+ ifdebug(TRAFFIC) logger(LOG_ERR,
+ "Unknown address family %x while writing packet to %s %s",
+ af, device_info, device);
+ return false;
+ }
+
+ memcpy(packet->data + 10, &type, sizeof(type));
+
+ if(write(device_fd, packet->data + 10, packet->len - 10) < 0) {
+ logger(LOG_ERR, "Can't write to %s %s: %s", device_info, device,
+ strerror(errno));
+ return false;
+ }
+
+ break;
+ }
+
+ case DEVICE_TYPE_TAP:
+ if(write(device_fd, packet->data, packet->len) < 0) {
+ logger(LOG_ERR, "Error while writing to %s %s: %s", device_info,
+ device, strerror(errno));