summaryrefslogtreecommitdiff
path: root/print-sctp.c
Commit message (Collapse)AuthorAgeFilesLines
* Add a flag to suppress the "default_print()" call made in variousguy2005-07-071-2/+2
| | | | | | | | link-layer print routines if no other print routine claimed the packet. Test whether that flag is set rather than testing whether neither of -x or -q were specified, and have -x, -q, *and* -X set that flag, so that -X suppresses it just as -x does. That way you don't get those pckets dumped twice if -X was specified.
* Fix the bounds check for the chunk.guy2005-05-061-2/+2
|
* Add more bounds checks, and check for bogus chunk lengths (too short).guy2005-05-051-11/+19
|
* Don't use "u_long", as its length is not guaranteed to be 4 bytes. Inguy2005-04-131-4/+4
| | | | | | fact, don't even use "u_int32_t", as we're just pointing into a packet, which is made up of bytes - use "u_char", and bump the pointer by 4 for each item.
* Print all of the SCTP information, except for the payload, if "-vv"guy2004-12-151-6/+11
| | | | isn't specified.
* 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".
* From Mark Ellzey Thomas <mark@ackers.net>: check the length of a dataguy2003-08-061-3/+11
| | | | chunk before printing it.
* The SCTP dissector is only called for SCTP packets, so there's no reasonguy2003-06-031-21/+11
| | | | | | | | | for it to check the protocol number in the IP header. Have the IPv6 dissector call the SCTP dissector for SCTP packets. Get rid of the definition of IPPROTO_SCTP in sctpConstants.h, so we don't have problems if <netinet/in.h> also defines it.
* The "__attribute__((packed))" tag on structures causes some files not toguy2002-12-111-28/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Added support for Win32, based on WinPcap.risso2002-08-011-7/+2
|
* whitespace cleanupitojun2002-06-111-37/+37
|
* Constify.guy2002-04-251-35/+36
| | | | | Make "payloadPtr" a "u_char *" rather than a "char *", to eliminate some signed vs. unsigned complaints from some compilers.
* The payload of an SCTP DATA chunk is *not* necessarily ASCII text, so itguy2001-12-121-8/+10
| | | | | | shouldn't be printed by directly sending it to the standard output; print it with "default_print()" if neither the "-x" nor the "-q" flag were set.
* Don't switch between using standard I/O and raw writes; just useguy2001-12-111-5/+4
| | | | "fwrite()" instead of "write()".
* "print-sctp.c" doesn't have to include <net/if.h>, and, if it doesn't doguy2001-08-011-7/+1
| | | | | | | so, it doesn't need to provide incomplete definitions of "struct mbuf" or "struct rtentry", either. If it *does* include <net/if.h>, it appears to fail to compile on at least some versions of AIX; remove the include and the incomplete definitions.
* size_t may not fit into intitojun2001-06-271-3/+3
|
* ntohl() is typed to return unsigned long on old 4.[34]BSD-based OSitojun2001-05-091-11/+12
| | | | | (i guess this i freebsd only among *BSD these day), and u_int32_t on some os. do not rely upon OS decl and cast away to u_int32_t, and use %lu.
* Quiet down gcc -Wallfenner2001-05-091-4/+4
|
* SCTP printing from Armando L. Caro Jr. <acaro@mail.eecis.udel.edu>fenner2001-05-091-0/+355
Modified to print IP/IPv6-level addresses like TCP does, and to not print multi-line detail unless -vv by fenner.