[OpenAFS-devel] AF_INET byte order
Kristen J. Webb
kwebb@teradactyl.com
Wed, 07 Mar 2007 09:12:37 -0700
This is a cryptographically signed message in MIME format.
--------------ms090505040907060501080202
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Out of curiosity, I compiled our test environment
with the htons call on the sin_family on i386/Linux
which resulted in the connection error:
#define EAFNOSUPPORT 97 /* Address family not supported by
protocol */
Which is what I suppose you would expect ;)
Ken Hornstein wrote:
>> #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
> _______________________________________________
> OpenAFS-devel mailing list
> OpenAFS-devel@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-devel
>
>
--
Mr. Kristen J. Webb
Teradactyl LLC.
PHONE: 1-505-242-1091
EMAIL: kwebb@teradactyl.com
VISIT: http://www.teradactyl.com
Home of the
True incremental Backup System
--------------ms090505040907060501080202
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature
MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIINGjCC
A2IwggLLoAMCAQICEAvaCxfBP4mOqwl0erTOLjMwDQYJKoZIhvcNAQECBQAwXzELMAkGA1UE
BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAxIFB1Ymxp
YyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk4MDUxMjAwMDAwMFoXDTA4
MDUxMj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