The patch below fixes a problem in gdomap which causes it to read an
incorrect list of interfaces under FreeBSD and other 4.4 BSD systems.
The bug is caused by the fact that SIOCGIFCONF returs a set of variable
length
data structures rather than a set of sixed length struct ifconf's.
The patch changes the code to step through the list by pointer uusing
a void* that ismoved on by the truelength of the structure. As a side
effect of
this wedo not know the number of interfaces we shall have in advance
and thus
the malloc for the space has been altered to always use MAX_IFACE.
The resulting list of interfaces is now correct and work in FreeBSD.
This
showed up an additional warning in that SIOCGIFBRDDR is being called on
loopback interfaces. The patch adds a flag to test for this and hence
not
make the call on loopback interfaces. This removes these warnings.