]> The Tcpdump Group git mirrors - tcpdump/commitdiff
ptp: Add test for v2.1 packets
authorCasper Andersson <[email protected]>
Thu, 13 Jul 2023 18:51:31 +0000 (20:51 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Thu, 12 Oct 2023 17:30:48 +0000 (19:30 +0200)
The data was created by running the latest version of Linuxptp with the
command 'ptp4l -2 -P -i eth0'.

Signed-off-by: Casper Andersson <[email protected]>
(cherry picked from commit f21fe72e3e8281b6cae7b07211836ea44b2c6658)

tests/TESTLIST
tests/ptp_v2_1.out [new file with mode: 0644]
tests/ptp_v2_1.pcap [new file with mode: 0644]

index 4a331bfc9db4a1ce48ea68390aa2bc96206bf369..d43ddefb8ced366de0ee36bb1ec94ffe69213f79 100644 (file)
@@ -824,6 +824,7 @@ sflow_print-segv sflow_print-segv.pcap sflow_print-segv.out -v
 ptp         ptp.pcap    ptp.out
 ptp_ethernet   ptp_ethernet.pcap       ptp_ethernet.out        -e
 ptp_corrections        ptp_corrections.pcap    ptp_corrections.out
+ptp_v2_1       ptp_v2_1.pcap           ptp_v2_1.out
 
 # bad packets from Jason Xiaole
 ldp_tlv_print-oobr ldp_tlv_print-oobr.pcap ldp_tlv_print-oobr.out -v
diff --git a/tests/ptp_v2_1.out b/tests/ptp_v2_1.out
new file mode 100644 (file)
index 0000000..f6a8360
--- /dev/null
@@ -0,0 +1,38 @@
+    1  18:50:22.425512 PTPv2.1, 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 : 0x38f3abfffe96ec12, port id : 1, seq id : 690, control : 0 (Sync), log message interval : 0, originTimeStamp : 0 seconds, 0 nanoseconds
+    2  18:50:22.425609 PTPv2.1, 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 : 0x38f3abfffe96ec12, port id : 1, seq id : 690, control : 0 (Sync), log message interval : 0, preciseOriginTimeStamp : 1689274220 seconds, 141087131 nanoseconds
+    3  18:50:22.586577 PTPv2.1, majorSdoId : 0x0, msg type : peer delay req msg, length : 54, domain : 0, reserved1 : 0, Flags [none], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x38f3abfffe96ec12, port id : 1, seq id : 697, control : 0 (Sync), log message interval : 127, preciseOriginTimeStamp : 0 seconds, 0 nanoseconds, port identity : 0x0, port id : 0
+    4  18:50:23.377848 PTPv2.1, majorSdoId : 0x0, msg type : announce msg, length : 64, domain : 0, reserved1 : 0, Flags [timescale], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x38f3abfffe96ec12, port id : 1, seq id : 346, control : 0 (Sync), log message interval : 1, originTimeStamp : 0 seconds 0 nanoseconds, origin cur utc :37, 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 : 0x38f3abfffe96ec12, steps removed : 0, time source : 0xa0
+    5  18:50:23.425692 PTPv2.1, 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 : 0x38f3abfffe96ec12, port id : 1, seq id : 691, control : 0 (Sync), log message interval : 0, originTimeStamp : 0 seconds, 0 nanoseconds
+    6  18:50:23.425772 PTPv2.1, 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 : 0x38f3abfffe96ec12, port id : 1, seq id : 691, control : 0 (Sync), log message interval : 0, preciseOriginTimeStamp : 1689274221 seconds, 139650073 nanoseconds
+    7  18:50:23.586670 PTPv2.1, majorSdoId : 0x0, msg type : peer delay req msg, length : 54, domain : 0, reserved1 : 0, Flags [none], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x38f3abfffe96ec12, port id : 1, seq id : 698, control : 0 (Sync), log message interval : 127, preciseOriginTimeStamp : 0 seconds, 0 nanoseconds, port identity : 0x0, port id : 0
+    8  18:50:24.425890 PTPv2.1, 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 : 0x38f3abfffe96ec12, port id : 1, seq id : 692, control : 0 (Sync), log message interval : 0, originTimeStamp : 0 seconds, 0 nanoseconds
+    9  18:50:24.425975 PTPv2.1, 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 : 0x38f3abfffe96ec12, port id : 1, seq id : 692, control : 0 (Sync), log message interval : 0, preciseOriginTimeStamp : 1689274222 seconds, 138235505 nanoseconds
+   10  18:50:24.586827 PTPv2.1, majorSdoId : 0x0, msg type : peer delay req msg, length : 54, domain : 0, reserved1 : 0, Flags [none], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x38f3abfffe96ec12, port id : 1, seq id : 699, control : 0 (Sync), log message interval : 127, preciseOriginTimeStamp : 0 seconds, 0 nanoseconds, port identity : 0x0, port id : 0
+   11  18:50:25.378023 PTPv2.1, majorSdoId : 0x0, msg type : announce msg, length : 64, domain : 0, reserved1 : 0, Flags [timescale], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x38f3abfffe96ec12, port id : 1, seq id : 347, control : 0 (Sync), log message interval : 1, originTimeStamp : 0 seconds 0 nanoseconds, origin cur utc :37, 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 : 0x38f3abfffe96ec12, steps removed : 0, time source : 0xa0
+   12  18:50:25.426060 PTPv2.1, 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 : 0x38f3abfffe96ec12, port id : 1, seq id : 693, control : 0 (Sync), log message interval : 0, originTimeStamp : 0 seconds, 0 nanoseconds
+   13  18:50:25.426141 PTPv2.1, 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 : 0x38f3abfffe96ec12, port id : 1, seq id : 693, control : 0 (Sync), log message interval : 0, preciseOriginTimeStamp : 1689274223 seconds, 136790595 nanoseconds
+   14  18:50:25.586964 PTPv2.1, majorSdoId : 0x0, msg type : peer delay req msg, length : 54, domain : 0, reserved1 : 0, Flags [none], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x38f3abfffe96ec12, port id : 1, seq id : 700, control : 0 (Sync), log message interval : 127, preciseOriginTimeStamp : 0 seconds, 0 nanoseconds, port identity : 0x0, port id : 0
+   15  18:50:26.426250 PTPv2.1, 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 : 0x38f3abfffe96ec12, port id : 1, seq id : 694, control : 0 (Sync), log message interval : 0, originTimeStamp : 0 seconds, 0 nanoseconds
+   16  18:50:26.426334 PTPv2.1, 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 : 0x38f3abfffe96ec12, port id : 1, seq id : 694, control : 0 (Sync), log message interval : 0, preciseOriginTimeStamp : 1689274224 seconds, 135367681 nanoseconds
+   17  18:50:26.587148 PTPv2.1, majorSdoId : 0x0, msg type : peer delay req msg, length : 54, domain : 0, reserved1 : 0, Flags [none], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x38f3abfffe96ec12, port id : 1, seq id : 701, control : 0 (Sync), log message interval : 127, preciseOriginTimeStamp : 0 seconds, 0 nanoseconds, port identity : 0x0, port id : 0
+   18  18:50:27.378208 PTPv2.1, majorSdoId : 0x0, msg type : announce msg, length : 64, domain : 0, reserved1 : 0, Flags [timescale], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x38f3abfffe96ec12, port id : 1, seq id : 348, control : 0 (Sync), log message interval : 1, originTimeStamp : 0 seconds 0 nanoseconds, origin cur utc :37, 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 : 0x38f3abfffe96ec12, steps removed : 0, time source : 0xa0
+   19  18:50:27.426429 PTPv2.1, 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 : 0x38f3abfffe96ec12, port id : 1, seq id : 695, control : 0 (Sync), log message interval : 0, originTimeStamp : 0 seconds, 0 nanoseconds
+   20  18:50:27.426515 PTPv2.1, 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 : 0x38f3abfffe96ec12, port id : 1, seq id : 695, control : 0 (Sync), log message interval : 0, preciseOriginTimeStamp : 1689274225 seconds, 133933535 nanoseconds
+   21  18:50:27.587359 PTPv2.1, majorSdoId : 0x0, msg type : peer delay req msg, length : 54, domain : 0, reserved1 : 0, Flags [none], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x38f3abfffe96ec12, port id : 1, seq id : 702, control : 0 (Sync), log message interval : 127, preciseOriginTimeStamp : 0 seconds, 0 nanoseconds, port identity : 0x0, port id : 0
+   22  18:50:28.426602 PTPv2.1, 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 : 0x38f3abfffe96ec12, port id : 1, seq id : 696, control : 0 (Sync), log message interval : 0, originTimeStamp : 0 seconds, 0 nanoseconds
+   23  18:50:28.426684 PTPv2.1, 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 : 0x38f3abfffe96ec12, port id : 1, seq id : 696, control : 0 (Sync), log message interval : 0, preciseOriginTimeStamp : 1689274226 seconds, 132490523 nanoseconds
+   24  18:50:28.587552 PTPv2.1, majorSdoId : 0x0, msg type : peer delay req msg, length : 54, domain : 0, reserved1 : 0, Flags [none], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x38f3abfffe96ec12, port id : 1, seq id : 703, control : 0 (Sync), log message interval : 127, preciseOriginTimeStamp : 0 seconds, 0 nanoseconds, port identity : 0x0, port id : 0
+   25  18:50:29.378406 PTPv2.1, majorSdoId : 0x0, msg type : announce msg, length : 64, domain : 0, reserved1 : 0, Flags [timescale], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x38f3abfffe96ec12, port id : 1, seq id : 349, control : 0 (Sync), log message interval : 1, originTimeStamp : 0 seconds 0 nanoseconds, origin cur utc :37, 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 : 0x38f3abfffe96ec12, steps removed : 0, time source : 0xa0
+   26  18:50:29.426793 PTPv2.1, 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 : 0x38f3abfffe96ec12, port id : 1, seq id : 697, control : 0 (Sync), log message interval : 0, originTimeStamp : 0 seconds, 0 nanoseconds
+   27  18:50:29.426878 PTPv2.1, 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 : 0x38f3abfffe96ec12, port id : 1, seq id : 697, control : 0 (Sync), log message interval : 0, preciseOriginTimeStamp : 1689274227 seconds, 131069455 nanoseconds
+   28  18:50:29.587761 PTPv2.1, majorSdoId : 0x0, msg type : peer delay req msg, length : 54, domain : 0, reserved1 : 0, Flags [none], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x38f3abfffe96ec12, port id : 1, seq id : 704, control : 0 (Sync), log message interval : 127, preciseOriginTimeStamp : 0 seconds, 0 nanoseconds, port identity : 0x0, port id : 0
+   29  18:50:30.426971 PTPv2.1, 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 : 0x38f3abfffe96ec12, port id : 1, seq id : 698, control : 0 (Sync), log message interval : 0, originTimeStamp : 0 seconds, 0 nanoseconds
+   30  18:50:30.427054 PTPv2.1, 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 : 0x38f3abfffe96ec12, port id : 1, seq id : 698, control : 0 (Sync), log message interval : 0, preciseOriginTimeStamp : 1689274228 seconds, 129632683 nanoseconds
+   31  18:50:30.587838 PTPv2.1, majorSdoId : 0x0, msg type : peer delay req msg, length : 54, domain : 0, reserved1 : 0, Flags [none], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x38f3abfffe96ec12, port id : 1, seq id : 705, control : 0 (Sync), log message interval : 127, preciseOriginTimeStamp : 0 seconds, 0 nanoseconds, port identity : 0x0, port id : 0
+   32  18:50:31.378612 PTPv2.1, majorSdoId : 0x0, msg type : announce msg, length : 64, domain : 0, reserved1 : 0, Flags [timescale], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x38f3abfffe96ec12, port id : 1, seq id : 350, control : 0 (Sync), log message interval : 1, originTimeStamp : 0 seconds 0 nanoseconds, origin cur utc :37, 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 : 0x38f3abfffe96ec12, steps removed : 0, time source : 0xa0
+   33  18:50:31.427185 PTPv2.1, 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 : 0x38f3abfffe96ec12, port id : 1, seq id : 699, control : 0 (Sync), log message interval : 0, originTimeStamp : 0 seconds, 0 nanoseconds
+   34  18:50:31.427268 PTPv2.1, 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 : 0x38f3abfffe96ec12, port id : 1, seq id : 699, control : 0 (Sync), log message interval : 0, preciseOriginTimeStamp : 1689274229 seconds, 128232389 nanoseconds
+   35  18:50:31.587912 PTPv2.1, majorSdoId : 0x0, msg type : peer delay req msg, length : 54, domain : 0, reserved1 : 0, Flags [none], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x38f3abfffe96ec12, port id : 1, seq id : 706, control : 0 (Sync), log message interval : 127, preciseOriginTimeStamp : 0 seconds, 0 nanoseconds, port identity : 0x0, port id : 0
+   36  18:50:32.427388 PTPv2.1, 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 : 0x38f3abfffe96ec12, port id : 1, seq id : 700, control : 0 (Sync), log message interval : 0, originTimeStamp : 0 seconds, 0 nanoseconds
+   37  18:50:32.427487 PTPv2.1, 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 : 0x38f3abfffe96ec12, port id : 1, seq id : 700, control : 0 (Sync), log message interval : 0, preciseOriginTimeStamp : 1689274230 seconds, 126823307 nanoseconds
+   38  18:50:32.588105 PTPv2.1, majorSdoId : 0x0, msg type : peer delay req msg, length : 54, domain : 0, reserved1 : 0, Flags [none], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x38f3abfffe96ec12, port id : 1, seq id : 707, control : 0 (Sync), log message interval : 127, preciseOriginTimeStamp : 0 seconds, 0 nanoseconds, port identity : 0x0, port id : 0
diff --git a/tests/ptp_v2_1.pcap b/tests/ptp_v2_1.pcap
new file mode 100644 (file)
index 0000000..62cabeb
Binary files /dev/null and b/tests/ptp_v2_1.pcap differ