Commit Graph

69 Commits

Author SHA1 Message Date
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
guy
608bcf8fa9 The second argument to "rsvp_obj_print()" is just a character string
tag, so make it "const char *", not "const u_char *").

Fix some typos, and fix up a comment.
2004-07-21 21:50:46 +00:00
guy
a681cd86bd Fix up some compiler warnings on platforms where "sizeof" generates an
"unsigned long" value.
2004-07-21 21:43:26 +00:00
hannes
ce83684fe7 - add support for RSVP aggregate Message processing
-put the object printer in a dedicated function that can be
   called from RSVP or from RSVP in RSVP (like for example in Aggregate Messages)
- improve verbosity when the min/max commonheader has a bogus size
- add support for the message-ID, message-ID ack and message-ID list object
2004-07-16 00:13:51 +00:00
guy
95421f8fc6 Add bounds checking and length checking.
Make "rsvp_intserv_print()" static - it's not used outside print-rsvp.c.
2004-03-24 04:00:38 +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
hannes
db25418bdc -add support for decoding the RSVP header Flag field
-add rfc2961 "Refresh reduction" Header Flag value
2003-10-22 11:43:04 +00:00
hannes
dfa5e625fe do a hexdump for the RSVP_HOP object for the C_Types which
do contain TLVs as we do not yet have a TLV decoder here;
print the codepoint for GMPLS LSP encodings
2003-10-20 10:50:09 +00:00
hannes
7310e34463 display cosmetics: add missing colons and show codepoints for gmpls 2003-10-20 10:35:20 +00:00
hannes
31a4462cfe support for generalized label as per rfc3471, correct offset for waveband c-type, support for recover label as per rfc3474 2003-06-07 23:05:19 +00:00
hannes
4254cbe7d1 add support for GMPLS related objects as per rfc3473 2003-06-07 22:41:31 +00:00