Hi,
Lets say I'm documenting a low-level protocol or file format and want to produce a picture such as the TCP header (etc) table (http://izecksohn.com/pedro/pub/tcp_header.jpg), what's the best program to use for that?
Another example: http://www.wtcs.org/snmp4tpc/images/TCP-Header.jpg
I have tried Openoffice drawing tool in Writer, and it does not align well. Inkscape might be good as I can snap to grid.
I could use a spreadsheet and then export to picture.
Is there a special purpose application for this that anyone has used and would reccommend?
I need to be able to insert text into the cells or perhaps refer to the cells in some markup way - also the cells should be fixed width as each cell would represent one byte.
Any suggestions please?
How would, for example, a graphics designer go about doing this?
Thanks all, Srdjan
On 29 Mar 2010, at 11:14, Srdjan Todorovic wrote:
Lets say I'm documenting a low-level protocol or file format and want to produce a picture such as the TCP header (etc) table (http://izecksohn.com/pedro/pub/tcp_header.jpg), what's the best program to use for that?
Another example: http://www.wtcs.org/snmp4tpc/images/TCP-Header.jpg
I have tried Openoffice drawing tool in Writer, and it does not align well. Inkscape might be good as I can snap to grid.
I could use a spreadsheet and then export to picture.
Is there a special purpose application for this that anyone has used and would reccommend?
I need to be able to insert text into the cells or perhaps refer to the cells in some markup way - also the cells should be fixed width as each cell would represent one byte.
Any suggestions please?
Maybe Dia or something like that? Alternatively, as you say, something like Inkscape would give you more flexibility.
How would, for example, a graphics designer go about doing this?
They'd use Photoshop/Illustrator ;)
Hi,
On 29/03/2010, David Reynolds david@reynoldsfamily.org.uk wrote:
On 29 Mar 2010, at 11:14, Srdjan Todorovic wrote: Maybe Dia or something like that? Alternatively, as you say, something like Inkscape would give you more flexibility.
I tried Dia but could not figure out how to this particular type of diagram with it. I've used Inkscape instead.
How would, for example, a graphics designer go about doing this?
They'd use Photoshop/Illustrator ;)
Ah of course! ;) Well I don't have these.
Srdjan
On 29-Mar-10 09:14:43, Srdjan Todorovic wrote:
Hi,
Lets say I'm documenting a low-level protocol or file format and want to produce a picture such as the TCP header (etc) table (http://izecksohn.com/pedro/pub/tcp_header.jpg), what's the best program to use for that?
Another example: http://www.wtcs.org/snmp4tpc/images/TCP-Header.jpg
I have tried Openoffice drawing tool in Writer, and it does not align well. Inkscape might be good as I can snap to grid.
I could use a spreadsheet and then export to picture.
Is there a special purpose application for this that anyone has used and would reccommend?
I need to be able to insert text into the cells or perhaps refer to the cells in some markup way - also the cells should be fixed width as each cell would represent one byte.
Any suggestions please?
How would, for example, a graphics designer go about doing this?
Thanks all, Srdjan
The first one is pure "ASCII ART", so you could do it at the keyboard and then take a screenshot of it :)! (Of course a bash script could be used, with parameters for the cell entries ... :)
The second one is skewed, as seen on my screen. Is that intentional?
In either case (being serious for once) the ideal Unix/Linux-based package for this is groff, using the pic preprocessor (which translates a diagram description language into troff input which then draws the diagram). The output is PostScript (PS), which can be coverted (e.g. into JPEG) by the ImageMagick program 'convert'.
I could prepare examples emulating your two above for study, but don't have time right now (maybe later today, maybe even later).
Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@manchester.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 29-Mar-10 Time: 15:18:49 ------------------------------ XFMail ------------------------------
Hi Ted,
On 29/03/2010, Ted Harding Ted.Harding@manchester.ac.uk wrote:
On 29-Mar-10 09:14:43, Srdjan Todorovic wrote:
Lets say I'm documenting a low-level protocol or file format and want to produce a picture such as the TCP header (etc) table (http://izecksohn.com/pedro/pub/tcp_header.jpg), what's the best program to use for that?
Another example: http://www.wtcs.org/snmp4tpc/images/TCP-Header.jpg
The first one is pure "ASCII ART", so you could do it at the keyboard and then take a screenshot of it :)!
I linked that picture to try to show that the byte boundaries need to be shown.
The second one is skewed, as seen on my screen. Is that intentional?
Oh that's just I think scanned from a book. I was more concerned with the representation of the same information from the ASCII picture into this pretty picture.
In either case (being serious for once) the ideal Unix/Linux-based package for this is groff, using the pic preprocessor (which translates a diagram description language into troff input which then draws the diagram). The output is PostScript (PS), which can be coverted (e.g. into JPEG) by the ImageMagick program 'convert'.
Ugh. Sounds like too much work, but thanks for the idea. Does it end up looking horrible just like the ASCII picture?
What would be great is some kind of C/C++ struct to diagram converter program to take care of this for me.
I could prepare examples emulating your two above for study, but don't have time right now (maybe later today, maybe even later).
Thanks for the offer - I'm managing just fine with Inkscape for the moment. One has to be very careful with Inkscape to get the sizes and layouts right. At least it beats Gimp for this kind of work. :)
Srdjan
See at end
On 29-Mar-10 13:32:49, Srdjan Todorovic wrote:
Hi Ted,
On 29/03/2010, Ted Harding Ted.Harding@manchester.ac.uk wrote:
On 29-Mar-10 09:14:43, Srdjan Todorovic wrote:
Lets say I'm documenting a low-level protocol or file format and want to produce a picture such as the TCP header (etc) table (http://izecksohn.com/pedro/pub/tcp_header.jpg), what's the best program to use for that?
Another example: http://www.wtcs.org/snmp4tpc/images/TCP-Header.jpg
The first one is pure "ASCII ART", so you could do it at the keyboard and then take a screenshot of it :)!
I linked that picture to try to show that the byte boundaries need to be shown.
The second one is skewed, as seen on my screen. Is that intentional?
Oh that's just I think scanned from a book. I was more concerned with the representation of the same information from the ASCII picture into this pretty picture.
In either case (being serious for once) the ideal Unix/Linux-based package for this is groff, using the pic preprocessor (which translates a diagram description language into troff input which then draws the diagram). The output is PostScript (PS), which can be coverted (e.g. into JPEG) by the ImageMagick program 'convert'.
Ugh. Sounds like too much work, but thanks for the idea. Does it end up looking horrible just like the ASCII picture?
What would be great is some kind of C/C++ struct to diagram converter program to take care of this for me.
I could prepare examples emulating your two above for study, but don't have time right now (maybe later today, maybe even later).
Thanks for the offer - I'm managing just fine with Inkscape for the moment. One has to be very careful with Inkscape to get the sizes and layouts right. At least it beats Gimp for this kind of work. :)
Srdjan
As illutration, I've done your second one http://www.wtcs.org/snmp4tpc/images/TCP-Header.jpg using pic+groff. I've put the results on
http://www.zen89632.zen.co.uk/Misc
files: tcpheader.tr (text input troff, almost entirely pic language) tcpheader.ps (PostScript output from the first, produced by groff) tcpheader.pdf (PDF converted from PS using pstopdf)
This was not the neatest way to do it. There is a lot of repetition in the ".tr" file (and there's quite a bit in the graphic as well). If I were doing this for a repeated type of job job (or just to make the source look nicer), I'd encapsulate much of it in macros.
As it is, it was just done "on the fly", building it up as I went along. Also, there is a little bit of tweaking which could be done to slightly improve a few bits of it; but I reckon it's not bad as it stands.
For conversion to other formats, the PS file would need to have a BoundingBox line put into it (I haven't done this yet). Then the 'convert' program could convert it into anything else.
Ted. PS: Can one post attachments to the ALUG list?
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@manchester.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 29-Mar-10 Time: 18:52:41 ------------------------------ XFMail ------------------------------
Hi,
On 29/03/2010, Ted Harding Ted.Harding@manchester.ac.uk wrote:
As illutration, I've done your second one http://www.wtcs.org/snmp4tpc/images/TCP-Header.jpg using pic+groff. I've put the results on
http://www.zen89632.zen.co.uk/Misc
files: tcpheader.tr (text input troff, almost entirely pic language) tcpheader.ps (PostScript output from the first, produced by groff) tcpheader.pdf (PDF converted from PS using pstopdf)
Wow! You did a great job of duplicating that. How long did it take? Did you just manually type the text into the .tr file or was there a tool you used?
Reminds me a little of LaTeX...
This was not the neatest way to do it. There is a lot of repetition in the ".tr" file (and there's quite a bit in the graphic as well). If I were doing this for a repeated type of job job (or just to make the source look nicer), I'd encapsulate much of it in macros.
Yes macros would be nice. So would perhaps some form of introspection in a program that can generate troff from a struct would be great.
I'll have to study your troff source more to figure out exactly how that works.
Thanks for the idea! :)
Srdjan
On 30-Mar-10 19:48:49, Srdjan Todorovic wrote:
Hi,
On 29/03/2010, Ted Harding Ted.Harding@manchester.ac.uk wrote:
As illutration, I've done your second one http://www.wtcs.org/snmp4tpc/images/TCP-Header.jpg using pic+groff. I've put the results on
http://www.zen89632.zen.co.uk/Misc
files: tcpheader.tr (text input troff, almost entirely pic language) tcpheader.ps (PostScript output from the first, produced by groff) tcpheader.pdf (PDF converted from PS using pstopdf)
Wow! You did a great job of duplicating that. How long did it take? Did you just manually type the text into the .tr file or was there a tool you used?
It tokk something like an hour to an hour and a half all told. It was typed in by hand. I did it piece-meal, looking at the original graphic, identifying its component objects (mainly "box"es) with different attributes, and typing in a description of them one by one. Hence all the repetition. Then there was a certain amount of tweaking of detail to improve the result. It was all done "by eye" with a little trial and error to get proportions and layout looking roughly right.
Reminds me a little of LaTeX...
Only a little (likewise for troff). The pic stuff is more like Turtle Graphics!
This was not the neatest way to do it. There is a lot of repetition in the ".tr" file (and there's quite a bit in the graphic as well). If I were doing this for a repeated type of job job (or just to make the source look nicer), I'd encapsulate much of it in macros.
Yes macros would be nice. So would perhaps some form of introspection in a program that can generate troff from a struct would be great.
I'll have to study your troff source more to figure out exactly how that works.
Thanks for the idea! :)
Srdjan
I'll send you (privately) the .tr file with explanatory comments later. I'm happy you were pleased with the result!
Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@manchester.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 31-Mar-10 Time: 17:21:52 ------------------------------ XFMail ------------------------------
See at end.
On 31-Mar-10 16:21:55, Ted Harding wrote:
On 30-Mar-10 19:48:49, Srdjan Todorovic wrote:
Hi,
On 29/03/2010, Ted Harding Ted.Harding@manchester.ac.uk wrote:
As illutration, I've done your second one http://www.wtcs.org/snmp4tpc/images/TCP-Header.jpg using pic+groff. I've put the results on
http://www.zen89632.zen.co.uk/Misc
files: tcpheader.tr (text input troff, almost entirely pic language) tcpheader.ps (PostScript output from the first, produced by groff) tcpheader.pdf (PDF converted from PS using pstopdf)
Wow! You did a great job of duplicating that. How long did it take? Did you just manually type the text into the .tr file or was there a tool you used?
It tokk something like an hour to an hour and a half all told. It was typed in by hand. I did it piece-meal, looking at the original graphic, identifying its component objects (mainly "box"es) with different attributes, and typing in a description of them one by one. Hence all the repetition. Then there was a certain amount of tweaking of detail to improve the result. It was all done "by eye" with a little trial and error to get proportions and layout looking roughly right.
Reminds me a little of LaTeX...
Only a little (likewise for troff). The pic stuff is more like Turtle Graphics!
This was not the neatest way to do it. There is a lot of repetition in the ".tr" file (and there's quite a bit in the graphic as well). If I were doing this for a repeated type of job job (or just to make the source look nicer), I'd encapsulate much of it in macros.
Yes macros would be nice. So would perhaps some form of introspection in a program that can generate troff from a struct would be great.
I'll have to study your troff source more to figure out exactly how that works.
Thanks for the idea! :)
Srdjan
I'll send you (privately) the .tr file with explanatory comments later. I'm happy you were pleased with the result!
Ted.
For the sake of anyone else who would like to see how it was done, I've put a copy of the file I sent earlier to Srdjan (but with some tpose corrected and a little bit added) on the above web-page, which now contains files:
http://www.zen89632.zen.co.uk/Misc
files: tcpheader.tr (text input troff, almost entirely pic language) tcpheader.ps (PostScript output from the first, produced by groff) tcpheader.pdf (PDF converted from PS using pstopdf) tcpheader_howto.pdf
the last one being a detailed explanation of how the pic code in tcpheader.tr works.
For reference, the original diagram which Srdjan posted is at
http://www.wtcs.org/snmp4tpc/images/TCP-Header.jpg
and is "replicated" by me in the file tcpheader.ps/pdf
Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@manchester.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 01-Apr-10 Time: 00:00:59 ------------------------------ XFMail ------------------------------