diff options
author | Michael Mann <mmann78@netscape.net> | 2013-10-24 00:30:14 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-10-24 00:30:14 +0000 |
commit | ffd7d714b34bb6ee9930ae49a85bcd55eb0a5ec4 (patch) | |
tree | 3cb7bdb5d371b48f51f06940f3981c6c10cfbe9d /plugins | |
parent | 5ca56e5bcec3a62654399b36c1284967503bb3ec (diff) |
Make WiMax CDMA Code Attribute its own protocol with it's own filter.
svn path=/trunk/; revision=52808
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/wimax/wimax_cdma_code_decoder.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/plugins/wimax/wimax_cdma_code_decoder.c b/plugins/wimax/wimax_cdma_code_decoder.c index fdd793992d..c32f034144 100644 --- a/plugins/wimax/wimax_cdma_code_decoder.c +++ b/plugins/wimax/wimax_cdma_code_decoder.c @@ -33,8 +33,6 @@ #include <glib.h> #include <epan/packet.h> -extern gint proto_wimax; - static int proto_wimax_cdma_code_decoder = -1; static gint ett_wimax_cdma_code_decoder = -1; @@ -45,19 +43,15 @@ static int hf_wimax_ranging_subchannel_offset = -1; static void dissect_wimax_cdma_code_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { gint offset = 0; - guint length; - proto_item *cdma_item = NULL; - - proto_tree *cdma_tree = NULL; + proto_item *cdma_item; + proto_tree *cdma_tree; /* update the info column */ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "CDMA Code Attribute"); if (tree) { /* we are being asked for details */ - /* get the tvb reported length */ - length = tvb_reported_length(tvb); /* display CDMA dissector info */ - cdma_item = proto_tree_add_protocol_format(tree, proto_wimax_cdma_code_decoder, tvb, offset, length, "CDMA Code Attribute (%u bytes)", length); + cdma_item = proto_tree_add_item(tree, proto_wimax_cdma_code_decoder, tvb, offset, -1, ENC_NA); /* add CDMA Code subtree */ cdma_tree = proto_item_add_subtree(cdma_item, ett_wimax_cdma_code_decoder); /* display the first CDMA Code */ @@ -107,7 +101,11 @@ void proto_register_wimax_cdma(void) &ett_wimax_cdma_code_decoder, }; - proto_wimax_cdma_code_decoder = proto_wimax; + proto_wimax_cdma_code_decoder = proto_register_protocol ( + "WiMax CDMA Code Attribute", /* name */ + "CDMA Code Attribute", /* short name */ + "wmx.cdma" /* abbrev */ + ); /* register the field display messages */ proto_register_field_array(proto_wimax_cdma_code_decoder, hf, array_length(hf)); |