[haiku-commits] Re: r40492 - haiku/trunk/src/servers/net

  • From: Philippe Houdoin <philippe.houdoin@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 15 Feb 2011 19:46:01 +0100

>> > +                               fServer.SetAddress(
>> > +
>> > (in_addr_t)B_BENDIAN_TO_HOST_INT32(*(uint32*)data));
>> Good catch!
>> Sorry for not seeing it while fixing the broadcast issue a few months
>> ago.
>
> Hey, stop apologizing for my bugs :-)

Well, in fact I've reconsidering my first reaction: in_addr_t type is
required per POSIX to be in network byte order.
So either the all-BNetworkAddress-is-in-host-byte-order is the rule,
and then BNetworkAddress::SetAddress(in_addr_t) should be
adapted then, or it's not for *network native* types like in_addr_t,
in6_addr_t, sockaddr_in and so on, and then this commit do it the
wrong way.

Other related posts: