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.14 by pcg, Wed Mar 23 17:03:58 2005 UTC vs.
Revision 1.16 by pcg, Fri Mar 25 13:56:25 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"; }
96 97
97#elif IF_freebsd 98#elif IF_freebsd
98# 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"; }
99 102
100#elif IF_netbsd 103#elif IF_netbsd
101# define IF_istun 1 104# define IF_istun 1
102# include "tincd/netbsd/device.c" 105# include "tincd/netbsd/device.c"
106const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME mtu $MTU up"; }
103 107
104#elif IF_openbsd 108#elif IF_openbsd
105# define IF_istun 1 109# define IF_istun 1
106# include "tincd/openbsd/device.c" 110# include "tincd/openbsd/device.c"
111const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME mtu $MTU up"; }
107 112
108#elif IF_solaris 113#elif IF_solaris
109# define IF_istun 1 114# define IF_istun 1
110# include "tincd/solaris/device.c" 115# include "tincd/solaris/device.c"
116const char * tap_device::if_up () { return ""; }
111 117
112#elif IF_cygwin 118#elif IF_cygwin
113# include "tincd/cygwin/device.c" 119# include "tincd/cygwin/device.c"
120const char * tap_device::if_up () { return ""; }
114 121
115#elif IF_mingw 122#elif IF_mingw
116# include "tincd/mingw/device.c" 123# include "tincd/mingw/device.c"
124const char * tap_device::if_up () { return ""; }
117 125
118#elif IF_darwin 126#elif IF_darwin
119# define IF_istun 1 127# define IF_istun 1
120# include "tincd/darwin/device.c" 128# include "tincd/darwin/device.c"
129const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU up"; }
121 130
122#elif IF_raw_socket 131#elif IF_raw_socket
123# define IF_istun 1
124# include "tincd/raw_socket/device.c" 132# include "tincd/raw_socket/device.c"
133const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU up"; }
125 134
126#elif IF_uml_socket 135#elif IF_uml_socket
127# include "tincd/uml_socket/device.c" 136# include "tincd/uml_socket/device.c"
137const char * tap_device::if_up () { return 0; }
128 138
129#else 139#else
130# error No interface implementation for your IFTYPE/IFSUBTYPE combination. 140# error No interface implementation for your IFTYPE/IFSUBTYPE combination.
131#endif 141#endif
132 142

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines