aboutsummaryrefslogtreecommitdiffstats
path: root/epan/ftypes/ftypes.c
diff options
context:
space:
mode:
authorOlivier Biot <obiot.ethereal@gmail.com>2004-02-27 12:00:32 +0000
committerOlivier Biot <obiot.ethereal@gmail.com>2004-02-27 12:00:32 +0000
commit1791f849198d188c4670a64e80c7ade0fee48820 (patch)
tree9e7c7db5726d4e8694e91a091472aedc623f9849 /epan/ftypes/ftypes.c
parentc1a0db6cba9a743606cc6148ec8bcd884a48c754 (diff)
First attempt at "bitwise AND" display filter operator.
Document how a display operator can be added. svn path=/trunk/; revision=10250
Diffstat (limited to 'epan/ftypes/ftypes.c')
-rw-r--r--epan/ftypes/ftypes.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/epan/ftypes/ftypes.c b/epan/ftypes/ftypes.c
index a723113bd5..6eae2d9498 100644
--- a/epan/ftypes/ftypes.c
+++ b/epan/ftypes/ftypes.c
@@ -1,5 +1,5 @@
/*
- * $Id: ftypes.c,v 1.20 2003/12/09 23:02:39 obiot Exp $
+ * $Id: ftypes.c,v 1.21 2004/02/27 12:00:32 obiot Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -177,6 +177,15 @@ ftype_can_le(enum ftenum ftype)
}
gboolean
+ftype_can_bitwise_and(enum ftenum ftype)
+{
+ ftype_t *ft;
+
+ FTYPE_LOOKUP(ftype, ft);
+ return ft->cmp_bitwise_and ? TRUE : FALSE;
+}
+
+gboolean
ftype_can_contains(enum ftenum ftype)
{
ftype_t *ft;
@@ -506,6 +515,14 @@ fvalue_le(fvalue_t *a, fvalue_t *b)
}
gboolean
+fvalue_bitwise_and(fvalue_t *a, fvalue_t *b)
+{
+ /* XXX - check compatibility of a and b */
+ g_assert(a->ftype->cmp_bitwise_and);
+ return a->ftype->cmp_bitwise_and(a, b);
+}
+
+gboolean
fvalue_contains(fvalue_t *a, fvalue_t *b)
{
/* XXX - check compatibility of a and b */