I want to test the flags being returned by the IOCTL call to the socket. I've written a minimal C program to do that. You can either compile the attached source or, if you'd prefer, I can provide a binary. Try it on all your network interfaces.
gcc -o socket-flags socket-flags.c for dev in /sys/class/net/*; do ./socket-flags ${dev##*/}; done eth0 SIOCGIFFLAGS 0x1043 ( IFF_UP (0x1) IFF_BROADCAST (0x2) IFF_RUNNING (0x40) IFF_MULTICAST (0x1000)) lo SIOCGIFFLAGS 0x49 ( IFF_UP (0x1) IFF_LOOPBACK (0x8) IFF_RUNNING (0x40)) pan0 SIOCGIFFLAGS 0x1002 ( IFF_BROADCAST (0x2) IFF_MULTICAST (0x1000)) tun0 SIOCGIFFLAGS 0x10d1 ( IFF_UP (0x1) IFF_POINTTOPOINT (0x10) IFF_RUNNING (0x40) IFF_NOARP (0x80) IFF_MULTICAST (0x1000)) wlan0 SIOCGIFFLAGS 0x1043 ( IFF_UP (0x1) IFF_BROADCAST (0x2) IFF_RUNNING (0x40) IFF_MULTICAST (0x1000)) wmaster0 SIOCGIFFLAGS 0x1043 ( IFF_UP (0x1) IFF_BROADCAST (0x2) IFF_RUNNING (0x40) IFF_MULTICAST (0x1000)) What we are looking for is the IFF_RUNNING flag defined in /usr/include/net/if.h: IFF_RUNNING = 0x40, /* Resources allocated. */ ** Attachment added: "socket-flags.c source-code" http://launchpadlibrarian.net/23953477/socket-flags.c -- netspeed applet will not measure wired https://bugs.launchpad.net/bugs/335507 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs