aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ax25-nol3.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2013-02-03 22:29:48 +0000
committerBill Meier <wmeier@newsguy.com>2013-02-03 22:29:48 +0000
commit6549fbbad7f6e2bd8cb05b63e4fe7b98d77468d0 (patch)
tree16e4f196347be2fca882512fbb9b3f13e71f3c61 /epan/dissectors/packet-ax25-nol3.c
parent7fa9cf92098e8547c38f8df7e71cf216228a8333 (diff)
#if 0 unused hf[] entries & etc.
Note: All (or almost all) unused hf[] entries in non-generated Wireshark dissectors have been #if 0'd (or commented) out. (This applies only to 'static hf_...' vars). A number of (non-generated) dissector files with *missing* hf[] entries still need to be fixed. svn path=/trunk/; revision=47459
Diffstat (limited to 'epan/dissectors/packet-ax25-nol3.c')
-rw-r--r--epan/dissectors/packet-ax25-nol3.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/epan/dissectors/packet-ax25-nol3.c b/epan/dissectors/packet-ax25-nol3.c
index cb94cb1c35..293f7b3108 100644
--- a/epan/dissectors/packet-ax25-nol3.c
+++ b/epan/dissectors/packet-ax25-nol3.c
@@ -67,7 +67,7 @@ static int proto_dx = -1;
static int hf_dx_report = -1;
-static int hf_text = -1;
+/* static int hf_text = -1; */
/* Global preferences */
static gboolean gPREF_APRS = FALSE;
@@ -89,11 +89,10 @@ dissect_dx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
int data_len;
int offset;
- offset = 0;
+ offset = 0;
data_len = tvb_length_remaining( tvb, offset );
col_set_str( pinfo->cinfo, COL_PROTOCOL, "DX" );
-
col_clear( pinfo->cinfo, COL_INFO );
col_add_fstr( pinfo->cinfo, COL_INFO, "%s", tvb_format_text( tvb, offset, 15 ) );
@@ -101,7 +100,7 @@ dissect_dx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
if ( parent_tree )
{
/* create display subtree for the protocol */
- ti = proto_tree_add_protocol_format( parent_tree, proto_dx, tvb, 0, tvb_length_remaining( tvb, offset ),
+ ti = proto_tree_add_protocol_format( parent_tree, proto_dx, tvb, 0, -1,
"DX (%s)", tvb_format_text( tvb, offset, 15 ) );
dx_tree = proto_item_add_subtree( ti, ett_dx );
offset = 0;
@@ -154,12 +153,12 @@ dissect_ax25_nol3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree )
{
proto_item *ti;
proto_tree *ax25_nol3_tree;
- char *info_buffer;
- int offset;
- void *saved_private_data;
- tvbuff_t *next_tvb = NULL;
- guint8 dti = 0;
- gboolean dissected;
+ char *info_buffer;
+ int offset;
+ void *saved_private_data;
+ tvbuff_t *next_tvb = NULL;
+ guint8 dti = 0;
+ gboolean dissected;
info_buffer = ep_alloc( STRLEN );
info_buffer[0] = '\0';
@@ -194,7 +193,7 @@ dissect_ax25_nol3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree )
proto_ax25_nol3,
tvb,
0,
- tvb_length_remaining( tvb, offset ),
+ -1,
"AX.25 No Layer 3 - (%s)", info_buffer );
ax25_nol3_tree = proto_item_add_subtree( ti, ett_ax25_nol3 );
@@ -231,6 +230,7 @@ proto_register_ax25_nol3(void)
module_t *ax25_nol3_module;
/* Setup list of header fields */
+#if 0 /* not used ? */
static hf_register_info hf[] = {
{ &hf_text,
{ "Text", "ax25_nol3.text",
@@ -238,6 +238,7 @@ proto_register_ax25_nol3(void)
NULL, HFILL }
},
};
+#endif
static hf_register_info hf_dx[] = {
{ &hf_dx_report,
@@ -257,20 +258,20 @@ proto_register_ax25_nol3(void)
proto_ax25_nol3 = proto_register_protocol("AX.25 no Layer 3", "AX.25 no L3", "ax25_nol3");
/* Required function calls to register the header fields and subtrees used */
- proto_register_field_array( proto_ax25_nol3, hf, array_length(hf ) );
+ /* proto_register_field_array( proto_ax25_nol3, hf, array_length(hf ) ); */
proto_register_subtree_array( ett, array_length( ett ) );
/* Register preferences module */
- ax25_nol3_module = prefs_register_protocol( proto_ax25_nol3, NULL);
+ ax25_nol3_module = prefs_register_protocol( proto_ax25_nol3, NULL);
/* Register any preference */
- prefs_register_bool_preference(ax25_nol3_module, "showaprs",
- "Decode the APRS info field",
+ prefs_register_bool_preference(ax25_nol3_module, "showaprs",
+ "Decode the APRS info field",
"Enable decoding of the payload as APRS.",
&gPREF_APRS );
- prefs_register_bool_preference(ax25_nol3_module, "showcluster",
- "Decode DX cluster info field",
+ prefs_register_bool_preference(ax25_nol3_module, "showcluster",
+ "Decode DX cluster info field",
"Enable decoding of the payload as DX cluster info.",
&gPREF_DX );