Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

PTP (ptp)

Reached from

Lower layerSelectorValue
ethernet2ethertype35063 (0x88f7)
dot1qethertype35063 (0x88f7)
dot1adethertype35063 (0x88f7)
udpdst_port / src_port319 (0x013f)
udpdst_port / src_port320 (0x0140)

Fields

FieldTypeDefaultAutoDescription
major_sdo_iduint(4)0majorSdoId (transportSpecific in IEEE 1588-2008): 0 for the default profiles, 1 for IEEE 802.1AS (gPTP).
message_typeenum(4)0 (sync)Message type: 0 Sync, 1 Delay_Req, 2 Pdelay_Req, 3 Pdelay_Resp, 8 Follow_Up, 9 Delay_Resp, 10 Pdelay_Resp_Follow_Up, 11 Announce, 12 Signaling, 13 Management.
minor_versionuint(4)0minorVersionPTP (0 in IEEE 1588-2008, 1 in IEEE 1588-2019).
versionuint(4)2versionPTP (2).
message_lengthuint(16)Length of the header and payload in octetsLength of the whole message in octets, including the TLVs (Auto).
domain_numberuint(8)0Domain number.
minor_sdo_iduint(8)0minorSdoId (reserved, 0, in IEEE 1588-2008).
flagsflags(16)0x0Flag field: alternateMaster, twoStep, unicast, the profile specific and security bits in the first octet; leap61, leap59, currentUtcOffsetValid, ptpTimescale, timeTraceable, frequencyTraceable and synchronizationUncertain in the second.
correction_fieldint(64)0Correction in nanoseconds multiplied by 2^16 (signed).
message_type_specificuint(32)0Message type specific field (reserved, 0, in IEEE 1588-2008).
clock_identityuint(64)144116287553929217Clock identity of the source port (EUI-64, e.g. a MAC address with ff:fe in the middle).
port_numberuint(16)1Port number of the source port.
sequence_iduint(16)0Sequence ID; a Follow_Up / Delay_Resp / Pdelay_Resp copies the one of the message it answers.
control_fieldenum(8)0 (sync)Control field (IEEE 1588 version 1 compatibility): 0 Sync, 1 Delay_Req, 2 Follow_Up, 3 Delay_Resp, 4 Management, 5 other messages.
log_message_intervalint(8)0Log2 of the message interval in seconds (signed; 0x7f when not applicable).
databytes — message_length - 34 octets00 00 00 00 00 00 00 00 00 00Rest of the message after the common header, as octets (up to the message length).

message_type

ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

flags

BitMaskName
1532768 (0x8000)security
1416384 (0x4000)profile_specific_2
138192 (0x2000)profile_specific_1
101024 (0x0400)unicast
9512 (0x0200)two_step
8256 (0x0100)alternate_master
664 (0x0040)synchronization_uncertain
532 (0x0020)frequency_traceable
416 (0x0010)time_traceable
38 (0x0008)ptp_timescale
24 (0x0004)current_utc_offset_valid
12 (0x0002)leap59
01 (0x0001)leap61

control_field

ValueName
0 (0x00)sync
1 (0x01)delay_req
2 (0x02)follow_up
3 (0x03)delay_resp
4 (0x04)management
5 (0x05)other

Next layer

The next layer is selected by message_type; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
0ptp_syncre-decodes this layer
1ptp_delay_reqre-decodes this layer
2ptp_pdelay_reqre-decodes this layer
3ptp_pdelay_respre-decodes this layer
8ptp_follow_upre-decodes this layer
9ptp_delay_respre-decodes this layer
10ptp_pdelay_resp_follow_upre-decodes this layer
11ptp_announcere-decodes this layer
12ptp_signalingre-decodes this layer
13ptp_managementre-decodes this layer

Sample templates

  • ptp-generic — templates/protocols/timing/ptp-generic.wpg.yaml