Packet diagram (PacketDiag)
PacketDiag maps bit ranges onto a fixed word width and draws the grid. It removes the entire class of errors that comes from drawing header diagrams by hand.
#What this example shows
colwidth, which sets the word size.
Inclusive bit ranges per field.
Single-bit flag fields.
#A worked example
Open it, edit it, or copy the source below.
The source, which you can paste into a new diagram and edit:
#Making it your own
colwidth must match the real word size or every offset misleads.
Ranges are inclusive, so 0-15 is sixteen bits.
For byte-oriented structures with nesting, use Bytefield.
#Related
Specialists. Borrow one when you need it.
