Make sure all of them are declared const and most of them -- static.
Proper declaration of token arrays is a common review point for new code
that is based on existing decoders. Thus fix the issue at its root.
The old ports for SCTP TML ports were replaced at RFC editor
publication time. Caught by folks preparing for an Interop
tommorow.
While we could add a backward compat support it seems meaningless
if those ports will never ever be used in production.
I will send new test/pcaps at a later point and remove the existing
ones once this patch goes in.
cheers,
jamal
commit 40ecad0e866e7567716e6e57158c5274c0786a21
Author: Jamal Hadi Salim <hadi@mojatatu.com>
Date: Thu Feb 3 22:00:23 2011 -0500
Conform to new IANA assignment of ForCES SCTP TML
Signed-off-by: Jamal Hadi Salim <hadi@mojatatu.com>
There's no guarantee that those quantities will be properly aligned, nor
is there any guarantee that fetching an improperly-aligned quantity will
work as desired.
link-layer print routines if no other print routine claimed the packet.
Test whether that flag is set rather than testing whether neither of -x
or -q were specified, and have -x, -q, *and* -X set that flag, so that
-X suppresses it just as -x does. That way you don't get those pckets
dumped twice if -X was specified.
fact, don't even use "u_int32_t", as we're just pointing into a packet,
which is made up of bytes - use "u_char", and bump the pointer by 4 for
each item.
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".
for it to check the protocol number in the IP header.
Have the IPv6 dissector call the SCTP dissector for SCTP packets.
Get rid of the definition of IPPROTO_SCTP in sctpConstants.h, so we
don't have problems if <netinet/in.h> also defines it.
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.
so, it doesn't need to provide incomplete definitions of "struct mbuf"
or "struct rtentry", either. If it *does* include <net/if.h>, it
appears to fail to compile on at least some versions of AIX; remove the
include and the incomplete definitions.