summaryrefslogtreecommitdiff
path: root/print-sctp.c
Commit message (Collapse)AuthorAgeFilesLines
* Clean up types to squelch narrowing warnings.Guy Harris2019-04-171-1/+1
|
* Use the new GET_ macros instead of the EXTRACT_ onesFrancois-Xavier Le Bail2019-03-261-28/+28
| | | | | | | The exceptions are currently: Some EXTRACT_ in print-juniper.c, not used on packet buffer pointer. An EXTRACT_BE_U_3 in addrtoname.c, not always used on packet buffer pointer.
* Add two ndo_protocol reassignments after xxx_print() callsFrancois-Xavier Le Bail2019-02-271-0/+4
|
* Clean up whitespaces/indentationFrancois-Xavier Le Bail2019-02-271-31/+31
|
* Fix small misspellingsAntonin Décimo2019-01-231-2/+2
|
* Add more nd_print_trunc() callsFrancois-Xavier Le Bail2018-05-101-1/+1
| | | | | | | Update the output of some tests accordingly. Moreover: Add a ndo_protocol field assignment.
* Add the ndo_protocol field in the netdissect_options structureFrancois-Xavier Le Bail2018-03-161-0/+1
| | | | | Update this field in printer entry functions. It will be used for some printings.
* Have ip{6}addr_string take a u_char * as the second argument.Guy Harris2018-01-311-4/+4
| | | | Fix warnings that introduces.
* Remove function specifier 'inline' in printersFrancois-Xavier Le Bail2018-01-261-1/+2
| | | | | | | | It was mostly used with large functions. Moreover: Put some function definition names at the beginning of line. Fix a space.
* Always include <config.h> rather than "config.h".Guy Harris2018-01-211-1/+1
| | | | | | | | This can prevent bizarre failures if, for example, you've done a configuration in the top-level source directory, leaving behind one config.h file, and then do an out-of-tree build in another directory, with different configuration options. This way, we always pick up the same config.h, in the build directory.
* Use quoted include netdissect-stdinc.h instead of angle-bracketed oneFrancois-Xavier Le Bail2018-01-211-1/+1
|
* Remove unneeded '&' when getting a pointer to an nd_uintN_t typeFrancois-Xavier Le Bail2018-01-081-25/+25
|
* Update ND_PRINT() as a variadic macroFrancois-Xavier Le Bail2018-01-071-56/+56
|
* Use ND_TTEST_SIZE()/ND_TCHECK_SIZE() macros (1/n)Francois-Xavier Le Bail2018-01-031-2/+2
|
* Use nd_ types, add EXTRACT_ calls, clean up signed vs. unsigned.Guy Harris2017-12-301-113/+65
|
* Replace ND_TTEST2()/ND_TCHECK2() macros by macros using pointers (1/n)Francois-Xavier Le Bail2017-12-111-2/+2
| | | | | ND_TTEST2(var, l) -> ND_TTEST_LEN(p, l) ND_TCHECK2(var, l) -> ND_TCHECK_LEN(p, l)
* Rename EXTRACT_ macrosFrancois-Xavier Le Bail2017-11-221-26/+26
| | | | | | | | | | | | | | | | Now all the macros have a name meaning a count in bytes. With _S_: signed, _U_: unsigned e.g.: EXTRACT_BE_32BITS -> EXTRACT_BE_U_4 EXTRACT_LE_32BITS -> EXTRACT_LE_U_4 ... EXTRACT_BE_INT32 -> EXTRACT_BE_S_4 and have: EXTRACT_8BITS -> EXTRACT_U_1 EXTRACT_INT8 -> EXTRACT_S_1
* Rename EXTRACT_nBITS() macros to EXTRACT_BE_nBITS()Francois-Xavier Le Bail2017-11-181-26/+26
| | | | | It indicates clearly that these macros are used to extract big-endian integral values.
* Put some function definition names at the beginning of lineFrancois-Xavier Le Bail2017-11-161-4/+5
|
* Remove parenthesis following immediately a #ifFrancois-Xavier Le Bail2016-09-011-2/+2
| | | | This avoid Coccinelle warning "Unable to parse #if condition"
* Move the printer summaries from INSTALL.txt to each printerFrancois-Xavier Le Bail2016-08-141-0/+2
| | | | | | | | with the tag '\summary:' for greping. Remark: Currently some printers have no summary line. Moreover: Summarize all printers with a single line in INSTALL.txt
* Do more bounds checking.Guy Harris2015-12-151-66/+130
| | | | | | | | | Step through the SCTP packet with the bp variable, and keep a packet data remaining variable and use that for bounds checking. For each chunk, keep a chunk data remaining variable and use that as well. If there's not enough room for a full item, that gets reported as an error. While we're at it, fix an error printout.
* Don't require IPv6 library support in order to support IPv6 addresses.Guy Harris2015-09-171-8/+0
| | | | | | | | | | | | | Have our own routines to convert between IPv4/IPv6 addresses and strings; that helps if, for example, we want to build binary versions of tcpdump for Windows that can run both on NT 5 (W2K/WXP), which doesn't have inet_ntop() or inet_pton(), and NT 6 (Vista/7/8/10), which do. It also means that we don't require IPv6 library support on UN*X to print addresses (if somebody wants to build tcpdump for older UN*Xes lacking IPv6 support in the system library or in add-on libraries). Get rid of files in the missing directory that we don't need, and various no-longer-necessary autoconf tests.
* Rename 'tcpdump-stdinc.h' to 'netdissect-stdinc.h'Francois-Xavier Le Bail2015-09-101-1/+1
| | | | Get the full log via: git log --follow netdissect-stdinc.h
* Remove obsolete commentsFrancois-Xavier Le Bail2015-09-071-1/+1
|
* Printers must include 'netdissect.h', not 'interface.h'Francois-Xavier Le Bail2015-09-051-1/+1
|
* Fix a bunch of de-constifications.Guy Harris2015-04-261-2/+2
|
* dismiss NETDISSECT_REWORKED macroDenis Ovsienko2015-03-221-1/+0
| | | | | | | The purpose of this macro was to enable the file-by-file switch to NDO, after which only tcpdump.c had a use of it and the definitions guarded by it. Update tcpdump.c not to require them any more and dismiss the unused definitions.
* u_intN_t is dead, long live uintN_t.Guy Harris2014-04-231-56/+56
| | | | | | | | | 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.
* M3UA: improve code styleDenis Ovsienko2014-04-211-4/+7
| | | | | | | Merge m3ua.h into the only file that includes it (print-m3ua.c). Make M3UA functions follow naming pattern, constify some of their arguments and switch to ND_PRINT(). Make use of tok2str() and ternary conditional. Eliminate declarations in the middle of code (C89).
* M3UA support added (GH #342)Vyacheslav Trushkin2014-04-211-36/+96
| | | | | | | | | | | | | | | | | | | | | | | SCTP's payload protocol identifiers added. M3UA tests provided by wireshark http://wiki.wireshark.org/SampleCaptures#Sigtran_Protocol_Family But RFC4666 tells that parameter 0x0002 aren't carried by M3UA, so it's OK that tcpdump doesn't know about this identifier. Conflicts: Makefile.in interface.h print-sctp.c sctpConstants.h ----------------------------------------------------------------------- The change to sctp_print() does three things: * makes detection of ForCES consider PPID, not just port number * verifies chunk length of all SCTP_DATA chunks, not just of ForCES * adds PPID-specific dispatching with a particular case of M3UA -- Denis
* SCTP: use tok2str()Denis Ovsienko2014-04-101-50/+24
|
* Netdissectify the to-name resolution routines.Guy Harris2014-04-041-4/+4
| | | | | | | | 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.
* fixup a few ND_DEFAULTPRINT() use casesDenis Ovsienko2014-04-021-1/+1
|
* improve some recent conversionsDenis Ovsienko2014-03-291-2/+0
|
* NDOize ForCES, MPLS LSP ping and OLSR decodersDenis Ovsienko2014-03-271-1/+1
|
* NDOize AODV, IPv4 and SCTP decodersDenis Ovsienko2014-03-261-86/+82
|
* 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.
* Pull a bunch of headers into the only source file that includes them.Guy Harris2013-12-301-2/+336
| | | | | | For headers included in only one source file, put the header contents in the source file in question, and get rid of a bunch of stuff from the header not used in the source file.
* 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.
* SCTP: remove an unused variable (compiler warning)Denis Ovsienko2013-09-071-9/+2
|
* RESEND: [PATCH 1/1] ForCES fix SCTP TML portjamal2011-03-311-3/+3
| | | | | | | | | | | | | | | | | | | | | The old ports for SCTP TML ports were replaced at RFC editor publication time. Caught by folks preparing for an Interop tommorow. While we could add a backward compat support it seems meaningless if those ports will never ever be used in production. I will send new test/pcaps at a later point and remove the existing ones once this patch goes in. cheers, jamal commit 40ecad0e866e7567716e6e57158c5274c0786a21 Author: Jamal Hadi Salim <hadi@mojatatu.com> Date: Thu Feb 3 22:00:23 2011 -0500 Conform to new IANA assignment of ForCES SCTP TML Signed-off-by: Jamal Hadi Salim <hadi@mojatatu.com>
* Use EXTRACT_16BITS to extract big-endian 16-bit quantities from the packet.Guy Harris2010-01-261-6/+6
| | | | | | There's no guarantee that those quantities will be properly aligned, nor is there any guarantee that fetching an improperly-aligned quantity will work as desired.
* IETF FORCES protocol printer, from Jamal Hadi Salim <hadi at cyberus.ca.Michael Richardson2010-01-101-3/+51
|
* From Chris Larson: don't cut off the last byte of the chunk payload.guy2007-09-131-2/+3
|
* 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.