| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
[skip ci]
|
|
|
|
| |
GENEVE_PORT (6081) is a destination port.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ICHECK like Invalid-Check.
Reminder: If the checked expression is true an error message is printed
and a 'goto invalid' is executed.
This change adds the parameter 'operator'.
Before this change, '<' comparison was hard coded.
We can do now:
ND_ICHECK_U(length, <, HEADER_LEN);
ND_ICHECK_U(length, ==, 24);
ND_ICHECK_U(length, !=, 8);
ND_ICHECK_ZU(length, <, sizeof(struct my_struct));
ND_ICHECKMSG_U("message length", msg_tlen, <, 4);
...
(Any comparison operator)
Remark: The change of names from ND_LCHECK*() to ND_ICHECK*() is
because something else than a length(L) can be checked.
Moreover:
Place the 'message' parameter at the beginning of ND_ICHECKMSG_U()
and ND_ICHECKMSG_ZU() paramaters lists.
|
| |
|
|
|
|
|
|
|
|
| |
Add support for SBFD on UDP port 7784. SBFD is different
in that packets from the reflector will be sent with *source*
port 7784; in all other BFD mechanisms, it is only the
destination port that matters. For SBFD print-udp.c has to
check both source and destination port.
|
| |
|
|
|
|
|
|
| |
Remove all ND_TCHECK_*() instances as redundant. Remove or convert a few
improvised snapshot end guards. Reduce arity of rtcp_print(). Test the
AppleTalk LAP type after testing the UDP port numbers, not before.
|
|
|
|
|
|
|
|
| |
udp_print() always knows whether UDP port numbers are available or not,
so split udpipaddr_print() into two functions to lose some arity, much
branching and all type casting. In the new functions test for IPv4
explicitly. In udp_print() convert duplicate code into a conditional
call to udpipaddr_print().
|
|
|
|
|
|
| |
Replace the calls to ipaddr_string()/ip6addr_string() with calls to
GET_IPADDR_STRING()/GET_IP6ADDR_STRING() macros performing bounds
checking.
|
|
|
|
|
|
|
| |
Remove a number of instances that do not match common patterns and have
the only substantial effect on the code flow that a truncated packet
triggers "goto trunc" instead of longjmp(). (In a few cases this change
can increase the number of fields printed before giving up.)
|
|
|
|
|
|
|
|
|
|
|
| |
ND_TCHECK_n(e), n in { 1, 2, 3, 4, 8 }.
They are redundant because they are followed by a GET_.*_n(e) call,
same n, same e, which do the bounds check.
Remove unused 'trunc' labels and most associated codes.
Update the outputs of some tests accordingly.
|
|
|
|
|
|
|
|
| |
Some calls use '(const u_char *)(up+1)'.
Other calls use 'cp' (same value).
Update the calls to only use 'cp'.
(follow-up to ea0f25cc7765554e521bf7ea44d94f77500749f5)
|
|
|
|
| |
[skip ci]
|
|
|
|
|
|
|
|
| |
Add the parameter 'over_tcp'.
Move the shift by 2 bytes from the TCP printer to the DNS printer.
Move adding a prepended space from the TCP printer to the DNS printer.
Add a length check.
Add some comments about 'over_tcp' and 'is_mdns' call values.
|
|
|
|
|
|
|
|
|
|
| |
Some calls use '(const u_char *)(up + 1)' or '(const void *)(up + 1)'.
Other calls use 'cp' (same value).
Update the calls to only use 'cp'.
Moreover:
Update some other casted 'up + 1' uses to 'cp'.
Update some pointers to packet bytes from 'void *' to 'u_char *'.
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Consistently use tabs.
[skip ci]
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(pull request #843)
fix build break for Broadcom LI printer on BSD platforms
incorporate review comments: make bcm_li_print() void, add a sample capture
incorporate review comments: remove trailing tabs
add BCM LI outputs to testset
incorporate review comment: return after printing
update verbose output for bcm-li
|
| |
| |
| |
| |
| |
| | |
This allows tcpdump to handle DNS running on non-standard ports.
Add two test files with DNS over TCP and DNS over UDP, port 8053.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- the print routines for ptp different ptp messages
- test completed for sync message, announce message, delay request message,
delay response message and follow up message.
- integration of the ptp v2 code with the tcpdump code.
Signed-off-by: Partha S. Ghosh <psglinux@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If we see one when processing the hop-by-hop extension header, use it to
set the payload length.
In UDP, if we have a zero length field in the UDP header, and the length
of the data handed to us is > 65535, treat that as a Jumbo Payload
packet.
|
| |
| |
| |
| |
| |
| | |
If there isn't an IPv6 payload, there isn't any TCP or UDP packet, and
there's no TCP or UDP header to checksum, so there's no need for the
check (it's not there for IPv4).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
... and a Clang warning.
The warning was:
./print-udp.c:574:104: warning: address of array
'ip6->ip6_ctlun.ip6_un1.ip6_un1_plen' will always evaluate to 'true'
[-Wpointer-bool-conversion]
...& 0xf0) >> 4) == 6 && ip6->ip6_ctlun.ip6_un1.ip6_un1_plen) {
~~ ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
|
| |
| |
| |
| |
| |
| |
| | |
Put back the bfd_port_values, and use it to distinguish
between destination ports for RFC5883 multihop and
RFC7310 lag sessions. (The destination port is the only
difference between these messages.)
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
That means less duplication of functionality - and less chance that
XXX-over-IPv4 will be handled but XXX-over-IPv6 won't be handled, or
*vice versa*. (CARP and VRRP were being handled over IPv4 but not over
IPv6; this fixes that.)
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |\ |
|
| | |\ |
|
| | | |
| | | |
| | | |
| | | | |
knows how to print some mac commands and IE contents. Also includes the zep printer to decode ZigBee Encapsulation Protocol frames
|
| | |/
| |/|
| | |
| | |
| | | |
Those checksums are 16-bit; change the return types of those routines
appropriately.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Remove the tstr[] strings.
Update the output of some tests accordingly.
Moreover:
Add or update some ndo_protocol fields.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Update this field in printer entry functions.
It will be used for some printings.
|
| | |
| | |
| | |
| | | |
Must be based on packet header caplen.
|
| | |
| | |
| | |
| | | |
Fix warnings that introduces.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|