> First, since we have loopback devices sorted to the end, we don't have
> to loop; we can just return the first one unless it is_loopback.
> 
> Second, we should probably call pcap_freealldevs here.

...or perhaps have a static routine that finds all interface addresses,
calling a supplied callback routine for each address, and have
"pcap_findalldevs()" and "pcap_lookupdev()" call that routine, with
different callbacks.

That might let us avoid allocating anything in "pcap_lookupdev()", and
also avoid (at least on platforms lacking "getifaddrs()") bothering to
spend CPU cycles getting addresses that aren't supplied by SIOCGIFCONF.
-
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