[OpenAFS-devel] AF_INET byte order
Jim Rees
rees@umich.edu
Wed, 7 Mar 2007 09:57:14 -0500
Here's a little gem from src/afsmonitor/afsmonitor.c:
#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.