Lines Matching refs:tundev

90 char tundev[1024] = { "" };  variable
232 ssystem("ifconfig %s down", tundev); in serial_to_tun()
234 ssystem("ifconfig %s hw ether %s", tundev, &macs[6]); in serial_to_tun()
236 ssystem("ifconfig %s up", tundev); in serial_to_tun()
277 tundev, inbufptr); in serial_to_tun()
280 printf("%s: 0000", tundev); in serial_to_tun()
293 if((i & 15) == 15) printf("\n%s: ", tundev); in serial_to_tun()
299 if((i & 15) == 15) printf("\n%s: ", tundev); in serial_to_tun()
378 static void flush_neighbors(const char *tundev) in flush_neighbors() argument
380 ssystem("ip neigh flush dev %s", tundev); in flush_neighbors()
490 flush_neighbors(tundev); in get_slipfd()
564 printf("%s: Packet from TUN of length %d - write SLIP\n", tundev, len); in write_to_serial()
567 printf("%s: 0000", tundev); in write_to_serial()
574 if((i & 15) == 15) printf("\n%s: ", tundev); in write_to_serial()
769 ssystem("ifconfig %s down", tundev); in cleanup()
778 tundev); in cleanup()
785 ssystem("ifconfig %s inet6 %s remove", tundev, ipaddr); in cleanup()
787 ssystem("ifconfig %s down", tundev); in cleanup()
824 ifconf(const char *tundev, const char *ipaddr, int tap) in ifconf() argument
835 ssystem("ifconfig %s inet `hostname` up", tundev); in ifconf()
836 ssystem("ifconfig %s add %s", tundev, ipaddr); in ifconf()
838 ssystem("ifconfig %s up", tundev); in ifconf()
839 ssystem("ip -6 route add 2001:db8::/64 dev %s", tundev); in ifconf()
840 ssystem("ip -6 addr add 2001:db8::2/64 dev %s", tundev); in ifconf()
841 ssystem("ip route add 192.0.2.0/24 dev %s", tundev); in ifconf()
842 ssystem("ip addr add 192.0.2.2/24 dev %s", tundev); in ifconf()
849 ssystem("ifconfig %s add fe80::1/64", tundev); in ifconf()
889 ssystem("ifconfig %s add %s/64", tundev, lladdr); in ifconf()
903 ssystem("ifconfig %s inet6 up", tundev ); in ifconf()
905 ssystem("ifconfig %s inet6 %s add", tundev, ipaddr ); in ifconf()
912 ssystem("ifconfig %s inet `hostname` %s up", tundev, ipaddr); in ifconf()
918 ssystem("ifconfig %s\n", tundev); in ifconf()
968 strncpy(tundev, optarg + 5, sizeof(tundev)); in main()
970 strncpy(tundev, optarg, sizeof(tundev)); in main()
1077 if(*tundev == '\0') { in main()
1080 strcpy(tundev, "tap0"); in main()
1082 strcpy(tundev, "tun0"); in main()
1088 tunfd = tun_alloc(tundev, tap, make); in main()
1092 tap ? "tap" : "tun", tundev); in main()
1099 ifconf(tundev, ipaddr, tap); in main()