Commit Graph

263 Commits

Author SHA1 Message Date
Guy Harris 197cfc585e Ethereal shouldn't use "file_seek()", "file_read()", or "file_write()"
directly; it should use them through Wiretap.  (Arguably, it shouldn't
use "file_open()", "file_dopen()", or "file_close()" directly, and
should use those through Wiretap as well.)

svn path=/trunk/; revision=1540
2000-01-24 19:27:38 +00:00
Guy Harris 24bf66d16c Don't recompute "cf->count" when filtering packets - the recomputation
will just give it the value it's always had, as packets are counted
regardless of whether they pass the filter or not (which is what we
want).

Given that, so there's no need for a separate "cf->unfiltered_count"
value, so get rid of it and use "cf->count" instead.

svn path=/trunk/; revision=1441
2000-01-08 23:49:33 +00:00
Gilbert Ramirez 71b7cd5031 Move GTK code out of summary.c and into gtk/summary_dlg.c
summary.c now provides a struct of info (see summary.h)

Changed the name of the summary dialogue callback (hence the change
in menu.c), and added a close button to the dialogue.

Moved #include <gtk/gtk.h> out of print.c and into prefs.h where it
was needed for GdkColor.

svn path=/trunk/; revision=1273
1999-12-10 04:21:04 +00:00
Guy Harris aef39cc00f To find out the file's packet encapsulation type (which could be
WTAP_ENCAP_PER_PACKET, if there's more than one type of packet in the
file, or could be WTAP_ENCAP_UNKNOWN, if the file is of a type that
doesn't put an encapsulation type in the file header, and it has no
packets), we just need to call "wtap_file_encap()" when we're done
reading the file.

svn path=/trunk/; revision=1205
1999-12-04 11:32:25 +00:00
Guy Harris a34c9711f6 Now that "wtap_file_type_string()" takes a file type rather than a "wtap
*" as an argument, there's no need to save the file type string in a
"capture_file" structure - we save the file type, and can use that when
generating the summary display.

svn path=/trunk/; revision=1202
1999-12-04 08:59:13 +00:00
Guy Harris dc548e7458 Allow the user to save either all of the current capture, or only the
packets that are currently being displayed from that capture.

Centralize the code to control whether "File:Save" and "File:Save As"
are enabled (and *always* have "File:Save As" enabled if you have a
capture; "File:Save" is enabled only if you have a live capture you've
not yet saved, although it does the same thing as "File:Save As").

Have the "save_file" member of a "capture_file" structure represent
*only* the file currently being *written* to by a capture, and, if there
is no capture currently in progress, have it be NULL; the name of the
file currently being *displayed" is in the "filename" member, and an
"is_tempfile" member indicates whether it's a temporary file for a live
capture or not.

Have "close_cap_file()" delete the current capture file if it's a
temporary capture file that hasn't been saved (in its entirety - saving
selected frames doesn't count).  Do the same (if there *is* a current
capture file) when exiting.

The "Ready to load or capture" message is the only statusbar message in
the "main" context; "close_cap_file()" should never pop it, it should
only pop whatever message exists in the "file" context, and thus has no
need to take, as an argument, the context for the message it should pop.

Update the man page to reflect the new behavior of "File:Save" and
"File:Save As", and to reflect recent changes to "Display:Match Selected".

svn path=/trunk/; revision=1170
1999-11-30 20:50:15 +00:00
Guy Harris 9a3791699c In "Go To Frame", distinguish between "there is no frame with that frame
number" and "there is a frame with that frame number, but it didn't pass
the current display filter".

svn path=/trunk/; revision=1164
1999-11-30 07:27:37 +00:00
Guy Harris 39be2f99be Expand some comments.
svn path=/trunk/; revision=1152
1999-11-29 08:51:11 +00:00
Guy Harris 150479490c Move the callback for input available on the sync pipe from "file.c" to
"capture.c", along with the other code that deals with the sync pipe.

Close the sync pipe, and get rid of the temporary capture file, on
errors.

Split "tail_cap_file()" into routines to set up to read from the capture
file, to read a specified number of packets from it when told to do so
by the child process, and to read the rest of the capture file and
finish up the capture, to provide the code in "capture.c" the hooks it
needs.

Have a common routine to set the status bar to report the file name and
number of dropped packets, to use both when reading in a capture file in
its entirety all at once and when done with a "read it while the capture
is writing to it" live capture.

svn path=/trunk/; revision=1137
1999-11-29 01:54:01 +00:00
Gerald Combs e479d316a7 Change display filter entry widget to a GtkCombo.
Modify filter_packtes to return 1 on success, and 0 on failure.

svn path=/trunk/; revision=1106
1999-11-25 18:02:25 +00:00
Guy Harris 1ecbfc0619 Clean up some ANSI C nits pointed out by "gcc -pedantic".
svn path=/trunk/; revision=1060
1999-11-18 21:04:54 +00:00
Guy Harris 0caff51de0 Add a "Go To Frame" menu item, which lets you go to a frame by frame
number.

svn path=/trunk/; revision=989
1999-11-08 01:03:40 +00:00
Guy Harris f633fe0259 Pop up a message box if a search for a frame fails.
svn path=/trunk/; revision=985
1999-11-06 06:54:24 +00:00
Guy Harris f0889e55c1 Add a "Find Frame" menu item under "Display"; it lets you use a display
filter to search forward or backward in the list of displayed frames for
a matching frame.

When filtering the display, readjust the display to show the "current"
frame if it passed the display filter.  When a file is read in, the
first frame becomes the "current" frame; when a frame is selected, it
becomes the "current" frame, and remains so *even if you unselect it*,
until another frame is selected.

Select the first frame when a file is read in.

Disable most of the "Display" and "Tools" menu items if there's no
current capture file, and enable the relevant ones if there is.

svn path=/trunk/; revision=982
1999-11-06 06:28:07 +00:00
Guy Harris 3b9013d393 When a new display filter is to be applied, don't set "cf.dfilter" or
"cf.dfcode" if the new filter doesn't compile, because the filter
currently in effect will be the one that was last applied - just free up
the text of the new filter, and whatever memory was allocated for the
new filter code.

This means we allocate a new dfilter when a new filter is to be applied,
rather than recycling stuff from the old filter, as we want the old
filter code to remain around if the new filter doesn't compile.

This means that "cf.dfilter" and "cf.dfcode" will be null if there's no
filter in effect.

svn path=/trunk/; revision=803
1999-10-11 06:39:26 +00:00
Guy Harris 12e0703c0d Get rid of some unused fields in a "capture_file" structure.
svn path=/trunk/; revision=756
1999-10-02 20:23:53 +00:00
Guy Harris e4f7809763 Add an item to the "File/Print" dialog box to ask that the full hex data
of the packet be printed (this is only done if "Print detail" is
selected; it should be grayed out of "Print summary" is selected).

If that item is selected, suppress the hex printing of uninterpreted
data items in the protocol tree.

Move some GTK+ keys not used outside of "gtk/print_dlg.c" from
"gtk/keys.h" into "gtk/print_dlg.c".

svn path=/trunk/; revision=736
1999-09-29 22:19:24 +00:00
Ashok Narayanan 501b9b05e1 Adds progress bar functionality back for loading files (it was changed to
bounce bar for compressed file support). Note that the progress bar may
not grow smoothly for compressed files, but it should be reasonably accurate
for files which are large enough to matter.

svn path=/trunk/; revision=701
1999-09-23 04:39:01 +00:00
Ashok Narayanan 3dfa56c498 This commit contains support for reading capture files compressed using
gzip. The zLib library is used for this purpose. If zLib is not available
(or it's use is disabled by the --disable-zlib option to configure), you
can still compile Ethereal but it will be unable to read compressed capture
files.

IMPORTANT:

Now all file accesses to capture files should be done through special macros.
Specifically, for any use of the following functions on capture files, replace them.
The arguments for the right-side functions are exactly the same as for the
original stdio functions.

	fopen			file_open
	fdopen			filed_open
	fread			file_read
	fwrite			file_write
	fseek			file_seek
	fclose			file_close
	ferror			file_error

svn path=/trunk/; revision=695
1999-09-22 01:26:50 +00:00
Guy Harris 3823ab23be Add a "Expand all levels"/"Print as displayed" pair of radio buttons to
the "File/Print" dialog box; "Expand all levels" means that all levels
of the protocol tree should be printed, while "Print as displayed" means
that only those levels shown in the display should be printed.

Free the table of column widths once printing is done.

svn path=/trunk/; revision=671
1999-09-12 20:23:43 +00:00
Guy Harris 55dff94484 Add summary-vs-detail radio buttons to the print dialog box; detail
prints the protocol tree, and summary prints the fields in the summary
clist, with a header line at the beginning of the printout.

Print only packets selected by the current packet filter.

Just have "ARP" and "RARP" in the "Protocol" field for ARP packets;
whether it's a request or a reply can be seen in the "Info" field.

Add to the "Frame" section of the protocol tree the time between the
current packet and the previous displayed packet, and the packet number.
Have FT_RELATIVE_TIME fields be a "struct timeval", and display them as
seconds and fractional seconds (we didn't have any fields of that type,
and that type of time fits the delta time above).

Add an FT_DOUBLE field type (although we don't yet have anything using
it).

svn path=/trunk/; revision=666
1999-09-12 06:11:51 +00:00
Guy Harris bb6a82004e Don't do file-read progress bar updates with a timeout; instead, update
the progress bar up to 100 times, as we get another percent closer to
completion.  That reduces the number of times we run the GTK+ main loop;
that main loop may do a "select()" or "poll()" or FIONREAD "ioctl" to
check for input from the X server, adding to the CPU overhead of reading
a file.

The packet filtering progress bar is already updated in a similar
fashion; make it also do up to 100 updates.

svn path=/trunk/; revision=597
1999-08-28 01:51:58 +00:00
Gilbert Ramirez e1bd4fd73f Added John McDermott's colorization routines. There's still some
debug printf's in there.

svn path=/trunk/; revision=562
1999-08-24 16:27:23 +00:00
Guy Harris bf9895bb26 Remove the include of <sys/time.h> from "file.h" - it's neither
necessary nor sufficient if you're using "struct tm" (on many, perhaps
most, perhaps even all modern UNIXes, <sys/time.h> includes <time.h>,
which declares "struct tm", but that's not necessarily the case on
non-UNIX systems).

Include <time.h> in "file.c", to declare "struct tm".

Don't use PCAP_ERRBUF_SIZE to declare a message string buffer - that
won't work if you don't have "libpcap".

svn path=/trunk/; revision=549
1999-08-22 07:19:28 +00:00
Guy Harris ee39938f67 DLT_NULL, from "libpcap", means different things on different platforms
and in different capture files; throw in some heuristics to try to
figure out whether the 4-byte header is:

	1) PPP-over-HDLC (some version of ISDN4BSD?);

	2) big-endian AF_ value (BSD on big-endian platforms);

	3) little-endian AF_ value (BSD on little-endian platforms);

	4) two octets of 0 followed by an Ethernet type (Linux, at least
	   on little-endian platforms, as mutated by "libpcap").

Make a separate Wiretap encapsulation type, WTAP_ENCAP_NULL,
corresponding to DLT_NULL.

Have the PPP code dissect the frame if it's PPP-over-HDLC, and have
"ethertype()" dissect the Ethernet type and the rest of the packet if
it's a Linux-style header; dissect it ourselves only if it's an AF_
value.

Have Wiretap impose a maximum packet size of 65535 bytes, so that it
fails more gracefully when handed a corrupt "libpcap" capture file
(other capture file formats with more than a 16-bit capture length
field, if any, will have that check added later), and put that size in
"wtap.h" and have Ethereal use it as its notion of a maximum packet
size.

Have Ethereal put up a "this file appears to be damaged or corrupt"
message box if Wiretap returns a WTAP_ERR_BAD_RECORD error when opening
or reading a capture file.

Include loopback interfaces in the list of interfaces offered by the
"Capture" dialog box, but put them at the end of the list so that it
doesn't default to a loopback interface unless there are no other
interfaces.  Also, don't require that an interface in the list have an
IP address associated with it, and only put one entry in the list for a
given interface (SIOCGIFCONF returns one entry per interface *address*,
not per *interface* - and even if you were to use only IP addresses, an
interface could conceivably have more than one IP address).

Exclusively use Wiretap encapsulation types internally, even when
capturing; don't use DLT_ types.

svn path=/trunk/; revision=540
1999-08-22 00:47:56 +00:00
Gilbert Ramirez c1adce9762 Re-arranged Ethereal's definitions of DLT_RAW et al. since capture.c
is the only file that uses them. I hope to avoid some compiler warnings
with this.

svn path=/trunk/; revision=512
1999-08-18 16:28:22 +00:00
Guy Harris df490a7085 Add to Wiretap the ability to write capture files; for now, it can only
write them in "libpcap" format, but the mechanism can have other formats
added.

When creating the temporary file for a capture, use "create_tempfile()",
to close a security hole opened by the fact that "tempnam()" creates a
temporary file, but doesn't open it, and we open the file with the name
it gives us - somebody could remove the file and plant a link to some
file, and, if as may well be the case when Ethereal is capturing
packets, it's running as "root", that means we write a capture on top of
that file....  (The aforementioned changes to Wiretap let you open a
capture file for writing given an file descriptor, "fdopen()"-style,
which this change requires.)

svn path=/trunk/; revision=509
1999-08-18 04:17:38 +00:00
Guy Harris 0171508113 Don't preserve the read filter from file to file - you won't necessarily
want to read the next file with the same filter that you used on the
last file.

In the "File/Open" dialog box, parse the read filter before trying to
open the file, and if the parse fails, leave the dialog box up so the
user still has the filter and file name around and can try to fix the
problem.

Keep the compiled read filter attached to the "capture_file" structure,
so you don't have to reparse it on a "File/Reload".

svn path=/trunk/; revision=497
1999-08-15 19:18:46 +00:00
Guy Harris 8f0acf3551 Have "wtap_open_offline()" return, on failure, an indication of the
reason for the failure, and have it do the checks to make sure the file
being opened is a plain file or a pipe.

Have "open_cap_file()" make use of that.

Don't automatically set "last_open_dir" if a "-r" flag was specified on
the command line - do so only if the file in question could actually be
opened.

svn path=/trunk/; revision=495
1999-08-15 06:59:13 +00:00
Guy Harris f452748340 "read_cap_file()" doesn't need to be passed a file name as an argument -
it's called after "open_cap_file()" has been called, and is always
passed the file name passed to "open_cap_file()", and that file name is
stored as "cf->filename", so "read_cap_file()" can just use
"cf->filename" as the pathname of the file.

svn path=/trunk/; revision=494
1999-08-15 01:02:26 +00:00
Guy Harris ea6a522b28 Split "load_cap_file()" into "open_cap_file()" and "read_cap_file()".
The former, which used to be called by "load_cap_file()", now just opens
the file and, if the open succeeds, closes any capture file we
previously had open, reinitializes any protocols that need
reinitialization, and saves information about the new capture file in
the "capture_file" structure to which it was passed a pointer.  The
latter reads the file already opened by "read_cap_file()".

For "File/Open", call "open_cap_file()" before dismissing the file
selection box; if it fails, "open_cap_file()" will have popped up a
message box complaining about it - just return, leaving the file
selection box open so the user can, after dismissing the message box,
either try again with a different file name, or dismiss the file
selection box.  (Other file selection boxes should be made to work the
same way.)  If "open_cap_file()" succeeds, dismiss the file selection
box, and read the capture file in.

svn path=/trunk/; revision=492
1999-08-15 00:26:11 +00:00
Gilbert Ramirez ab6490398c Moved global memory alloction used in display filters (which was stored
in dfilter-grammar.y) to a new struct dfilter. Display filters now have
their own struct, rather than simply being GNode's. This allows multiple
display filters to exist at once, aiding John McDermott in his
work on colorization.

svn path=/trunk/; revision=480
1999-08-13 23:47:43 +00:00
Gilbert Ramirez 499eff7b0d Changed two #include <>'s to #include "" 's, for stylistic reasons only.
svn path=/trunk/; revision=471
1999-08-11 17:02:28 +00:00
Guy Harris 3f14fd3d7e More whitespace fixups, and fix a typo in a comment.
svn path=/trunk/; revision=463
1999-08-10 07:54:07 +00:00
Guy Harris 16e3dd2e48 Fix up whitespace.
svn path=/trunk/; revision=462
1999-08-10 07:52:54 +00:00
Guy Harris 8eb998e360 Add the ability to specify a filter to be used when reading the file to
the "Open File" dialog box (the "Open File" dialog box equivalent of the
"-R" flag).  Have "load_cap_file()" take the filter expression as an
argument, and make the global "rfilter" into a member of a
"capture_file" structure.

When reading a temporary capture file after a live capture, don't apply
any filter.

Move the code that pops up error boxes on file opens when reading a
capture file back to "load_cap_file()"; it also pops up error boxes if
the filter expression can't be parsed.

Don't enable "File/Save" or "File/Save As..." if an attempt to read a
capture file fails - if there was already an open capture file, it was
closed by "load_cap_file()", so we no longer have an open file to save.

svn path=/trunk/; revision=460
1999-08-10 07:16:47 +00:00
Guy Harris 86a8ad1dcd Building a GList by adding elements to the end with "g_list_append()" is
N^2 in the ultimate size of the list (as "g_list_append()" is linear in
the size of the list, at least when used in the way the GLib
documentation says to use it); instead, maintain our own linked list of
"frame_data" structures for all packets read, including a pointer to the
last element.

"gtk_clist_set_row_data()" is linear in the row number, so if it's used
to attach a pointer to the "frame_data" structure for a packet to the
packet list GtkClist row for each packet, that's also N^2 in the number
of packets in that packet list; instead, store the row number in the
"frame_data" structure, and find the packet for a given row by scanning
the list for it (we were already scanning the list linearly to find that
packet's index in the list of all packets; that's only done when a
packet's selected, so it's not *too* bad, but it might be nice to avoid
having to do that scan).

svn path=/trunk/; revision=457
1999-08-10 04:13:37 +00:00
Laurent Deniel 9f8898726d Allow compilation of ethereal in a directory different than
the source directory. The doc makefile is still broken however.
Thanks to Jan Bernard van Doorn for raising this problem.

svn path=/trunk/; revision=453
1999-08-07 17:28:21 +00:00
Gilbert Ramirez ecff53a0de Added a progress bar to the display filter computation. Unfortunately,
try as I might, I couldn't get gtk_timeout_add to work. I read all the docs,
but no luck. So for now I call dfilter_progress_cb for every 20 packets
that are filtered. I'd rather have *something* for the next Ethereal
release than nothing.

I also modified file_progress_cb to use it's local copy of cf rather
than the global copy.

svn path=/trunk/; revision=447
1999-08-05 16:46:04 +00:00
Guy Harris 79c2223425 Check in Olivier Abad's patch to add dissectors for LAP-B and X.25, and
wiretap support for RADCOM Ltd.'s WAN/LAN analyzers (see

	http://www.radcom-inc.com/

).  Note: as I remember, IEEE 802.2/ISO 8022 LLC has somewhat of an SDLC
flavor to it, just as I think LAP, LAPB, LAPD, and so on do, so we may
be able to combine some of the LLC dissection and the LAPB dissection
into common code that could, conceivably be used for other SDLC-flavored
protocols.

Make "S" a mnemonic for "Summary" in the "Tools" menu.

Move the routine, used for the "Tools/Summary" display, that turns a
wiretap file type into a descriptive string for it into the wiretap
library itself, expand on some of its descriptions, and add an entry for
files from a RADCOM analyzer.

Have "Tools/Summary" display the snapshot length for the capture.

svn path=/trunk/; revision=416
1999-08-02 02:04:38 +00:00
Guy Harris c6ccba12d1 Turn "protocol_tree" and "fd" from global variables into members of a
"capture_file" structure, make a "select_packet()" routine to parallel
"unselect_packet()", and have "unselect_packet()" free the protocol tree
that the "protocol_tree" member of the "capture_file" passed to it
points to.

It should now be impossible to do a "Print Packet" operation if no
packet has been selected, so remove the check for that (we'll probably
just blow up if it happens; if it does, that means we probably forgot to
gray out "/File/Print Packet" somewhere, so we should fix that).

svn path=/trunk/; revision=385
1999-07-24 03:22:50 +00:00
Guy Harris 520e977a5b Have "close_cap_file()" disable all menu items that make sense only if
you have a capture.

Leave the job of enabling and disabling menu items that make sense only
if you have a capture (except for "File/Save" and "File/Save As...", for
now) up to "load_cap_file()", "close_cap_file()", and the like - don't
scatter that stuff throughout the code.

Disable "File/Print Packet" if no packet is selected; enable it only if
a packet is selected.

If there's a selected packet, and a display filter is run:

	if the selected packet passed the filter, re-select it;

	if the selected packet didn't pass the filter, un-select it.

If we've opened a live "pcap" capture, but can't do the capture because
we can't get the netmask info, or can't parse the capture filter string,
or can't install the filter, close the live capture and the dump and
delete the dump file.

If we failed to open a live "pcap" capture, don't try to read the
capture file - it doesn't exist.

svn path=/trunk/; revision=384
1999-07-24 02:42:52 +00:00
Guy Harris 356a07b384 Add a "File/Print" menu item, which prints *all* the packets in the
capture to a file or printer.  This should eventually get the ability to
print either all the packets or only the packets selected by the display
filter, and possibly also the ability to print only packets M through N.

Get rid of "cur" member of "capture_file" structure; nobody used it.

There's no need to pass a pointer to a "dialog_button" variable to
"simple_dialog()" for the error boxes displayed if a file copy or move
fails; that dialog box is just a message box and has only an "OK"
button.

Put the declaration of "prefs" into "prefs.h".

svn path=/trunk/; revision=378
1999-07-23 08:29:24 +00:00
Gilbert Ramirez 601c52f0fb Added support for compiling on win32 with Visual C and 'nmake'. It compiles,
but does not link. Perhaps someone who understands the MS tools can help
out. I made it link a few months ago, but with different version of glib/gtk+.
I can't remember how I made it link.

Most of the compatibility issues were resolved with adding
#ifdef HAVE_UNISTD_H the the source code. Please be sure to add this to all
future code.

svn path=/trunk/; revision=359
1999-07-13 02:53:26 +00:00
Gilbert Ramirez 5a7e28ca46 Added the ability to create a read-only ethereal, i.e., one that
doesn't link with libpcap, so no packet captures can be made. The
"--disable-pcap" option has been added to the configure script. Docs
have been updated. And the string buffer size in the simple_dialog()
has been doubled so that Johan's e-mail address in the "About" dialogue
window doesn't get chopped off.

svn path=/trunk/; revision=351
1999-07-09 04:18:36 +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 7ea29fb80d Added Aaron Hillegass' summary dialogue. We're ignoring the problem with
NetMon statistic packets for now. We might fix that problem with wiretap,
either filtering out those packets, and/or providing the summary
information through a new wiretap API.

svn path=/trunk/; revision=326
1999-06-22 22:02:39 +00:00
Guy Harris 919fe8f24c Update the display if the "command-line-specified" time format is
changed by updating those columns showing the time in the
"command-line-specified" format, not by redoing the entire packet list
display; that way, the display continues to show the same packets and
any packet the user selected remains selected.  (It's also less work to
do that - you don't have to re-dissect the packet.)

Turn "redisplay_packets()" into "filter_packets()", and do some other
cleanups.

svn path=/trunk/; revision=325
1999-06-22 03:39:07 +00:00
Guy Harris 88e94a0186 Added "Capture" and "Display" menus; "Capture" has a "Start" item, which
is the same as "Tools/Capture", and "Display" has an "Options" item,
which pops up a dialog box to let you change the "default" time-stamp
column display format on the fly (the "default" is what the "-t"
command-line option sets), and have the display change when you do that.

Made infrastructure changes to make the immediate display update work.

Removed some unused functions, declared some functions used only in the
file in which they're defined "static", and removed some unnecessary
#includes.

svn path=/trunk/; revision=317
1999-06-19 01:14:51 +00:00
Guy Harris 18f922b46e Improve the alert boxes put up for file open/read/write errors. (Some
influence came from

http://developer.apple.com/techpubs/mac/HIGuidelines/HIGuidelines-232.html

which has a section on dialog box and alert box messages.  However,
we're largely dealing with technoids, not with The Rest Of Us, so I
didn't go as far as one perhaps should.)

Unfortunately, it looks like it's a bit more work to arrange that, if
you give a bad file name to the "-r" flag, the dialog box pop up only
*after* the main window pops up - it has the annoying habit of popping
up *before* the main window pops up, and sometimes getting *obscured* by
it, when I do that.  The removal of the dialog box stuff from
"load_cap_file()" was intended to facilitate that work.  (It might also
be nice if, when an open from the "File/Open" menu item fails, we keep
the file selection box open, and give the user a chance to correct
typos, choose another file name, etc.)

svn path=/trunk/; revision=310
1999-06-12 09:10:20 +00:00
Laurent Deniel 4664b86ccd Live data capture and display enhancement that allows network capture and
display of fully decoded packets at the same time.
Options added:
-F : fork capture process
-S : sync mode ala tail -f (implies -F)
-f : filter expression
-Q : exit after capture (implies -k)

svn path=/trunk/; revision=276
1999-05-11 18:51:10 +00:00
Gilbert Ramirez 2870ce29ce Capturing packets from ethereal now saves the capture in an "anonymous" buffer. That is, it's
a random name chosen by tempnam(), unknown to the user. If the user decides to save that
trace, he then uses File | Save to save it to a file. File | Save As lets him make a copy
of his named trace file as well. I also updated my e-mail address in the various credit
locations.

svn path=/trunk/; revision=242
1999-04-06 16:24:50 +00:00
Gilbert Ramirez ef3dfe2077 Removed all references to gtk objects from packet*.[ch] files. They now
reference the protocol tree with struct proto_tree and struct proto_item
objects. That way, the packet decoding source code file can be used with
non-gtk packet decoders, like a curses-based ethereal, e.g. I also re-arranged
some of the information in packet.h to more appropriate places (like other
packet-*.[ch] files).

svn path=/trunk/; revision=223
1999-03-23 03:14:46 +00:00
Guy Harris 22990ed08f Make the minimum and maximum packet sizes #defines.
Crank the maximum packet size up to 65535 bytes.

svn path=/trunk/; revision=185
1999-02-11 06:17:30 +00:00
Gilbert Ramirez 7757b2e72b I removed the per-file encapsulation type from wiretap, and make all filetypes
provide a per-packet encapsulation type. this required minor modifications to
ethereal.

svn path=/trunk/; revision=162
1999-01-07 16:15:37 +00:00
Gilbert Ramirez 3688d96c45 Added the iptrace (AIX's packet-capture tool) file format to wiretap.
This necessitated a change in ethereal because iptrace supports multi-NIC
packet capturing, including multi-datalink-type capturing.

svn path=/trunk/; revision=145
1999-01-02 06:10:55 +00:00
Gerald Combs 6ca358948b * Added column formatting functionality.
* Added check_col(), add_col_str() and add_col_fmt() to replace references
  to ft->win_info.
* Added column prefs handling code.

svn path=/trunk/; revision=97
1998-11-17 04:29:13 +00:00
Guy Harris 86bf1fc851 Add support to wiretap for reading Sun "snoop" capture files.
That requires that, in the packet-reading loop, we pass to the callback
routine the offset in the file of a packet's data, because we can no
longer compute that offset by subtracting the size of the captured
packet data from the offset in the file after the data was read -
"snoop" may stick padding in after the packet data to align packet
headers on 4-byte boundaries.

Doing that required that we arrange that we do that for "libpcap"
capture files as well; the cleanest way to do that was to write our own
code for reading "libpcap" capture files, rather than using the
"libpcap" code to do it.

Make "wtap_dispatch_cb()" and "pcap_dispatch_cb()" static to "file.c",
as they're not used elsewhere.

If we're using wiretap, don't define in "file.h" stuff used only when
we're not using wiretap.

Update the wiretap README to reflect Gilbert's and my recent changes.

Clean up some memory leaks in "wiretap/lanalyzer.c" and
"wiretap/ngsniffer.c", where the capture-file-format-specific data
wasn't freed if the open failed.

svn path=/trunk/; revision=91
1998-11-15 05:29:17 +00:00
Gilbert Ramirez fcb4c78a6a A lengthy patch to add the wiretap library. Wiretap is not used by default
because it is still in its infancy, but it can be compiled in optionally.
The library exists in its own subdirectory ethereal/wiretap. This patch also
edits all the packet-*.c files to remove the #include <pcap.h> line which is
unnecessary in these files. In the ethereal code, file.c is the most heavily
modified with #ifdef WITH_WIRETAP lines for the optional library.

svn path=/trunk/; revision=82
1998-11-12 00:06:47 +00:00
Gerald Combs 0758da1146 - Added match_strval function to packet.c
- Separated display and capture filters; rearranged some of the look and feel
- Lots of other miscellaneous fixes and updates

svn path=/trunk/; revision=38
1998-10-12 01:40:57 +00:00
Gerald Combs 5110b21fd8 * Added Mike Hall's TCP reconstruction code.
svn path=/trunk/; revision=10
1998-09-17 03:12:28 +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