I am a huge fan of software documentation and one of my go-to means of documenting the behavior of software is through sequence diagrams. Sequence diagrams show communication between one or more endpoints in a system. For example, here’s a sequence diagram of the TCP 3-way handshake:
I use a program called Mscgen to generate sequence diagrams. It allows you to define the content of the sequence diagram with text markup which the Mscgen program then turns into a graphical file via the command-line. Here’s an example of the markup that generates the above sequence diagram:
will generate a PNG graphic of the sequence diagram. You can also generate EPS, PNG and something called ‘ismap’ which I doubt I will ever use. I prefer PNG for general use, but if I’m embedding the graphic in a LaTeX document then EPS is the best choice.