+ ifdebug(TRAFFIC) logger(LOG_ERR, "Unknown IP version %d while reading packet from %s %s", packet->data[14] >> 4, device_info, device);
+ return false;
+ }
+
+ memset(packet->data, 0, 12);
+ packet->len = sbuf.len + 14;
+ break;
+
+ case DEVICE_TYPE_TAP:
+ sbuf.maxlen = MTU;
+ sbuf.buf = (char *)packet->data;
+
+ if((result = getmsg(device_fd, NULL, &sbuf, &f)) < 0) {
+ logger(LOG_ERR, "Error while reading from %s %s: %s", device_info, device, strerror(errno));
+ return false;
+ }
+
+ packet->len = sbuf.len;
+ break;
+
+ default:
+ abort();