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.15 by pcg, Wed Mar 23 21:55:39 2005 UTC vs.
Revision 1.18 by pcg, Fri Mar 25 16:05:22 2005 UTC

78{ 78{
79 if (!strcmp (key, "Interface")) 79 if (!strcmp (key, "Interface"))
80 *res = conf.ifname; 80 *res = conf.ifname;
81 else if (!strcmp (key, "Device")) 81 else if (!strcmp (key, "Device"))
82 *res = 0; 82 *res = 0;
83 else if (!strcmp (key, "DeviceType"))
84 *res = "tap";
83 else 85 else
84 { 86 {
85 slog (L_ERR, _("tincd layer asking for unknown config '%s'"), key); 87 slog (L_ERR, _("tincd layer asking for unknown config '%s'"), key);
86 *res = 0; 88 *res = 0;
87 } 89 }
91 93
92#define netname conf.ifname 94#define netname conf.ifname
93 95
94#if IF_linux 96#if IF_linux
95# include "tincd/linux/device.c" 97# include "tincd/linux/device.c"
96const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME hw ether $MAC mtu $MTU up"; } 98const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME hw ether $MAC mtu $MTU"; }
99
100#elif IF_bsd
101# include "tincd/bsd/device.c"
102const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU"; }
97 103
98#elif IF_freebsd 104#elif IF_freebsd
99# include "tincd/freebsd/device.c" 105# include "tincd/freebsd/device.c"
100const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU up"; } 106const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU"; }
101 107
102#elif IF_netbsd 108#elif IF_netbsd
103# define IF_istun 1 109# define IF_istun 1
104# include "tincd/netbsd/device.c" 110# include "tincd/netbsd/device.c"
105const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME mtu $MTU up"; } 111const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME mtu $MTU"; }
106 112
107#elif IF_openbsd 113#elif IF_openbsd
108# define IF_istun 1 114# define IF_istun 1
109# include "tincd/openbsd/device.c" 115# include "tincd/openbsd/device.c"
110const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME mtu $MTU up"; } 116const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME mtu $MTU"; }
111 117
112#elif IF_solaris 118#elif IF_solaris
113# define IF_istun 1 119# define IF_istun 1
114# include "tincd/solaris/device.c" 120# include "tincd/solaris/device.c"
115const char * tap_device::if_up () { return ""; } 121const char * tap_device::if_up () { return ""; }
123const char * tap_device::if_up () { return ""; } 129const char * tap_device::if_up () { return ""; }
124 130
125#elif IF_darwin 131#elif IF_darwin
126# define IF_istun 1 132# define IF_istun 1
127# include "tincd/darwin/device.c" 133# include "tincd/darwin/device.c"
128const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU up"; } 134const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU"; }
129 135
130#elif IF_raw_socket 136#elif IF_raw_socket
131# include "tincd/raw_socket/device.c" 137# include "tincd/raw_socket/device.c"
132const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU up"; } 138const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU"; }
133 139
134#elif IF_uml_socket 140#elif IF_uml_socket
135# include "tincd/uml_socket/device.c" 141# include "tincd/uml_socket/device.c"
136const char * tap_device::if_up () { return 0; } 142const char * tap_device::if_up () { return 0; }
137 143

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines