diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-07-15 15:33:52 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-07-15 15:33:52 +0000 |
commit | 0d36ec8de2e587337c8d8bc787e40de23cda644a (patch) | |
tree | f039dce320dbc82cf7724400ce75c8afc499f1c7 /packet-llc.c | |
parent | c1bfe4a1a84e4fdae4e28476a4fe23318f12a025 (diff) |
Modified the proto_register_field_array usage again. Thanks to Guy's
suggestion, this new method using a static array should use less memory
and be faster. It also has a nice side-effect of making the source-code
more readble, IMHO.
Changed the print routines to look for protocol proto_data instead of
looking at the text label as they did before, hoping that the data hex
dump field item starts with "Data (".
Added the -G keyword to ethereal to make it dump a glossary of display
filter keywords to stdout and exit. This data is then formatted with
the doc/dfilter2pod perl program to pod format, which is combined
with doc/ethereal.pod.template to create doc/ethereal.pod, from which
the ethereal manpage is created. This way we can keep the manpage up-to-date
with a list of fields that can be filtered on.
svn path=/trunk/; revision=364
Diffstat (limited to 'packet-llc.c')
-rw-r--r-- | packet-llc.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/packet-llc.c b/packet-llc.c index 3aba7cb71e..edbdf2c227 100644 --- a/packet-llc.c +++ b/packet-llc.c @@ -2,7 +2,7 @@ * Routines for IEEE 802.2 LLC layer * Gilbert Ramirez <gramirez@tivoli.com> * - * $Id: packet-llc.c,v 1.15 1999/07/07 22:51:46 gram Exp $ + * $Id: packet-llc.c,v 1.16 1999/07/15 15:32:42 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@unicom.net> @@ -247,15 +247,22 @@ dissect_llc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { void proto_register_llc(void) { - const hf_register_info hf[] = { - { "DSAP", "llc.dsap", &hf_llc_dsap, FT_VALS_UINT8, VALS(sap_vals) }, - { "SSAP", "llc.ssap", &hf_llc_ssap, FT_VALS_UINT8, VALS(sap_vals) }, - { "Control", "llc.control", &hf_llc_ctrl, FT_VALS_UINT8, VALS(llc_ctrl_vals) }, + static hf_register_info hf[] = { + { &hf_llc_dsap, + { "DSAP", "llc.dsap", FT_VALS_UINT8, VALS(sap_vals) }}, - /* registered here but handled in ethertype.c */ - { "Type", "llc.type", &hf_llc_type, FT_VALS_UINT16, VALS(etype_vals) }, + { &hf_llc_ssap, + { "SSAP", "llc.ssap", FT_VALS_UINT8, VALS(sap_vals) }}, - { "Organization Code", "llc.oui", &hf_llc_oui, FT_VALS_UINT24, VALS(llc_oui_vals) } + { &hf_llc_ctrl, + { "Control", "llc.control", FT_VALS_UINT8, VALS(llc_ctrl_vals) }}, + + /* registered here but handled in ethertype.c */ + { &hf_llc_type, + { "Type", "llc.type", FT_VALS_UINT16, VALS(etype_vals) }}, + + { &hf_llc_oui, + { "Organization Code", "llc.oui", FT_VALS_UINT24, VALS(llc_oui_vals) }} }; proto_llc = proto_register_protocol ("Logical-Link Control", "llc" ); |