Commit Graph

58 Commits

Author SHA1 Message Date
Gilbert Ramirez 791f5774d0 Provide for per-protocol-tree data in the proto_tree code.
Put a hash-table of "interesting" fields in the per-proto-tree data.
The dfilter code records which fields/protocols are "interesting" (by which
I mean, their value or existence is checked). Thus, the proto_tree routines
can create special arrays of field_info*'s that are ready for the dfilter
engine to use during a filter operation.

Also store the "proto_tree_is_visible" boolean, renamed "visible", in
the per-proto-tree data.

Move epan_dissect_t to its own header file to make #include dependencies
easier to handle.

Provide epan_dissect_fill_in_columns(), which accepts just the epan_dissect_t*
as an argument.

epan_dissect_new() needs to be followed by epan_dissect_run() for the
dissection to actually take place. Between those two calls,
epan_dissect_prime_dfilter() can be run 0, 1, or multiple times in order to
prime the empty proto_tree with the "intersesting" fields from the dfilter_t.

svn path=/trunk/; revision=4422
2001-12-18 19:09:08 +00:00
Guy Harris cc97eed136 TCP time-sequence, round-trip time, and throughput graphs, from Pavel
Mores.

svn path=/trunk/; revision=4360
2001-12-08 09:27:51 +00:00
Gilbert Ramirez 8743a4a8a7 Remove the global packet_info called "pi". Dissectors now only
access their own "pinfo". A packet_info is stored in epan_dissect_t,
which is created for the dissection of a single packet.

GUI functions which need to access the packet_info of the currently
selected packet used to use "pi"; now they use cfile.edt->pi. cfile's
"edt" member is the epan_dissect_t of the currently-selected packet.

The functionality of blank_packetinfo() was moved into
dissect_packet(), as that's the only place that called blank_packetinfo(),
after a spurious call to blank_packetinfo() was removed from
packet_list_select_cb().

svn path=/trunk/; revision=4246
2001-11-21 23:16:26 +00:00
Ed Warnicke 718e062823 Added a "Mark Frame" option to the packet_list_menu_items
so that you can right click on a packet in the packet list
and mark it.

svn path=/trunk/; revision=3737
2001-07-17 05:44:58 +00:00
Guy Harris fafefda449 Don't offer the ability to edit capture filters if Ethereal wasn't
linked with libpcap.

svn path=/trunk/; revision=3613
2001-06-27 10:00:14 +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 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 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
Guy Harris 55662a3607 Inactivate the "Decode As" menu item if the "Decode As" dialog box
wouldn't actually offer any options to the user.

Make a bunch of routines static that aren't used outside
"decode_as_dlg.c".

Remove the declaration of the nonexistent "decode_as_register_tcpudp()"
routine.

svn path=/trunk/; revision=3020
2001-02-11 23:02:05 +00:00
Guy Harris 8b51643203 "Decode As" dialog, from David Hampton.
svn path=/trunk/; revision=2965
2001-02-01 07:34:33 +00:00
Guy Harris ceef26d2c1 Have separate capture and display filter lists; some filter dialog boxes
use the capture filter lists, and others use the display filter list, as
appropriate.

Have separate menu items for editing the capture and display filter
lists.

Have separate "~/.ethereal/cfilters" and "~/.ethereal/dfilters" files
for the two lists; if either of those files isn't found, we try
"~/.ethereal/filters", which means that you will start out with two
identical lists holding all your filters - if certain filters belong
only in one list, you'll have to delete them by hand from the other
list.

Do I/O error checking when reading and writing filter lists; when
writing a filter list, write it to a new file, and then rename the new
file on top of the old file, so that you don't lose your old filter list
if, for example, you run out of disk space or disk quota.

svn path=/trunk/; revision=2948
2001-01-28 09:13:10 +00:00
Guy Harris fb84384942 Move the declaration of "g_resolving_actif" from the top-level
"globals.h" file to "epan/resolv.h", as it's exported by
"epan/resolv.c", have files that use "g_resolving_actif" include
"resolv.h", and don't have "epan/resolv.c" include "globals.h" so that
it doesn't drag in, for example, headers that, in turn, drag in GTK+
headers.

svn path=/trunk/; revision=2517
2000-10-19 22:59:24 +00:00
Guy Harris 54ecbe2d4e Santeri Paavolainen's patch to add a "Capture->Stop" menu item to let
you stop an "Update list of packets in real time" capture from the main
window as well as from the capture statistics dialog.

svn path=/trunk/; revision=2487
2000-10-11 06:01:16 +00:00
Guy Harris a11b619f2a "#if 0" out the code that puts "Cut", "Copy", and "Paste" items into the
"Edit" menu, pending the implementation of cut/copy/paste, so that users
don't think that there's something they can do (other than implementing
cut/copy/paste :-)) to be able to use those functions.

svn path=/trunk/; revision=2402
2000-09-09 08:17:51 +00:00
Laurent Deniel 85a4718c6b Small update (add accelerator).
svn path=/trunk/; revision=2340
2000-08-22 14:21:27 +00:00
Laurent Deniel dea8f0c202 Add some menu items related to the "frame mark" feature in
the Edit menu which allow you to:

- mark (or unmark) the currently selected frame
- mark all _displayed_ frames
- unmark all _displayed_ frames

Should I be more precise in the menu label ?
(e.g. "Mark All Displayed Frame" instead of "Mark All Frames"
  and "Mark Selected Frame" instead of "Mark Frame" ?)

svn path=/trunk/; revision=2325
2000-08-21 19:36:19 +00:00
Laurent Deniel a3d48f0972 Make work better the (hexdump) popup menus.
- have popup_menu_handler return TRUE or FALSE according
  to the fact that the event is really processed or not.
- use gtk_signal_connect instead of gtk_signal_connect_object
  to have the widget that emitted the signal _and_ the popup
  menu widget.
- call gtk_signal_emit_stop_by_name to abort the propagation
  if the signal was processed.

svn path=/trunk/; revision=2318
2000-08-21 12:33:22 +00:00
Laurent Deniel e0a8d41556 Add a popup menu for the hexdump window. For now, it has only the
common items but let's prepare the future (e.g. Match selected)...

svn path=/trunk/; revision=2314
2000-08-20 21:55:58 +00:00
Laurent Deniel df89199498 - remove "Match Selected" from the packet list popup menu.
- reorganise a bit the two right click popup menus :

  . the first part is common to the packet list and protocol tree menus
  . the second part is window-specific.

 (if we had a popup menu for the hexdump window, that would be the same).

svn path=/trunk/; revision=2281
2000-08-16 19:15:11 +00:00
Guy Harris 75a756e881 Rename the "Properties" pop-up menu item "Protocol Properties", to make
it clearer what properties it lets you edit.  (Perhaps it should say
"Edit Protocol Properties", to make it even clearer?)

svn path=/trunk/; revision=2279
2000-08-15 21:35:34 +00:00
Laurent Deniel e559d013fc Oups. Forgot some set_menus_for_selected_tree_row calls.
svn path=/trunk/; revision=2277
2000-08-15 21:03:55 +00:00
Laurent Deniel 5a326952de Implements the "Properties" menu item which displays the preferences window
at the correct notebook page when a particular protocol (which has registered
some preferences) is selected in the tree view.

- add set_menus_for_selected_tree_row() in menu.[ch]

- add prefs_is_registered_protocol() and
      prefs_get_title_by_name() in prefs.[ch]

svn path=/trunk/; revision=2275
2000-08-15 20:46:17 +00:00
Laurent Deniel cc36f0b931 Add the "Edit:Protocols..." feature which currently only implements
the following:

It is now possible to enable/disable a particular protocol decoding
(i.e. the protocol dissector is void or not). When a protocol
is disabled, it is displayed as Data and of course, all linked
sub-protocols are disabled as well.

Disabling a protocol could be interesting:

- in case of buggy dissectors
- in case of wrong heuristics
- for performance reasons
- to decode the data as another protocol (TODO)

Currently (if I am not wrong), all dissectors but NFS can be disabled
(and dissectors that do not register protocols :-)

I do not like the way the RPC sub-dissectors are disabled (in the
sub-dissectors) since this could be done in the RPC dissector itself,
knowing the sub-protocol hfinfo entry (this is why, I've not modified
the NFS one yet).

Two functions are added in proto.c :

gboolean proto_is_protocol_enabled(int n);
void proto_set_decoding(int n, gboolean enabled);

and two MACROs which can be used in dissectors:

OLD_CHECK_DISPLAY_AS_DATA(index, pd, offset, fd, tree)
CHECK_DISPLAY_AS_DATA(index, tvb, pinfo, tree)

See also the XXX in proto_dlg.c and proto.c around the new functions.

svn path=/trunk/; revision=2267
2000-08-13 14:09:15 +00:00
Guy Harris 42f7676996 Give the Help menu the more-or-less canonical style from most
Motif/KDE/GNOME(?) and Windows applications, with "Help" above "About",
and separated from "About" by a separator line.

(This also makes "Help->Help" the default, which is probably what most
users would want, especially if, as, and when we fill out the help.)

svn path=/trunk/; revision=2239
2000-08-09 06:43:22 +00:00
Laurent Deniel cedac6e3f1 Add a Help window that contains:
- short overview
- list of known protocols
- list of display filters
- short capture filter help

The display filter help can be extended in the future
when we will have a GUI for filter construction. But
this is better than nothing ;-)
And cut & paste from the text help window and the filter
input field works...

svn path=/trunk/; revision=2227
2000-08-08 12:28:50 +00:00
Gilbert Ramirez a3e7190456 Add a "Save As" feature to the TCP Follow dialogue, to save the stream
file to a user-specified file.

Move the file-copy routine in save_cap_file() to an indepenent
function in file.c  (copy_binary_file()) so that follow_dlg.c can use it.

Remove #include "follow.h" from the C files that don't need it.

svn path=/trunk/; revision=2200
2000-08-03 12:44:40 +00:00
Guy Harris ed5651a909 Get rid of the stuff to let the callback that pops up the Preferences
dialog select a particular page - I think that was used only by the
filter code back when "Filter:" buttons popped up a Preferences dialog
with the Filter page (which is no longer a Preferences dialog page)
selected, but now there's a separate Filter dialog box.

svn path=/trunk/; revision=2116
2000-07-05 06:33:02 +00:00
Guy Harris f3feac3b1d Put in a comment to note what we'd do if we ever wanted to make the
contents of the popup menu differ based on what row or column we're in.

svn path=/trunk/; revision=1902
2000-05-02 07:44:37 +00:00
Guy Harris 592f641bfc Make "P" a mnemonic for "Print" in the "File" menu.
svn path=/trunk/; revision=1901
2000-05-02 03:21:41 +00:00
Guy Harris 1a460aa453 Define "popup_menu_object" only in "gtk/menu.c", and just declare it as
an "extern" in "gtk/menu.h", to avoid complaints from the linker on some
platforms.

svn path=/trunk/; revision=1810
2000-04-06 06:52:10 +00:00
Guy Harris 7dbe2ffaf2 Get rid of the "Find Frame" and "Go To Frame" items under "Display"; we
put them under "Edit" a while ago.

svn path=/trunk/; revision=1764
2000-03-29 22:39:19 +00:00
Guy Harris 7c11334000 Jeff Foster's changes, with my additions, to allow the user to pop up a
window showing the protocol tree and hex/ASCII data for the currently
selected packet.

svn path=/trunk/; revision=1670
2000-02-29 06:24:41 +00:00
Laurent Deniel e7d574dd39 Add "Resolve Name" item in detailed tree popup.
svn path=/trunk/; revision=1658
2000-02-20 14:52:28 +00:00
Guy Harris 55c8a368b8 Split the color manipulation stuff into "color_dlg.[ch]", containing the
dialog boxes for editing color filtes, and "colors.[ch]", containing the
toolkit-dependent code to manipulate colors.

svn path=/trunk/; revision=1622
2000-02-12 08:31:49 +00:00
Guy Harris 80de78aaad Move the declarations of the routines in "gtk/file_dlg.c" out of
"gtk/main.h" and into a new "gtk/file_dlg.h" file.

svn path=/trunk/; revision=1620
2000-02-12 06:58:42 +00:00
Guy Harris 2cad7bc346 Make the routines internal to the filter-editing dialog box static.
Declare the one routine exported by "gtk/filter_prefs.c" in
"gtk/filter_prefs.h" rather than in "gtk/main.h".  Declare
"E_FILT_TE_PTR_KEY" there, as well, rather than in "prefs_dlg.h", as the
filter-editing dialog box is no longer a preference tab.

Don't include "prefs_dlg.h" unless the stuff declared therein is of
interest.

Fix "gtk/find_dlg.c" to fire up the filter-editing dialog box, not the
no-longer-extant preferences tab for filters, if the "Filter:" button is
clicked.

svn path=/trunk/; revision=1619
2000-02-12 06:46:54 +00:00
Gerald Combs b7a9eca9ba If we open a file, and immediately try to open another file while the first
one is loading, we dump core.  Add the "Open..." menu item to the list of
items that we disable while a file is loading.

svn path=/trunk/; revision=1551
2000-01-25 03:48:16 +00:00
Guy Harris f09b4f0ace Use "strrchr()" instead of "rindex()" - "strrchr()" is the routine the
ANSI C standard specifies.

Fix up some menu stuff that should've been fixed when I put "Find Frame"
and "Go To Frame" under "Edit".

svn path=/trunk/; revision=1509
2000-01-18 19:01:35 +00:00
Guy Harris aa718b5e74 Put the "Find Frame" and "Go To Frame" menu items under "Edit"; leave
them under "Display" as well for now.

svn path=/trunk/; revision=1505
2000-01-18 09:05:30 +00:00
Guy Harris 4603877dc4 Jerry Talkington's changes to support, in the packet list and protocol
tree panes, menus popped up by the right mouse button.

svn path=/trunk/; revision=1504
2000-01-18 08:38:18 +00:00
Olivier Abad fdc1055f9f We have to #include "plugins.h" before using the HAVE_PLUGINS define.
svn path=/trunk/; revision=1500
2000-01-17 17:12:43 +00:00
Gilbert Ramirez 339d67b043 Merge in the final code to make Ethereal run on Win32, compiled
with MSVC 6.0 and 'nmake', the make tool that comes with MSVC.

It compiles, links, and runs. It doesn't run correctly. There's a problem
when reading files. I'm getting short reads.  I'm not linking in zlib or
libsnmp because it first needs to be debugged.

I changed the plugin code to use gmodule instead of libltdl, but the
Unix build still links ethereal against libltdl. I'll fix that tonight; sorry
about leaving it in such a sad state, but I wanted to check in this code
before I left work on a Friday night. Ethereal still works, but the
building is less than optimal.

svn path=/trunk/; revision=1479
2000-01-15 00:23:13 +00:00
Guy Harris 0452dfe11e Allow people to print packets if there are packets to print, even if
we're in the middle of an "Update list of packets in real time" capture.

svn path=/trunk/; revision=1440
2000-01-08 23:34:50 +00:00
Guy Harris 91801fd5dd Make "menus_init()", set_menu_sensitivity()", and "grp" static to
"gtk/menu.c", as they're not used outside it.

Move the definition of "GTK_MENU_FUNC()" from "gtk/menu.h" to
"gtk/menu.c", as it's not used outside of "gtk/menu.c".

Get rid of the declaration of "menus_create()" in "gtk/menu.h", as that
routine doesn't exist.

svn path=/trunk/; revision=1411
2000-01-03 04:06:09 +00:00
Guy Harris 2ef301bcf6 Have "gtk/menu.c" (and, in the future, code for other UIs) export a set
of routines to enable and disable various sets of menu items; call only
those routines, not routines to enable or disable particular menu items,
from files in the top-level directory, as other UIs may not refer to
menu items with path strings of the sort used in GTK+, and as this
buries knowledge of the menu items available in "gtk/menu.c" rather than
requiring stuff outside of "gtk/menu.c" to know what menu items exist.

svn path=/trunk/; revision=1410
2000-01-03 03:57:04 +00:00
Guy Harris f47ff8dfd0 Squelch a GCC complaint.
svn path=/trunk/; revision=1278
1999-12-10 07:04:30 +00:00
Guy Harris 7537c5cc73 Jerry Talkington's patch to remove the filter stuff from
"Edit:Preferences" and put it directly under "Edit:Filters", and to add
an "Apply" button to it, which makes the currently selected filter the
current filter and applies it to the current capture.

svn path=/trunk/; revision=1275
1999-12-10 06:28:24 +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
Olivier Abad 564a1c1d62 plugins support (i.e. Dynamically loadable dissectors)
depends on dlopen() being available on the target platform

svn path=/trunk/; revision=1263
1999-12-09 20:43:38 +00:00