[osiris-devel] bind on windows

Brian Wotring brian at shmoo.com
Fri Sep 24 10:58:05 EDT 2004


While developing a port monitoring module for Osiris I discovered 
something troubling, hopefully someone knows more about this than I do.

On Windows (including XP SP2), if one does something like:

   sin_addr.s_addr = inet_addr( "127.0.0.1" );
   bind(...);

It binds to the local address correctly, but winsock always reports the 
local address for this as 0.0.0.0, as if INADDR_ANY was specified, as if 
it was accepting connections on any interface.  This seems really broken.

Anyone know of any ways to determine programatically which TCP listens 
are actually locally bound, and which are not?



More information about the osiris-devel mailing list