Commit Graph

11 Commits

Author SHA1 Message Date
Denis Ovsienko
88e479b75e don't include pcap.h needlessly
Both interface.h and netdissect.h include <pcap.h>, thus most files
should not include it regardless if these need it or not. The only
exceptions so far remain:
* addrtoname.c
* missing/datalinks.c
* missing/dlnames.c
* tcpdump.c
2014-02-28 18:11:09 +04:00
Denis Ovsienko
fe3253b9b8 remove tcpdump's own CVS keywords
Remove lots of $Header's and a few $Id's that all belong to the former
CVS repository of tcpdump itself. These keywords have been frozen since
the migration to git in late 2008.
2014-01-03 00:59:08 +04:00
Michael Richardson
a97fb2f3ae whitespace changes 2014-01-01 21:31:18 -05:00
Michael Richardson
1cead823ec reworked print-ether to use netdissect 2010-10-07 14:40:50 -04:00
Guy Harris
ea5736c8c6 Process VLAN frames and Alteon jumbo frames in the Ethernet printer.
Instead of having the Ethernet-type handler process the VLAN and Alteon
jumbo frame Ethernet type values, process them in the Ethernet (and
Linux cooked-mode) dissectors.  This makes it easier for the right MAC
addresses to be printed for those packets.

As part of that, rename ether_encap_print() to ethertype_print() - it
doesn't print encapsulated Ethernet frames, it prints payloads whose
packet type is indicated by an Ethernet type field value - and remove
the no-longer-needed "extracted Ethernet type" argument.  That also lets
us eliminate it from the SNAP print routine.

Make ether_print() take a function, and an argument to pass to that
function, as parameters, so that, for example, the ATM LANE printer can
use it and put the LEC ID into the link-layer headeer printout.
2010-02-21 12:44:53 -08:00
Guy Harris
e8b5237589 Don't directly fetch multi-byte integers from packets.
Use the EXTRACT_ macros to extract multi-byte integral values from
packets, rather than just dereferencing pointers into the packet; there
is no guarantee that the packet data will be aligned on the right
boundary, and there is no guarantee that, if they're not, a direct
access will work correctly.
2010-02-21 00:27:00 -08:00
hannes
aebfcfe1f6 rework the ARP printer & add support for Frame-Relay ARP 2006-02-11 22:11:40 +00:00
guy
d953299b94 Add a flag to suppress the "default_print()" call made in various
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.
2005-07-07 01:22:15 +00:00
guy
fb1b6d808f Fix up a bunch of comments - the on-the-wire length field in a
pcap_pkthdr is "len", not "length".
2004-03-17 23:24:35 +00:00
guy
94592bf31a Add support for the "-e" flag, printing the destination and source
addresses.
2004-03-17 22:11:34 +00:00
guy
3c4f187d36 Add support for Apple's IP-over-IEEE 1394 encapsulation. 2004-03-17 19:40:41 +00:00