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-fddi.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-fddi.c')
-rw-r--r-- | packet-fddi.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/packet-fddi.c b/packet-fddi.c index feb0cfd13c..32a4f1a1d4 100644 --- a/packet-fddi.c +++ b/packet-fddi.c @@ -3,7 +3,7 @@ * * Laurent Deniel <deniel@worldnet.fr> * - * $Id: packet-fddi.c,v 1.13 1999/07/08 03:18:19 gram Exp $ + * $Id: packet-fddi.c,v 1.14 1999/07/15 15:32:41 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -279,14 +279,22 @@ void dissect_fddi(const u_char *pd, frame_data *fd, proto_tree *tree) void proto_register_fddi(void) { - const hf_register_info hf[] = { - { "Frame Control", "fddi.fc", &hf_fddi_fc, FT_UINT8, NULL }, - { "Destination", "fddi.dst", &hf_fddi_dst, FT_ETHER, NULL }, - { "Source", "fddi.src", &hf_fddi_src, FT_ETHER, NULL }, - { "Destination Hardware Vendor", - "fddi.dst_vendor", &hf_fddi_dst_vendor, FT_ETHER_VENDOR, NULL }, - { "Source Hardware Vendor", - "fddi.src_vendor", &hf_fddi_src_vendor, FT_ETHER_VENDOR, NULL } + static hf_register_info hf[] = { + + { &hf_fddi_fc, + { "Frame Control", "fddi.fc", FT_UINT8, NULL }}, + + { &hf_fddi_dst, + { "Destination", "fddi.dst", FT_ETHER, NULL }}, + + { &hf_fddi_src, + { "Source", "fddi.src", FT_ETHER, NULL }}, + + { &hf_fddi_dst_vendor, + { "Destination Hardware Vendor", "fddi.dst_vendor", FT_ETHER_VENDOR, NULL }}, + + { &hf_fddi_src_vendor, + { "Source Hardware Vendor", "fddi.src_vendor", FT_ETHER_VENDOR, NULL }} }; proto_fddi = proto_register_protocol ("Fiber Distributed Data Interface", "fddi" ); |