diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-05-03 00:48:37 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-05-03 00:48:37 +0000 |
commit | ca318813a4d4c28af90b14abdb60f7ecbcb46ea9 (patch) | |
tree | e9aa16cb6d0df21a992929c5fc2cb8f53a13bd04 /gtk/menu.c | |
parent | a8f171f2ffb7ebba2f270a7baa2df94d35b0fed8 (diff) | |
download | wireshark-ca318813a4d4c28af90b14abdb60f7ecbcb46ea9.tar.gz wireshark-ca318813a4d4c28af90b14abdb60f7ecbcb46ea9.tar.bz2 wireshark-ca318813a4d4c28af90b14abdb60f7ecbcb46ea9.zip |
Rename "proto_alloc_dfilter_string()" to
"proto_construct_dfilter_string()", to more accurately reflect what it
does.
Give it, and "proto_can_match_selected()", an "epan_dissect_t *"
argument, which replaces the raw data pointer argument to
"proto_construct_dfilter_string()".
For fields that don't have a type we can directly filter on, we don't
support filtering on the field as raw data if:
the "epan_dissect_t *" argument is null;
the data source tvbuff for the field isn't the tvbuff for the
"epan_dissect_t" in question (i.e., it's in the result of a
reassembly, and "frame[N:M]" can't get at it).
Trim the length the raw data in the case of such a field to the length
of the tvbuff for the "epan_dissect_t" in question, so we don't go past
it. Fetch the raw data bytes to match from that tvbuff.
Have "proto_construct_dfilter_string()" return a null pointer if it
can't construct the filter string, and have "protocolinfo_packet()" in
the tap-protocolinfo tap ignore a field if
"proto_construct_dfilter_string()" can't construct a filter string for
it - and have it pass NULL as the "epan_dissect_t *", for now. If
somebody decides it makes sense to dump out a "frame[N:M] =" value for
non-registered fields, it can be changed to pass "edt".
svn path=/trunk/; revision=7635
Diffstat (limited to 'gtk/menu.c')
-rw-r--r-- | gtk/menu.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gtk/menu.c b/gtk/menu.c index 3655b9d377..3c613e8c68 100644 --- a/gtk/menu.c +++ b/gtk/menu.c @@ -1,7 +1,7 @@ /* menu.c * Menu routines * - * $Id: menu.c,v 1.92 2003/04/23 05:37:22 guy Exp $ + * $Id: menu.c,v 1.93 2003/05/03 00:48:37 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -757,13 +757,13 @@ set_menus_for_selected_tree_row(gboolean have_selected_tree) "/Go To Corresponding Frame", FALSE); } set_menu_sensitivity(main_menu_factory, "/Display/Match", - proto_can_match_selected(finfo_selected)); + proto_can_match_selected(finfo_selected, cfile.edt)); set_menu_sensitivity(tree_view_menu_factory, "/Match", - proto_can_match_selected(finfo_selected)); + proto_can_match_selected(finfo_selected, cfile.edt)); set_menu_sensitivity(main_menu_factory, "/Display/Prepare", - proto_can_match_selected(finfo_selected)); + proto_can_match_selected(finfo_selected, cfile.edt)); set_menu_sensitivity(tree_view_menu_factory, "/Prepare", - proto_can_match_selected(finfo_selected)); + proto_can_match_selected(finfo_selected, cfile.edt)); } else { set_menu_sensitivity(main_menu_factory, "/Display/Match", FALSE); set_menu_sensitivity(tree_view_menu_factory, "/Match", FALSE); |