[gnet] gnet_inetaddr_list_interfaces() inconsistency



Hi,

from gnet-1.1.7, inetaddr.c:

 *  gnet_inetaddr_list_interfaces:
 *
 *  Get a list of #GInetAddr interfaces's on this host.  This list
 *  includes all "up" Internet interfaces and the loopback interface,
 *  if it exists.

however, in gnet_inetaddr_list_interfaces() it reads:

      /* Ignore entries that aren't up or loopback.  Someday we'll
	 write an interface structure and include this stuff. */
      if (!(ifr->ifr_flags & IFF_UP) ||
	  (ifr->ifr_flags & IFF_LOOPBACK))
	continue;

... and thus doesn't list my 127.0.0.1 loopback interface in spite of what it 
says in the documentation/description.

Did I misunderstand something here?

If not, I'd suggest changing one or the other. I tend to say the function 
should list loopback interfaces as well, but I'm not sure how much sense this 
makes if we have IMQ interfaces or something similar.

Just thought I'd mention it.

Cheers
-Tim





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]