mirror of
1
0
Fork 0

Briefly document use of -f commandline option and provide an example

This commit is contained in:
David Mirabito 2018-07-04 14:24:20 +10:00
parent d450da7d8a
commit 1c1894d37d
1 changed files with 56 additions and 0 deletions

View File

@ -29,6 +29,7 @@
| |_ 0x04.2.1 Field Lists.................................................
| |_ 0x04.2.2 Options.....................................................
|_ 0x04.3 Command-line Options...............................................
|_ 0x04.4 Specifications File................................................
0x05 Examples.................................................................
0x06 Contact, Support and Bug Reporting.......................................
@ -276,6 +277,17 @@
--endchar <char> : Character that ends horizontal lines
--sepchar <char> : Character that separates protocol fields
0x04.4 Specifications File
Specifications may also be presented in a text file: one per line and lines
beginning with '#' are treated as comments and ignored.
Each line in the file is processed and the diagram for each is printed,
respecting the order of -f option(s) relative to other protocol name or
specification commandline options.
Multiple invocations of -f are allowed.
0x05 - EXAMPLES
@ -425,6 +437,50 @@
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
$ cat myproto.txt
One:1,Two:2,Three:3,Four:4,Five:5,Six:6,Seven:7,more:4
wide:120,short:8,tiny:2
$ protocol ether -f myproto.txt uint32_t:32
0 1 2 3 4
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Destination Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Ether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