Commit Graph

81692 Commits

Author SHA1 Message Date
Guy Harris f5733e9aee Fix a typo in "Hypertext".
svn path=/trunk/; revision=404
1999-07-30 00:57:15 +00:00
Guy Harris da1baa7d22 Fix it to build with CMU, as well as UCD, SNMP.
svn path=/trunk/; revision=403
1999-07-29 07:11:23 +00:00
Gilbert Ramirez 7bd6c15378 Made the protocol (but not the fields) use the new proto_tree routine,
allowing users to filter on the existence of these protocols. I also
added packet-clip.c to the Nmake makefile.

svn path=/trunk/; revision=402
1999-07-29 05:47:07 +00:00
Guy Harris 6f1d3a3be8 Patches from Thierry Andry to support Classical IP captures from systems
with the ATM on Linux software from <http://lrcwww.epfl.ch/linux-atm/>.

svn path=/trunk/; revision=401
1999-07-28 23:16:42 +00:00
Laurent Deniel c4717a95d9 Code cleaning:
- remove the tail_timeout_cb feature
- remove unneeded fseek.

svn path=/trunk/; revision=400
1999-07-28 20:53:40 +00:00
Guy Harris 5eac77ec4c Include <stdlib.h> to get "atoi()" declared, to squelch a "gcc -Wall"
complaint.

svn path=/trunk/; revision=399
1999-07-28 20:39:42 +00:00
Laurent Deniel c42634dd82 Fix the -S option :
- read only the real number of packets that have been written
  by the child process. That's avoid incomplete packet read.
- special timeout handling no more necessary and the whole
  real time capture and display behavior is much more
  satisfying with this patch.
- wiretap modified to allow the reading of 'count' packets
  with wtap_loop.

svn path=/trunk/; revision=398
1999-07-28 20:17:24 +00:00
Guy Harris e0b268397a Fix up the comment before "get_column_width()" to reflect current
reality.

svn path=/trunk/; revision=397
1999-07-28 03:47:03 +00:00
Guy Harris 075ba742f7 If a column doesn't automatically resize, we have to set its size to the
appropriate value when we thaw the packet list, so that its size isn't
set to the size of the column title.

svn path=/trunk/; revision=396
1999-07-28 03:38:42 +00:00
Guy Harris cc0f9562c9 Get rid of the "Tools/Capture" menu item, in favor of "Capture/Start".
svn path=/trunk/; revision=395
1999-07-28 03:33:34 +00:00
Guy Harris b70d733f50 Have:
COL_INFO columns resize automatically even during a live
	capture;

	columns showing network addresses never resize automatically;

	other columns resize only when a capture is done;

and make all columns resizeable by hand (once they've resized, for
auto-resizeable columns).

svn path=/trunk/; revision=394
1999-07-28 03:29:02 +00:00
Gerald Combs f04819106b Added a bug fix from Erik Daughtrey that sets cf_filter to NULL after being
freed.

svn path=/trunk/; revision=393
1999-07-28 02:40:16 +00:00
Gerald Combs 90cae40e82 Added a fix from Shoichi Sakane that corrects some missing "break"s.
svn path=/trunk/; revision=392
1999-07-28 02:32:25 +00:00
Gerald Combs a8e264ff8e Added a fix from Takashi Tanaka to correct a byte order problem when printing
the MTU.

svn path=/trunk/; revision=391
1999-07-28 02:14:14 +00:00
Gerald Combs c7e8a7e855 Added a patch from Olivier Abad to handle X.25 iptrace captures.
svn path=/trunk/; revision=390
1999-07-28 01:35:34 +00:00
Gilbert Ramirez b080b90479 Fixed some improper word choices in the echoed error messages.
svn path=/trunk/; revision=389
1999-07-27 05:19:10 +00:00
Gilbert Ramirez 1708722fc2 Removed automatically-generated files from CVS. Some files are generated,
others are copied into the build-tree by 'automake -a'. The autogen.sh
script runs autoheader, automake, and autoconf for the developer in order
to populate a fresh CVS image with the generated build tools.

svn path=/trunk/; revision=388
1999-07-27 04:43:22 +00:00
Guy Harris eea3b55cab Actually, I think File/Reload is still used if you do a capture with
"-F" - you do a File/Reload to see any new packets that showed up since
the last time the file was loaded.

svn path=/trunk/; revision=387
1999-07-27 02:04:38 +00:00
Guy Harris 7051efd336 File/Reload isn't necessary any more - to run a display filter, just
fill in the display filter text entry box and hit <Enter> - so remove
it.

svn path=/trunk/; revision=386
1999-07-27 01:58:43 +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 22c9ec90c8 Printing multiple frames in PostScript is a bit tricky, I think - I
think I may have to worry about page boundaries and the like - so, for
now, we make the "File/Print..." stuff print only as text.  ("Print
Packet" can still print PostScript, as always.)

We clean up a few text vs. PostScript things for printing multiple
frames, but it's still not ready for prime time.

svn path=/trunk/; revision=383
1999-07-23 21:09:25 +00:00
Gilbert Ramirez 02fe5e7d57 Got rid of ipv6 compiler warnings when compiling on RedHat 6.0.
Initialized AndXCommand to 0 in packet-smb.c just to get rid of compiler
warning about 'possibly used uninitialized'.

svn path=/trunk/; revision=382
1999-07-23 15:08:25 +00:00
Gilbert Ramirez f142a75daa Added file_print_packet_cmd_cb() prototype to ethereal.h to appease menu.c.
svn path=/trunk/; revision=381
1999-07-23 15:04:05 +00:00
Guy Harris a1f7559b0a 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=380
1999-07-23 08:33:44 +00:00
Guy Harris e14befef22 Fix "open_print_dest()" to do the right thing.
svn path=/trunk/; revision=379
1999-07-23 08:30:57 +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
Guy Harris de459d1426 Revert to static sizing of columns.
svn path=/trunk/; revision=377
1999-07-22 21:14:13 +00:00
Gilbert Ramirez 0e7a2d905a Converted UDP fields to new proto_tree functions.
svn path=/trunk/; revision=376
1999-07-22 16:41:22 +00:00
Gilbert Ramirez 4dcaf2d853 Added "Packet Length in bytes" as an optional column.
svn path=/trunk/; revision=375
1999-07-22 16:03:52 +00:00
Gilbert Ramirez 7e9230a0bd Finally got the win32 ethereal to link properly with MSVC.
svn path=/trunk/; revision=374
1999-07-21 17:40:42 +00:00
Guy Harris 92bbbec464 Don't depend on Perl being in "/usr/bin/perl"; find it, and generate a
"dfilter2pod" with the path of Perl in its "#!" line.

svn path=/trunk/; revision=373
1999-07-20 08:28:15 +00:00
Guy Harris bbc785bb90 Don't depend on Perl being in "/usr/bin/perl"; find it, and generate a
"dfilter2pod" with the path of Perl in its "#!" line.

svn path=/trunk/; revision=372
1999-07-20 08:02:24 +00:00
Guy Harris ee263d9381 If doing a catpure with "-S", as soon as we've created the capture file
(this assumes that "libpcap" writes out the header as soon as that
happens, which is the case for "libpcap" 0.4), we sync it out (to make
sure said header is in the file), and signal the parent process, so that
it opens the capture file and updates its windows to indicate that the
capture is in progress.

svn path=/trunk/; revision=371
1999-07-20 06:16:09 +00:00
Guy Harris c2107fa600 In the BSD standard I/O library, there's a flag in a FILE structure
that's set whenever we encounter an EOF; if that flag is set, all
subsequent reads return an EOF indication.  I.e., end-of-file is sticky.

This means that the stuff to continue reading a capture file, if we're
updating the display as the capture progresses, doesn't work - it gets
stuck at the point where the first read finished.

To clear that flag, we must do an "fseek()"; we do one that doesn't move
the seek pointer.

When updating the display as a capture progresses, do
"init_col_widths()" only when we first open the capture file; there's no
need to do it every time we read from the file - the column widths never
get smaller, they can only get bigger or stay the same.

svn path=/trunk/; revision=370
1999-07-20 05:13:24 +00:00
Guy Harris f1ade8dc6e Fix a comment.
svn path=/trunk/; revision=369
1999-07-20 05:07:57 +00:00
Guy Harris 05fab57665 Fix some typos.
Make the descriptions of all options full sentences (if an option sets
XXX, describe it as "Sets XXX" rather than just "XXX"); some were, some
weren't.

Note that "-f" sets the *capture* filter expression.

Don't say that Ethereal can read only "libpcap"-format files; it can
read other formats (using "wiretap" to read capture files is no longer
an option, it's what Ethereal always uses).

svn path=/trunk/; revision=368
1999-07-20 03:54:53 +00:00
Guy Harris 9adb35249f "doc/ethereal.pod" is no longer a source file - it's generated from the
output of "ethereal -G" and "doc/ethereal.pod.template".  Make
"ethereal.1" depend on "ethereal" and "doc/ethereal.pod.template",
rather than on "doc/ethereal.pod", so that it can be built even if you
don't have "doc/ethereal.pod".

svn path=/trunk/; revision=367
1999-07-20 03:39:13 +00:00
Gilbert Ramirez 7079858013 Converted some IPX fields to the new proto_tree functions.
svn path=/trunk/; revision=366
1999-07-20 02:56:44 +00:00
Gilbert Ramirez 9612b74c16 Added just enough fields to TCP to support "Follow TCP Stream". It works now.
Added the protocol IDs for ipx and IGMP, but not their fields.

svn path=/trunk/; revision=365
1999-07-17 04:19:15 +00:00
Gilbert Ramirez 0d36ec8de2 Modified the proto_register_field_array usage again. Thanks to Guy's
suggestion, this new method using a static array should use less memory
and be faster. It also has a nice side-effect of making the source-code
more readble, IMHO.

Changed the print routines to look for protocol proto_data instead of
looking at the text label as they did before, hoping that the data hex
dump field item starts with "Data (".

Added the -G keyword to ethereal to make it dump a glossary of display
filter keywords to stdout and exit. This data is then formatted with
the doc/dfilter2pod perl program to pod format, which is combined
with doc/ethereal.pod.template to create doc/ethereal.pod, from which
the ethereal manpage is created. This way we can keep the manpage up-to-date
with a list of fields that can be filtered on.

svn path=/trunk/; revision=364
1999-07-15 15:33:52 +00:00
Guy Harris c1bfe4a1a8 Use HAVE_LIBPCAP, not HAVE_PCAP - we define the former, not the latter.
svn path=/trunk/; revision=363
1999-07-13 07:14:18 +00:00
Guy Harris f57403fe46 When printing a packet, do it from the protocol tree, not from the GTK+
tree constructed from the protocol tree:

	1) The value of "level" field of GTK+ tree items appears to
	   depend on various random things - see a change I made to
	   "packet-dns.c" a while ago, to change the order in which
	   items were put in the tree, so that DNS trees printed with
	   correct indentation - and, right now, we appear to be doing
	   *something* wrong, as some packets I printed from one file
	   here had randomly bogus indentation; I could probably track
	   the problem down and fix it, but that might just hold us
	   until we accidentally do something *else* wrong by GTK+'s
	   lights.

	   The new code provides its own tree level as it goes.

	2) The new code is independent of GTK+, so it could be used with
	   other toolkits, or with non-GUI variants of Ethereal.

	3) This may make it easier to add a "Print..." menu item to let
	   the user print packets other than the currently selected
	   packet.

Make the internal routines used to print the packet static.

For the "Print Packet" menu item, put up a message box if they haven't
yet selected a packet.

svn path=/trunk/; revision=362
1999-07-13 04:38:15 +00:00
Guy Harris 8369394c07 Look for <sys/socket.h>, not <sys/socket>.
svn path=/trunk/; revision=361
1999-07-13 03:31:40 +00:00
Gilbert Ramirez 57e49071ef Since ethereal is now dependent on GTK+-1.2.x (because of proto_tree and
display filter code, which uses features in GLIB-1.2.x), I removed
the vestigial code supporting old 1.0.x and 1.1.x GTK+ versions.

svn path=/trunk/; revision=360
1999-07-13 03:08:06 +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 093f28c382 Fixed packet.h for good.
svn path=/trunk/; revision=358
1999-07-12 21:39:28 +00:00
Richard Sharpe 87be6de734 Some more updates. Now have open_andx decoded mostly ... Still some funnies
and some difficult things.

I should not have blown away any of Gilbert's stuff this time around ...

Hope not anyway ...

svn path=/trunk/; revision=357
1999-07-12 14:26:16 +00:00
Guy Harris 6a6f7bb8d8 Don't claim that display filters have "tcpdump" filter syntax, as they
no longer do.  (Leave a placeholder comment; the syntax should perhaps
be described here.)  Update the example filter to match current reality.

Note that the <Return> and <Enter> keys, when typed in the display
filter field, cause the filter to be applied.

svn path=/trunk/; revision=356
1999-07-12 05:47:29 +00:00
Guy Harris bb0eaf66b7 When you hit <Return> in the text entry box for the display filter,
apply the filter (if it isn't invalid).

Apply the filter by clearing the Clist that shows packet summary lines
and scanning through the list of all packets and adding to the Clist
those that match the filter.

Get rid of "if (dfilter_proto_tree)" test in "load_cap_file()";
"dfilter_proto_tree" is always FALSE, and all the test does is keep us
from doing a "gtk_clist_freeze()" of the packet list, and we don't want
to do that (we don't want the packet to be updated until we're done
reading in the file).

Get rid of "dfilter_proto_tree", as it's no longer used.

Move the test that checks whether the display filter matches the current
packet to "add_packet_to_packet_list()"; this allows us to run
"dissect_packet()" only once - if we have a display filter, we generate
the summary info *and* the protocol tree in the same call, using the
summary info to make the packet list item and the protocol tree when
checking the display filter.

In "dfilter_compile()", destroy "*p_dfcode" if it's not NULL, so we
don't leak memory.

svn path=/trunk/; revision=355
1999-07-11 08:40:52 +00:00