Hi all,

The function StrToHostAddr in unit sockets returns for '127.0.0.1' on a
little endian system the in_addr:
s_bytes[1]=1
s_bytes[2]=0
s_bytes[3]=0
s_bytes[4]=127

Is this correct?

The documentation for HostAddrToStr writes "Basically, it is the same
as NetAddrToStr, but with the bytes in correct order.":
http://lazarus-ccr.sourceforge.net/docs/rtl/sockets/hostaddrtostr.html
This sounds as if a Net and a Host uses different ordered bytes, which
makes the whole point of an "and" mask pointless.


Mattias
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to