Index: uspace/app/pcapctl/main.c
===================================================================
--- uspace/app/pcapctl/main.c	(revision 192019fb0f0f9643b1e1e705d014b5fe3f29d1e9)
+++ uspace/app/pcapctl/main.c	(revision 6eab537d3c916127b5583625be8f310525b6a341)
@@ -40,11 +40,4 @@
 
 #define NAME "pcapctl"
-
-#define LOGGER(msg, ...) \
-     fprintf(stderr, \
-         "[PCAP %s:%d]: " msg "\n", \
-         __FILE__, __LINE__, \
-         ##__VA_ARGS__\
-     )
 
 pcapctl_sess_t sess;
Index: uspace/drv/nic/e1k/e1k.c
===================================================================
--- uspace/drv/nic/e1k/e1k.c	(revision 192019fb0f0f9643b1e1e705d014b5fe3f29d1e9)
+++ uspace/drv/nic/e1k/e1k.c	(revision 6eab537d3c916127b5583625be8f310525b6a341)
@@ -49,8 +49,7 @@
 #include <nic.h>
 #include <ops/nic.h>
+#include <pcapdump_iface.h>
 #include "e1k.h"
 
-#include "pcapdump_iface.h"
-#include "pcap_iface.h"
 #define NAME  "e1k"
 
@@ -1192,5 +1191,4 @@
 		if (frame != NULL) {
 			memcpy(frame->data, e1000->rx_frame_virt[next_tail], frame_size);
-			pcapdump_packet(nic_get_pcap_iface(nic), frame->data, frame->size);
 
 			nic_received_frame(nic, frame);
@@ -2208,12 +2206,9 @@
 		goto err_add_to_cat;
 
-	errno_t pcap_rc  = pcapdump_init(nic_get_pcap_iface(nic));
-
-	if (pcap_rc != EOK) {
-		printf("Failed creating pcapdump port\n");
-	}
 	rc = ddf_fun_add_to_category(fun, "pcap");
-	if (rc != EOK)
+	if (rc != EOK) {
+		ddf_msg(LVL_ERROR, "Failed adding function to category pcap");
 		goto err_add_to_cat;
+	}
 
 	return EOK;
@@ -2380,5 +2375,4 @@
 
 	memcpy(e1000->tx_frame_virt[tdt], data, size);
-	pcapdump_packet(nic_get_pcap_iface(nic), data, size);
 	tx_descriptor_addr->phys_addr = PTR_TO_U64(e1000->tx_frame_phys[tdt]);
 	tx_descriptor_addr->length = size;
Index: uspace/drv/nic/virtio-net/virtio-net.c
===================================================================
--- uspace/drv/nic/virtio-net/virtio-net.c	(revision 192019fb0f0f9643b1e1e705d014b5fe3f29d1e9)
+++ uspace/drv/nic/virtio-net/virtio-net.c	(revision 6eab537d3c916127b5583625be8f310525b6a341)
@@ -43,6 +43,6 @@
 
 #include <virtio-pci.h>
-#include "pcapdump_iface.h"
-#include "pcap_iface.h"
+#include <pcapdump_iface.h>
+
 #define NAME	"virtio-net"
 
@@ -93,5 +93,4 @@
 		if (frame) {
 			memcpy(frame->data, &hdr[1], len - sizeof(*hdr));
-			pcapdump_packet(nic_get_pcap_iface(nic), frame->data, frame->size);
 			nic_received_frame(nic, frame);
 		} else {
@@ -353,5 +352,5 @@
 	/* Copy packet data into the buffer just past the header */
 	memcpy(&hdr[1], data, size);
-	pcapdump_packet(nic_get_pcap_iface(nic), data, size);
+
 	/*
 	 * Set the descriptor, put it into the virtqueue and notify the device
@@ -433,12 +432,9 @@
 	    ddf_dev_get_name(dev));
 
-	errno_t pcap_rc  = pcapdump_init(nic_get_pcap_iface(nic));
-
-	if (pcap_rc != EOK) {
-		printf("Failed creating pcapdump port\n");
-	}
 	rc = ddf_fun_add_to_category(fun, "pcap");
-	if (rc != EOK)
+	if (rc != EOK) {
+		ddf_msg(LVL_ERROR, "Failed adding function to category pcap");
 		goto unbind;
+	}
 
 	return EOK;
Index: uspace/lib/nic/include/nic.h
===================================================================
--- uspace/lib/nic/include/nic.h	(revision 192019fb0f0f9643b1e1e705d014b5fe3f29d1e9)
+++ uspace/lib/nic/include/nic.h	(revision 6eab537d3c916127b5583625be8f310525b6a341)
@@ -44,6 +44,5 @@
 #include <device/hw_res_parsed.h>
 #include <ops/nic.h>
-
-#include "pcap_iface.h"
+#include <pcap_iface.h>
 
 #define DEVICE_CATEGORY_NIC "nic"
Index: uspace/lib/nic/src/nic_driver.c
===================================================================
--- uspace/lib/nic/src/nic_driver.c	(revision 192019fb0f0f9643b1e1e705d014b5fe3f29d1e9)
+++ uspace/lib/nic/src/nic_driver.c	(revision 6eab537d3c916127b5583625be8f310525b6a341)
@@ -47,4 +47,5 @@
 #include <ops/nic.h>
 #include <errno.h>
+#include <pcapdump_iface.h>
 
 #include "nic_driver.h"
@@ -522,4 +523,5 @@
 	 * 		 calls it inside send_frame handler (with locked main lock)
 	 */
+	pcapdump_packet(nic_get_pcap_iface(nic_data), frame->data, frame->size);
 	fibril_rwlock_read_lock(&nic_data->rxc_lock);
 	nic_frame_type_t frame_type;
@@ -560,4 +562,5 @@
 		fibril_rwlock_write_unlock(&nic_data->stats_lock);
 	}
+	//pcapdump_packet(nic_get_pcap_iface(nic_data), frame->data, frame->size);
 	nic_release_frame(nic_data, frame);
 }
@@ -647,4 +650,9 @@
 
 	nic_data->dev = device;
+	errno_t pcap_rc  = pcapdump_init(nic_get_pcap_iface(nic_data));
+
+	if (pcap_rc != EOK) {
+		printf("Failed creating pcapdump port\n");
+	}
 
 	return nic_data;
Index: uspace/lib/nic/src/nic_impl.c
===================================================================
--- uspace/lib/nic/src/nic_impl.c	(revision 192019fb0f0f9643b1e1e705d014b5fe3f29d1e9)
+++ uspace/lib/nic/src/nic_impl.c	(revision 6eab537d3c916127b5583625be8f310525b6a341)
@@ -40,4 +40,5 @@
 #include <ipc/services.h>
 #include <ns.h>
+#include <pcapdump_iface.h>
 #include "nic_driver.h"
 #include "nic_ev.h"
@@ -179,5 +180,5 @@
 		return EBUSY;
 	}
-
+	pcapdump_packet(nic_get_pcap_iface(nic_data), data, size);
 	nic_data->send_frame(nic_data, data, size);
 	fibril_rwlock_read_unlock(&nic_data->main_lock);
Index: uspace/lib/pcap/include/pcap.h
===================================================================
--- uspace/lib/pcap/include/pcap.h	(revision 192019fb0f0f9643b1e1e705d014b5fe3f29d1e9)
+++ uspace/lib/pcap/include/pcap.h	(revision 6eab537d3c916127b5583625be8f310525b6a341)
@@ -64,5 +64,5 @@
 	uint32_t snaplen;
 	uint32_t additional; /** The LinkType and additional information field is in the form */
-} __attribute__((packed, aligned(4))) pcap_file_header_t;
+} pcap_file_header_t;
 
 typedef struct pcap_packet_header {
Index: uspace/lib/pcap/src/pcap.c
===================================================================
--- uspace/lib/pcap/src/pcap.c	(revision 192019fb0f0f9643b1e1e705d014b5fe3f29d1e9)
+++ uspace/lib/pcap/src/pcap.c	(revision 6eab537d3c916127b5583625be8f310525b6a341)
@@ -35,11 +35,4 @@
  * @brief Headers and functions for .pcap file and packets to be dumped
  */
-
-#define LOGGER(msg, ...) \
-     fprintf(stderr, \
-         "[PCAP %s:%d]: " msg "\n", \
-         __FILE__, __LINE__, \
-         ##__VA_ARGS__\
-     )
 
 #include "pcap.h"
@@ -108,5 +101,4 @@
 	if (writer->data == NULL) {
 		rc = EINVAL;
-		LOGGER("Failed to create %s: %s.", filename, str_error(rc));
 		return rc;
 	}
Index: uspace/lib/pcap/src/pcap_iface.c
===================================================================
--- uspace/lib/pcap/src/pcap_iface.c	(revision 192019fb0f0f9643b1e1e705d014b5fe3f29d1e9)
+++ uspace/lib/pcap/src/pcap_iface.c	(revision 6eab537d3c916127b5583625be8f310525b6a341)
@@ -82,5 +82,5 @@
 }
 
-void pcap_close_file()
+void pcap_close_file(void)
 {
 	pcap_writer.ops->close(&pcap_writer);
