… | |
… | |
91 | |
91 | |
92 | #define netname conf.ifname |
92 | #define netname conf.ifname |
93 | |
93 | |
94 | #if IF_linux |
94 | #if IF_linux |
95 | # include "tincd/linux/device.c" |
95 | # include "tincd/linux/device.c" |
96 | const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME hw ether $MAC mtu $MTU up"; } |
96 | const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME hw ether $MAC mtu $MTU"; } |
97 | |
97 | |
98 | #elif IF_freebsd |
98 | #elif IF_freebsd |
99 | # include "tincd/freebsd/device.c" |
99 | # include "tincd/freebsd/device.c" |
100 | const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU up"; } |
100 | const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU"; } |
101 | |
101 | |
102 | #elif IF_netbsd |
102 | #elif IF_netbsd |
103 | # define IF_istun 1 |
103 | # define IF_istun 1 |
104 | # include "tincd/netbsd/device.c" |
104 | # include "tincd/netbsd/device.c" |
105 | const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME mtu $MTU up"; } |
105 | const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME mtu $MTU"; } |
106 | |
106 | |
107 | #elif IF_openbsd |
107 | #elif IF_openbsd |
108 | # define IF_istun 1 |
108 | # define IF_istun 1 |
109 | # include "tincd/openbsd/device.c" |
109 | # include "tincd/openbsd/device.c" |
110 | const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME mtu $MTU up"; } |
110 | const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME mtu $MTU"; } |
111 | |
111 | |
112 | #elif IF_solaris |
112 | #elif IF_solaris |
113 | # define IF_istun 1 |
113 | # define IF_istun 1 |
114 | # include "tincd/solaris/device.c" |
114 | # include "tincd/solaris/device.c" |
115 | const char * tap_device::if_up () { return ""; } |
115 | const char * tap_device::if_up () { return ""; } |
… | |
… | |
123 | const char * tap_device::if_up () { return ""; } |
123 | const char * tap_device::if_up () { return ""; } |
124 | |
124 | |
125 | #elif IF_darwin |
125 | #elif IF_darwin |
126 | # define IF_istun 1 |
126 | # define IF_istun 1 |
127 | # include "tincd/darwin/device.c" |
127 | # include "tincd/darwin/device.c" |
128 | const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU up"; } |
128 | const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU"; } |
129 | |
129 | |
130 | #elif IF_raw_socket |
130 | #elif IF_raw_socket |
131 | # include "tincd/raw_socket/device.c" |
131 | # include "tincd/raw_socket/device.c" |
132 | const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU up"; } |
132 | const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU"; } |
133 | |
133 | |
134 | #elif IF_uml_socket |
134 | #elif IF_uml_socket |
135 | # include "tincd/uml_socket/device.c" |
135 | # include "tincd/uml_socket/device.c" |
136 | const char * tap_device::if_up () { return 0; } |
136 | const char * tap_device::if_up () { return 0; } |
137 | |
137 | |