big endian and little endian problem

DA Ming Ming.Da at alcatel-sbell.com.cn
Thu Oct 25 01:58:36 UTC 2007


Hi all

I've just met a problem which seems as a big endian and little endian
one.

When I send a DHCPDISCOVER to server, and I capture this packet using
'ethereal', I see in ethereal that the field 'xid' is 'A9EF68AC'; the
'secs' is 0a00.

However, I print with gdb the option of this packet and find that the
'xid' is '2892558249' (dec) = 'AC68EFA9' (hex); the 'secs' is 10 (dec) =
0a (hex).

 

I've modified the related source codes in 'Ultrix.h' where 'BYTE_ORDER'
is set to 'LITTLE_ENDIAN' and changed it to 'BIG_ENDIAN'. Unfortunately,
the problem still happens.

Can anybody help me with it?

Thanks a lot!

 

Best Regards!

DA MING at CHINA

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20071025/34c4504a/attachment.html>


More information about the dhcp-users mailing list