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.
Move nanosecond-specific constants from print-arista.c to netdissect.h. In ptp_print_timestamp_identity() and ptp_print_announce_msg() use ptp_print_timestamp() to deduplicate code. In ptp_print_timestamp() change the format to SECONDS.NANOSECONDS and a bogus nanoseconds value indicator. Update the tests. This resolves GH issue the-tcpdump-group#1260.
- Loading branch information
1 parent
6cd500c
commit 2386101
Showing
8 changed files
with
266 additions
and
284 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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
1 2018-01-23 19:44:09.248292 IP 11.0.0.110.319 > 224.0.1.129.319: PTPv2, majorSdoId: 0x0, msg type: delay req msg, length: 44, domain: 0, reserved1: 0, Flags [none], NS correction: 0, sub NS correction: 0, reserved2: 0, clock identity: 0x7cfe90fffef950b4, port id: 1, seq id: 132, control: 1 (Delay_Req), log message interval: 127, originTimeStamp: 0 seconds, 0 nanoseconds | ||
2 2018-01-23 19:44:09.248437 IP 11.0.0.9.320 > 224.0.1.129.320: PTPv2, majorSdoId: 0x0, msg type: delay resp msg, length: 54, domain: 0, reserved1: 0, Flags [none], NS correction: 0, sub NS correction: 0, reserved2: 0, clock identity: 0x200fffe000001, port id: 1, seq id: 132, control: 3 (Delay_Resp), log message interval: 0, receiveTimeStamp: 1516736649 seconds, 248292005 nanoseconds, port identity: 0x7cfe90fffef950b4, port id: 1 | ||
3 2018-01-23 19:44:09.982883 IP 11.0.0.9.320 > 224.0.1.129.320: PTPv2, majorSdoId: 0x0, msg type: announce msg, length: 64, domain: 0, reserved1: 0, Flags [none], NS correction: 0, sub NS correction: 0, reserved2: 0, clock identity: 0x200fffe000001, port id: 1, seq id: 534, control: 5 (Other), log message interval: 1, originTimeStamp: 0 seconds 0 nanoseconds, origin cur utc:36, rsvd: 0, gm priority_1: 128, gm clock class: 248, gm clock accuracy: 254, gm clock variance: 65535, gm priority_2: 128, gm clock id: 0x200fffe000001, steps removed: 0, time source: 0xa0 | ||
4 2018-01-23 19:44:10.034745 IP 11.0.0.9.319 > 224.0.1.129.319: PTPv2, majorSdoId: 0x0, msg type: sync msg, length: 44, domain: 0, reserved1: 0, Flags [two step], NS correction: 0, sub NS correction: 0, reserved2: 0, clock identity: 0x200fffe000001, port id: 1, seq id: 1067, control: 0 (Sync), log message interval: 0, originTimeStamp: 0 seconds, 0 nanoseconds | ||
5 2018-01-23 19:44:10.034796 IP 11.0.0.9.320 > 224.0.1.129.320: PTPv2, majorSdoId: 0x0, msg type: follow up msg, length: 44, domain: 0, reserved1: 0, Flags [none], NS correction: 0, sub NS correction: 0, reserved2: 0, clock identity: 0x200fffe000001, port id: 1, seq id: 1067, control: 2 (Follow_Up), log message interval: 0, preciseOriginTimeStamp: 1516736650 seconds, 34751783 nanoseconds | ||
1 2018-01-23 19:44:09.248292 IP 11.0.0.110.319 > 224.0.1.129.319: PTPv2, majorSdoId: 0x0, msg type: delay req msg, length: 44, domain: 0, reserved1: 0, Flags [none], NS correction: 0, sub NS correction: 0, reserved2: 0, clock identity: 0x7cfe90fffef950b4, port id: 1, seq id: 132, control: 1 (Delay_Req), log message interval: 127, originTimeStamp: 0.000000000 seconds | ||
2 2018-01-23 19:44:09.248437 IP 11.0.0.9.320 > 224.0.1.129.320: PTPv2, majorSdoId: 0x0, msg type: delay resp msg, length: 54, domain: 0, reserved1: 0, Flags [none], NS correction: 0, sub NS correction: 0, reserved2: 0, clock identity: 0x200fffe000001, port id: 1, seq id: 132, control: 3 (Delay_Resp), log message interval: 0, receiveTimeStamp: 1516736649.248292005 seconds, port identity: 0x7cfe90fffef950b4, port id: 1 | ||
3 2018-01-23 19:44:09.982883 IP 11.0.0.9.320 > 224.0.1.129.320: PTPv2, majorSdoId: 0x0, msg type: announce msg, length: 64, domain: 0, reserved1: 0, Flags [none], NS correction: 0, sub NS correction: 0, reserved2: 0, clock identity: 0x200fffe000001, port id: 1, seq id: 534, control: 5 (Other), log message interval: 1, originTimeStamp: 0.000000000 seconds, origin cur utc:36, rsvd: 0, gm priority_1: 128, gm clock class: 248, gm clock accuracy: 254, gm clock variance: 65535, gm priority_2: 128, gm clock id: 0x200fffe000001, steps removed: 0, time source: 0xa0 | ||
4 2018-01-23 19:44:10.034745 IP 11.0.0.9.319 > 224.0.1.129.319: PTPv2, majorSdoId: 0x0, msg type: sync msg, length: 44, domain: 0, reserved1: 0, Flags [two step], NS correction: 0, sub NS correction: 0, reserved2: 0, clock identity: 0x200fffe000001, port id: 1, seq id: 1067, control: 0 (Sync), log message interval: 0, originTimeStamp: 0.000000000 seconds | ||
5 2018-01-23 19:44:10.034796 IP 11.0.0.9.320 > 224.0.1.129.320: PTPv2, majorSdoId: 0x0, msg type: follow up msg, length: 44, domain: 0, reserved1: 0, Flags [none], NS correction: 0, sub NS correction: 0, reserved2: 0, clock identity: 0x200fffe000001, port id: 1, seq id: 1067, control: 2 (Follow_Up), log message interval: 0, preciseOriginTimeStamp: 1516736650.034751783 seconds |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
1 2022-10-11 17:52:26.679146 IP 4.5.0.2.319 > 2.2.2.2.319: PTPv2, majorSdoId: 0x0, msg type: delay req msg, length: 44, domain: 44, reserved1: 0, Flags [unicast], NS correction: 0, sub NS correction: 0, reserved2: 0, clock identity: 0xa0369ffffe856e8a, port id: 1, seq id: 1203, control: 1 (Delay_Req), log message interval: 127, originTimeStamp: 0 seconds, 0 nanoseconds | ||
2 2022-10-11 17:52:26.679265 IP 2.2.2.2.320 > 4.5.0.2.320: PTPv2, majorSdoId: 0x0, msg type: delay resp msg, length: 54, domain: 44, reserved1: 0, Flags [unicast], NS correction: 36035, sub NS correction: 0, reserved2: 0, clock identity: 0xe8c57affff01313f, port id: 3, seq id: 1203, control: 3 (Delay_Resp), log message interval: 127, receiveTimeStamp: 1665510783 seconds, 679015501 nanoseconds, port identity: 0xa0369ffffe856e8a, port id: 1 | ||
3 2022-10-11 17:52:26.682034 IP 2.2.2.2.319 > 4.5.0.2.319: PTPv2, majorSdoId: 0x0, msg type: sync msg, length: 44, domain: 44, reserved1: 0, Flags [unicast], NS correction: 105045, sub NS correction: 0, reserved2: 0, clock identity: 0xe8c57affff01313f, port id: 3, seq id: 1213, control: 0 (Sync), log message interval: 127, originTimeStamp: 1665510783 seconds, 681548698 nanoseconds | ||
1 2022-10-11 17:52:26.679146 IP 4.5.0.2.319 > 2.2.2.2.319: PTPv2, majorSdoId: 0x0, msg type: delay req msg, length: 44, domain: 44, reserved1: 0, Flags [unicast], NS correction: 0, sub NS correction: 0, reserved2: 0, clock identity: 0xa0369ffffe856e8a, port id: 1, seq id: 1203, control: 1 (Delay_Req), log message interval: 127, originTimeStamp: 0.000000000 seconds | ||
2 2022-10-11 17:52:26.679265 IP 2.2.2.2.320 > 4.5.0.2.320: PTPv2, majorSdoId: 0x0, msg type: delay resp msg, length: 54, domain: 44, reserved1: 0, Flags [unicast], NS correction: 36035, sub NS correction: 0, reserved2: 0, clock identity: 0xe8c57affff01313f, port id: 3, seq id: 1203, control: 3 (Delay_Resp), log message interval: 127, receiveTimeStamp: 1665510783.679015501 seconds, port identity: 0xa0369ffffe856e8a, port id: 1 | ||
3 2022-10-11 17:52:26.682034 IP 2.2.2.2.319 > 4.5.0.2.319: PTPv2, majorSdoId: 0x0, msg type: sync msg, length: 44, domain: 44, reserved1: 0, Flags [unicast], NS correction: 105045, sub NS correction: 0, reserved2: 0, clock identity: 0xe8c57affff01313f, port id: 3, seq id: 1213, control: 0 (Sync), log message interval: 127, originTimeStamp: 1665510783.681548698 seconds |
Oops, something went wrong.