Commit Graph

367 Commits

Author SHA1 Message Date
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
Guy Harris d35862ac07 The previous checkins were based on versions of the file prior to
Gilbert's new protocol-tree code (and to a bunch of other changes); put
all the missing changes back in.

svn path=/trunk/; revision=354
1999-07-11 07:24:57 +00:00
Richard Sharpe 9b8cd07087 More decoding of fields. Now handle enumerated fields, but still have
problems with single bit fields when declared as an enumerated field.

It shows an unknown ... Damn ... Can't see what the problem is.

svn path=/trunk/; revision=353
1999-07-10 14:01:53 +00:00
Guy Harris d8dab1fd95 Add back in the note about GNU "make", "flex", and "bison"/Berkeley
"yacc" being required.

svn path=/trunk/; revision=352
1999-07-09 04:28:45 +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
Guy Harris 5617c18368 Declare "dissect_radius()" here.
svn path=/trunk/; revision=350
1999-07-08 20:31:42 +00:00
Guy Harris da00ae83bf "pntohl()" doesn't actually return a "long" (or an "unsigned long"), it
returns a "guint32", which is an "unsigned int" on all platforms Glib
supports, so print what it returns with "%u", not "%lu".

svn path=/trunk/; revision=349
1999-07-08 06:03:21 +00:00
Gilbert Ramirez 53d2a96094 Added Johan's RADIUS dissector, finally. I modified it to fit in with the
new proto_tree routines. I also removed the check for lex and yacc from
wiretap's configure script. The IP dissector now uses
proto_register_field_array().

svn path=/trunk/; revision=348
1999-07-08 04:23:28 +00:00
Gilbert Ramirez e578a22f4c Put the XOR logic in place, where previously I had left an inclusive-OR
place-holder. Also removed the printf() telling the world that the parser
found some punctuation.

svn path=/trunk/; revision=347
1999-07-08 03:35:30 +00:00
Gilbert Ramirez acad5a3730 Documented the proto_register_field_array() function, and converted
the registration functions in packet-fddi.c and packet-eth.c to this new
registration method.

svn path=/trunk/; revision=346
1999-07-08 03:18:20 +00:00
Gilbert Ramirez 56c0587491 Fixed the byte_range implementation, and removed some of the C-style
operators that I had thrown in at the last moment. Sorry! But I'm trying
to get rid of those embarrassing shift/reduce and reduce/reduce warnings.
I also removed wiretap/wiretap.c, which is no longer needed.

svn path=/trunk/; revision=345
1999-07-08 03:05:55 +00:00
Guy Harris 856e356a7a "const"ifty some function arguments and structure members, and "#if 0"
out the declaration of a variable used only by "#if 0"ed out code, to
eliminate some compiler warnings.

svn path=/trunk/; revision=344
1999-07-07 23:54:13 +00:00
Gilbert Ramirez 9f9d19f529 Removed old #include's.
svn path=/trunk/; revision=343
1999-07-07 22:58:37 +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
Guy Harris fba49cfe85 From Jason Lango <jal@netapp.com>, a fix to a long-standing problem
(which could cause core dumps in "Follow TCP Stream") -
"check_fragments()" was, when deleting a TCP segment at the beginning of
the list of segments, setting "src[index]" to point to the next segment,
not "frags[index]".  "src[index]" is the source IP address, not a
pointer to a fragment.

Also, make some routines not used outside "follow.c" static.

svn path=/trunk/; revision=341
1999-07-07 01:41:15 +00:00
Guy Harris b547681d56 Add support for RTSP (RFC 2326) over TCP, and SDP (RFC 2327) inside
RTSP, from Jason Lango <jal@netapp.com>.

svn path=/trunk/; revision=340
1999-07-07 00:34:58 +00:00
Guy Harris bec7c4afe5 "pntohl()" doesn't actually return a "long" (or an "unsigned long"), it
returns a "guint32", which is an "unsigned int" on all platforms Glib
supports, so print what it returns with "%u", not "%lu".

svn path=/trunk/; revision=339
1999-07-06 06:10:31 +00:00
Guy Harris 7a4fe9b1c3 Include <sys/types.h> before including <netinet/in.h> - you have to do
that on FreeBSD, at least.

svn path=/trunk/; revision=338
1999-07-04 06:47:09 +00:00
Guy Harris aca6d29e7b Note that non-GNU "make"s appear not to be able to build Ethereal, and
that you need "flex" and either "bison" or Berkeley "yacc".  (XXX -
should notes such as this go in some other file, e.g. INSTALL?  I
discovered the "flex" and "bison"/byacc requirement on a Solaris 7
system, but it's probably a problem on other commercial UNIXes, as well,
so it probably doesn't belong in, say, "README.solaris".)

svn path=/trunk/; revision=337
1999-07-04 06:45:53 +00:00
Guy Harris 057f3639a3 In GTK+ 1.0[.x], "gtk_window_set_position()" was called
"gtk_window_position()", so use "gtk_window_position()" if we're using
GTK+ 1.0[.x].

svn path=/trunk/; revision=336
1999-07-04 06:41:19 +00:00
Richard Sharpe 4cef485bd4 Fixed a small problem that would have prevented Ethereal from compiling.
svn path=/trunk/; revision=335
1999-07-01 04:04:38 +00:00
Richard Sharpe e10ddc676c Added some more, auto-generated decoding to packet-smb.c.
Hope it is all OK.

This is getting interesting.

svn path=/trunk/; revision=334
1999-06-28 10:57:57 +00:00
Guy Harris ea9053b4f7 When checking to see if a packet is of a given type by checking the
source and destination port numbers, check both port numbers against the
specified port, rather than checking the lower of the two port numbers
against the specified port, just in case you happen to either have

	1) the port number for that type being high enough that you can
	   get client sockets using it

or

	2) client sockets using it for some other reason.

svn path=/trunk/; revision=333
1999-06-25 07:15:02 +00:00
Guy Harris 8f8923a33b If WITH_WIRETAP is defined, don't define variables used only if
WITH_WIRETAP isn't defined.

svn path=/trunk/; revision=332
1999-06-25 06:49:46 +00:00
Gilbert Ramirez 8596488569 In my haste to get rid of the compilation warning, I converted the
pointer to a signed int instead of an unsigned int. In my testing the
code still worked, but it's better to do the conversion correctly.

svn path=/trunk/; revision=331
1999-06-25 02:57:42 +00:00
Gilbert Ramirez 11394d515f Added Ashok's Match Selected functionality, and changes to move ethereal
to version 0.6.3.

svn path=/trunk/; revision=330
1999-06-24 16:25:59 +00:00