diff options
-rw-r--r-- | epan/dfilter/dfilter.c | 9 | ||||
-rw-r--r-- | epan/proto.c | 17 | ||||
-rw-r--r-- | gtk/dfilter_expr_dlg.c | 16 |
3 files changed, 32 insertions, 10 deletions
diff --git a/epan/dfilter/dfilter.c b/epan/dfilter/dfilter.c index cb610d9578..f106a4f442 100644 --- a/epan/dfilter/dfilter.c +++ b/epan/dfilter/dfilter.c @@ -1,5 +1,5 @@ /* - * $Id: dfilter.c,v 1.2 2001/02/01 20:31:18 gram Exp $ + * $Id: dfilter.c,v 1.3 2001/02/12 10:06:50 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -117,7 +117,12 @@ dfilter_init(void) g_assert(abbrev[0] != 0); /* Not empty string */ /* We allow multiple hfinfo's to be registered under the same - * abbreviation. This was done for X.25 */ + * abbreviation. This was done for X.25, as, depending + * on whether it's modulo-8 or modulo-128 operation, + * some bitfield fields may be in different bits of + * a byte, and we want to be able to refer to that field + * with one name regardless of whether the packets + * are modulo-8 or modulo-128 packets. */ same_name_hfinfo = g_tree_lookup(dfilter_tokens, abbrev); if (same_name_hfinfo) { /* Set the "same_name" pointer in the hfinfo, then diff --git a/epan/proto.c b/epan/proto.c index 37f8b4148f..1bc7ec5c30 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -1,7 +1,7 @@ /* proto.c * Routines for protocol tree * - * $Id: proto.c,v 1.8 2001/02/01 21:48:02 guy Exp $ + * $Id: proto.c,v 1.9 2001/02/12 10:06:48 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -2596,6 +2596,21 @@ proto_registrar_dump(void) } /* format for header fields */ else { + /* + * If there's another field with the same name as + * this one, skip this field - all fields with the + * same name are really just versions of the + * same field stored in different bits, and should + * have the same type/radix/value list, and just + * differ in their bit masks. (If a field isn't + * a bitfield, but can be, say, 1 or 2 bytes long, + * it can just be made FT_UINT16, meaning the + * *maximum* length is 2 bytes, and be used + * for all lengths.) + */ + if (hfinfo->same_name != NULL) + continue; + parent_hfinfo = proto_registrar_get_nth(hfinfo->parent); g_assert(parent_hfinfo); diff --git a/gtk/dfilter_expr_dlg.c b/gtk/dfilter_expr_dlg.c index ed45cdf579..c234318b39 100644 --- a/gtk/dfilter_expr_dlg.c +++ b/gtk/dfilter_expr_dlg.c @@ -7,7 +7,7 @@ * Copyright 2000, Jeffrey C. Foster<jfoste@woodward.com> and * Guy Harris <guy@alum.mit.edu> * - * $Id: dfilter_expr_dlg.c,v 1.11 2001/02/12 09:06:19 guy Exp $ + * $Id: dfilter_expr_dlg.c,v 1.12 2001/02/12 10:06:51 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -1013,12 +1013,14 @@ dfilter_expr_dlg_new(GtkWidget *filter_te) /* * If there's another field with the same name as this - * one, skip it - all fields with the same name should - * have the same type/radix/value list, they would - * just have different bit masks. (If a field isn't - * a bitfield, but can be, say, 1 or 2 bytes long, - * it can just be made FT_UINT16, meaning the *maximum* - * length is 2 bytes.) + * one, skip this field - all fields with the same name + * are really just versions of the same field stored in + * different bits, and should have the same type/radix/ + * value list, and just differ in their bit masks. + * (If a field isn't a bitfield, but can be, say, 1 or 2 + * bytes long, it can just be made FT_UINT16, meaning the + * *maximum* length is 2 bytes, and be used for all + * lengths.) */ if (hfinfo->same_name != NULL) continue; |