Commit Graph

450 Commits

Author SHA1 Message Date
Guy Harris 2da9bb2696 When printing the contents of a raw-data field, don't use the raw data
of the current frame as the source, use the raw data of the tvbuff
that's the data source of that field.

svn path=/trunk/; revision=3531
2001-06-08 08:50:51 +00:00
Guy Harris 2851b7ef76 Enable "Match Selected" only if there's a field selected *and* we can do
a "Match Selected" on it - we can't do a "Match Selected" if the field
has no value (e.g., FT_NULL) and has a length of 0.

If we unselect the current packet, we don't have a protocol tree, so we
don't have a currently selected field - clear the "Match Selected" menu
item and the display in the status line of information about the
currently selected field.

Move the low-level statusbar manipulation into "gtk/main.c", in routines
whose API doesn't expose anything GTK+-ish.

"close_cap_file()" calls one of those routines to clear out the status
bar, so it doesn't need to take a pointer to the statusbar widget as an
argument.

"clear_tree_and_hex_views()" is purely a display-manipulating routine;
move it to "gtk/proto_draw.c".

Extract from "tree_view_unselect_row_cb()" an "unselect_field()" routine
to do all the work that needs to be done if the currently selected
protocol tree row is unselected, and call it if the currently selected
packet list row is unselected (if it's unselected, there *is* no
protocol tree, so no row can be selected), as well as from
"tree_view_unselect_row_cb()".

Before pushing a new field-description message onto the statusbar, pop
the old one off.

Get rid of an unused variable (set, but not used).

svn path=/trunk/; revision=3513
2001-06-05 07:39:31 +00:00
Guy Harris b699efc451 Changes to structure initializations not to initialize some but not all
members, from Joerg Mayer.

svn path=/trunk/; revision=3501
2001-06-02 06:26:54 +00:00
Guy Harris 6ee04dad33 Support for "-N" flag enabling selected forms of name resolution, from
Joerg Meyer.

Support for saving to the preferences file the settings for all types of
name resolution.

Do a case-insensitive check for "true" and "false" in Boolean preference
settings.

svn path=/trunk/; revision=3489
2001-05-31 08:36:46 +00:00
Guy Harris 963de49427 Free the string you "g_strdup()"ed, rather than handing "g_free()" the
null pointer that provoked you to free the string.

svn path=/trunk/; revision=3485
2001-05-31 05:33:15 +00:00
Guy Harris cc6b18e6ab No old-style dissectors call "old_dissector_try_port()", so get rid of
"old_dissector_try_port()".

There are no longer any old-style heuristic or conversation dissectors,
so get rid of "old_heur_dissector_add()" and "old_conv_dissector_add()"
and the data-structure members that support old-style heuristic and
conversation dissectors.

svn path=/trunk/; revision=3478
2001-05-30 06:41:08 +00:00
Guy Harris 176eaa265a Give protocol tree windows a horizontal scrollbar - yes, sometimes
protocol tree lines can be long enough that you might want, or even
need, one (consider really long names for SNMP OIDs, for example).

svn path=/trunk/; revision=3466
2001-05-27 07:50:28 +00:00
Gerald Combs f9a822d78f Fix a bug reported by Christopher McAvaney in
http://www.ethereal.com/lists/ethereal-dev/200104/msg00152.html.
In the display filter help window, the height of the text widget
can easily exceed the maximum height of an X window, which results
in a nonfunctioning vertical scroll bar.  This fix disables the
GtkScrolledWindow vertical scroll bar, and creates a new scroll bar
attached directly to the GtkText widget.

The layout is a little off - the horizontal scroll bar now occupies the
full height of the GtkScrolledWindow widget.  There doesn't seem to be
an easy way to grab the height of the horizontal scroll bar in order to
pad out the are underneath the vertical scroll bar.

svn path=/trunk/; revision=3411
2001-05-12 19:45:37 +00:00
Guy Harris 025578a1bd "-l" command-line option to turn on automatic scrolling in "Update list
of captures in real time" captures, from Christian Lacunza.

svn path=/trunk/; revision=3389
2001-05-01 00:41:46 +00:00
Guy Harris bdb69627b2 "prefs.capture_real_time", not "prefs.capture_auto_scroll", should
control whether we have a child process do the capturing; a user might
want the packet list to be updated as packets arrive but *not* want it
to scroll so that the most recently arrived packets are shown.

"prefs.capture_auto_scroll", not "auto_scroll_live", should control
whether we scroll a real-time-update capture's packet list;
"auto_scroll_live" isn't set by the capture dialog box,
"prefs_capture_auto_scroll" is.

svn path=/trunk/; revision=3388
2001-05-01 00:18:48 +00:00
Guy Harris da38a630cb Undefine "isprint()" before re-defining it, to squelch a compiler
warning.

Put in a comment indicating that non-ASCII characters may well pass
"isprint()".

svn path=/trunk/; revision=3381
2001-04-25 06:33:41 +00:00
Guy Harris 799672571b Signed vs. unsigned fixes from Joerg Mayer.
svn path=/trunk/; revision=3373
2001-04-24 00:28:21 +00:00
Guy Harris c75f555d8c Move the declarations of IP protocol numbers to "ipproto.h" from
"packet-ip.h".

Fix Gerald's address in some files while we're at it.

svn path=/trunk/; revision=3366
2001-04-23 17:51:37 +00:00
Guy Harris f4db05c7d1 When displaying the numeric value for the value_string string that was
selected in the filter-construction GUI, treat BASE_BIN like BASE_DEC,
as that's currently how it's treated elsewhere.

svn path=/trunk/; revision=3351
2001-04-20 21:57:55 +00:00
Guy Harris 4caa331d21 Patch from Ronnie Sahlberg to cause the field description section of the
status bar to display nothing, rather than "Text (text)", when a
"proto_tree_add_text()" field is selected.

While we're at it, use a similar test to eliminate the text pseudo-field
from the output of "{ethereal,tethereal} -G", as well.

svn path=/trunk/; revision=3335
2001-04-19 23:06:23 +00:00
Guy Harris d2d999fb74 Check the validity of numbers specified in command-line options.
svn path=/trunk/; revision=3326
2001-04-18 05:45:58 +00:00
Guy Harris 4acaa8b961 Fix to a preferences dialog bug, from <inoue@ainet.or.jp>.
svn path=/trunk/; revision=3315
2001-04-17 18:49:55 +00:00
Guy Harris f8c9764894 There's no "enable name resolution in captures" preference in Ethereal,
and never was - there's only an Ethereal-wide "enable name resolution"
preference.  Name it just "name_resolve".

Replace all tests of "g_resolving_actif" with tests of
"prefs.name_resolv", and replace all code that sets "g_resolving_actif"
with code that sets "prefs.name_resolv", so that the setting of
"prefs.name_resolv" actually affects whether names are resolved or not.

svn path=/trunk/; revision=3300
2001-04-15 03:37:16 +00:00
Jeff Foster 78ce39994c Added the ethereal capture preferences to the preference file.
svn path=/trunk/; revision=3298
2001-04-13 14:59:30 +00:00
Gilbert Ramirez 2a2b4bb6b4 Check in isprint() hack for Win32 so that Ethereal is usably while
we figure out what the real bug is.

Fix set_last_open_dir() to use G_DIR_SEPARATOR and G_DIR_SEPARATOR_S
for cross-platform compatibility.

svn path=/trunk/; revision=3281
2001-04-10 12:07:40 +00:00
Gilbert Ramirez 8ea93329a8 last_open_dir needs a trailing slash in order for the GTK+
file-selection dialogue to open the directory and show its
contents, otherwise it opens the parent directory and shows *its*
contents.

svn path=/trunk/; revision=3279
2001-04-09 22:35:23 +00:00
Gilbert Ramirez 9fc1e0261b Win32 build fix, show "0.5.2 (WinPcap 2.1)" as the libpcap version
for Win32, and show a slightly more informative (i.e., geared to the
user) help message when trying to capture without having WinPcap installed.

svn path=/trunk/; revision=3261
2001-04-05 05:58:05 +00:00
Gilbert Ramirez a817e97015 Now that WinPcap is a DLL, I can load it at run-time rather than load-time.
That means that I no longer need to distribute capture and non-capture
versions of Ethereal for Win32; one version (compiled with WinPcap headers)
can run on systems with or without WinPcap.

For systems that don't have WinPcap, instead of disabling the Capture
menu, Capture|Start brings up a dialogue informing the user that wpcap.dll
was not loadable, and gives a URL to the WinPcap home page.

svn path=/trunk/; revision=3249
2001-04-03 05:26:27 +00:00
Guy Harris 65dc469326 "get_home_dir()", in "epan/filesystem.c", uses
"find_last_pathname_separator()" on Win32; move the other pathname
manipulation routines from "util.c" into "epan/filesystem.c".

Remove from "util.h" the declarations of routines not defined in
"util.c", and put them into "epan/filesystem.h" if they're not already
there.

Adjust #includes to make the above work.

svn path=/trunk/; revision=3241
2001-04-02 09:53:46 +00:00
Guy Harris d203637ade Use GLib types rather than "u_int" and "u_char" in "resolv.h"; "u_int"
and "u_char" aren't declared in <sys/types.h> in Win32, you have to
include <winsock.h>, which is a pain.

Throw in some "const"s while we're at it.

svn path=/trunk/; revision=3240
2001-04-02 09:41:56 +00:00
Ed Warnicke f5cf9c8dca Added two new arguments to epan_init() and proto_init() to
allow the passing of register_all_protocols() and
register_all_protocol_handoffs() through epan_init() to proto_init().
This allows the removal of the compile time dependence of proto.c
on register.h.  Modified dftest.c, tethereal.c, and gtk/main.c to
use the new style epan_init() and depend on register.h.

svn path=/trunk/; revision=3237
2001-04-02 00:38:36 +00:00
Gilbert Ramirez 9bda102f83 Change name of "Last-Protocol" columns to "End" so that there's
a better chance of them fitting horizontally into the window, for
users of small screens.

svn path=/trunk/; revision=3203
2001-03-29 04:21:35 +00:00
Guy Harris c58b7b49b5 Make "comp_info_str" static in Ethereal - there's no need for it outside
"gtk/main.c" in Ethereal.

Add the GLib version to it in Ethereal, and put in the GLib version
rather than the GTK+ version in Tethereal (which isn't linked with
GTK+...).

Make it a GString; this makes the code to construct it slightly less
ugly, especially now that we're putting the GLib version in.

Fix the code for the "-D" flag in Tethereal to compile in a no-libpcap
version (in a no-libpcap version, it just says that this version of
Tethereal wasn't compiled with capture support).

svn path=/trunk/; revision=3196
2001-03-27 06:48:12 +00:00
Guy Harris f380fba2b1 There's no "-D" option to Ethereal - remove the "D" from the getopt flag
list argument.

svn path=/trunk/; revision=3195
2001-03-27 06:19:30 +00:00
Guy Harris 92e96d7e9f GUI code fixes from Eduardo P�rez Ureta.
svn path=/trunk/; revision=3189
2001-03-26 10:28:34 +00:00
Gilbert Ramirez 16358126d5 Create dialogue box as top-level window, not transient window.
svn path=/trunk/; revision=3188
2001-03-26 03:02:57 +00:00
Guy Harris 51aa38785a Get rid of extra definition of "byte_nb_ptr"; it's defined in
"gtk/main.c", and declared in "gtk/gtkglobals.h".

The last argument to "gtk_object_set_data()" is a "gpointer"; cast it to
that.

svn path=/trunk/; revision=3186
2001-03-24 23:57:12 +00:00
Guy Harris 92a7d9b2eb Fix typos in comments.
svn path=/trunk/; revision=3185
2001-03-24 23:53:07 +00:00
Guy Harris 9b85728d1d "reactivate_window()" is used only by stuff in the "gtk" directory, and
has an API that depends on GTK+.  "set_main_window_name()" is
UI-toolkit-independent.  Declare the former in a new "gtk/ui_util.h"
file, rather than in "ui_util.h"; this helps separate
UI-toolkit-independent stuff from UI-toolkit-dependent stuff.

svn path=/trunk/; revision=3181
2001-03-24 02:23:08 +00:00
Guy Harris 8ac0e6618a The declaration of "destroy_packet_wins()" belongs in
"gtk/packet_win.h", along with the declarations of the other packet
window manipulation routines; put it there.

svn path=/trunk/; revision=3180
2001-03-24 02:14:56 +00:00
Guy Harris 58369df4ef Give the code that computes protocol statistics a progress dialog box,
as, on a large capture, it could take a significant amount of time.

Let the user stop the computation and, if they do, don't pop up the
statistics dialog box.

Create a new header file declaring the routines to create, update, and
destroy progress dialog boxes; those routines' APIs don't depend on
GTK+, but others declared in "ui_util.h" do, and we don't want to oblige
a source file to depend on GTK+ headers unless it uses a GTK+ API or an
API that depends on GTK+.

svn path=/trunk/; revision=3179
2001-03-24 02:07:22 +00:00
Guy Harris 720d7bb9f4 Put back some of Gilbert's changes lost by recent checkins.
svn path=/trunk/; revision=3176
2001-03-23 22:26:33 +00:00
Jeff Foster 2fd1bed04a Fix last minute edit mistake in add_byte_tab.
svn path=/trunk/; revision=3166
2001-03-23 17:14:40 +00:00
Jeff Foster 395b68ea19 Changes required to support multiple named data sources.
Tvbuffers changed to added the data source name,
GUI and printing code changed to support these changes
and display the multiple hex views.

svn path=/trunk/; revision=3165
2001-03-23 14:44:04 +00:00
Gilbert Ramirez e108afe2bb The Win32 build builds wiretap as a DLL and requires WinPcap 2.1.
svn path=/trunk/; revision=3163
2001-03-23 02:05:29 +00:00
Gilbert Ramirez 2218ce1220 Add a new tool which summarizes packet counts by protocols, but
organizes the protocols in the same hierarchical order in which
they are found in the packet.

The GUI needs some more refinement (placment of vertical
scrollbar, style of GtkCTree, initial sizing of window).

I need to add an option to honor/not honor the current display filter.

svn path=/trunk/; revision=3162
2001-03-22 23:54:47 +00:00
Gilbert Ramirez 712548da3e In the code that handles finding a field after a user clicks on
a byte in the hex dump,

1. Fix an off-by-one error when finding the field. This only showed up
if the selected byte had no field of its own and was only designated
as part of the parent protocol (like the 00-padding at the beginning of
TCP options).

2. Fix an off-by-one error when clicking on a character in the second
half of the "text dump" portion of the hex dump. I forgot about the
extra space between the first 8 characters and the second 8 characters.

svn path=/trunk/; revision=3117
2001-03-07 19:33:24 +00:00
Guy Harris bf1ebaea4f Use "proto_get_first_protocol()" and "proto_get_next_protocol()" to
enumerate the protocols, as that

	1) gives you the protocols in dictionary order;

	2) leaves out the non-protocol "text";

	3) doesn't even bother to show you non-protocols, so you don't
	   have to check for them.

svn path=/trunk/; revision=3115
2001-03-06 21:07:13 +00:00
Guy Harris c4562297ab Add a few more items to ".cvsignore".
svn path=/trunk/; revision=3100
2001-03-03 00:47:31 +00:00
Guy Harris 1c71e3a0fa Do a bunch of semantic checks when "Accept" is clicked, so that we catch
at least some invalid filter expressions.

svn path=/trunk/; revision=3099
2001-03-03 00:45:14 +00:00
Gilbert Ramirez 540f564993 Calculate the height and width of m_r_font globally, since various
routines need it.

When a user clicks on a hex digit or on the corresponding character
(the "text dump" portion) in the hex dump, find the field in the
proto_tree that the byte corresponds to, expand the GtkCTree so that
the field is viewable, select the field, and center it vertically.
LanAlyzer has this feature, and I've missed it in Ethereal.

svn path=/trunk/; revision=3096
2001-03-02 23:10:12 +00:00
Gilbert Ramirez 8260a34fe5 create_main_window() does not need to be called by the capture child
process.

svn path=/trunk/; revision=3094
2001-03-02 17:44:07 +00:00
Gilbert Ramirez c88e7b5a63 Add "Toggle All", "Enable All", and "Disable All" buttons to the
protocol GUI.

svn path=/trunk/; revision=3091
2001-03-01 21:34:09 +00:00
Gilbert Ramirez e9b0d49fb0 Don't let the color selection dialogue for TCP Streams
stretch itself due to a really wide notebook widget.

svn path=/trunk/; revision=3090
2001-03-01 20:49:50 +00:00
Guy Harris c1764ee28d Boolean fields are just like other fields - if you use the field name
without a comparison operator, it tests for the field's presence or
absence, not its value; to test whether a Boolean field is true, you
compare it with a non-zero value, and to test whether it's false, you
compare it with a zero value.

Make the filter expression construction dialog handle that correctly.

svn path=/trunk/; revision=3068
2001-02-23 07:09:39 +00:00