are.
To extract a 32-bit big-endian quantity from a particular address, use
EXTRACT_32BITS(), don't do pointer casting - casting a "char *" or
"unsigned char *" to point to a multi-byte quantity doesn't guarantee
the pointer can be dereferenced and give you the right answer (SPARC
traps on unaligned pointer accesses, some other processor types might
also trap, or might ignore the low bits of the pointer).
I think this is a mistake in the procedure used to display the
bitfield. Instead of tok2str() it should be bittok2str() - at
least since I changed it it display the flag field of the RSVP
session attribute correctly.
Diff file attached.
Additionally I've taken the freedom to shorten the displayed
strings a bit, taking the "desired" away that was in every
string. While correct RFC it fills the screen. Not sure about
your procedures changing output but as it never displayed before
anyway ... ;-)
The shared secret is passed using the already existing -M option which is
used for TCP-MD5 checking.
add initial supoort for RSVP Integrity object verification.
at places where the entity to print / or increment
shares the semantics of an IPv4 or IPv6 address
use sizeof(in_addr) and sizeof(in6_addr),
rather than a hardcoded 4 or 16
-put the object printer in a dedicated function that can be
called from RSVP or from RSVP in RSVP (like for example in Aggregate Messages)
- improve verbosity when the min/max commonheader has a bogus size
- add support for the message-ID, message-ID ack and message-ID list object
appropriately, and that GNUmakefile and the MSVC++ project file define
it apppriately, as we do with libpcap, rather than defining it in
"interface.h".
Undo the rcsid-shuffling and addition of extra #includes, as we no
longer need to arrange that "interface.h" be included before using _U_
in an RCS ID or copyright.
use "_U_" in the definitions of "rcsid[]", to eliminate
complaints about those variables being unused;
move the definitions after the include of "interface.h", or add
an include of "interface.h", so that "_U_" is defined.
Include "config.h" before including "tcpdump-stdinc.h" in
"missing/datalinks.c".
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.
Use "%.3f".
The floating-point numbers in RSVP packets are stored in big-endian
format; extract them as such, so that when we process them as numbers
they're in native byte order, not network byte order.