Home | History | Annotate | Download | only in linux

Lines Matching defs:interface

43 // # Create a TUN interface.
46 // # Set the addresses and bring up the interface.
54 // its own TUN interface. A short shell script will be sufficient. Since this
63 int interface = open("/dev/net/tun", O_RDWR | O_NONBLOCK);
70 if (ioctl(interface, TUNSETIFF, &ifr)) {
71 perror("Cannot get TUN interface");
75 return interface;
174 "Note that TUN interface needs to be configured properly\n"
184 // Get TUN interface.
185 int interface = get_interface(argv[1]);
220 int length = read(interface, packet, sizeof(packet));
243 write(interface, packet, length);