Commit Graph

35 Commits

Author SHA1 Message Date
Guy Harris
69cb46af91 Fix a bunch of de-constifications. 2015-04-26 17:24:42 -07:00
Denis Ovsienko
38700c7f24 dismiss NETDISSECT_REWORKED macro
The purpose of this macro was to enable the file-by-file switch to NDO,
after which only tcpdump.c had a use of it and the definitions guarded
by it. Update tcpdump.c not to require them any more and dismiss the
unused definitions.
2015-03-22 10:06:15 +00:00
Guy Harris
ed85e20e4d u_intN_t is dead, long live uintN_t.
And, as we require at least autoconf 2.61, and as autoconf 2.61 and
later have AC_TYPE_UINTn_T and AC_TYPE_INTn_T macros, we use them to
define the uintN_t and intN_t macros if the system doesn't define them
for us.

This lets us get rid of bitypes.h as well.
2014-04-23 00:20:40 -07:00
Denis Ovsienko
d57e945e5e NDOize EIGRP, ICMP, L2TP, STP and UDP decoders 2014-03-15 23:25:06 +04:00
Denis Ovsienko
69f6f4392a don't include addrtoname.h needlessly 2014-02-25 17:53:08 +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
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
1b0c892902 Don't print the SPB stuff in non-verbose mode.
Before the previous change, we didn't print it; restore that behavior.

Also update a comment - DEFAULT_SNAPLEN is now pretty large, so we
should capture the entire packet by default.
2013-03-27 01:18:58 -07:00
Guy Harris
4a696ee49a Fix handling of V3 and V4 BPDUs.
Make the offsets and lengths 32-bit, so that they don't overflow.

Pull the handling of V4 fields into its own routine.  Call it only if
the packet's been identified as a V4 packet and the length is sane; call
the routine to handle V3 fields before we do any V4 work.
2013-03-26 02:35:14 -07:00
Ajith Adapa
cb85addfd6 Fixes-for-test-results 2013-02-07 11:07:29 +05:30
Ajith Adapa
a82c0023ad updated-spb-bpdu-packet-info 2012-10-08 08:42:40 +05:30
Ajith Adapa
df33a28a6c Modified-mstp-display-as-per-standard 2012-10-05 11:11:22 +05:30
Ajith Adapa
0b3ef304c3 Added-bpduv4-test-files 2012-10-04 20:48:22 +05:30
Ajith Adapa
0861504ead Added-support-BPDUv4 2012-10-04 20:32:12 +05:30
hannes
1ef8aefb54 Bugfix from Carles Kishimoto <carles.kishimoto@gmail.com>:
the port and prio fields of mstp PDUs need to be properly shifted.
2007-03-18 17:11:46 +00:00
hannes
d37052722d From From Carles Kishimoto <carles.kishimoto@gmail.com>:
print 802.1s digest
2007-03-09 18:58:48 +00:00
hannes
775626db62 From Swaminathan Chandrasekaran <chander@juniper.net>:
add support for Multiple-STP as per 802.1s
2007-03-08 13:49:46 +00:00
hannes
b130639f49 minor typo: should be SPT instead of STP 2007-03-07 12:10:54 +00:00
hannes
0cb07723b3 bugfix: root-pathcost is not a time-quantity 2007-03-07 11:21:24 +00:00
hannes
40161522e4 From Hannes Gredler <hannes@juniper.net>:
rework of the STP printer

From From Carles Kishimoto <carles.kishimoto@gmail.com>:
  add support for rapid-SPT as per 802.1w
2007-03-06 15:03:51 +00:00
guy
fead98c71d Make "snap_print()" handle fetching and printing the OUI.
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()".
2005-04-26 07:26:33 +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
88664d9c43 As noted in a bug report, the type for a topology change notification is
0x80, not 1.
2003-09-12 20:53:19 +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
f72fe0d0de Get rid of an extra newline. 2002-05-29 09:59:12 +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
guy
7b50febe28 Add "tcp.h" and "udp.h" headers, to declare the TCP and UDP stuff needed
by dissectors, and have dissectors include them rather than
<netinet/udp.h>, <netinet/udp_var.h>, or <netinet/tcp.h>, if they
actually need that stuff.

Remove all unnecessary includes of <netinet/udp*.h> or <netinet/tcp*.h>
files.
2000-09-23 08:26:30 +00:00
assar
3cd171317f remove non-STDC code 2000-07-01 03:38:59 +00:00
assar
f835c3286a add config.h. From Kevin Steves <stevesk@sweden.hp.com> 2000-06-13 12:19:07 +00:00
assar
954bc7f13e add IEEE8021.d printer contributed by Lennert Buytenhek <buytenh@gnu.org> 2000-06-10 20:57:55 +00:00