[OpenAFS-devel] pr_Initialize falis when called within a simple application

Derek Atkins warlord@MIT.EDU
Thu, 19 Aug 2004 00:10:54 -0400


Derrick J Brashear <shadow@dementia.org> writes:

>> While the similar portion of strace for afstest is:
>> sendmsg(3, {msg_name(16)={sa_family=AF_INET, sin_port=htons(42166),
>> sin_addr=inet_addr("164.182.7.8")}, msg_iov(2)=[{"A\"G*\4\
>> 242p\324\0\0\0\1\0\0\0\1\0\0\0\1\1\5\0\0\0\0\0"..., 28},
>> {"\0\0\0\26\0\0\0\3jhh\0\0\0\0\0A\"G*AI\324*\0\0\0\10\333"..., 44}],
>> m
>>
>> What is boils down to at  this point is that the afstest application is
>> going to the wrong server.
>
> and the wrong port. so uh, byte swapping would be my guess. i tried on
> solaris. i bet you tried on linux.

Unlikely...  Byteswapping of 42166 yields 46756 (7004 swaps to 23579).
So I don't think it's pure byteswapping.  It's not bit-swapped,
either..  So I have no clue where this port number came from.  Perhaps
an uninitialized variable?

-derek
-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available