net_tun.h revision 612c05bd
1/*
2 * Copyright 2008-2019, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT license.
4 */
5#ifndef NET_TUN_H
6#define NET_TUN_H
7
8
9#include <sys/socket.h>
10#include <net_device.h>
11
12
13// name of the kernel tun interface
14#define NET_TUN_MODULE_NAME "network/devices/tun/v1"
15
16
17struct tun_device : net_device {
18	//queue
19	/*
20	int		fd;
21	uint32	frame_size;*/
22};
23
24
25
26struct tun_module_info {
27	struct net_device_module_info;
28
29	status_t	(*tun_read)(net_device* device, net_buffer* buffer);
30	status_t	(*tun_write)(net_device* device, net_buffer** _buffer);
31};
32
33#endif	// NET_TUN_H
34