[fpc-devel] StrToHostAddr

Mattias Gaertner nc-gaertnma at netcologne.de
Sat Nov 5 18:33:16 CET 2011


On Sat, 5 Nov 2011 18:09:27 +0100
Jeppe Græsdal Johansen <jjohan07 at student.aau.dk> wrote:

> Den 05-11-2011 18:01, Mattias Gaertner skrev:
> > This sounds as if a Net and a Host uses different ordered bytes, which
> > makes the whole point of an "and" mask pointless.
> Network order is always big endian. Host endian is just the endian of 
> your host computer. So in most cases they are indeed different

Ah, I confused Network format with Network mask (netmask).

Ok, so StrToHostAddr('1.2.3.4') returns the in_addr in machine order.
 
I wonder why TSocketStream.RemoteAddress.in_addr is
in network order.


> I don't know what you mean about and mask

I thought the Host and Net stand for the host and net(-mask) part of a
subnet e.g. 1.2.3.4/255.255.255.0.

Mattias



More information about the fpc-devel mailing list