summaryrefslogtreecommitdiff
path: root/print-igmp.c
Commit message (Collapse)AuthorAgeFilesLines
* u_intN_t is dead, long live uintN_t.Guy Harris2014-04-231-15/+15
| | | | | | | | | 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-12/+12
| | | | | | | | 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-1/+1
|
* NDOize BOOTP, DHCPv6, DNS, PIM and sFlow decodersDenis Ovsienko2014-03-251-1/+1
| | | | Also add/remove tabs in a few involved functions to justify indentation.
* NDOize 7 more small decodersDenis Ovsienko2014-03-211-1/+1
| | | | | This change converts DVMRP, DLT_ENC, EGP, GeoNet, NetFlow, SLIP and TFTP decoders.
* NDOize 7 bigger decodersDenis Ovsienko2014-03-191-90/+89
| | | | | This change converts IGMP, IPv6 mobility options, LDP, Lightweight Access Point, PGM, PPTP and RIP decoders.
* 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.
* make consistent use of the "tstr" idiomDenis Ovsienko2013-12-261-5/+7
| | | | | | | | 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-1/+1
| | | | | | 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.
* Previous commit accidentally used 6 seconds cutoff.Bill Fenner2012-02-131-1/+1
| | | | 60 seconds == 600 in units of 0.1, oops.
* IGMPv3's Max Response Time is in units of 0.1 second.Bill Fenner2012-02-131-1/+5
| | | | | | If it's less than 60 seconds, print it as %.1fs, to be able to accurately represent small values including the tenths-of-a-second. Only use relts_print() when it is 60 seconds or more.
* Go with Wireshark's Internet checksum routine.Guy Harris2011-06-131-1/+5
| | | | | | | | | | | | | 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.
* Add bounds checking.guy2004-03-241-1/+2
|
* Add missing bounds checking to the DVMRP and PIM print routines.guy2003-11-191-2/+7
| | | | | | 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".
* The "__attribute__((packed))" tag on structures causes some files not toguy2002-12-111-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-18/+18
| | | | forth while i'm here
* Get rid of the "-Wno-unused" flag, and fix up most of theguy2002-09-051-1/+19
| | | | | | | | | | | | | | | unused-parameter problems reported by GCC. Add an _U_ tag to label parameters as unused if the function is called through a pointer (so that you can't change its signature by removing parameters) or if there are unused parameters only because the function isn't complete. Add some additional bounds checks the necessity for which was revealed while cleaning up unused-parameter problems. Make some routines static. "lcp_print()", defined in "print-lcp.c", isn't called anywhere - "print-ppp.c" has the code to dissect LCP. Get rid of "print-lcp.c".
* Added support for Win32, based on WinPcap.risso2002-08-011-5/+2
|
* whitespace cleanupitojun2002-06-111-11/+11
|
* Get rid of unneeded includes of <netinet/in_systm.h> and <netinet/ip.h>.guy2002-06-021-3/+1
|
* Eliminate some unused parameters.fenner2001-09-171-16/+14
| | | | | | | | | | | Use const more. Use EXTRACT_* macros more. Use TCHECK* more. Use tok2str() to replace some home-grown workalikes. smb: - Get rid of private types, use tcpdump-defined types - Rename fdata and fdata1 to smb_fdata and smb_fdata1 to avoid conflict with IRIX library function.
* Implement exponential Max Response Code->Max Response Time mapping for IGMPv3fenner2001-05-111-1/+13
|
* Don't print the IP src and dst again; print-ip.c already did it.fenner2001-01-091-8/+1
|
* Eliminate unused #includesfenner2000-11-021-14/+1
|
* Move IGMP to its own file.fenner2000-11-021-0/+327
Add IGMPv3 support. Contributed by: Wilbert de Graaf <wilbertdg@hetnet.nl>