summaryrefslogtreecommitdiff
path: root/openbsd-compat/port-tun.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat/port-tun.c')
-rw-r--r--openbsd-compat/port-tun.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/openbsd-compat/port-tun.c b/openbsd-compat/port-tun.c
index 31921615f..276474db8 100644
--- a/openbsd-compat/port-tun.c
+++ b/openbsd-compat/port-tun.c
@@ -16,9 +16,23 @@
16 16
17#include "includes.h" 17#include "includes.h"
18 18
19#include <sys/types.h>
20#include <sys/ioctl.h>
21
22#include <netinet/in.h>
23#include <arpa/inet.h>
24#include <netinet/ip.h>
25
26#include <errno.h>
27#include <fcntl.h>
28#include <stdarg.h>
29#include <string.h>
30#include <unistd.h>
31
19#include "log.h" 32#include "log.h"
20#include "misc.h" 33#include "misc.h"
21#include "bufaux.h" 34#include "buffer.h"
35#include "channels.h"
22 36
23/* 37/*
24 * This is the portable version of the SSH tunnel forwarding, it 38 * This is the portable version of the SSH tunnel forwarding, it
@@ -26,6 +40,7 @@
26 * settings. 40 * settings.
27 * 41 *
28 * SSH_TUN_LINUX Use the (newer) Linux tun/tap device 42 * SSH_TUN_LINUX Use the (newer) Linux tun/tap device
43 * SSH_TUN_FREEBSD Use the FreeBSD tun/tap device
29 * SSH_TUN_COMPAT_AF Translate the OpenBSD address family 44 * SSH_TUN_COMPAT_AF Translate the OpenBSD address family
30 * SSH_TUN_PREPEND_AF Prepend/remove the address family 45 * SSH_TUN_PREPEND_AF Prepend/remove the address family
31 */ 46 */
@@ -93,7 +108,10 @@ sys_tun_open(int tun, int mode)
93#ifdef SSH_TUN_FREEBSD 108#ifdef SSH_TUN_FREEBSD
94#include <sys/socket.h> 109#include <sys/socket.h>
95#include <net/if.h> 110#include <net/if.h>
111
112#ifdef HAVE_NET_IF_TUN_H
96#include <net/if_tun.h> 113#include <net/if_tun.h>
114#endif
97 115
98int 116int
99sys_tun_open(int tun, int mode) 117sys_tun_open(int tun, int mode)