Commit Graph

30 Commits

Author SHA1 Message Date
Denis Ovsienko
7de355927b justify declarations of struct tok arrays
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.
2013-09-24 20:54:03 +04:00
Guy Harris
a91d20cc84 Convert the IPv6 printer to use netdissect. 2010-11-07 12:50:16 -08: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
9248d0c2fa From William J. Hulley: support for the Transparent Ethernet Bridge
ethertype in GRE.
2009-02-26 01:04:20 -08:00
mcr
4189fb7df6 refactored ip_print() so that chained header parser (ESP/AH) can
more easily call the inner parts.
2005-04-06 21:32:38 +00:00
hannes
dcf2763947 - print packet length even after no-payload frames
- from alex medvedev <alexm@pycckue.org>:

  case ETHERTYPE_IPV6:
          ip6_print(bp, len);
          break;

  needs a #ifdef INET6 around
2004-07-02 06:39:11 +00:00
hannes
32db3d2be2 -call the PPP printer in GREv1 (to better debug PPTP)
-commatized and multipline output for better readability
-make use of bittok2str() for flag processing
2004-06-29 08:12:06 +00:00
hannes
3b8786edf4 - hack the ethertype_values[] table to accomodate GRE flavours
- call the IP6, IPX, ATALK, MPLS dissectors within the GRE dissector
- be more verbose about the GRE proto-id (hidden under the eflag)
2004-06-12 16:32:56 +00:00
guy
bbc1cfa669 Have the configure script arrange that the Makefile define _U_
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.
2003-11-16 09:36:07 +00:00
guy
3824a6c041 From Neil Spring:
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".
2003-11-15 00:39:12 +00:00
hannes
8f94d68a09 don't pass on src & dst MAC adresses to the isoclns decoder as MAC adresses
should be really printed in ether_print() using the eflag
2003-05-22 16:52:36 +00:00
hannes
e426556d7c fixed GRE OSI-type as per ijotuns hint 2002-10-31 07:17:02 +00:00
itojun
104647e644 tabify 2002-10-30 05:29:16 +00:00
itojun
a77df9c411 o for gre version 1, correctly check if kp (key present) is unset.
o remove trailing spaces for better output.
o print sequence, acknowledge and callid as unsigned, and remove key
from version 1 since it's actually the payload length (not including
the gre header).

from openbsd
2002-10-30 05:11:42 +00:00
hannes
e0451bbf40 OSI (IS-IS) support over GRE tunnels 2002-09-24 23:39:22 +00:00
itojun
2c98bd5d6f rewrite with better license (explicit "with or without modification").
from openbsd
2002-09-20 22:42:21 +00:00
risso
3d932490b8 Added support for Win32, based on WinPcap. 2002-08-01 08:52:55 +00:00
itojun
111ff8a61d whitespace cleanup 2002-06-11 17:08:37 +00:00
guy
4c6bada758 Get rid of unneeded incomplete definitions of "struct mbuf" and "struct
rtentry", and unneded includes of <sys/uio.h>, <sys/file.h>, and
<sys/ioctl.h>.
2002-06-01 23:50:30 +00:00
fenner
a11713da52 Remove #if 0 sections
Finish converting over to having the caller print the IP address
 (except for UDP, TCP and SCTP).  This consists mostly of removing
 places where the IP address is printed, both in the big "case"
 in ip_print() and in the individual printers.
Also fix a couple of spacing bugs.
2001-06-15 22:17:31 +00:00
fenner
13c623cda7 Fix checksum and offset printing. 2001-03-13 01:03:17 +00:00
guy
9298dc84c8 Assorted PPTP and GRE enhancements from Motonori Shindo
<mshindo@mshindo.net>.
2001-03-12 00:24:54 +00:00
fenner
28468a4a82 Update GRE printer from RFC 2784 (GRE), 2890 (Key and Sequence extensions).
Handle PPTP's GRE extension (RFC 2637)
Print the seq, ack, key fields if -vv
2001-02-03 20:21:28 +00:00
guy
7c4458eb6a Making "extracted_ethertype" static to "print-ether.c" broke other
dissectors that expected calls to "llc_print()" to set it.  (Thanks and
a tip of the hat to Olaf Kirch <okir@caldera.de> for noticing this.)

Make "ether_encap_print()" and "llc_print()" take a pointer to an
extracted-Ethertype variable as an argument, have "llc_print()" pass it
to "ether_encap_print()", and have "ether_encap_print()" set what it
points to rather than setting a static "extracted_ethertype" variable.

Get rid of said static "extracted_ethertype" variable in favor of one
local to "ether_if_print()", just as other link-layer dissectors have
local "extracted_ethertype" variables.
2000-12-18 05:41:58 +00:00
guy
cf53dc05f1 Get rid of includes of <netinet/in_systm.h>, and replace "n_short",
"n_long", and "n_time", defined in that file, with other types.
2000-09-29 04:58:33 +00:00
guy
536f512583 Add an "ip.h" header, to declare the IP stuff needed by dissectors, and
have dissectors include them rather than <netinet/ip.h> or
<netinet/ip_var.h>, if they actually need that stuff.

Put the declarations of the ICMP stuff directly into "print-icmp.c".

Remove all unnecessary includes of <netinet/ip*.h> files.

Copy the byte-order stuff from "nameser.h" into "tcp.h".
2000-09-23 08:54:24 +00:00
fenner
b9ac23ce92 Switch to config.h instead of passing defines in DEFS. 1999-11-21 09:36:43 +00:00
assar
9a28162fdc use ether_encap_print. From kuznet@ms2.inr.ac.ru 1999-11-21 03:46:03 +00:00
mcr
f555c163f9 Initial revision 1999-10-07 23:47:09 +00:00