IPv6 network packet: format specification

KS implementation details

License: CC0-1.0
Minimal Kaitai Struct required: 0.8

This page hosts a formal specification of IPv6 network packet 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: ipv6_packet
  title: IPv6 network packet
  license: CC0-1.0
  ks-version: 0.8
    - /network/protocol_body
  endian: be
  - id: version
    type: b4
  - id: traffic_class
    type: b8
  - id: flow_label
    type: b20
  - id: payload_length
    type: u2
  - id: next_header_type
    type: u1
  - id: hop_limit
    type: u1
  - id: src_ipv6_addr
    size: 16
  - id: dst_ipv6_addr
    size: 16
  - id: next_header
    type: protocol_body(next_header_type)
  - id: rest
    size-eos: true