Ethereal-dev: [ethereal-dev] SIOCGIFCONF

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Uwe Girlich <Uwe.Girlich@xxxxxxxxxxx>
Date: Wed, 30 Aug 2000 12:03:20 +0200
Hello!

Why do we ourself look for the network interfaces in util.c?
Why don't we use the libpcap-function (which is used in the Windows code)
pcap_lookupdev()?

Another problem is the method of looking for the interfaces: the buffer is
good for 1024 network cards, which is too big on Reliant UNIX 5.43 systems
(ioctl calls an internal ioctl(I_STR), which gives an EINVAL (buffer too big)).

* libpcap 0.4 uses a similar method (only 16 buffers)
* libpcap 0.5 starts with a small buffer and doubles it, if it is not big
  enough
* Richard Stevens (UNIX Network Programming, Networking APIs: Sockets and XTI,
  page 434) increments by 10 more buffers in every round

All these methods do work on Reliant UNIX. 

Which is the preferred method?

Bye, Uwe