Commit Graph

54 Commits

Author SHA1 Message Date
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
hannes
0364e27192 fix format string & arguments 2003-05-08 14:52:20 +00:00
hannes
c1af4ad9fd added subobject flag parsing for the RRO object, added additional SESSION_ATTR_OBJ flag codepoints 2003-03-14 10:03:52 +00:00
guy
d85d9ee28c Make format argument lists match the format strings. 2003-03-11 06:40:58 +00:00
hannes
5379087cc4 bugfix: wrong starting pointer for Session name in RSVP_OBJ_SESSION_ATTRIBUTE 2003-03-05 11:28:21 +00:00
hannes
15e66a139f added support for parsing the RSVP Properties and Error Spec Object 2003-03-05 11:13:34 +00:00
hannes
19a360850c IPv4, IPv6 C-Types for Sender Template Obj., display of break bit in intserv per-service header 2002-12-14 02:03:10 +00:00
hannes
9c58a41455 rework of the intserv service type dissector 2002-12-14 01:38:32 +00:00
hannes
52fe86f06d added support for RSVP CONFIRM object 2002-12-12 18:31:58 +00:00
hannes
2644a5e317 -modularized the decoding of intserv related parameters in rsvp_intserv_print()
- added support for parameters 4,6,8,10
-support for the remaining missing intserv (SENDER_TSPEC,ADSPEC) objects
2002-12-12 15:58:33 +00:00
hannes
bdfe570710 support for fastreroute and detour RSVP objects as per draft-ietf-mpls-rsvp-lsp-fastreroute-01 2002-12-12 13:29:20 +00:00
guy
ae560894b5 Use "%.10g" rather than "%.3f" to print floating-point numbers, as it
1) switches to "e" format for sufficiently large or small
	   numbers;

	2) doesn't put out any unnecessary trailing 0's.
2002-12-11 07:18:08 +00:00
guy
fcc82f451d The "__attribute__((packed))" tag on structures causes some files not to
compile with Sun C, as "interface.h" isn't being included before the
structures are being declared.

Furthermore, in the files that Sun C *can* compile, it doesn't cause Sun
C to generate code that's safe with unaligned accesses, as
"__attribute__" is defined as a do-nothing macro with compilers that
don't support it.

Therefore, we get rid of that tag on the structures to which it was
added, and instead use "EXTRACT_16BIT()" and "EXTRACT_32BIT()" to fetch
16-bit and 32-bit big-endian quantities from packets.  We also fix some
other references to multi-byte quantities to get rid of code that tries
to do unaligned loads on platforms that don't support them.

We also throw in a hack that makes those macros use
"__attribute__((packed))" on structures containing only one 16-bit or
32-bit integer to get the compiler to generate unaligned-safe code
rather than doing it by hand.  (GCC on SPARC produces the same code that
doing it by hand does; I don't know if GCC on any other big-endian
strict-alignment processor generates better code for that case.  On
little-endian processors, as "ntohs()" and "ntohl()" might be functions,
that might actually produce worse code.)

Fix some places to use "%u" rather than "%d" to print unsigned
quantities.
2002-12-11 07:13:49 +00:00
guy
c44ee4aace "%.f" is not a valid format string; you need a number after the ".".
Use "%.3f".

The floating-point numbers in RSVP packets are stored in big-endian
format; extract them as such, so that when we process them as numbers
they're in native byte order, not network byte order.
2002-12-10 08:16:22 +00:00
hannes
657c5df865 add some more (intserv) related RSVP objects 2002-12-04 19:04:56 +00:00
itojun
10afb02ac8 put __attribute__((packed)) to packet headers. s/u_short/u_int16_t/ and so
forth while i'm here
2002-11-09 17:19:16 +00:00