Another problem with returning non-up interfaces is that you may get
errors when trying to get addresses on them:

        % ./iflist
        iflist in free(): warning: modified (chunk-) pointer.
        Error in pcap_findalldevs: SIOCGIFNETMASK: lp0: Can't assign requested
            address

        % ifconfig -a
        fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
                inet XXX.XXX.XXX.XXX netmask 0xXXXXXXXX broadcast XXX.XXX.XXX.XX
                inet YYY.YYY.YYY.YYY netmask 0xYYYYYYYY broadcast YYY.YYY.YYY.YYY
                ether ZZ:ZZ:ZZ:ZZ:ZZ:ZZ
                media: autoselect (10baseT/UTP) status: active
                supported media: autoselect 100baseTX <full-duplex> 100baseTX 
10baseT/UTP <full-duplex> 10baseT/UTP
        lp0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500
        tun0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
        sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552
        ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
        lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
                inet 127.0.0.1 netmask 0xff000000 
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe

Reply via email to