Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 91 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,13 @@ Few examples are available.
You can get more examples at
`blockdiag.com`_ .

simple.diag
------------
nwdiag Example
==============
following instructions shows how to generate png and svg for nwdiag

simple.diag is simply define nodes and transitions by dot-like text format::
create file, ex: `nw.diag`

nw.diag is simply define nodes and transitions by dot-like text format::

nwdiag {
network dmz {
Expand All @@ -64,14 +67,95 @@ simple.diag is simply define nodes and transitions by dot-like text format::


Usage
=====
-----

Execute nwdiag command::

$ nwdiag simple.diag
$ ls simple.png
simple.png
$ nwdiag nw.diag
$ ls nw.png
nw.png

$ nwdiag nw.diag -T svg
$ ls nw.svg
nw.svg

packetdiag Example
==================
following instructions shows how to generate png and svg for packetdiag

create file, ex: `packet.diag`

::

packetdiag {
colwidth = 32;
node_height = 72;

0-15: Source Port;
16-31: Destination Port;
32-63: Sequence Number;
64-95: Acknowledgment Number;
96-99: Data Offset;
100-105: Reserved;
106: URG [rotate = 270];
107: ACK [rotate = 270];
108: PSH [rotate = 270];
109: RST [rotate = 270];
110: SYN [rotate = 270];
111: FIN [rotate = 270];
112-127: Window;
128-143: Checksum;
144-159: Urgent Pointer;
160-191: (Options and Padding);
192-223: data [colheight = 3];
}


Usage
-----

Execute packetdiag command::

$ packetdiag packet.diag
$ ls packet.png
packet.png

$ packetdiag packet.diag -T svg
$ ls packet.svg
packet.svg

rackdiag Example
================
following instructions shows how to generate png and svg for rackdiag

create file, ex: `rack.diag`

::

rackdiag {
16U;
1: UPS [2U];
3: DB Server;
4: Web Server;
5: Web Server;
6: Web Server;
7: Load Balancer;
8: L3 Switch;
}


Usage
-----

Execute rackdiag command::

$ rackdiag rack.diag
$ ls rack.png
rack.png

$ rackdiag rack.diag -T svg
$ ls rack.svg
rack.svg

Requirements
============
Expand Down