On Tuesday 11 March 2008 17:30:08 Mathew Hennessy wrote: > I see that in dns.hh endianness is detected by arch, and __sun or __sparc > (or some variant) should be detected to configure the dnsheader struct > appropriately. Also, the id (query identification number) is the first > word regardless of endian in that file. Unless that's incorrect, my > suspicions are more along the lines of miscast references to the message id > (which should be uint16_t everywhere AFAIK?) or bad alignment assumptions.
After looking at the code I'm wondering if it wouldn't be more fail-safe to
use ntoh{s,l}() resp. hton{s,l}().
Norbert
--
OpenPGP public key
http://www.linuxnetworks.de/norbert.pubkey.asc
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Pdns-users mailing list [email protected] http://mailman.powerdns.com/mailman/listinfo/pdns-users
