queries. Display that bit correctly (as per Marc Krochmal's request).
In mDNS, the topmost bit of the class field should be handled the same
way regardless of the value of the lower 15 bits, and *vice versa* -
they're independent fields.
compile with Sun C, as "interface.h" isn't being included before the
structures are being declared.
Furthermore, in the files that Sun C *can* compile, it doesn't cause Sun
C to generate code that's safe with unaligned accesses, as
"__attribute__" is defined as a do-nothing macro with compilers that
don't support it.
Therefore, we get rid of that tag on the structures to which it was
added, and instead use "EXTRACT_16BIT()" and "EXTRACT_32BIT()" to fetch
16-bit and 32-bit big-endian quantities from packets. We also fix some
other references to multi-byte quantities to get rid of code that tries
to do unaligned loads on platforms that don't support them.
We also throw in a hack that makes those macros use
"__attribute__((packed))" on structures containing only one 16-bit or
32-bit integer to get the compiler to generate unaligned-safe code
rather than doing it by hand. (GCC on SPARC produces the same code that
doing it by hand does; I don't know if GCC on any other big-endian
strict-alignment processor generates better code for that case. On
little-endian processors, as "ntohs()" and "ntohl()" might be functions,
that might actually produce worse code.)
Fix some places to use "%u" rather than "%d" to print unsigned
quantities.
T_NULL, defined by some STREAMS/TPI/XTI/TLI/whatever header file in
HP-UX - if it's defined, undefine it before we define it, to squelch
compiler warnings.
redefinitions" stuff from files that include "nameser.h" to "nameser.h"
itself (we used to include <arpa/nameser.h>, over which we had no
control so we couldn't do that, but we now have our own "nameser.h").
Add T_OPT to the list of things we undefine, and undefine T_UNSPEC iff
T_UNSPEC is defined, not iff NOERROR is defined.
Replace the include of <arpa/nameser.h> in "print-rx.c" with an include
of "nameser.h", and "#if 0" it out pending a determination of whether
it's necessary (why would AFS's RX care about the internals of DNS
packets?) or not.