Packet diagrams (packetdiag)
Compatible with packetdiag
Protocol packet layouts in a column-based DSL — write `0-15: source port` `16-31: destination port` and every bit-field renders with the correct width. Ideal for RFC-style protocol documentation; complementary to bytefield-svg.
In the same space
Most users come to Packet diagrams (packetdiag) from Hand-drawn RFC packet layouts. Glyph runs this engine in the browser — no install, shareable via URL, exportable to PNG / SVG / PDF / source.
Syntax at a glance
packetdiag {
0-15: Source port
16-31: Destination port
32-47: Length
}Paste this in the Studio code pane to see Packet diagrams (packetdiag) render live. The full grammar is at the upstream-docs link above.
Sample templates
All 8 →Classic 64-bit UDP header — source port, destination port, length, checksum. Bit-positions enforced.
Bit-precise TCP header. Compare with the bytefield-svg version for two takes on the same layout.
Ping packet — Type / Code / Checksum / Identifier / Sequence number + payload.
Bit-accurate IPv4 header layout.
Standard TCP segment header.
Tiny UDP header.
packetdiag · ← Browse all engines · Quick-start guide