On Fri, Oct 22, 1999 at 01:40:37PM -0500, Warren Young wrote:
>
>
> 2. Postscript mode doesn't seem to work, and I don't know enough about
> Postscript to figure out why. I just copied code from the packet
> printing code, so it should be close.
The postscript printing in Ethereal is very specialized for printing protocol
trees and hex dumps. It won't easily work for anything else. (But I think you can
make it work... read on!)
print.ps is the postscript used for printing protocol trees. It has two things
in it: a postscript program to read protocol-tree and hex-dump information,
and some test data.
The test data is there so that I could hack on print.ps, then fire up ghostscript
real quick to see if my changes to the postscript worked. The postscript program
and my test data are separated by special comments.
During the Ethereal build, a program 'rdps' is built form 'rdps.c'. This program
reads print.ps, strips the data from it, and converts the chunks of postscript
code into strings inside a C program, ps.c. This C file is compiled and linked
into Ethereal.
You might get it to work if you are able to print the lines in the TCP Follow
window much like the hex data in print.ps... as options to the 'hexdump' postscript
function (defined in print.ps). That will print fixed-width text. And it's smart
enough to know about page breaks, so you can just hexdump() line after line.
A "Save" option would be nice in the TCP Follow window as well... :)
--gilbert