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)