big endian and little endian problem

Shane Kerr Shane_Kerr at isc.org
Mon Oct 29 12:17:05 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

DA Ming wrote:
> 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?

Are you having a problem with clients not behaving properly or the server giving
out leases with incorrect timings or something?

Or is the problem just that the packet looks incorrect in ethereal?

- --
Shane
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHJc89MsfZxBO4kbQRAop+AKDNbzzBM2pGhFse1xvX6A0qCpSgowCgvbfS
Ppt2ArYIZGWYtWTI4w/oiig=
=k7bS
-----END PGP SIGNATURE-----


More information about the dhcp-users mailing list