Ethereal-users: Re: [Ethereal-users] Filter on Local host

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: Sun, 2 Sep 2001 13:07:22 -0700
On Sun, Sep 02, 2001 at 05:01:46PM +0200, Gilad Benjamini wrote:
> I want to do something like this
>     tethereal -c 100 -f "tcp && ! src `hostname`"
> Does tethereal have some built-in symbolic name for "hostname" ?

No, it doesn't.  Tethereal just uses the libpcap library's parser for
capture filter expressions, and that parser doesn't have any builtin
symbolic name for the current host.

> I am asking this because I want to run the same command on different
> platforms.

Then you will have to find some platform-independent way of getting that
host name, and pass it in the filter argument to Tethereal in whatever
script you're using, or abandon the idea of running the same command on
different platforms.