summaryrefslogtreecommitdiff
path: root/openbsd-compat/port-tun.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2009-12-29 21:38:40 +0000
committerColin Watson <cjwatson@debian.org>2009-12-29 21:38:40 +0000
commit1b816ea846aca3ee89e7995373ace609e9518424 (patch)
treeb41cdc8495cae7fa9c2e0f98a5f2e71656b61f9a /openbsd-compat/port-tun.c
parentfa585019a79ebcb4e0202b1c33f87ff1c5c9ce1c (diff)
parent086ea76990b1e6287c24b6db74adffd4605eb3b0 (diff)
import openssh-4.6p1-gsskex-20070312.patch
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)