aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2006-11-23 21:16:46 +0000
committerGuy Harris <guy@alum.mit.edu>2006-11-23 21:16:46 +0000
commit37a6c026975823425f23a4282fc8a20b5b8f52b5 (patch)
treeb8a4fc55ca8524b944595a7ef65d16849af5ef9a /epan/proto.h
parent789a5d581b9b936754b3cad377c397a5c799c11b (diff)
Rename proto_construct_dfilter_string() to
proto_construct_match_selected_string() to indicate what it does - and have it return a Boolean indication of whether the string could be built, returning the string through a pointer, and, if that pointer is null, have it just return the Boolean and not construct the string. Get rid of proto_can_match_selected() - proto_construct_match_selected_string() can be used for that, which means we have only one piece of code that knows whether a "match selected" string can be constructed or not. Have proto_construct_match_selected_string() support matching zero-length FT_NONE (and FT_PCRE, but that shouldn't happen) fields even if there's no epan_dissect_t, as such a match just checks whether the field is present. svn path=/trunk/; revision=19967
Diffstat (limited to 'epan/proto.h')
-rw-r--r--epan/proto.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/epan/proto.h b/epan/proto.h
index 1f8af93e2d..78c1096843 100644
--- a/epan/proto.h
+++ b/epan/proto.h
@@ -1532,19 +1532,16 @@ hfinfo_bitwidth(header_field_info *hfinfo);
#include "epan.h"
-/** Can we do a "match selected" on this field.
+/** Check whether we can do a "match selected" on this field and, if
+ requested to, return the filter that does so.
@param finfo field_info
@param edt epan dissecting
+ @param filter if non-null, the display filter string is constructed and
+ *filter is set to point to it
@return TRUE if we can do a "match selected" on the field, FALSE otherwise. */
extern gboolean
-proto_can_match_selected(field_info *finfo, epan_dissect_t *edt);
-
-/** Construct a display filter string.
- @param finfo field_info
- @param edt epan dissecting
- @return the display filter string */
-extern char*
-proto_construct_dfilter_string(field_info *finfo, epan_dissect_t *edt);
+proto_construct_match_selected_string(field_info *finfo, epan_dissect_t *edt,
+ char **filter);
/** Find field from offset in tvb.
@param tree