Ethereal-dev: Re: [Ethereal-dev] Output files in text mode

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Guy Harris" <gharris@xxxxxxxxx>
Date: Mon, 25 Oct 2004 15:16:30 -0700 (PDT)
Pedro Pérez Pérez said:
> My problem is that i need this text files using tethereal or ethereal in
> command mode. I mean, i need to know what option i can put in the command
> line to execute ethereal getting in the output the same text file that i
> get using graphical interface exporting the output file as plain text with
> "all-collapsed" option.

Unfortunately, there isn't one.

>From the command line, all you can tell Ethereal to do is

    1) start a capture

or

    2) read a capture file.

You can't tell it to perform arbitrary GUI actions.

You can run a command to get Tethereal to read a capture file and write
out the dissection as text, but you can't get it to do that in
"all-collapsed" mode - there's no command line option for that.

> The meaning of this question is that i want to develop an application that
> sniff the network traffic with ethereal and reads this frames using output
> text files because is easier than using dmp files.

If you only want the top-level information about the protocols in the
packet, plus whatever information particular dissectors put in the
top-level items, try running Tethereal  with "-V" and then filtering out
all lines that begin with a space.  If you have "grep" (i.e., you're not
stuck on Windows, or you have Cygwin or something else that gives you
"grep" on Windows), try

    tethereal -V -r {file name} | grep -v '^ '