Commit Graph

80 Commits

Author SHA1 Message Date
Francois-Xavier Le Bail
11d3a01319 Move the printer summaries from INSTALL.txt to each printer
with the tag '\summary:' for greping.
Remark: Currently some printers have no summary line.

Moreover:
Summarize all printers with a single line in INSTALL.txt
2016-08-14 17:03:43 +02:00
Francois-Xavier Le Bail
2bdecbfb10 RSVP: Add bounds and length checks 2016-07-04 22:17:34 +02:00
Francois-Xavier Le Bail
b62aefa71e RSVP: Add a bounds check 2016-07-04 12:11:20 +02:00
Francois-Xavier Le Bail
436ced3bd8 Change istr[] (for invalid string) to be global 2016-01-28 14:24:19 +01:00
Denis Ovsienko
3dbcc57b6a RSVP: squelch a compiler warning
./print-rsvp.c: In function ‘rsvp_print’:
./print-rsvp.c:1870:13: warning: ISO C90 forbids mixed declarations and code [-Wpedantic]
             u_short subplen, subtlen;
             ^
2015-12-28 10:32:57 +00:00
Guy Harris
f521fa526a I suspect an INTEGRITY object in a submessage covers only the submessage.
So don't hand rsvp_obj_print() a pointer to the beginning of, and the
length of, the entire bundle message; hand it a pointer to the beginning
of, and the length of, the submessage.

Use "bundle" rather than "aggregate" as the message type, while we're at
it; to quote RFC 2961, "The term "bundling" is used to avoid confusion
with RSVP reservation aggregation."
2015-12-27 20:13:14 -08:00
Guy Harris
7b1cba646d If HAVE_LIBCRYPTO isn't defined, define a stub signature_verify().
That cleans up its callers.
2015-12-27 18:09:33 -08:00
Guy Harris
59caec8a01 Have signature_verify() do the copying and clearing.
Just pass it a pointer to a routine to do the clearing and a pointer to
the data that needs to be cleared; signature_verify() will relocate all
pointers to stuff that needs to be cleared to point into the copy, clear
the signature itself, and call the routine to clear anything else.
2015-12-27 17:59:56 -08:00
Francois-Xavier Le Bail
ef87bed366 RSVP: Add some bounds checks
Moreover:
Add and use tstr[] string.
2015-11-06 18:55:56 +01:00
Francois-Xavier Le Bail
d7d269e8c6 RSVP: Fix an infinite loop 2015-10-06 16:24:40 +02:00
Guy Harris
11f73ad248 Don't require IPv6 library support in order to support IPv6 addresses.
Have our own routines to convert between IPv4/IPv6 addresses and
strings; that helps if, for example, we want to build binary versions of
tcpdump for Windows that can run both on NT 5 (W2K/WXP), which doesn't
have inet_ntop() or inet_pton(), and NT 6 (Vista/7/8/10), which do.  It
also means that we don't require IPv6 library support on UN*X to print
addresses (if somebody wants to build tcpdump for older UN*Xes lacking
IPv6 support in the system library or in add-on libraries).

Get rid of files in the missing directory that we don't need, and
various no-longer-necessary autoconf tests.
2015-09-17 14:56:44 -07:00
Francois-Xavier Le Bail
99c91c3aec Rename 'tcpdump-stdinc.h' to 'netdissect-stdinc.h'
Get the full log via: git log --follow netdissect-stdinc.h
2015-09-10 08:50:40 +02:00
Francois-Xavier Le Bail
c1c3c77463 Printers must include 'netdissect.h', not 'interface.h' 2015-09-05 23:35:58 +02: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
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
Denis Ovsienko
f0f2e6d058 don't reinvent ND_TCHECK2() 2014-06-12 14:59:03 +04: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
51670d1949 NDOize safeputs() and safeputchar() 2014-04-01 19:46:05 +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
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
Sascha Wildner
684955d586 Fix a bunch of "sizeof(sizeof(XXX))".
In some places, there was one too many levels of sizeof() -
sizeof(sizeof(XXX)) is sizeof(size_t), but we wanted the size of type
XXX.

Reviewed-By: Guy Harris <guy@alum.mit.edu>
2011-12-07 10:42:12 -08:00
Guy Harris
5d2acbcf57 Don't warn about the non-use of some arguments to rsvp_obj_print() if we
don't have libcrypto, as we can't use them if we don't.
2010-01-05 20:24:44 -08:00
Guy Harris
2ef070a02f Fix indentation to make it clearer what the arguments to a printf call
are.

To extract a 32-bit big-endian quantity from a particular address, use
EXTRACT_32BITS(), don't do pointer casting - casting a "char *" or
"unsigned char *" to point to a multi-byte quantity doesn't guarantee
the pointer can be dereferenced and give you the right answer (SPARC
traps on unaligned pointer accesses, some other processor types might
also trap, or might ignore the low bits of the pointer).
2009-06-28 11:06:01 -07:00
Guy (Core OS) Harris
88efc43576 From Marc Binderberger:
attached a patch for print-rsvp.c to decode the "label"
	subobject for Record Route Objects (RRO).
2009-06-09 20:54:49 -07:00
Guy (Core OS) Harris
d972c8c862 From Marc Binderberger:
I think this is a mistake in the procedure used to display the
	bitfield.  Instead of tok2str() it should be bittok2str() - at
	least since I changed it it display the flag field of the RSVP
	session attribute correctly.

	Diff file attached.

	Additionally I've taken the freedom to shorten the displayed
	strings a bit, taking the "desired" away that was in every
	string.  While correct RFC it fills the screen.  Not sure about
	your procedures changing output but as it never displayed before
	anyway ...  ;-)
2009-06-09 20:51:30 -07:00
hannes
3d3c70fbe9 add infrastructure for verifiying the HMAC-MD5 digest in routing protocols.
The shared secret is passed using the already existing -M option which is
used for TCP-MD5 checking.

add initial supoort for RSVP Integrity object verification.
2008-08-16 11:36:20 +00:00
hannes
7f53fdf513 add support for p2mp rsvp objects as per rfc4875 2008-03-03 12:57:04 +00:00
guy
d3d68cfc84 Don't declare variables in the middle of a block of code; in C89, that's
not valid.
2007-09-13 17:29:50 +00:00
hannes
10efb18e73 From Carles Kishimoto <carles.kishimoto@gmail.com>:
add support for OIF RSVP Extensions UNI 1.0 Rev. 2
2007-02-26 13:17:54 +00:00
hannes
4ab5e29b33 From Carles Kishimoto <carles.kishimoto@gmail.com>:
add support for the GMPLS 'label set' RSVP object.
2007-02-26 11:07:06 +00:00
hannes
b405dcc85e bugfix rom Carles Kishimoto <carles.kishimoto@gmail.com>:
the GMPLS label rquest object (c-type 4) is 4 octets (and not 8) in size.
2007-02-26 07:23:02 +00:00
hannes
1f1648b1c4 From Carles Kishimoto <carles.kishimoto@gmail.com>:
add support for the admin status RSVP object.
2007-02-25 22:06:12 +00:00
hannes
478292ecde From Carles Kishimoto <carles.kishimoto@gmail.com>:
add support for the Message-id NACK c-type.
2007-02-23 10:40:10 +00:00
hannes
617f68b272 remove redundant TRUE|FALSE defs 2006-06-23 02:03:09 +00:00
hannes
f35e1c7e78 update the diffserv-te error-spec codepoints (and retain the old ones) 2005-09-22 14:47:04 +00:00
hannes
4dc9cccc3e retain the old diffserv-te codepoints for a transition period 2005-09-20 10:04:26 +00:00
hannes
50973844ef update diffserv-TE codepoints as per rfc4124 2005-08-23 11:07:34 +00:00
hannes
9f3ac700b6 add support for RSVP integrity objects as per rfc 2747, update fast-reroute obj printer to latest spec 2005-08-01 09:10:23 +00:00
hannes
67eb31b994 code cosmetics:
at places where the entity to print / or increment
  shares the semantics of an IPv4 or IPv6 address
  use sizeof(in_addr) and sizeof(in6_addr),
  rather than a hardcoded 4 or 16
2005-07-11 20:15:31 +00:00
guy
542c5f3939 Add some length checking, improve some other length checking, and give
the right error if the RSVP object length isn't a multiple of 4.
2005-06-16 00:49:55 +00:00
guy
e660434752 Add some missing braces. 2005-04-25 19:28:30 +00:00
hannes
ce115a5966 bugfix: prevent infinite loop in ERO processing, print ERO subtype length 2005-04-25 13:18:30 +00:00
hannes
da8bcc0c0d bugfix: the timer values in the restart object
are 32-bit and not 16-bit wide
2005-01-13 07:08:54 +00:00
hannes
32cde073ff add support for diffserv-TE error codes as per draft-ietf-tewg-diff-te-proto-07 2004-09-16 09:02:43 +00:00
hannes
fa81716b75 add support for the Class-Type Object as per draft-ietf-tewg-diff-te-proto-07 2004-09-16 06:34:01 +00:00