Skip to main content

PacketDiag

PacketDiag creates bit-field layouts for packets and binary records.

Use this type

Use PacketDiag to show field positions, field widths, and grouped data.

Source format

The source format is PacketDiag text. Enter the source in the diagram.zip editor.

Syntax essentials

  • Put the diagram in a packetdiag block.
  • Set the column width when the default is not correct.
  • Use bit ranges before field labels.
  • Use attributes for field height or label rotation.

Example

packetdiag {
colwidth = 16;
0-3: Version;
4-7: Flags;
8-15: Length;
}
Rendered exampleDrag to pan. Use the wheel or controls to zoom.
100%
This view uses the live diagram.zip renderer.

Upstream reference

PacketDiag documentation