Skip to content

Generate cool network packet structure diagrams with ease

License

Notifications You must be signed in to change notification settings

czarnota/framegram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

framegram logo

framegram generates cool network packet structure diagrams
with ease

Installation

You can install framegram by running

$ python setup.py install

This will make the framegram script available to you

$ framegram --help

Usage

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

frame

Available options

$ 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

License

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.

About

Generate cool network packet structure diagrams with ease

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages