3 #include <sys/socket.h>
5 #include <linux/if_tun.h>
11 printf("Allocating tap device via VSYS\n");
13 char if_name[IFNAMSIZ];
15 int tun_fd = tun_alloc(IFF_TAP, if_name);
17 printf("Allocated tap device: %s fd=%d\n", if_name, tun_fd);
19 printf("Sleeping for 120 secs...\n");