It stores them in network byte order (big endian).  If you're on a little 
endian machine (e.g., x86), these look backwards if you try to work with them 
as an integer.

-- Murphy

On Aug 10, 2011, at 4:32 PM, Masoud Moshref Javadi wrote:

> when I write:
>    v=convert_to_ipaddr("0.1.0.0")
>    logger.debug("v is "+str(v))
> the output is 256 and when I write
>    v=convert_to_ipaddr("0.0.0.1")
>    logger.debug("v is "+str(v))
> it is 16777216. It seems that it reverse the IP position of 4 numbers in IP. 
> Why is it like this?

_______________________________________________
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev

Reply via email to