summaryrefslogtreecommitdiff
path: root/epan/proto.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-07-31 04:18:01 +0000
committerGuy Harris <guy@alum.mit.edu>2003-07-31 04:18:01 +0000
commit5b04b9a4ff42eb6e59c4102cfe7d9a3e121fb3c9 (patch)
treea3e8da74b17554447e946574b19d51a1c067e631 /epan/proto.c
parentadf711d5fb40af4af8b6914704c984709f551e81 (diff)
downloadwireshark-5b04b9a4ff42eb6e59c4102cfe7d9a3e121fb3c9.tar.gz
Give FT_IPv4 val_repr_len and val_to_repr methods, and use them for
generating display filters from FT_IPv4 fields. svn path=/trunk/; revision=8110
Diffstat (limited to 'epan/proto.c')
-rw-r--r--epan/proto.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/epan/proto.c b/epan/proto.c
index c521872e9e..74fe13b094 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -1,7 +1,7 @@
/* proto.c
* Routines for protocol tree
*
- * $Id: proto.c,v 1.97 2003/07/31 03:52:40 guy Exp $
+ * $Id: proto.c,v 1.98 2003/07/31 04:18:00 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -3572,18 +3572,6 @@ proto_construct_dfilter_string(field_info *finfo, epan_dissect_t *edt)
stringified);
break;
- case FT_IPv4:
- /*
- * 4 bytes for " == ".
- * 14 bytes for "XXX.XXX.XXX.XXX".
- * 1 byte for the trailing '\0'.
- */
- dfilter_len = abbrev_len + 4 + 15 + 1;
- buf = g_malloc0(dfilter_len);
- snprintf(buf, dfilter_len, "%s == %s", hfinfo->abbrev,
- ipv4_addr_str(fvalue_get(finfo->value)));
- break;
-
case FT_IPXNET:
/*
* 4 bytes for " == ".
@@ -3620,6 +3608,7 @@ proto_construct_dfilter_string(field_info *finfo, epan_dissect_t *edt)
case FT_DOUBLE:
case FT_ABSOLUTE_TIME:
case FT_RELATIVE_TIME:
+ case FT_IPv4:
/* Figure out the string length needed.
* The ft_repr length.
* 4 bytes for " == ".