summaryrefslogtreecommitdiff
path: root/print-vxlan.c
Commit message (Collapse)AuthorAgeFilesLines
* Rework "Update more link-layer dissectors to void functions"Francois-Xavier Le Bail2020-08-061-1/+1
| | | | | | | | | | It's a follow-up to commit 81dbf4a0b05092760d0ff0cdd48c692e4769ba99. There is no need to update ether_print(), ether_common_print() and ether_switch_tag_print() to void functions: back to u_int functions. There is also no need to add a flag parameter to ether_print(), ether_common_print() and ether_switch_tag_print(): Remove it.
* Update more link-layer dissectors to void functionsFrancois-Xavier Le Bail2020-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | brcm_tag_if_print() brcm_tag_prepend_if_print() dsa_if_print() edsa_if_print() ether_if_print() netanalyzer_if_print() netanalyzer_transparent_if_print() Update ether_print(), ether_common_print() and ether_switch_tag_print() to void functions. Add a flag parameter to ether_print(), ether_common_print() and ether_switch_tag_print() to increment the link-layer header length field of the netdissect_options when needed. The calls use TRUE when the return value of the funtions was used. The calls with FALSE avoid increments when the calls are nested. Moreover: Remove trailing "_if" from some protocol names.
* Fix some narrowing warnings on LP64/LLP64 platforms.Guy Harris2019-04-181-1/+1
| | | | | | | | | | | | Add a ND_BYTES_AVAILABLE_AFTER() macro to find the number of bytes available in the captured data, starting at the byte pointed to by the argument. It returns a u_int rather than a ptrdiff_t, so it'll be 32 bits on LP64 and LLP64 platforms as well as on ILP32 platforms. Use that macro. Make size-of-buffer arguments size_t. Cast some size_t and ptrdiff_t values to u_int or int.
* Use the new GET_ macros instead of the EXTRACT_ onesFrancois-Xavier Le Bail2019-03-261-2/+2
| | | | | | | 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.
* Print truncations with nd_print_trunc() instead of tstr[] stringsFrancois-Xavier Le Bail2018-05-041-2/+1
| | | | | | | | 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-4/+4
|
* Replace ND_TTEST2()/ND_TCHECK2() macros by macros using pointers (1/n)Francois-Xavier Le Bail2017-12-111-1/+1
| | | | | ND_TTEST2(var, l) -> ND_TTEST_LEN(p, l) ND_TCHECK2(var, l) -> ND_TCHECK_LEN(p, l)
* Use more the EXTRACT_U_1() macro (49/n)Francois-Xavier Le Bail2017-12-091-1/+1
| | | | Assignment, *(p)
* Rename EXTRACT_ macrosFrancois-Xavier Le Bail2017-11-221-1/+1
| | | | | | | | | | | | | | | | 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-1/+1
| | | | | It indicates clearly that these macros are used to extract big-endian integral values.
* CVE-2017-5342/pass correct caplen value to ether_print()Denis Ovsienko2017-01-181-1/+1
| | | | | | | | | | | | | | | In that function the "length" parameter means off-the-wire length, that is, the length declared inside the outer header. The "caplen" parameter means the amount of bytes actually available in the captured packet. gre_print_0() and the functions modelled after it passed the value of "length" instead of the value of "caplen", this could make ether_print() access beyond the memory allocated for the captured packet. Brian Carpenter had demonstrated this for the OTV case. Fix the involved functions that call ether_print() to pass the correct value and leave a comment to dismiss "caplen" later as its value can be reliably derived from the other ether_print() parameters.
* Add a summary comment in all other printersFrancois-Xavier Le Bail2016-08-151-0/+4
| | | | | | | Moreover: Remove some redundant comments Update some summary comments Update the specification URL for ATA over Ethernet (AoE) protocol
* VXLAN: Add a bound checkFrancois-Xavier Le Bail2016-01-311-5/+14
| | | | | | Moreover: Add and use tstr[]. Add and use VXLAN_HDR_LEN.
* 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
* 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.
* VXLAN: update reference from draft to RFC7348Francois-Xavier Le Bail2014-11-141-1/+3
|
* u_intN_t is dead, long live uintN_t.Guy Harris2014-04-231-2/+2
| | | | | | | | | 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.
* make use of NETDISSECT_REWORKEDDenis Ovsienko2014-03-151-1/+2
| | | | | Update the already converted decoders to define the macro and to include interface.h instead of netdissect.h. Fix incurred compile errors.
* NDOize AHCP, OTV and VXLAN decodersDenis Ovsienko2014-03-081-19/+7
|
* don't include addrtoname.h needlesslyDenis Ovsienko2014-02-251-1/+0
|
* only include udp.h when necessaryDenis Ovsienko2014-02-111-2/+0
|
* whitespace changesMichael Richardson2014-01-011-2/+2
|
* Declare vxlan_print() and otv_print() in interface.h, and fix its definition.Guy Harris2013-03-261-1/+1
| | | | | They doesn't use their third argument, and they aren't being passed a third argument, so get rid of that argument.
* - Add support for OTV (draft-hasmit-otv-04).Francesco Fondelli2013-02-261-1/+0
| | | | - Use the packettype infrastructure (-T vxlan) for VXLAN parsing (waiting for a well known dest port)
* Add support for VXLAN (draft-mahalingam-dutt-dcops-vxlan-03)Francesco Fondelli2013-02-251-0/+75