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.17 by pcg, Fri Mar 25 15:38:07 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 }
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"; } 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"; } 106const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU"; }
101 107

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines