Two minor changes to try and make it more robust in the face of many interfaces, until it's redone to use sysctl(). - bump the SIOCGIFCONF buffer size from 1K to 8K - if we didn't find a suitable address, return a failure.  Previously   if it didn't find anything it left the return address uninitialised.   Perhaps it would be better to return AF_INET/111/127.0.0.1 rather than   failing?
Two minor changes to try and make it more robust in the face of many
interfaces, until it's redone to use sysctl().
- bump the SIOCGIFCONF buffer size from 1K to 8K
- if we didn't find a suitable address, return a failure.  Previously
  if it didn't find anything it left the return address uninitialised.
  Perhaps it would be better to return AF_INET/111/127.0.0.1 rather than
  failing?

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase