I use nlif_index2name() to get interfaces list in my programm. After uptime 44 days and many reconnections by vtund i can't get tun/tap interfaces numbers. For example output of iftest (example in nfnetlink library): root@banana:/tmp/tgz/libnfnetlink-1.0.0/utils# ./iftest index (1) is lo (RUNNING) index (2) is eth0 (RUNNING) index (3) is eth1 (RUNNING) index (4) is eth2 (NOT RUNNING) index (5) is eth3 (RUNNING) index (6) is teql0 (NOT RUNNING) index (7) is tunl0 (NOT RUNNING) index (8) is gre0 (NOT RUNNING) index (9) is eth0.11 (RUNNING) index (10) is eth0.14 (RUNNING) index (11) is eth0.15 (RUNNING) index (12) is eth0.2 (RUNNING) index (13) is eth0.5 (RUNNING) Output by ifconfig: eth0 Link encap:Ethernet HWaddr 00:22:15:39:a3:33 eth0:1 Link encap:Ethernet HWaddr 00:22:15:39:a3:33 eth0:2 Link encap:Ethernet HWaddr 00:22:15:39:a3:33 eth0:3 Link encap:Ethernet HWaddr 00:22:15:39:a3:33 eth1 Link encap:Ethernet HWaddr 00:22:15:39:a3:34 eth2 Link encap:Ethernet HWaddr 00:22:15:39:a3:35 eth3 Link encap:Ethernet HWaddr 00:22:15:39:a3:36 eth0.2 Link encap:Ethernet HWaddr 00:22:15:39:a3:33 eth0.5 Link encap:Ethernet HWaddr 00:22:15:39:a3:33 eth0.11 Link encap:Ethernet HWaddr 00:22:15:39:a3:33 eth0.14 Link encap:Ethernet HWaddr 00:22:15:39:a3:33 eth0.14:1 Link encap:Ethernet HWaddr 00:22:15:39:a3:33 eth0.15 Link encap:Ethernet HWaddr 00:22:15:39:a3:33 lo Link encap:Local Loopback tun1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 tun2 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 In iftest.c we have: for (i=0; i<64; i++) { char name[IFNAMSIZ]; unsigned int flags; if (nlif_index2name(h, i, name) == -1) continue; if (nlif_get_ifflags(h, i, &flags) == -1) continue; printf("index (%d) is %s (%s)\n", i, name, flags & IFF_RUNNING ? "RUNNING" : "NOT RUNNING"); } Only 64 interfaces numbers checked. It mean that tun ifaces have number greater than 64. I think libnfnetlink need better way to get list of interfaces, better than stupid checking random number by nlif_index2name. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Kuzin Andrey - kuzinandrey@xxxxxxxxx =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html