Commit Graph

20 Commits

Author SHA1 Message Date
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
mcr
fc80a87e4c NDO-ized print-arp.c 2004-04-30 16:42:14 +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
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
guy
0978dd2b9b The ARCNET sequence number on the wire appears to be big-endian, at
least from the Linux RFC1201 code; extract it as such.

Get rid of some variables that are initialized but never modified.
2003-01-23 09:15:14 +00:00
guy
ad06a893cf From Peter Fales <peter@fales-lorenz.net>: add support for
DLT_ARCNET_LINUX.

Also handle IPX-over-ARCNET.
2003-01-23 09:05:37 +00:00
guy
4bec97f457 Hoist a bunch of stuff that should be done by all if_print routines into
tcpdump.c.  Have if_print routines return the length of the link-layer
header, so that the common code knows how to skip the link-layer header
when printing the packet in hex/ASCII.
2002-12-19 09:39:10 +00:00
guy
cfabfb053b Add a new routine "default_print_packet()", which takes a pointer to the
beginning of the raw packet data, the captured length of the raw packet
data, and the length of the link-layer header, and:

	if "-e" was specified, prints all the raw packet data;

	if "-e" was not specified, prints all the raw packet data past
	the link-layer header, if there is any.

Use that routine in all the "xxx_if_print()" routines if "-x" was
specified.

Make "arcnet_encap_print()" static - it's not used outside
"print-arcnet.c".

Add missing info printing code to "atm_if_print()".

Print the packet data in "lane_if_print()", not in "lane_print()", as
"lane_print()" can be called from other "xxx_if_print()" routines, and
those routines will also print the packet data if "-x" was specified -
no need to print it twice.
2002-12-18 09:41:13 +00:00
guy
e070cf232f We no longer use "packetp" for anything, so eliminate it. (If any
dissector really needs source and destination MAC addresses, we should
make global pointers to them - which would be null for packets lacking
MAC addresses, so dissectors that need them will need to do something
sensible if those pointers are null.)

Don't fake up an Ethernet header if there aren't any MAC addresses to
use when faking it up.

"bp_chaddr" in "print-bootp.c" is an array, so "bp->bp_chaddr" cannot be
null, and there's no need to test for it not being null.
2002-12-18 08:53:18 +00:00
guy
c422d3ab0f Get rid of the "-Wno-unused" flag, and fix up most of the
unused-parameter problems reported by GCC.  Add an _U_ tag to label
parameters as unused if the function is called through a pointer (so
that you can't change its signature by removing parameters) or if there
are unused parameters only because the function isn't complete.

Add some additional bounds checks the necessity for which was revealed
while cleaning up unused-parameter problems.

Make some routines static.

"lcp_print()", defined in "print-lcp.c", isn't called anywhere -
"print-ppp.c" has the code to dissect LCP.  Get rid of "print-lcp.c".
2002-09-05 21:25:34 +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
c672f00276 Eliminate some unused parameters.
Use const more.
Use EXTRACT_* macros more.
Use TCHECK* more.
Use tok2str() to replace some home-grown workalikes.
smb:
 - Get rid of private types, use tcpdump-defined types
 - Rename fdata and fdata1 to smb_fdata and smb_fdata1 to avoid conflict
   with IRIX library function.
2001-09-17 21:57:50 +00:00
fenner
23215ab902 packetp and snapend are already externally defined in print-ether.c .
Submitted by:	"Brent L. Bates" <blbates@vigyan.com>
2001-09-10 00:20:43 +00:00
guy
176a3e4986 Put the infodelay wrapping into the remaining "XXX_if_print()" routines.
Split the Cisco HDLC printer into "chdlc_if_print()", which does the
stuff expected of a low-level print routine (printing the time stamp,
printing the final newline, doing the infodelay stuff) and
"chdlc_print()", which doesn't do that stuff.  This lets us clean up
"ppp_hdlc_if_print()" a bit - it can just print the time stamp at the
beginning, and do the infodelay stuff at the end, without having to
treat Cisco HDLC specially by skipping the time stamp printing.  (This
also ensures that the time stamp is always printed, which wasn't the
case before.)

Print the missing final newline in "pppoe_if_print()".
2001-07-05 18:54:13 +00:00
guy
cd8940439f Squelch a compiler warning. 2001-05-22 06:23:29 +00:00
guy
e0abc505c1 Patch from Juergen Schoenwaelder <schoenw@ibr.cs.tu-bs.de> to get
print-arcnet.c to compile on some platforms.
2001-04-24 02:26:14 +00:00
guy
3838a46155 ARCNet support, from NetBSD. 2001-04-17 08:39:17 +00:00