Similar to how internet protocols are presented in RFC documents, but rather not in text mode. Preferably in some vector format, like SVG, to make it easy to embed these figures in different kind of documents.
Up to now I have mainly used Microsoft Visio or even Excel for this. This is very tedious and ineffective. I think there must exist a tool for this where you just define the protocol (e.g. using Kaitai Struct syntax or something simlar) and then generate the protocol figure.
So far I have only found tools for generating such figures in text format.
Any suggestions?
In terms of data sources, you can potentially parse the metadata for known protocols out of a good protocol dissector like tcpdump[1] or Wireshark[2], or https://www.luismg.com/protocol/
See https://graphviz.readthedocs.io/en/stable/examples.html#stru... for a tabular example.
[0] A decade or more ago someone posted the source TeX. Unfortunately I lost it. If anyone has it, sharing is caring. [1] https://github.com/the-tcpdump-group/tcpdump [2] https://github.com/wireshark/wireshark/tree/master/epan/diss...
You might find something suitable there, from what I recall there was some disagreement about whether there is or not depending on what the scope is of what you want to achieve.
It’s ASCII though.
Edited to add: it’s the graphviz generator -> https://thrift.apache.org/tutorial/graphviz.html
I’d guess gRPC and other such IDLs have a way to render similar things as well.
_edit_
Yeah, there's some samples on their page: https://formats.kaitai.io/rar/rar.svg
Not sure if that's what you're looking for?
but the usual tools are pic (for diagrams) and grap (for graphs), as linked from here: http://n-t-roff.github.io/heirloom/doctools.html
this is the manual https://pikchr.org/home/uv/pic.pdf
I've also used postscript for extreme usages, the doctools can also include ps verbatim.
https://memalign.github.io/m/pceimage/index.html
I made this so I can embed images in code.