forked from the-tcpdump-group/tcpdump
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The ICMP types are different, but everything else about PROBE, including the RFC4884-based parsing, is the same, so we share some code from print-icmp.c using the new icmp.h.
- Loading branch information
Showing
7 changed files
with
131 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright (c) 1988, 1989, 1990, 1991, 1993, 1994, 1995, 1996 | ||
* The Regents of the University of California. All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that: (1) source code distributions | ||
* retain the above copyright notice and this paragraph in its entirety, (2) | ||
* distributions including binary code include the above copyright notice and | ||
* this paragraph in its entirety in the documentation or other materials | ||
* provided with the distribution, and (3) all advertising materials mentioning | ||
* features or use of this software display the following acknowledgement: | ||
* ``This product includes software developed by the University of California, | ||
* Lawrence Berkeley Laboratory and its contributors.'' Neither the name of | ||
* the University nor the names of its contributors may be used to endorse | ||
* or promote products derived from this software without specific prior | ||
* written permission. | ||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED | ||
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF | ||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
*/ | ||
|
||
#ifndef netdissect_icmp_h | ||
#define netdissect_icmp_h | ||
|
||
/* common data structures to be shared between ICMP and ICMPv6 */ | ||
|
||
/* | ||
* RFC 4884 - Extended ICMP to Support Multi-Part Messages | ||
*/ | ||
|
||
/* | ||
* Extract version from the first octet of icmp_ext_version_res. | ||
*/ | ||
#define ICMP_EXT_EXTRACT_VERSION(x) (((x)&0xf0)>>4) | ||
|
||
/* | ||
* Current version. | ||
*/ | ||
#define ICMP_EXT_VERSION 2 | ||
|
||
extern int | ||
print_icmp_multipart_ext_object(netdissect_options *, const uint8_t *); | ||
|
||
/* | ||
* RFC8335 - PROBE | ||
*/ | ||
extern const struct tok icmp_extended_echo_reply_code_str[]; | ||
extern const struct tok icmp_extended_echo_reply_state_str[]; | ||
|
||
#endif /* netdissect_icmp_h */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
1 05:10:17.314281 IP6 (flowlabel 0xf260b, hlim 255, next-header ICMPv6 (58) payload length: 28) fdfd:5c41:712d:d05a:d0dd:22ff:feac:5c6b > fdfd:5c41:712d:d0aa:225:90ff:fea8:8686: [icmp6 sum ok] ICMP6, extended echo request, id 64353, seq 0 | ||
Local Interface, checksum 0xdcf4 (correct), length 12 | ||
Interface Identification Object (3), Class-Type: 2, length 8 | ||
Interface Index: 1 | ||
2 05:10:17.314546 IP6 (flowlabel 0x618d4, hlim 59, next-header ICMPv6 (58) payload length: 28) fdfd:5c41:712d:d0aa:225:90ff:fea8:8686 > fdfd:5c41:712d:d05a:d0dd:22ff:feac:5c6b: [icmp6 sum ok] ICMP6, extended echo reply, id 64353, seq 0 | ||
Code 0 (No error), State 0 (Reserved), active 1 ipv4 1 ipv6 1 | ||
3 05:10:46.267725 IP6 (flowlabel 0xf260b, hlim 255, next-header ICMPv6 (58) payload length: 32) fdfd:5c41:712d:d05a:d0dd:22ff:feac:5c6b > fdfd:5c41:712d:d0aa:225:90ff:fea8:8686: [icmp6 sum ok] ICMP6, extended echo request, id 64356, seq 0 | ||
Local Interface, checksum 0x2df1 (correct), length 16 | ||
Interface Identification Object (3), Class-Type: 1, length 12 | ||
Interface Name, length 8: enp2s0f0 | ||
4 05:10:46.267887 IP6 (flowlabel 0x618d4, hlim 59, next-header ICMPv6 (58) payload length: 32) fdfd:5c41:712d:d0aa:225:90ff:fea8:8686 > fdfd:5c41:712d:d05a:d0dd:22ff:feac:5c6b: [icmp6 sum ok] ICMP6, extended echo reply, id 64356, seq 0 | ||
Code 0 (No error), State 0 (Reserved), active 1 ipv4 0 ipv6 0 | ||
5 05:11:07.324173 IP6 (flowlabel 0xf260b, hlim 255, next-header ICMPv6 (58) payload length: 32) fdfd:5c41:712d:d05a:d0dd:22ff:feac:5c6b > fdfd:5c41:712d:d0aa:225:90ff:fea8:8686: [icmp6 sum ok] ICMP6, extended echo request, id 64359, seq 0 | ||
Local Interface, checksum 0x9eb5 (correct), length 16 | ||
Interface Identification Object (3), Class-Type: 1, length 12 | ||
Interface Name, length 8: george | ||
6 05:11:07.324377 IP6 (flowlabel 0x618d4, hlim 59, next-header ICMPv6 (58) payload length: 32) fdfd:5c41:712d:d0aa:225:90ff:fea8:8686 > fdfd:5c41:712d:d05a:d0dd:22ff:feac:5c6b: [icmp6 sum ok] ICMP6, extended echo reply, id 64359, seq 0 | ||
Code 2 (No Such Interface), State 0 (Reserved), active 0 ipv4 0 ipv6 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
1 05:10:17.314281 IP6 fdfd:5c41:712d:d05a:d0dd:22ff:feac:5c6b > fdfd:5c41:712d:d0aa:225:90ff:fea8:8686: ICMP6, extended echo request, id 64353, seq 0, length 28 | ||
2 05:10:17.314546 IP6 fdfd:5c41:712d:d0aa:225:90ff:fea8:8686 > fdfd:5c41:712d:d05a:d0dd:22ff:feac:5c6b: ICMP6, extended echo reply, id 64353, seq 0, length 28 | ||
3 05:10:46.267725 IP6 fdfd:5c41:712d:d05a:d0dd:22ff:feac:5c6b > fdfd:5c41:712d:d0aa:225:90ff:fea8:8686: ICMP6, extended echo request, id 64356, seq 0, length 32 | ||
4 05:10:46.267887 IP6 fdfd:5c41:712d:d0aa:225:90ff:fea8:8686 > fdfd:5c41:712d:d05a:d0dd:22ff:feac:5c6b: ICMP6, extended echo reply, id 64356, seq 0, length 32 | ||
5 05:11:07.324173 IP6 fdfd:5c41:712d:d05a:d0dd:22ff:feac:5c6b > fdfd:5c41:712d:d0aa:225:90ff:fea8:8686: ICMP6, extended echo request, id 64359, seq 0, length 32 | ||
6 05:11:07.324377 IP6 fdfd:5c41:712d:d0aa:225:90ff:fea8:8686 > fdfd:5c41:712d:d05a:d0dd:22ff:feac:5c6b: ICMP6, extended echo reply, id 64359, seq 0, length 32 |
Binary file not shown.