aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-tsp.c')
-rw-r--r--epan/dissectors/packet-tsp.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/epan/dissectors/packet-tsp.c b/epan/dissectors/packet-tsp.c
index 19b5f7901d..a958df14c9 100644
--- a/epan/dissectors/packet-tsp.c
+++ b/epan/dissectors/packet-tsp.c
@@ -23,16 +23,18 @@
void proto_register_tsp(void);
void proto_reg_handoff_tsp(void);
-static int proto_tsp = -1;
-static int hf_tsp_type = -1;
-static int hf_tsp_vers = -1;
-static int hf_tsp_seq = -1;
-static int hf_tsp_hopcnt = -1;
-static int hf_tsp_time_sec = -1;
-static int hf_tsp_time_usec = -1;
-static int hf_tsp_name = -1;
+static dissector_handle_t tsp_handle;
-static gint ett_tsp = -1;
+static int proto_tsp;
+static int hf_tsp_type;
+static int hf_tsp_vers;
+static int hf_tsp_seq;
+static int hf_tsp_hopcnt;
+static int hf_tsp_time_sec;
+static int hf_tsp_time_usec;
+static int hf_tsp_name;
+
+static gint ett_tsp;
/* timed port from /etc/services */
#define UDP_PORT_TIMED 525
@@ -144,7 +146,7 @@ dissect_tsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if (tsp_tree) {
proto_tree_add_item(tsp_tree, hf_tsp_name, tvb, 12,
- -1, ENC_ASCII|ENC_NA);
+ -1, ENC_ASCII);
}
return tvb_captured_length(tvb);
}
@@ -153,9 +155,6 @@ dissect_tsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
void
proto_reg_handoff_tsp(void)
{
- dissector_handle_t tsp_handle;
-
- tsp_handle = create_dissector_handle(dissect_tsp, proto_tsp);
dissector_add_uint_with_preference("udp.port", UDP_PORT_TIMED, tsp_handle);
}
@@ -201,6 +200,7 @@ proto_register_tsp(void)
"TSP", "tsp");
proto_register_field_array(proto_tsp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ tsp_handle = register_dissector("tsp", dissect_tsp, proto_tsp);
}
/*