- if((lenin = read(device_fd, packet->data + 14, MTU - 14)) <= 0) {
- logger(LOG_ERR, _("Error while reading from %s %s: %s"), device_info,
+#ifdef HAVE_TUNEMU
+ case DEVICE_TYPE_TUNEMU:
+ if(device_type == DEVICE_TYPE_TUNEMU)
+ lenin = tunemu_read(device_fd, packet->data + 14, MTU - 14);
+ else
+#else
+ lenin = read(device_fd, packet->data + 14, MTU - 14);
+#endif
+
+ if(lenin <= 0) {
+ logger(LOG_ERR, "Error while reading from %s %s: %s", device_info,