Ethereal-dev: [ethereal-dev] Live capture from the command line if no "-i" flag specified

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

From: Guy Harris <guy@xxxxxxxxxx>
Date: Fri, 14 Jan 2000 15:48:59 -0800 (PST)
> gram        2000/01/14 08:21:53 CST
> 
>   Modified files:
>     .                    tethereal.c 
>   Log:
>   Check for existence of cf.iface before calling capture(). Change
>   usage statement accordingly.
>   
>   Revision  Changes    Path
>   1.2       +7 -2      ethereal/tethereal.c

We should probably, for both Ethereal and Tethereal, use the interface
returned by "pcap_lookupdev()" if the command line requests a capture
(e.g., Ethereal with "-k", or Tethereal with no "-r" flag) and no "-i"
flag was specified.  (If it returns NULL, we should just report the
error from it.)

On a multi-homed host, you'd probably want to specify a "-i" flag most
if not all of the time, but on a host with only one interface not having
to specify that interface would be a convenience.