Packet formats


Packet headers

The following headers are used by pml-0.02 and up. All values are in network byte order. Note that these packet formats differ from the packet formats used in pml-0.01. This backwards incompatibility should not be an issue because there is vary little actual usage of pml-0.01.

The P2P Multicast Session Description (PMSD) header is used when describing a resource using a multicast group.

  0 4 8 12 16 20 24 28
0 Version CodingID Payload size
1 Start (Res'd) SessionID
2 Source IP address
3 Multicast group IP address
4 UDP port Bitrate (8Kbit/s)
5 Filesize (bytes)
7 File TigerTree Hash
13 Segment offset
14 Segment length
15 Segment TigerTree Hash
21 Filename (Max 128 bytes)

PMSD header

  • The first two bytes of each header are used to multiplex both PMT and PMSD packets on the same (S,G) session. Currently, version number 0 indicates that a PMT packet is being sent and version number 1 indicates that a PMSD version 1 packet is being sent.
  • For the possible CodingID values please consult the table below with the defined PMT codings
  • The Start field provides the number of seconds before the actual transmission of the resource starts
  • The SessionID provides an  identifier unique to the (S,G) multicast session that will be used for the transport of the resource described by the PMSD packet
  • Source IP address & multicast group IP address, UDP port
  • The bitrate field in the PMSP header is provided in multiples of 8Kbit/s. So a bitrate value of 8 means that the session will be transmitted at 64Kbit/s
  • File size is the size of the file of which a segment is being described
  • File TigerTree hash
  • The segment offset plus the segment length may not be greater then the filesize.
  • The filename may not exceed 128 bytes and is encoded using ASCII (UTF-8 support may be added in the future)


The P2P Multicast Transport  (PMT) header is used when transporting a resource from the sender to the receivers.

  0 4 8 12 16 20 24 28
0 Version PartID SessionID
1 PacketID
2 Payload (...)

PMT header

  • The Version must be 0 for all PMT headers to be able to distinguish between PMSD and PMT headers in the same multicast session.
  • The PartID is only used when Reed-Solomon coding is used for the multicast session. The PartID must be 0 when the multicast session does not use Reed-Solomon coding.
  • The SessionID matches the SessionID announced in the PMSD header.
  • The PacketID provides:
    • the sequence number of the packet in the part in the case of Reed-Solomon coding
    • the sequence number of the packet in the session, with the other codings
  • The payload of the packet may not exceed the payload size indicated in the corresponding PMSD header


The following P2P Multicast Transport encodings are defined:

ID Codec Parameters
0 Reed-Solomon SYMSIZE=8, Genpoly = 0x187, FCS=1, Prime=1, NROOTS=8
1 LDGM-Stairs

Left degree = 7, Data packets = int(Segment length / Payload size) + 1, FEC packets = int (0.33 * data packets), Seed = 1

PMT coding

Copyright (C) 2003, 2004 Steven Hessing