return this->if_name;
}
+METHOD(tun_device_t, get_fd, int,
+ private_tun_device_t *this)
+{
+ return this->tunfd;
+}
+
METHOD(tun_device_t, write_packet, bool,
private_tun_device_t *this, chunk_t packet)
{
.get_mtu = _get_mtu,
.set_mtu = _set_mtu,
.get_name = _get_name,
+ .get_fd = _get_fd,
.set_address = _set_address,
.up = _up,
.destroy = _destroy,
*/
char *(*get_name)(tun_device_t *this);
+ /**
+ * Get the underlying tun file descriptor.
+ *
+ * @return file descriptor of this tun device
+ */
+ int (*get_fd)(tun_device_t *this);
+
/**
* Destroy a tun_device_t
*/