Ethereal-dev: Re: [Ethereal-dev] how to capture packet through the eth0 in my computer with 3

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

From: Thomas Anders <thomas.anders@xxxxxxxxxxxxx>
Date: Wed, 04 Aug 2004 16:21:07 +0200
Li Haijiang wrote:
Now my computur have 3 network cards.I want to capture the packets through the
interface:eth0.I know how to do in the gtk Gui.But I want to use the command mode
to capture. So I can use the "tethereal" command to capture the packets?what
parameter to use?

RTFM. From the tethereal man page:

       -i  Set the name of the network interface or pipe to use
           for live packet capture.

           Network interface names should match one of the names
           listed in "tethereal -D" (described above); a number,
           as reported by "tethereal -D", can also be used.  If
           you're using UNIX, "netstat -i" or "ifconfig -a" might
           also work to list interface names, although not all
           versions of UNIX support the -a flag to ifconfig.

           If no interface is specified, Tethereal searches the
           list of interfaces, choosing the first non-loopback
           interface if there are any non-loopback interfaces,
           and choosing the first loopback interface if there are
           no non-loopback interfaces; if there are no inter­
           faces, Tethereal reports an error and doesn't start
           the capture.

           Pipe names should be either the name of a FIFO (named
           pipe) or ``-'' to read data from the standard input.
           Data read from pipes must be in standard libpcap for­
           mat.


+Thomas

--
Thomas Anders (thomas.anders at blue-cable.de)