Commit Graph

7 Commits

Author SHA1 Message Date
Guy Harris 29b9c8a285 Have "get_host_ipaddr()" return a Boolean indicating whether it
succeeded or failed, and, if it succeeded, have it fill in the IP
address if found through a pointer passed as the second argument.

Have it first try interpreting its first argument as a dotted-quad IP
address, with "inet_aton()", and, if that fails, have it try to
interpret it as a host name with "gethostbyname()"; don't bother with
"gethostbyaddr()", as we should be allowed to filter on IP addresses
even if there's no host name associated with them (there's no guarantee
that "gethostbyaddr()" will succeed if handed an IP address with no
corresponding name - and it looks as if FreeBSD 3.2, at least, may not
succeed in that case).

Add a "dfilter_fail()" routine that takes "printf()"-like arguments and
uses them to set an error message for the parse; doing so means that
even if the filter expression is syntactically valid, we treat it as
being invalid.  (Is there a better way to force a parse to fail from
arbitrary places in routines called by the parser?)

Use that routine in the lexical analyzer.

If that error message was set, use it as is as the failure message,
rather than adding "Unable to parse filter string XXX" to it.

Have the code to handle IP addresses and host names in display filters
check whether "get_host_ipaddr()" succeeded or failed and, if it failed,
arrange that the parse fail with an error message indicating the source
of the problem.

svn path=/trunk/; revision=802
1999-10-11 03:03:12 +00:00
Laurent Deniel a673e8bb2c Added name resolution in GUI part:
- Capture->Start->"Active name resolution"

Allows the user to turn on/off name resolution
during a live capture.

- Display->Options->"Name resolution"

Turn on/off name resolution for the displayed
data (or during the -S mode).
E.g. clicking on a packet captured with
resolution disabled will resolve names in
the detailed list if this option is set.
And applying or resetting a display filter
allows the update of the packet list as well.

svn path=/trunk/; revision=726
1999-09-26 14:40:01 +00:00
Gilbert Ramirez 07f42b5b31 Created a new protocol tree implementation and a new display filter
mechanism that is built into ethereal. Wiretap is now used to read all
file formats. Libpcap is used only for capturing.

svn path=/trunk/; revision=342
1999-07-07 22:52:57 +00:00
Gilbert Ramirez 2b86d46d70 Jun-ichiro's IPv6 patch is merged in with ethereal and now uses the new
proto*() functions. The configure script tries to use ipv6 name resolution if
it knows the type of ipv6 stack the user has (this can be avoided with the
--disable-ipv6 switch) Additionally, the configure script now deals with wiretap
better. If the user doesn't want to compile wiretap, the wiretap is never
visited. A few unnecessary #includes were removed from some wiretap files, and
a CPP macro was moved from bpf.c to wtap.h.

svn path=/trunk/; revision=229
1999-03-28 18:32:03 +00:00
Gerald Combs 3da04dd983 * Ethernet manufacturer support (Laurent)
* PPP fixes (Gerald)
* Null/loopback interface support (Gerald)

svn path=/trunk/; revision=25
1998-09-25 23:24:07 +00:00
Gerald Combs 576024f903 Added ID tags to the beginning of each source file.
svn path=/trunk/; revision=7
1998-09-16 03:22:19 +00:00
Gerald Combs 86534f46e1 Initial revision
svn path=/trunk/; revision=2
1998-09-16 02:39:15 +00:00