]> The Tcpdump Group git mirrors - tcpdump/commit
Clean up printing of LLC packets.
authorGuy Harris <[email protected]>
Sat, 18 Apr 2015 01:38:46 +0000 (18:38 -0700)
committerGuy Harris <[email protected]>
Sat, 18 Apr 2015 01:38:46 +0000 (18:38 -0700)
commit59864b113d8f2310a38d916e11a27c6f7e979ad9
tree1ffb8db59e76d121389ec416fdca8dfff1c25764
parentce0f6c9687a93d3959276de95f9b656d014a050e
Clean up printing of LLC packets.

Don't print LLC header information for SNAP packets; if we have a SNAP
header, just call snap_print() and return its return value, regardless
of whether it's 1 or 0, don't fall into the code to print raw LLC header
information - and don't print it with -e, either.

If llc_print() returns 0, just call the default packet printer, don't
print the MAC-layer header or the extracted ethertype - llc_print() will
print the source and destination MAC addresses and whatever type
information is in the LLC or SNAP headers.

If we don't know the DSAP/LSAP, and it's an information frame (numbered
or not) and not an XID frame, return 0, so that we give a hex dump of
the raw payload.

In addition, print the length when printing SNAP header information with
-e.
12 files changed:
netdissect.h
print-802_11.c
print-atm.c
print-cip.c
print-ether.c
print-fddi.c
print-fr.c
print-ipfc.c
print-juniper.c
print-llc.c
print-sll.c
print-token.c