[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libnet
Subject:    Re: Possible bug?
From:       "Mike D. Schiffman" <route () RESENTMENT ! INFONEXUS ! COM>
Date:       2000-01-29 4:49:01
[Download RAW message or body]


{Simple Nomad}
> Is it me or shouldn't libnet_get_ipaddr return the unsigned long in net
> order? I have to htonl the returned results. Using 1.0 btw.

    Ah.  Yes.  That.  It depends on what you want to believe.  The
    documentation or the code.  The manpage sayez NBO, the code has it plainly:

        return (ntohl(sin->sin_addr.s_addr));

    So...  Who's right?  I dunno.  I fucked up.  I think it's definitely
    more intuitive to have the function return a big endian value.  So mote
    it be.  Although it will muck things up a bit, we're going for CORRECTNESS
    here.  Next maintenence release of 1.0 will have the switch.

    Thankz SN for bringing this up.

--
It is that which none in the whole army are more intimate relations to be
maintained than with spies.  None should be more liberally rewarded.  In no
other business should greater secrecy be preserved.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic