udp_datagram: format specification

This page hosts a formal specification of udp_datagram using Kaitai Struct. This specification can be automatically translated into a variety of programming languages to get a parsing library.

Block diagram

Format specification in Kaitai Struct YAML

  id: udp_datagram
  endian: be
  - id: src_port
    type: u2
  - id: dst_port
    type: u2
  - id: length
    type: u2
  - id: checksum
    type: u2
  - id: body
    size-eos: true