Commit Graph

183 Commits

Author SHA1 Message Date
Hannes Gredler
be03cc0b4a add support for IS-IS Purge Originator Identifier as per RFC6232. 2015-05-19 15:49:40 +02:00
Guy Harris
bce91cc243 Fix one more de-constifying cast. 2015-04-28 10:55:24 -07:00
Guy Harris
30870e3e2a Not all C compilers accept C++/C99 comments by default.
Use "#if 0" instead to comment out code.
2015-04-13 18:32:17 -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
ca9a02c55e Add a missing space to a printout.
Fix some warnings while we're at it.
2015-03-11 12:51:32 -07:00
Michael Richardson
2d26a39f67 protected osi_print_cksum is more general fashion 2015-03-10 23:14:34 -07:00
Michael Richardson
364b00185b some patches to deal with kday pcap files
Author:    Michael Richardson <mcr@sandelman.ca>
2015-03-10 23:13:30 -07:00
Denis Ovsienko
60a835d80f clean K&R style up in function declarations a bit
The function body should have its opening brace on the next line.
2015-03-05 10:35:03 +00:00
Guy Harris
840d0bb8b4 Don't run past the snaplength when printing a packet with a too-short LI.
Fixes GitHub issue #437.
2015-03-01 11:01:14 -08:00
Guy Harris
efe8a2be5a Squelch a Coverity warning.
For unknown PDU types, we return 0 whether print_unknown_data() succeeds
or fails; don't bother checking whether it succeeds, Just Do It.
2015-02-06 11:42:00 -08:00
Guy Harris
a6f81d534d Leave it up to ip6_print() to handle non-IPv6-capable systems.
Always define and declare ip6_print(), always compile print-ip6.c, and
always call it if we recognize a payload as IPv6.  If INET6 isn't
defined, ip6_print() will just print the length and note that printing
isn't supported.

That way, we don't do weird dissection of IPv6 packets on systems
without IPv6 support, due to, for example, ethertype_print() returning 0
("not dissected") for IPv6 packets on those systems (IPv6-over-Frame
Relay was dissected weirdly due to this).
2014-10-01 15:32:11 -07: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
Guy Harris
1cde6435df Netdissectify the to-name resolution routines.
Have them take a netdissect_options * argument, and get the "no name
resolution" flag from it.

Move the declaration of dnaddr_string to addrtoname.h, along with the
other XXX-to-string routines.
2014-04-04 00:43:46 -07:00
Denis Ovsienko
8863fc0e5d NDOize some generic code 2014-04-03 17:43:33 +04:00
Denis Ovsienko
fc6f112b40 NDOize LLDP, PPP and RSVP decoders 2014-04-02 18:22:28 +04:00
Denis Ovsienko
5797b57c44 improve some recent conversions 2014-03-29 08:35:54 +04:00
Denis Ovsienko
2210a967cb NDOize ISO CLNS decoder 2014-03-28 14:08:48 +04:00
Denis Ovsienko
bed843855d NDOize Frame Relay, LMP and RADIUS decoders 2014-03-18 16:30:50 +04:00
Guy Harris
6bfa3ea6aa Fix a compiler warning.
It's not necessarily safe to do pre-increment or post-increment in an
argument to an EXTRACT_ macro.
2014-02-01 14:08:25 -08: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
ac910c086e ndo-ize print-ascii: hex_print_with_offset() 2014-01-01 21:31:18 -05: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
Ajith Adapa
cb85addfd6 Fixes-for-test-results 2013-02-07 11:07:29 +05:30
Guy Harris
608eed8385 Fix some errors.
isis_print_mcid() returns no value and nobody expects it to; declare it
void, not int.

Fix a typo in a case statement ("defualt" rather than "default").

Fix indentation.
2012-06-07 22:18:25 -07:00
Ajith Adapa
95dee7d511 Added support for SPBM Service Identifier and Unicast Address subtlv 2012-05-22 19:23:06 +05:30
Ajith Adapa
660d76acd5 Added support for SPB 2012-05-22 17:57:33 +05:30
Guy Harris
d6bb95e4f0 Get rid of an unused variable. 2011-12-08 23:06:00 -08:00
Guy Harris
f944e1e39d Clean up option-walking code.
Loop as long as the remaining option list length is not zero, even if
that means we try to process the remaining options if the remaining
length is 1, so that if the option length is bogus, we'll report it.

Check for a valid ESIS_OPTION_ES_CONF_TIME length - it's supposed to be
2.
2011-10-13 20:03:29 -07:00
Hannes Gredler
548cef814d From Minto Jeyananth <minto@juniper.net>: add support for IS-IS Generic Cryptographic Authentication as per RFC 5310 2011-03-02 16:57:03 +01:00
Hannes Gredler
aac33a3684 From Minto Jeyananth <minto@juniper.net>: fix the IS-IS MT flag tokentable 2011-03-02 16:49:28 +01:00
Guy Harris
a91d20cc84 Convert the IPv6 printer to use netdissect. 2010-11-07 12:50:16 -08:00
hannes
b756fcfd81 bugfix: the IS-IS Multi-topology TLV MTID is prepended once per TLV and not once per MT-IS neighbor 2008-08-16 13:38:15 +00:00
hannes
6fb52fa951 Add HMAC-MD5 verification support for IS-IS 2008-08-16 12:07:17 +00:00
hannes
b0757875e2 bugfix: the Multi-topology header is just at the beginning of the TLV and not before every prefix 2007-03-02 09:16:19 +00:00
hannes
600222a669 from Jacek Tobiasz <Jacek.Tobiasz@atm.com.pl>:
display the IS-IS istype field as L2 and not L1L2.
2007-02-22 11:28:09 +00:00
hannes
96977962e9 print shouldbe checksum for broken OSI checksum, remove osi_cksum() 2006-09-25 09:23:32 +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
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
hannes
47ac6d9c3d fixup typo from last commit 2006-04-14 07:12:46 +00:00
hannes
65ba981d2e add support for link attribute subTLV, update GMPLS printer to latest spec (rfc4205) 2006-04-10 21:07:35 +00:00
hannes
03e75a767c bugfix: wrong offset calculation for restart holdtimer 2006-04-06 13:43:30 +00:00
hannes
50b4920bc5 move AF specific stuff to dedicated files 2006-02-21 10:27:40 +00:00
guy
085929abcb Get rid of an #ifdef - to zero something out with memset, just use
"sizeof something" as the size argument.
2005-11-12 22:22:59 +00:00
guy
02c692dc72 From Markus Schoepflin: don't use "struct in6_addr" if INET6 isn't
defined, because, in that case, "struct in6_addr" probably isn't
defined, either.

Check for too-large bit lengths in TLVs.
2005-10-16 08:17:51 +00:00
hannes
4dc9cccc3e retain the old diffserv-te codepoints for a transition period 2005-09-20 10:04:26 +00:00
guy
1c47cfa81a But the PDU length checks back, so "tmp" doesn't go negative.
At least as I read RFC 3847, you won't get a system ID without the
remaining hold time field; after printing the flags field, check whether
there's anything else after the flag field and, if not, quit, otherwise
print the remaining hold time field and, if present, the system ID field.
2005-09-05 18:20:15 +00:00
hannes
806a7cab5c rework the restart signaling TLV printer:
-accept TLV length of 1 as this is now perfectly valid as per rfc 3847
  -only attempt to print a trailing system-ID and not a node-ID
2005-09-05 11:12:33 +00:00
hannes
50973844ef update diffserv-TE codepoints as per rfc4124 2005-08-23 11:07:34 +00:00
hannes
f6e4e639b3 code cosmetics: add a few TLV_MINLEN #defines 2005-07-14 20:10:03 +00:00