Searched defs:tun (Results 1 - 10 of 10) sorted by relevance

/external/openssh/openbsd-compat/
H A Dport-tun.c43 * SSH_TUN_LINUX Use the (newer) Linux tun/tap device
44 * SSH_TUN_FREEBSD Use the FreeBSD tun/tap device
58 sys_tun_open(int tun, int mode) argument
64 if ((fd = open("/dev/net/tun", O_RDWR)) == -1) {
77 name = "tun%d";
81 if (tun != SSH_TUNID_ANY) {
82 if (tun > SSH_TUNID_MAX) {
84 tun, strerror(errno));
87 snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), name, tun);
96 if (tun
118 sys_tun_open(int tun, int mode) argument
[all...]
/external/ipsec-tools/
H A Dmain.c108 int tun = open("/dev/tun", 0); local
118 if (ioctl(tun, TUNSETIFF, &ifr)) {
/external/openssh/
H A Dauth-options.c359 char *tun = NULL; local
361 tun = xmalloc(strlen(opts) + 1);
366 tun[i++] = *opts++;
373 xfree(tun);
377 tun[i] = '\0';
378 forced_tun_device = a2tun(tun, NULL);
379 xfree(tun);
381 debug("%.100s, line %lu: invalid tun device",
383 auth_debug_add("%.100s, line %lu: invalid tun device",
388 auth_debug_add("Forced tun devic
[all...]
H A Dmisc.c250 int tun; local
261 tun = a2tun(sp, NULL);
263 return (*remote == SSH_TUNID_ERR ? *remote : tun);
269 tun = strtonum(s, 0, SSH_TUNID_MAX, &errstr);
273 return (tun);
647 tun_open(int tun, int mode) argument
650 return (sys_tun_open(tun, mode));
657 if (tun <= SSH_TUNID_MAX) {
658 snprintf(name, sizeof(name), "/dev/tun%d", tun);
[all...]
H A Dserverloop.c974 int mode, tun; local
992 tun = packet_get_int();
994 if (tun != SSH_TUNID_ANY && forced_tun_device != tun)
996 tun = forced_tun_device;
998 sock = tun_open(tun, mode);
1001 c = channel_new("tun", SSH_CHANNEL_OPEN, sock, sock, -1,
1002 CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 0, "tun", 1);
1067 } else if (strcmp(ctype, "tun@openssh.com") == 0) {
/external/libppp/src/
H A Dip.c79 #include "tun.h"
910 struct tun_data tun; local
915 if (nb > sizeof tun.data) {
917 l->name, nb, (int)(sizeof tun.data));
921 mbuf_Read(bp, tun.data, nb);
924 if (PacketCheck(bundle, af, tun.data, nb, &bundle->filter.in,
929 if (!FilterCheck(tun.data, af, &bundle->filter.alive, &alivesecs)) {
936 tun.header.family = htonl(af);
937 nb += sizeof tun - sizeof tun
[all...]
H A Dbundle.c90 #include "tun.h"
311 * If it's an LCP and we're in multilink mode, adjust our tun
552 struct tun_data tun; local
558 data = (u_char *)&tun;
559 sz = sizeof tun;
561 data = tun.data;
562 sz = sizeof tun.data;
565 /* something to read from tun */
574 n -= sz - sizeof tun.data;
580 af = ntohl(tun
[all...]
/external/wpa_supplicant_8/hostapd/src/radius/
H A Dradius.c1339 struct radius_tunnel_attrs tunnel[RADIUS_TUNNEL_TAGS], *tun; local
1357 tun = &tunnel[0];
1359 tun = &tunnel[data[0]];
1365 tun->tag_used++;
1366 tun->type = WPA_GET_BE24(data + 1);
1371 tun->tag_used++;
1372 tun->medium_type = WPA_GET_BE24(data + 1);
1383 tun->tag_used++;
1384 tun->vlanid = atoi(buf);
1390 tun
[all...]
/external/wpa_supplicant_8/src/radius/
H A Dradius.c1339 struct radius_tunnel_attrs tunnel[RADIUS_TUNNEL_TAGS], *tun; local
1357 tun = &tunnel[0];
1359 tun = &tunnel[data[0]];
1365 tun->tag_used++;
1366 tun->type = WPA_GET_BE24(data + 1);
1371 tun->tag_used++;
1372 tun->medium_type = WPA_GET_BE24(data + 1);
1383 tun->tag_used++;
1384 tun->vlanid = atoi(buf);
1390 tun
[all...]
/external/wpa_supplicant_8/wpa_supplicant/src/radius/
H A Dradius.c1339 struct radius_tunnel_attrs tunnel[RADIUS_TUNNEL_TAGS], *tun; local
1357 tun = &tunnel[0];
1359 tun = &tunnel[data[0]];
1365 tun->tag_used++;
1366 tun->type = WPA_GET_BE24(data + 1);
1371 tun->tag_used++;
1372 tun->medium_type = WPA_GET_BE24(data + 1);
1383 tun->tag_used++;
1384 tun->vlanid = atoi(buf);
1390 tun
[all...]

Completed in 212 milliseconds