If there are multiple fields with the same name, list only one of them
in the output of "{ethereal,tethereal} -G", so that it appears only once in the documentation. Expand some comments to give more details. svn path=/trunk/; revision=3024
This commit is contained in:
parent
32a7b693f9
commit
0196634a17
|
@ -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
|
||||
|
|
17
epan/proto.c
17
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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue