Commit Graph

33 Commits

Author SHA1 Message Date
Guy Harris 1e59b9dc86 Set the locale for Tethereal to the native environment; Ethereal already
does so, as a side-effect of calling "gtk_set_locale()".

svn path=/trunk/; revision=2111
2000-07-05 02:06:58 +00:00
Guy Harris 9e42b3a4ed Remove the progress bar from the status line, and, instead, for any
potentially long-running operation that has a progress indicator, pop up
a modal dialog box with

	an indication of what is being done;

	a progress bar;

	a "Cancel" button to stop the operation.

This:

	leaves more room on the status line for a filter expression;

	provides a mechanism to allow the user to cancel long-running
	operations (although the way we do so may not back out of them
	as nicely as the user might like, if it's not obvious what the
	"right" way is or if the "right" way is difficult to implement
	or involves doing as much work as letting the operation
	continue);

	means that, because the dialog box is modal, we don't have to
	worry about the user performing arbitrary UI operations out from
	under the operation and changing arbitrary bits of state being
	used by that operation.

svn path=/trunk/; revision=2103
2000-07-03 08:36:52 +00:00
Guy Harris 7fbf320b8a Patch from Ben Fowler to rename the global variable "cf" to "cfile", to
make it easier to use grep to find all references to it without getting
a lot of false hits and to check, after allocating the memory chunk for
"frame_data" structures, that the allocation succeeded.

svn path=/trunk/; revision=2092
2000-06-27 04:36:03 +00:00
Guy Harris 65b907e98d Patch from Joerg Mayer:
Make "tethereal -h" look as similar to "ethereal -h" as
	possible.  The ethereal help was the "better" of the two.

svn path=/trunk/; revision=2073
2000-06-15 07:49:25 +00:00
Gilbert Ramirez d7e6e0e384 Add wtap-int.h. Move definitions relevant to the internal workins of wiretap
to that file, leave public definitions in wtap.h.

Rename "union pseudo_header" to "union wtap_pseudo_header".
Make the wtap_pseudo_header pointer available in packet_info struct.

svn path=/trunk/; revision=1989
2000-05-19 23:07:04 +00:00
Guy Harris f3d90d30a4 Remove the "union pseudo_header" from the "frame_data" structure;
there's no need to keep it around in memory - when the frame data is
read in when handing a frame, read in the information, if any, necessary
to reconstruct the frame header, and reconstruct it.  This saves some
memory.

This requires that the seek-and-read function be implemented inside
Wiretap, and that the Wiretap handle remain open even after we've
finished reading the file sequentially.

This also points out that we can't really do X.25-over-Ethernet
correctly, as we don't know where the direction (DTE->DCE or DCE->DTE)
flag is stored; it's not clear how the Ethernet type 0x0805 for X.25
Layer 3 is supposed to be handled in any case.  We eliminate
X.25-over-Ethernet support (until we find out what we're supposed to
do).

svn path=/trunk/; revision=1975
2000-05-18 09:09:50 +00:00
Guy Harris 7bf3c7523b Have "proto_tree_is_visible" false except when we're in the middle of
doing something that requires that the text for protocol tree entries be
generated, i.e.

	1) initialize it to FALSE;

	2) have every routine that sets it clear it when it's done;

	3) when printing packets, set it to TRUE only if we're not just
	   printing packet summary lines;

and then get rid of settings to FALSE made unnecessary as a result of
those changes.

This makes sure it's not set when it doesn't have to be (which causes
the protocol tree code to format the text when it doesn't have to,
wasting CPU time).

svn path=/trunk/; revision=1973
2000-05-18 08:35:01 +00:00
Gilbert Ramirez 61167a3c28 Change dfilter_apply() to 4-argument function. 4th argument is not yet used,
but will be in the future, and it's easier for me to keep my local branch
in sync with the source with the calls to dfilter_apply() already modified
tothe 4-arg format.

Add a CPP macro to ipv4.h to define ipv4_addr_ne(). Use it in dfilter.c

svn path=/trunk/; revision=1854
2000-04-14 05:39:43 +00:00
Gilbert Ramirez b218a8f550 Consolidate flags in struct frame_data, and add "visited" flag. Use
it in SOCKS dissector.

(Okay, how many times am I going to modify packet.h today, forcing you
to re-compile everything? :-)

svn path=/trunk/; revision=1850
2000-04-13 20:39:38 +00:00
Guy Harris c2b1feea05 Turn "ethereal_proto_init()" and "ethereal_proto_cleanup()" into
"dissect_init()" and "dissect_cleanup()", in "packet.c", so that we
don't duplicate those routines in Ethereal and Tethereal (and so on),
and don't have to remember to update N different versions of them if we
have to change the way we do one-time initialization and cleanup.

svn path=/trunk/; revision=1790
2000-04-04 07:03:07 +00:00
Guy Harris 5f0fc518c7 Use the new split between protocol registration and protocol handoff
registration routines to get rid of the special handling of ONC RPC
protocols - dissectors for ONC RPC-based protocols should register their
protocol, fields, and ETT values in a protocol registration routine, and
register themselves with the ONC RPC dissector in their protocol handoff
routine, so that the latter is done after the ONC RPC dissector's
protocol registration routine is called, so that the data structures
needed when dissectors for ONC RPC protocols register themselves with
the ONC RPC dissector have been initialized.

Get rid of "init_dissect_rpc()", which initializes said data structures;
do that in "proto_register_rpc()" instead.

svn path=/trunk/; revision=1789
2000-04-04 06:46:41 +00:00
Guy Harris 3ee409084c Move the creation of, and registration of protocols known to UDP in, the
hash table attached to "udp.port" out of "init_dissect_udp()" into
"proto_register_udp()", so that it's done the way TCP does it, and then
get rid of "init_dissect_udp()".

svn path=/trunk/; revision=1781
2000-04-03 09:41:31 +00:00
Gilbert Ramirez c317b042a8 Add getopt.c (from GNU libc) for use on Win32.
Ethereal/win32 now supports command-line options.
Tethereal now compiles on win32, except for the fact that I haven't
put the Makefile.nmake changes in for that yet.

svn path=/trunk/; revision=1758
2000-03-28 20:20:11 +00:00
Guy Harris ca9d89b2ba In Tethereal, allow capture filters and read filters either to be
specifies with "-f" and "-R" flags, respectively, or specified with
non-flag command-line arguments, as tcpdump and snoop allow.

svn path=/trunk/; revision=1663
2000-02-22 07:07:55 +00:00
Guy Harris 585268e3e1 Use WTAP_ERR_UNSUPPORTED_ENCAP for all attempts to open or read a
capture file for an unsupported link-layer encapsulation type (as the
nettl reader does), and report it correctly if it occurs on an open or
read attempt rather than a save attempt.

svn path=/trunk/; revision=1647
2000-02-19 08:00:08 +00:00
Gilbert Ramirez 4fb901bbad Allow for non-"struct timeval" ts's in phdr just like we did
in capture.c. Copy the members of the struct instead of the entire struct.

svn path=/trunk/; revision=1640
2000-02-16 01:38:56 +00:00
Guy Harris 7c4a6c5e21 Say "Tethereal", rather than "Ethereal", in messages from Tethereal.
svn path=/trunk/; revision=1617
2000-02-11 06:53:31 +00:00
Guy Harris 408eddc7e7 Initialize per-dissection data structures before doing a capture, as
well as before reading a capture file - if the user didn't specify that
the capture should be saved to a file, it'll be dissected as it arrives.

svn path=/trunk/; revision=1568
2000-01-26 05:30:02 +00:00
Guy Harris 2727167b2d Make the Tethereal usage message reflect whether libpcap support was
compiled in or not.

svn path=/trunk/; revision=1536
2000-01-24 05:13:45 +00:00
Guy Harris 6253a38e97 Keep the sample command line in the usage message within 80 characters.
svn path=/trunk/; revision=1534
2000-01-24 04:53:54 +00:00
Guy Harris f393a19883 Heikki Vatiainen's patch to add a flag to control whether to interpret
the IPv4 TOS field as a TOS field or as a DiffServ field, and allow that
field to be controlled by a command-line option or an option in the
"Display:Options" dialog box.

svn path=/trunk/; revision=1532
2000-01-24 04:44:58 +00:00
Guy Harris 287efcbbe7 Allow "-w" and/or "-R" to be specified either when doing a live capture
or when reading a saved capture file; if "-w" is specified, the packets
captured or read from the file are written to the specified file rather
than being dissected and printed, and if "-R" is specified, only packets
that pass the specified read filter are dissected and printed or
written.

svn path=/trunk/; revision=1523
2000-01-22 07:19:34 +00:00
Guy Harris 3e067b812c Fix files that had Gilbert's old e-mail address or that didn't have my
forwarding e-mail address.

svn path=/trunk/; revision=1522
2000-01-22 06:22:44 +00:00
Guy Harris a83998f4f0 Add a "-F" flag, to allow the format of a file being written to be
specified.  This will be of more use when I allow "-w" to be used when
reading an existing capture file rather than doing a live capture (which
will also allow you to specify a read filter, and thus to write a
capture file containing those packets from an existing capture file that
match a given display filter).

Fix up some messages to say "tethereal" rather than "ethereal".

svn path=/trunk/; revision=1499
2000-01-17 08:06:42 +00:00
Guy Harris 1108f9f609 Add a "-x" flag to Tethereal, to make it print a hex and ASCII dump of
the packet data.

svn path=/trunk/; revision=1497
2000-01-17 07:49:03 +00:00
Guy Harris 7f30e566a0 Move the routine to get a list of the network interfaces on the system
to "util.c", and provide a routine to free that list as well.

When picking an interface on which to do a capture (if no "-i" flag was
specified), use that routine, and pick the first interface on the list.

svn path=/trunk/; revision=1495
2000-01-16 02:48:12 +00:00
Olivier Abad c85d49dc19 Add a call to init_plugins() in order to read the plugins.status file and
enable plugins if their saved status is "active".

svn path=/trunk/; revision=1487
2000-01-15 10:47:56 +00:00
Guy Harris 84776702fa Pass the number of packets to be captured to "capture()" as an argument,
rather than making it static.

Don't print the "Capturing on <interface>" message until you actually
start capturing, and print it regardless of whether the interface was
explicitly specified or not (that's what snoop and tcpdump do).

svn path=/trunk/; revision=1485
2000-01-15 10:23:10 +00:00
Guy Harris 278b21900a If no "-i" flag is specified to Tethereal when no file is to be read,,
or to Ethereal when the "-k" flag is specified, i.e. when a capture is
to be started immediately, use "pcap_lookupdev()" to pick an interface,
just as tcpdump does.

svn path=/trunk/; revision=1482
2000-01-15 06:05:21 +00:00
Nathan Neulinger dbf3bf6177 better command line syntax description
svn path=/trunk/; revision=1478
2000-01-14 23:26:18 +00:00
Gerald Combs 62207b4d85 Set an initial (blank) filter to get around the peculiarities in RH
6.1's libpcap.

svn path=/trunk/; revision=1476
2000-01-14 19:05:30 +00:00
Gilbert Ramirez b65829c808 Check for existence of cf.iface before calling capture(). Change
usage statement accordingly.

svn path=/trunk/; revision=1474
2000-01-14 14:21:50 +00:00
Guy Harris b799cb10d9 Add "tethereal", a tty-oriented derivative of Ethereal that works like
Sun's snoop or like tcpdump.

svn path=/trunk/; revision=1468
2000-01-14 06:46:00 +00:00