summaryrefslogtreecommitdiff
path: root/print-ospf.c
Commit message (Collapse)AuthorAgeFilesLines
* clean K&R style up in function declarations a bitDenis Ovsienko2015-03-051-4/+4
| | | | The function body should have its opening brace on the next line.
* u_intN_t is dead, long live uintN_t.Guy Harris2014-04-231-20/+20
| | | | | | | | | 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.
* Netdissectify the to-name resolution routines.Guy Harris2014-04-041-31/+31
| | | | | | | | 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.
* NDOize DECnet, OSPF and TCP decodersDenis Ovsienko2014-04-021-286/+279
|
* NDOize safeputs() and safeputchar()Denis Ovsienko2014-04-011-1/+1
|
* remove tcpdump's own CVS keywordsDenis Ovsienko2014-01-031-5/+0
| | | | | | 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.
* ndo-ize print-ascii: hex_print_with_offset()Michael Richardson2014-01-011-6/+6
|
* whitespace changesMichael Richardson2014-01-011-17/+17
|
* make consistent use of the "tstr" idiomDenis Ovsienko2013-12-261-2/+2
| | | | | | | | For each decoder that has more than one instance of truncation signaling and prints the same string in each instance make sure that the string is declared as "static const char tstr[]" right after the initial includes block. Where necessary, replace fputs(s, stdout) with equivalent printf("%s", s).
* justify declarations of struct tok arraysDenis Ovsienko2013-09-241-17/+17
| | | | | | 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.
* Use __inline with MSVC for all source files.Guy Harris2013-06-091-4/+0
|
* Constify some arguments.Guy Harris2011-10-131-2/+2
|
* Fix plurals in packet count messages.Guy Harris2011-03-081-1/+1
| | | | | | | | Based on a patch from cr4ckn@sourceforge.net, but with a macro PLURAL_SUFFIX() defined to return either "s" or "" (rather than possibly printing a NUL character with %c), and with that macro used in a couple of cases where the equivalent had been done by hand, and with one case the patch missed fixed as well.
* Don't directly fetch multi-byte integers from packets.Guy Harris2010-02-211-1/+1
| | | | | | | | Use the EXTRACT_ macros to extract multi-byte integral values from packets, rather than just dereferencing pointers into the packet; there is no guarantee that the packet data will be aligned on the right boundary, and there is no guarantee that, if they're not, a direct access will work correctly.
* clean up some code-cosmetics that came up during code-reviewhannes2007-10-081-14/+14
|
* unclutter the options field value definitionshannes2007-09-271-15/+3
|
* add support for multi-topology ospf as per draft-ietf-ospf-mt-09hannes2007-09-271-36/+60
|
* From Marc Binderberger:guy2007-09-231-8/+140
| | | | | | | | | add support for OSPF Link-Local Signaling (RFC 4811/4812/4813); when printing the Database Description, show the MTU and sequence number; fix "bogus length" messages when printing LSA headers.
* squelch some signedness compiler warningshannes2007-07-241-2/+2
|
* bugfix: use the correct codepoint for the OSPF simple text auth token entry.hannes2006-12-131-8/+4
| | | | use safeputs to print the password.
* -share the grace LSA and TE LSA printer with the outside world.hannes2006-09-051-256/+302
| | | | -misc. cosmetic cleanups
* update diffserv-TE codepoints as per rfc4124hannes2005-08-231-12/+12
|
* Add an "fn_printzp()" routine for printing null-padded strings (stringsguy2005-05-061-3/+6
| | | | | | | | | | | | | | | with a maximum length, where a string shorter than that length is padded with NULs), as "fn_print()" won't handle the maximum length *and* the snapshot length and "fn_printn()" won't stop on a null string. Use it where appropriate. Always pass "snapend" to "fn_print()" and "fn_printn()" if they're passed a pointer into the packet data; only pass NULL if they're being handed a pointer into a buffer that's not part of the packet data. Always check the return value of "fn_print()", "fn_printn()", and "fn_printzp()" if they're passed "snapend", and do the appropriate string termination and "packet truncated" indication if they return 1.
* Get rid of an unused variable.guy2005-04-201-4/+2
|
* -display cosmetics: make the output more conistent:hannes2004-09-291-3/+2
| | | | | | | | - consistent use of length field (not payload-len) - no message type number given in PIM/OSPF printers as those changes affect only verbose mode and/or routing protocols we hope not to break existing scripts;
* add support for the Up/Down Bit as per draft-ietf-ospf-2547-dnbit-04hannes2004-09-201-1/+2
|
* add support for the Opaque Router Information LSA and the Router ↵hannes2004-09-201-1/+69
| | | | Capabilities TLV as per draft-ietf-ospf-cap-03
* bugfix: changed format for diffserv-TE subTLVs, add tok2str() for decoding ↵hannes2004-09-151-3/+6
| | | | BC models
* add (cheap) support for NSSA LSAshannes2004-09-091-1/+2
|
* "if (!TTEST2(x, y)) goto trunc" is just "TCHECK2(x, y)".guy2004-03-241-9/+11
| | | | Add a length check.
* add support for Diffserv TE per draft-ietf-tewg-diff-te-proto-06hannes2004-01-271-2/+12
|
* add support for Graceful OSPF Restart (rfc3623)hannes2004-01-081-3/+78
|
* Don't check for the OSPF opaque traffic engineering TLV type beforeguy2003-11-191-4/+3
| | | | | processing the TLV - there might not be any TLVs. Instead, check before fetching the type.
* Have the configure script arrange that the Makefile define _U_guy2003-11-161-4/+4
| | | | | | | | | | 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.
* From Neil Spring:guy2003-11-151-4/+4
| | | | | | | | | | | 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".
* Squelch some compiler sarnings.guy2003-10-221-38/+64
| | | | Add some length checks.
* - fix a compiler padding issue in the LS-Request structurehannes2003-10-221-9/+25
| | | | | | | u_int32_t ls_type becomes u_int8_t ls_type[4]; - teach the LS-Request decoder howto properly print Opaque LSAs
* misc. cosmetic output & identationhannes2003-10-221-19/+19
|
* - port LS_TYPE_OPAQUE printing from ospf_print_lsa() to ospf_print_lshdr()hannes2003-10-221-45/+51
| | | | | | | | -that fixes the LSA-ACK printing of Opaque LSAs bugreport courtesy Carles Kishimoto Bisbe ckishimo [AT] ac [DOT] upc [DOT] es - make use of ospf_print_lshdr() inside ospf_print_lsa() - shared link risk group decoder from Carles Kishimoto Bisbe ckishimo [AT] ac [DOT] upc [DOT] es - print IP adresses for LINK_IDs
* bug report [plus partial patch] from Carles Kishimoto Bisbe ckishimo [AT] ac ↵hannes2003-10-201-134/+144
| | | | | | | [DOT] upc [DOT] es -parse TE-TLVs until the ls_length field is zero -print router-ID TLV
* - squelch some compiler warningshannes2003-10-041-18/+189
| | | | | | courtesy Neil Spring nspring [AT] cs [DOT] washington [DOT] edu - add support for the Traffic Engineering TLV plus all known subTLVs - add support for draft-ietf-ccamp-ospf-gmpls-extensions defined subTLVs
* remove some LSA header code redundancyhannes2003-10-031-13/+10
|
* show opaque-LSA specific fields of the LSA headerhannes2003-10-031-8/+31
|
* add better handling for unknown LSAs to OSPFhannes2003-10-021-1/+26
|
* better display of MD5 related authentication infohannes2002-12-231-8/+19
|
* The "__attribute__((packed))" tag on structures causes some files not toguy2002-12-111-25/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* On some platforms, "ntohl()" returns a "long" or "unsigned long"; castguy2002-11-101-7/+7
| | | | | | it to "u_int32_t" when printing with "%[duox]". Print unsigned quantities with "%u", not "%d".
* ospf rework;hannes2002-11-071-240/+179
| | | | | | | | | - get rid of lots of private tok2string() lookalikes - changed output formatting to idented multiline output (-v option) - added defs for opaque, NSSA LSAs - completed option byte processing more changes to come;
* Added support for Win32, based on WinPcap.risso2002-08-011-7/+6
|
* Don't print "nbrs" if no neighbor list will follow.fenner2001-06-281-3/+4
| | | | Remove extra space before "OSPF".