[OpenAFS-devel] AF_INET byte order

Ken Hornstein kenh@cmf.nrl.navy.mil
Wed, 07 Mar 2007 10:05:04 -0500


>#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
>	    curr_skt->sin_family = AF_INET;		/*Internet family */
>#else
>	    curr_skt->sin_family = htons(AF_INET);	/*Internet family */
>#endif
>
>I suspect that this code is wrong and the address family should always be
>given in host order.  This just happens to work on sun and aix because they
>run on big-endian processors.  Not sure about linux.

I think you're right; I don't think I've ever seen anyone ever use
htons on the address family.

--Ken