summaryrefslogtreecommitdiff
path: root/print-pim.c
Commit message (Collapse)AuthorAgeFilesLines
* don't reinvent ND_TCHECK2()Denis Ovsienko2014-06-121-2/+1
|
* u_intN_t is dead, long live uintN_t.Guy Harris2014-04-231-9/+9
| | | | | | | | | 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.
* PIM: refresh and use tok2str()Denis Ovsienko2014-04-101-28/+34
| | | | | | | Remove PIMv1 type 8 (Mode), which is missing from draft-ietf-idmr-pim-spec-01 and is not decoded anyway. List (w/o decoding) two PIMv2 types defined in 2007 and 2012.
* Netdissectify the to-name resolution routines.Guy Harris2014-04-041-26/+26
| | | | | | | | 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 some generic codeDenis Ovsienko2014-04-031-11/+11
|
* NDOize BOOTP, DHCPv6, DNS, PIM and sFlow decodersDenis Ovsienko2014-03-251-283/+285
| | | | Also add/remove tabs in a few involved functions to justify indentation.
* 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-2/+2
|
* whitespace changesMichael Richardson2014-01-011-1/+1
|
* Fix compilation warnings: set but unused variables.Gleb Smirnoff2013-11-261-3/+1
|
* justify declarations of struct tok arraysDenis Ovsienko2013-09-241-3/+3
| | | | | | 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.
* spelling fixesRomain Francoise2012-05-281-2/+2
|
* from Weesan Lee <weesan@juniper.net>: display pim bidir supportHannes Gredler2011-06-211-2/+6
|
* Go with Wireshark's Internet checksum routine.Guy Harris2011-06-131-10/+8
| | | | | | | | | | | | | The Wireshark routine is based on the BSD in-kernel portable checksum routine (thus BSD-licensed); it takes a vector of pointers and lengths and checksums the concatenation of the buffers in question (just as the BSD in-kernel routine checksums a chain of mbufs). This simplifies the "with a pseudo-header" checksums; hopefully it'll fix up the problems being seen on some big-endian platforms, which might be due to hand-calculating some or all of the checksum and doing so incorrectly. It also gets rid of some code that might be dereferencing unaligned pointers.
* Convert the IPv6 printer to use netdissect.Guy Harris2010-11-071-1/+1
|
* modularize ip6 nextlayer checksum generation andHannes Gredler2009-10-121-7/+5
| | | | change tcp6 and pim6 to use it.
* add support for PIMv2 checksum verification, Null Register messages and ↵hannes2006-02-131-17/+40
| | | | Register Flag resolution
* code cosmetics:hannes2005-07-111-10/+10
| | | | | | | 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
* Get rid of an unused variable. (It should be possible to tell the typeguy2005-04-201-6/+1
| | | | of address from the way it's printed.)
* Add a comment asking about the address and mask length fields inguy2005-04-201-1/+5
| | | | join/prune requests.
* refactored ip_print() so that chained header parser (ESP/AH) canmcr2005-04-061-2/+9
| | | | more easily call the inner parts.
* -display cosmetics: make the output more conistent:hannes2004-09-291-6/+4
| | | | | | | | - 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 bounds checks.guy2004-03-241-1/+2
|
* provide multiline output for PIM Joins/Grafts/Graft-Ackshannes2004-03-181-13/+49
|
* make PIMv2 use tok2str(), change to multiline outputhannes2003-12-151-94/+133
|
* Add missing bounds checking to the DVMRP and PIM print routines.guy2003-11-191-1/+2
| | | | | | Instead of checking that there are 8 bytes available at the beginning of an IGMP packet - which there might not be, e.g. with some DVMRP packets - do the checks as necessary before fetching values.
* 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".
* my address list option, from suz@kame.netitojun2003-10-291-1/+21
|
* The "__attribute__((packed))" tag on structures causes some files not toguy2002-12-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* put __attribute__((packed)) to packet headers. s/u_short/u_int16_t/ and soitojun2002-11-091-2/+2
| | | | forth while i'm here
* From Pavlin Radoslavov <pavlin@icir.org>: print the PIM "LAN Pruneguy2002-10-191-1/+17
| | | | Delay" option.
* Add a few more GCC warnings on GCC >= 2 for ".devel" builds.guy2002-09-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From Neil T. Spring: fixes for many of those warnings: addrtoname.c, configure.in: Linux needs netinet/ether.h for ether_ntohost print-*.c: change char *foo = "bar" to const char *foo = "bar" to appease -Wwrite-strings; should affect no run-time behavior. print-*.c: make some variables unsigned. print-bgp.c: plen ('prefix len') is unsigned, no reason to validate by comparing to zero. print-cnfp.c, print-rx.c: use intoa, provided by addrtoname, instead of inet_ntoa. print-domain.c: unsigned int l; (l=foo()) < 0 is guaranteed to be false, so check for (u_int)-1, which represents failure, explicitly. print-isakmp.c: complete initialization of attrmap objects. print-lwres.c: "if(x); print foo;" seemed much more likely to be intended to be "if(x) { print foo; }". print-smb.c: complete initialization of some structures. In addition, add some fixes for the signed vs. unsigned comparison warnings: extract.h: cast the result of the byte-extraction-and-combining, as, at least for the 16-bit version, C's integral promotions will turn "u_int16_t" into "int" if there are other "int"s nearby. print-*.c: make some more variables unsigned, or add casts to an unsigned type of signed values known not to be negative, or add casts to "int" of unsigned values known to fit in an "int", and make other changes needed to handle the aforementioned variables now being unsigned. print-isakmp.c: clean up the handling of error/status indicators in notify messages. print-ppp.c: get rid of a check that an unsigned quantity is >= 0. print-radius.c: clean up some of the bounds checking. print-smb.c: extract the word count into a "u_int" to avoid the aforementioned problems with C's integral promotions. print-snmp.c: change a check that an unsigned variable is >= 0 to a check that it's != 0. Also, fix some formats to use "%u" rather than "%d" for unsigned quantities.
* Added support for Win32, based on WinPcap.risso2002-08-011-7/+2
|
* whitespace cleanupitojun2002-06-111-2/+2
|
* Handle old DR-priority and old Bidir-capable option values.fenner2002-05-071-1/+15
|
* Update location of auto-RP spec.fenner2001-07-041-2/+8
| | | | Print reserved fields if they're non-zero.
* Remove #if 0 sectionsfenner2001-06-151-6/+1
| | | | | | | | Finish converting over to having the caller print the IP address (except for UDP, TCP and SCTP). This consists mostly of removing places where the IP address is printed, both in the big "case" in ip_print() and in the individual printers. Also fix a couple of spacing bugs.
* Parse State-Refresh Hello option properly.fenner2001-05-111-4/+8
|
* Don't print multiple lines for a single packet unless -vvfenner2001-05-101-3/+9
|
* Update PIM Hello options with IANA-registered values.fenner2001-04-271-15/+12
|
* styleitojun2001-01-281-260/+255
|
* always use u_intXX_t for protocol format declaration. char/short/int may notitojun2000-10-031-3/+3
| | | | | | come with exact size. while at it, correct signedness of ip/udp header field. nuke most of the use of bitfield. TODO: bitfield in namser.h
* Get rid of includes of <netinet/in_systm.h>, and replace "n_short",guy2000-09-291-2/+1
| | | | "n_long", and "n_time", defined in that file, with other types.
* Add an "ip.h" header, to declare the IP stuff needed by dissectors, andguy2000-09-231-2/+3
| | | | | | | | | | | have dissectors include them rather than <netinet/ip.h> or <netinet/ip_var.h>, if they actually need that stuff. Put the declarations of the ICMP stuff directly into "print-icmp.c". Remove all unnecessary includes of <netinet/ip*.h> files. Copy the byte-order stuff from "nameser.h" into "tcp.h".
* Set frpcnt to the right value.fenner2000-08-171-3/+3
| | | | Submitted by: Ravi Puvvala <ravi@iprg.nokia.com>
* style. s/switch(/switch (/.itojun2000-04-241-4/+4
|
* Fix nybble-order bug: version is top, type is bottom.fenner2000-02-161-7/+9
| | | | | Make sure to print "pim" in front of the PIM version. Reduce ep to the end of the IP packet if we captured some padding.
* remove unnecessary header files.itojun2000-01-191-7/+1
|
* fix pim printing. type/version field is 4bit+4bit in 8bit.itojun2000-01-191-23/+18
| | | | | | - using u_int for this bitfield would make them occupy 32bits. - use of char as bitfield type is illegal either so I've avoided use of bitfield (use mask and shift).