new interfaces code - testers needed on lots of OSes

tridge at tridge at
Mon Aug 30 13:29:52 GMT 1999

I need some testers for a new set of interface probing routines. These
routines work out what interfaces exist on a box so you don't need an
interfaces= line in smb.conf. 

The reason I'm bothering with this is that I saw several sites
recently that had a nasty problem with Samba servers on dhcp driven
networks, where no interfaces line is valid. That made me rethink the
whole interfaces= method. What I'm hoping to do is:

1) if you use a interfaces= line then you can either give IP/mask as
   you do now or instead give a bcast/mask and Samba will work out the
   IP from the interfaces list

2) you can give interfaces by name (eg "eth0"). You can also use
   wildcards like "eth*"

3) a HUP to nmbd will re-scan the interfaces list and re-start if it
   has changed

4) if no interfaces line is given and gethostname() returns a host
   whos address is then use the first interface that is
   broadcast capable and is not loopback.

to support this we need a reliable method of getting the complete list
of interfaces including their names, IP addresses and netmasks. I've
written that code (based on lib/netmask.c) and have it working on
Linux, SunOS4, SunOS5, IRIX 6.4 and AIX 4.2. Now I need it tested on
lots more OSes to see if it is sufficiently portable.

The code is at

to test it try the following 3 compile methods in turn:

cc -o interfaces interfaces.c -DAUTOCONF -DHAVE_IFACE_IFCONF
cc -o interfaces interfaces.c -DAUTOCONF -DHAVE_IFACE_IFREQ
cc -o interfaces interfaces.c -DAUTOCONF -DHAVE_IFACE_AIX

then test each by running the binary and seeing if it correctly lists
the available interfaces. Note that you do not need to do this as

I expect to get something like:

got 3 interfaces

if you get something that differs signifcantly from the output of
"netstat -in" then please let me know what OS you are running or send
me a patch to fix the interfaces.c code.


More information about the samba-technical mailing list