Universal Packet Format
General Packet Format
Ping Protocol comprises a binary packet format. All packets have the same structure which is defined in the table below.
Payload Conventions
Individual fields within the payload are aligned on their appropriate boundaries. So 32 bit fields are aligned on 4 byte boundaries, 16 bit fields are aligned on 2 byte boundaries and 8 bit fields can be on any byte alignment. Note that the checksum field is not necessarily aligned on a 2 byte boundary however.
Parsing Unknown Packet IDs
Note that a packet parser can easily skip over packets that it doesn't understand or need to handle by just advancing the stream beyond the payload and the checksum. It is to be expected that there could be unknown packet types in any live stream or replayed log file.
Future Proofing
It is allowed for future fields to be added to any particular packet payload. Therefore parsers should check to see that the packet length is sufficient for any fields that will be used, but should not be alarmed if the payload length is longer than expected.
Last updated