diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 2003-08-27 15:23:11 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 2003-08-27 15:23:11 +0000 |
commit | 52338a3bafa30b1c1ea6759ea14a60c5d3fd35da (patch) | |
tree | a4104c638529709d8c4f8b869d76c7f5253c6d16 /epan/ftypes/ftype-ipv4.c | |
parent | d3562c0480240333a99315699992e3165702a369 (diff) |
Add a "contains" operator for byte-strings, strings, and tvbuffs (protocols).
The search uses a naive approach; more work is required to add a
Boyer-Moore Search algorithm.
svn path=/trunk/; revision=8280
Diffstat (limited to 'epan/ftypes/ftype-ipv4.c')
-rw-r--r-- | epan/ftypes/ftype-ipv4.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/epan/ftypes/ftype-ipv4.c b/epan/ftypes/ftype-ipv4.c index cad03ef251..c5362bfbca 100644 --- a/epan/ftypes/ftype-ipv4.c +++ b/epan/ftypes/ftype-ipv4.c @@ -1,5 +1,5 @@ /* - * $Id: ftype-ipv4.c,v 1.12 2003/07/31 04:18:01 guy Exp $ + * $Id: ftype-ipv4.c,v 1.13 2003/08/27 15:23:07 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -45,7 +45,7 @@ value_get(fvalue_t *fv) } static gboolean -val_from_unparsed(fvalue_t *fv, char *s, LogFunc logfunc) +val_from_unparsed(fvalue_t *fv, char *s, gboolean allow_partial_value _U_, LogFunc logfunc) { guint32 addr; unsigned int nmask_bits; @@ -99,7 +99,7 @@ val_from_unparsed(fvalue_t *fv, char *s, LogFunc logfunc) } /* XXX - this is inefficient */ - nmask_fvalue = fvalue_from_unparsed(FT_UINT32, net_str, logfunc); + nmask_fvalue = fvalue_from_unparsed(FT_UINT32, net_str, FALSE, logfunc); g_free(s_copy); if (!nmask_fvalue) { return FALSE; @@ -202,6 +202,7 @@ ftype_register_ipv4(void) cmp_ge, cmp_lt, cmp_le, + NULL, /* cmp_contains */ NULL, NULL, |