framegram
generates cool network packet structure diagrams
with ease
You can install framegram
by running
$ python setup.py install
This will make the framegram
script available to you
$ framegram --help
framegram
uses *.json
to specify the structure of the network packet, that
will be presented.
[
{
"name": "Ethernet Frame",
"_": [
{ "name": "Destination MAC", "_": 48, "val": ["DE", "AD", "BE", "EF", "CC", "DD"] },
{ "name": "Source MAC", "_": 48, "val": ["DE", "AD", "BE", "EF", "CC", "DD"] },
{ "name": "802.1Q Header", "_": [
{ "name": "TPID", "_": 16, "val": [ "0x8100" ] },
{ "name": "TCI", "_": 16, "val": [ "..." ] }
]},
{ "name": "Ethertype", "_": 16, "val": ["0x8000"] }
]
}
]
Then you can run framegram to generate packet diagram
$ framegram --width 1440 --height 200 example_diagram2.json
And this is the result
$ framegram --help
usage: framegram [-w WIDTH] [-h HEIGHT] [--wrap WRAP] [--help] file
positional arguments:
file The file to render diagram from
optional arguments:
-w WIDTH, --width WIDTH
Output width
-h HEIGHT, --height HEIGHT
Output image height
--wrap WRAP Wrap
--help Print help
framegram
is licensed under MIT, which means you can do anything you want
with it as long as you include the copyright notice. See LICENSE
for details.