Ethereal-users: Re: [Ethereal-users] help : using "-l" to pipe the output of Tethereal to anothe
On Sep 24, 2003, at 5:47 AM, Ching-Tung Lo wrote:
While I was reading Tethereal manual about using the option "-l ",I
was confused.
In the part of options using "-l",it says that :
This may be useful when piping the output of Tethereal to another
program, as it means that the program to which the output is piped
will see the dissected data for a packet as soon asTetherealsees the
packet and generates that output, rather than seeing it only when the
standard output buffer containing that data fills up.
My question is that how to use the option "-l" to pipe the output of
Tethereal to another program.
You use it by running Tethereal with the "-l" option, and piping the
output of Tethereal to another program. :-)
The option *itself* doesn't cause output to be piped to another
program. It merely causes the output to be "line-buffered" - i.e.,
causes Tethereal to arrange that a write will be done to the standard
output at the end of each line, rather than when the I/O library's
buffer fills up.
If Tethereal is reading from a capture file, "-l" probably won't be
useful. If you're doing a live capture, and piping the output to
another program, it could be useful if you want that other program to
report the result of processing a line of input from Tethereal as soon
as the packet that generates that line is seen by Tethereal. (That
requires that the other program write that line out immediately; if
it's writing to a terminal, its output will probably be line-buffered,
so that'll happen, but if it's being piped to yet *another* program,
the output probably won't be line-buffered unless the other program
always line-buffers its output or has a command-line option like "-l"
to force line buffering.)