… | |
… | |
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" |
96 | const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME hw ether $MAC mtu $MTU"; } |
98 | const 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" |
|
|
102 | const 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" |
100 | const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU"; } |
106 | const char * tap_device::if_up () { return "/sbin/ifconfig $IFNAME ether $MAC mtu $MTU"; } |
101 | |
107 | |