Commit Graph

2184 Commits

Author SHA1 Message Date
hannes
9427d40c14 change the TCP printer to print new-style order:
- seperate fields by comma
  - use [] for flags and options sets
  - print a trailing length field

make use of tok2str() and bitttok2str()
move port definitions into tcp.h
2007-01-29 09:59:42 +00:00
hannes
1f30d54a0f from Kevin Steves <stevesk@pobox.com>:
format the ttl field not with heading whitespaces for ttl < 100 and ttl < 10
2007-01-17 17:55:01 +00:00
hannes
9b070a6e94 from Kevin Steves <stevesk@pobox.com>:
receive some colons in the IP printer output for consistency reasons.
2007-01-17 14:07:36 +00:00
guy
c6fe76b166 From Kevin Steves: get rid of extra leading spaces. 2007-01-15 11:15:26 +00:00
guy
94dcce9a92 From Kevin Steves: get rid of some extra blanks when printing flags. 2007-01-14 22:40:40 +00:00
guy
ac3e9eddeb From Kevin Steves:
0) use TTEST/TCHECK macros vs. snapend comparisons
	1) when -vvv display PAD and END options
	   (multiple PAD options are summarized)
	2) change a trunc string from bootp to rfc1048 because I think that is
	   what is intended (matches trunc label)
2007-01-14 21:29:22 +00:00
guy
c10cc49cd8 From Kevin Steves: fix the printing of options in a parameter request
list.
2007-01-14 21:22:05 +00:00
hannes
b2be8ad2d8 bugfix: use the correct codepoint for the OSPF simple text auth token entry.
use safeputs to print the password.
2006-12-13 08:21:49 +00:00
hannes
92d2311423 apply some heuristics to detect MPLS ICMP extension headers because
not all implementations correctly set the length field in the
ICMP header as per draft-bonica-internet-icmp-08.

if the length field is not set then simply check the checksum.
2006-12-12 14:31:51 +00:00
hannes
196bff58cd rework on the ICMP MPLS extension code:
- preserve the snapend pointer as it may get overwritten by calling the IP printer
- protect against infinite loops inside the MPLS extension printer.
- detect present of an MPLS extension header by introducing a length field to the ICMP header
  as per draft-bonica-internet-icmp-08.
2006-12-12 10:48:43 +00:00
guy
99296888f0 Mark Krochmal says that the class field should be treated in mDNS as a
flag and a 15-bit field even for OPT RRs.
2006-11-12 23:12:03 +00:00
guy
ee98a5bb16 For OPT resource records, the class field is used as a length, so, if one
happens to be in an mDNS packet, we don't split it into a class and a
"cache flush" flag.
2006-11-12 22:21:44 +00:00
guy
f0ededcff9 The topmost bit in the class field isn't a "cache flush" flag in mDNS
queries.  Display that bit correctly (as per Marc Krochmal's request).

In mDNS, the topmost bit of the class field should be handled the same
way regardless of the value of the lower 15 bits, and *vice versa* -
they're independent fields.
2006-11-10 03:18:21 +00:00
hannes
8e396b5731 from Gerrit Renker <gerrit@erg.abdn.ac.uk>:
add support for variable-length checksum in DCCP, as per section 9 of RFC 4340.
remove duplicated code in dccp6_cksum (which just repeated the code of in_cksum
fix a bug in dccp.h -- the fields of CCVAL and CSCOV were swapped (see section 5.1 of RFC 4340)
fix a typo in the display of incorrect checksums
  old output `cksum xDEAD (incorrect (->  xBEEF)',
  new output `cksum xDEAD (incorrect -> xBEEF)'
2006-11-02 09:05:23 +00:00
hannes
3472526186 from Gerrit Renker <gerrit@erg.abdn.ac.uk>:
remove duplicate code for v6 checksum calculation
unify the output for broken checksums
2006-11-02 08:56:16 +00:00
hannes
ec950b64f2 add support for CFM Link-trace msg, Link-trace-Reply msg, Sender-ID tlv, private tlv 2006-10-29 23:10:07 +00:00
guy
cb7aa23f20 From Jun Kuriyama:
I noticed tcpdump (on FreeBSD 6.1) cannot show pflog
reason value 8 (should be "ip-option").

I made a patch for print-pflog.c to add more values
which obtained from /usr/include/net/pfvar.h on FreeBSD
6.1.
2006-10-25 22:13:10 +00:00
guy
3fa6ec70c3 From Shinsuke Suzuki:
Some of the options in print-dhcp6.c are declared as
"unassigned ones". but it is no longer true due to an
IETF standardization activities.

Here's the patch to catch up with the latest IANA
assignment, including an removal of the old Prefix-
Delegation option used in the NTT-communications.
(AFAIK they no longer uses this old option).
2006-10-25 22:02:36 +00:00
hannes
255477bbc9 fix TLV parser, add support for port, interface status TLV 2006-10-20 18:07:55 +00:00
hannes
1226a40cb0 add skeleton support for 802.1ag CFM 2006-10-12 10:26:12 +00:00
hannes
e928e06bc0 add support for 802.3ah loopback ctrl msg 2006-10-12 05:44:33 +00:00
hannes
165d8db403 bugfix from Aaron Campbel <aaron@arbor.net>:
The expression (BGP_OSPF_RTYPE_EXT ||BGP_OSPF_RTYPE_NSSA) will always evaluate to 1.
2006-10-06 06:25:06 +00:00
guy
81276563fd sed reads its standard input by default, and not all versions understand
"-" as meaning "standard input".
2006-10-04 18:03:15 +00:00
hannes
96977962e9 print shouldbe checksum for broken OSI checksum, remove osi_cksum() 2006-09-25 09:23:32 +00:00
guy
d7da1619b5 Cast "sizeof" to a "u_int"; it's not guaranteed to be "int" in size (it
could be "long", for example, and probably *is* "long" on LP64
platforms), so you can't print it with "%u", but, in this particular
case, it's going to fit in a 32-bit quantity.
2006-09-13 06:31:11 +00:00
hannes
603d00791c -rework the OSPFv3 printer:
-share the grace and TE LSA printer with the OSPFv2 printer
 -change to multiple line output (behind vflag)
 -unambiguate datastructures such that the OSPFv3 printer can
  include OSPFv2 header files.
2006-09-05 15:50:26 +00:00
hannes
298fb77638 -share the grace LSA and TE LSA printer with the outside world.
-misc. cosmetic cleanups
2006-09-05 15:46:42 +00:00
mcr
31e4acb85a adjust count of items to reflect new additions. 2006-08-27 18:48:29 +00:00
mcr
c415d70047 added additional modp groups to definition. 2006-08-27 18:46:39 +00:00
mcr
a048d061b5 install a version stamped version of tcpdump as well. 2006-08-27 18:44:09 +00:00
guy
9bdbb51f41 Fix some "unsigned int" vs. "size_t" issues (they're not necessarily the
same).
2006-08-19 06:59:17 +00:00
guy
c1cb148bb7 Squelch compiler warning. 2006-08-19 06:51:13 +00:00
guy
7daf6157e2 Fix indentation. 2006-08-19 06:47:39 +00:00
hannes
072e016c6c code cosmetics: bracketize the on-liners after if statements, proper length decrement for ANSI LMI frames 2006-06-23 22:20:32 +00:00
hannes
617f68b272 remove redundant TRUE|FALSE defs 2006-06-23 02:03:09 +00:00
hannes
939a69c898 bugfixes: change oam_pdu_config to 16 bits as per the spec and clean the mixup between mux-action state and parse-action state 2006-06-23 01:53:28 +00:00
hannes
de5421422e do not bail if we hit a zero-length TLV, continue to read the next TLV header instead. 2006-06-16 18:08:35 +00:00
mcr
6aca5370ae support creating TAGS file for *emacs 2006-06-15 21:44:36 +00:00
hannes
b0d4e1f955 bugfix: ggsn: parse against cookies and not the ip header 2006-06-14 21:40:00 +00:00
hannes
476bd0e900 add GGSN PIC name resolution 2006-06-14 16:13:51 +00:00
guy
801c193b35 Pick up check for bad FCS from NetBSD version. 2006-06-13 22:25:30 +00:00
guy
17deff7968 Update from current NetBSD version of ieee80211_radiotap.h. 2006-06-13 22:24:06 +00:00
guy
038431c6b4 From NetBSD:
revision 1.7
	date: 2006/03/25 11:43:53;  author: rpaulo;  state: Exp;  lines: +23 -3
	PR 13604: detect and print correct information for 4.4BSD/NetBSD NFS
	filehandles.
	The heuristic may or may not be wrong, but no one replied in the
	tcpdump-workers mailing list.
	Extraction of the fsid information contributed by Chuck Silvers.

	Discussed with Chuck Silvers.
	----------------------------
	revision 1.6
	date: 2006/03/22 04:30:28;  author: christos;  state: Exp;  lines: +4 -2
	Coverity CID 563: Kill SUNOS3 case; it is dead code.
	----------------------------
2006-06-13 22:21:38 +00:00
hannes
6354506df4 from Gino Barille <barille@yahoo.com>:
add support for printing notification subcode 7 as per rfc3392.
2006-06-13 17:15:28 +00:00
hannes
37d667f993 add TRUE, FALSE defs 2006-05-19 17:55:34 +00:00
hannes
38a040b901 continue work on the 802.3AH printer:
-add support for link-event TLVs
  -clean up some confusion between shared and unshared
   TLV formats.
  -do per-TLV hexdumping
2006-05-18 08:23:26 +00:00
hannes
a333cd3aaf fix an infinite loop while processing OAM info PDUs 2006-05-16 21:57:26 +00:00
hannes
194e9d1e35 first cut of Ethernet 802.3AH OAM TLV parser code:
-add support for Code Information TLV
  FIXME boundary checks
2006-05-15 02:02:53 +00:00
guy
a7c96d7bcb "ether.h" defines more than we need, and, on some platforms, redefines
ether_header (which is one of the things we don't need).  Just define
ETHER_ADDR_LEN to 6 if it's not defined - it can't be anything but 6.
2006-05-12 02:14:55 +00:00
guy
df7c862246 From Don Ebright: fix a place where we were referring to AF_INET6 even
when INET6 wasn't defined.
2006-05-12 02:10:21 +00:00