]> 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)
committerfxlb <[email protected]>
Mon, 4 Nov 2024 13:56:55 +0000 (13:56 +0000)
commitc98b4d0b3aa0a66f413ef3d86d726421a46fac5a
treed707be055e32938eedd222f5367385723352b503
parent487405e871739842bc46caaba27f93419f2722ed
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]>
tests/TESTLIST
tests/ptp_management.out [new file with mode: 0644]
tests/ptp_management.pcap [new file with mode: 0644]