summaryrefslogtreecommitdiff
path: root/print-m3ua.c
Commit message (Collapse)AuthorAgeFilesLines
* Use the new GET_ macros instead of the EXTRACT_ onesFrancois-Xavier Le Bail2019-03-261-9/+11
| | | | | | | 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 the nd_print_invalid() functionFrancois-Xavier Le Bail2018-09-111-3/+3
| | | | | | | It prints " (invalid)", used for malformed or corrupted packets. Moreover: Update CONTRIBUTING.
* Print truncations with nd_print_trunc() instead of tstr[] stringsFrancois-Xavier Le Bail2018-05-041-4/+3
| | | | | | | | Remove the tstr[] strings. Update the output of some tests accordingly. Moreover: Add or update some ndo_protocol fields.
* 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.
* 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
|
* Update ND_PRINT() as a variadic macroFrancois-Xavier Le Bail2018-01-071-12/+12
|
* Use ND_TTEST_SIZE()/ND_TCHECK_SIZE() macros (1/n)Francois-Xavier Le Bail2018-01-031-1/+1
|
* Use nd_ types, add EXTRACT_ calls.Guy Harris2017-12-301-19/+21
|
* Replace ND_TTEST2()/ND_TCHECK2() macros by macros using pointers (1/n)Francois-Xavier Le Bail2017-12-111-7/+7
| | | | | 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-6/+6
| | | | | | | | | | | | | | | | 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-6/+7
| | | | | It indicates clearly that these macros are used to extract big-endian integral values.
* M3UA: Fix a typoFrancois-Xavier Le Bail2017-05-111-1/+1
|
* Add a summary comment in all other printersFrancois-Xavier Le Bail2016-08-151-2/+4
| | | | | | | Moreover: Remove some redundant comments Update some summary comments Update the specification URL for ATA over Ethernet (AoE) protocol
* Change istr[] (for invalid string) to be globalFrancois-Xavier Le Bail2016-01-281-1/+0
|
* 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
* Rename cstr[] to istr[] like invalid stringFrancois-Xavier Le Bail2015-09-061-4/+4
| | | | | | Moreover: Hamonise the output for error messages Add istr[] in print-babel.c
* Use the word 'invalid' for 'malformed' or 'corrupted' packetsFrancois-Xavier Le Bail2015-09-061-8/+8
| | | | | | An invalid packet could be: 1) built malformed originally by the sender or a fuzz tester, 2) became corrupted in transit.
* Printers must include 'netdissect.h', not 'interface.h'Francois-Xavier Le Bail2015-09-051-1/+1
|
* 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-8/+8
| | | | | | | | | 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.
* Shorten sizeof to u_int, to match the %u format used with it.Guy Harris2014-04-211-1/+1
| | | | | | | | | On LP64 and LLP64 platforms, sizeof returns a 64-bit value, which is larger than an int or unsigned int, so if you add the result of sizeof to a value shorter than 64 bits, you can't print the result with %u. As an M3UA parameter header is much shorter than 2^32 bytes, we can safely just cast sizeof(struct m3ua_param_header) to u_int.
* M3UA: add safety checksDenis Ovsienko2014-04-211-8/+86
| | | | | | Add M3UA headers diagrams and check that message/parameter length allows for at least respective header. Use TCHECK and signal malformed structures.
* M3UA: improve code styleDenis Ovsienko2014-04-211-39/+125
| | | | | | | 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-0/+175
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