ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/device-tincd.C
(Generate patch)

Comparing gvpe/src/device-tincd.C (file contents):
Revision 1.16 by pcg, Fri Mar 25 13:56:25 2005 UTC vs.
Revision 1.17 by pcg, Fri Mar 25 15:38:07 2005 UTC

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"
96const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME hw ether $MAC mtu $MTU up"; } 96const 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// 5.2.1' ifconfig _first_ sets the if up then changes mtu, which can be deadly due to ipv6 kicking in
101const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU && /sbin/ifconfig $IFNAME up"; } 100const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU"; }
102 101
103#elif IF_netbsd 102#elif IF_netbsd
104# define IF_istun 1 103# define IF_istun 1
105# include "tincd/netbsd/device.c" 104# include "tincd/netbsd/device.c"
106const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME mtu $MTU up"; } 105const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME mtu $MTU"; }
107 106
108#elif IF_openbsd 107#elif IF_openbsd
109# define IF_istun 1 108# define IF_istun 1
110# include "tincd/openbsd/device.c" 109# include "tincd/openbsd/device.c"
111const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME mtu $MTU up"; } 110const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME mtu $MTU"; }
112 111
113#elif IF_solaris 112#elif IF_solaris
114# define IF_istun 1 113# define IF_istun 1
115# include "tincd/solaris/device.c" 114# include "tincd/solaris/device.c"
116const char * tap_device::if_up () { return ""; } 115const char * tap_device::if_up () { return ""; }
124const char * tap_device::if_up () { return ""; } 123const char * tap_device::if_up () { return ""; }
125 124
126#elif IF_darwin 125#elif IF_darwin
127# define IF_istun 1 126# define IF_istun 1
128# include "tincd/darwin/device.c" 127# include "tincd/darwin/device.c"
129const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU up"; } 128const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU"; }
130 129
131#elif IF_raw_socket 130#elif IF_raw_socket
132# include "tincd/raw_socket/device.c" 131# include "tincd/raw_socket/device.c"
133const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU up"; } 132const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU"; }
134 133
135#elif IF_uml_socket 134#elif IF_uml_socket
136# include "tincd/uml_socket/device.c" 135# include "tincd/uml_socket/device.c"
137const char * tap_device::if_up () { return 0; } 136const char * tap_device::if_up () { return 0; }
138 137

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines