-remove tok2str() and bittok2str() lookalikes
-print length field
-print more self-describing tokensstring
e.g. "Receiver not ready" instead of "rnr"
-add codepoint for SNA
Don't copy the LLC header to a "struct llc", just construct the
individual fields.
Fetch the control field early in the dissection process, and check to
make sure we have at least 4 bytes of LLC header if it's not a U frame.
Fetch both bytes of the control field for I and S frames, and display
all 4 hex digits of it.
Only dissect UI frames as BPDUs, and pass the BPDU dissector a pointer
to the beginning of the BPDU, not the beginning of the LLC header - not
all BPDUs are encapsulated in LLC headers.
Only dissect UI frames as IP packets.
Do bounds checking in "snap_print()".
the global oui.c file and make all SNAP printers use it
make the display output of the frame-relay SNAP printer consistent
to the LLC SNAP printer (= print oui{id,name}, proto-id)
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.
Treat LLC+SNAP packets with an OUI of 0x0000f8 the same way we treat
encapsulated Ethernet packets - that OUI is used by Cisco for some forms
of bridging.
tip of the Hatlo hat to Pascal Hennequin <pascal.hennequin@int-evry.fr>
for catching this one.
Also, the control field in an S or I frame is little-endian; treat it as
such, fixing various #defines in "llc.h" to match.