]> The Tcpdump Group git mirrors - tcpdump/commit
ptp: Add test for management packets
authorCasper Andersson <[email protected]>
Mon, 11 Mar 2024 17:49:47 +0000 (18:49 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Mon, 4 Nov 2024 14:04:29 +0000 (15:04 +0100)
commitf7c257710fffe0a289f8315c2f7de73870a70c01
tree5d803d81d3992605258a3cd067365f0daeaa7572
parentae9a8128e1f125b5906495f27e01cf2ba66e03d6
ptp: Add test for management packets

Test setup:
ip link add link vethA type veth peer name vethB
ip link set dev vethA up
ip link set dev vethB up
ptp4l -2 -P -S -i vethA &
tcpdump -i vethA 'ether[14] = 0xD' -w ptp_management.pcap &

Tcpdump filtering on only management packets (0xD) to skip capturing
other traffic that is already covered by other tests.

Sending management requests (which ptp4l responds to):
pmc -b 3 -2 -i vethB 'get current_data_set'
pmc -b 3 -2 -i vethB 'get port_data_set'
pmc -b 3 -2 -i vethB 'get default_data_set'
pmc -b 3 -2 -i vethB 'get parent_data_set'
pmc -b 3 -2 -i vethB 'get clock_description'

Sidenote: the management packets contains a TLV at the end and I
included 5 of them (out of the total ~50 listed in the
standard). Tcpdump currently does not print the TLV.

Signed-off-by: Casper Andersson <[email protected]>
(cherry picked from commit c98b4d0b3aa0a66f413ef3d86d726421a46fac5a)
tests/TESTLIST
tests/ptp_management.out [new file with mode: 0644]
tests/ptp_management.pcap [new file with mode: 0644]