aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/q932/packet-q932-template.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/asn1/q932/packet-q932-template.c')
-rw-r--r--epan/dissectors/asn1/q932/packet-q932-template.c41
1 files changed, 22 insertions, 19 deletions
diff --git a/epan/dissectors/asn1/q932/packet-q932-template.c b/epan/dissectors/asn1/q932/packet-q932-template.c
index 8b258ba626..e34c5f1512 100644
--- a/epan/dissectors/asn1/q932/packet-q932-template.c
+++ b/epan/dissectors/asn1/q932/packet-q932-template.c
@@ -27,23 +27,23 @@
void proto_register_q932(void);
/* Initialize the protocol and registered fields */
-static int proto_q932 = -1;
-static int hf_q932_ie_type = -1;
-static int hf_q932_ie_len = -1;
-static int hf_q932_ie_data = -1;
-static int hf_q932_pp = -1;
-static int hf_q932_nd = -1;
+static int proto_q932;
+static int hf_q932_ie_type;
+static int hf_q932_ie_len;
+static int hf_q932_ie_data;
+static int hf_q932_pp;
+static int hf_q932_nd;
#include "packet-q932-hf.c"
/* Initialize the subtree pointers */
-static gint ett_q932 = -1;
-static gint ett_q932_ie = -1;
+static gint ett_q932;
+static gint ett_q932_ie;
#include "packet-q932-ett.c"
-static expert_field ei_q932_dse_not_supported = EI_INIT;
-static expert_field ei_q932_acse_not_supported = EI_INIT;
-static expert_field ei_q932_unknown_component = EI_INIT;
-static expert_field ei_q932_asn1_encoded = EI_INIT;
+static expert_field ei_q932_dse_not_supported;
+static expert_field ei_q932_acse_not_supported;
+static expert_field ei_q932_unknown_component;
+static expert_field ei_q932_asn1_encoded;
/* Preferences */
@@ -64,6 +64,9 @@ dissector_table_t etsi_err_local_dissector_table;
static gint g_facility_encoding = FACILITY_QSIG;
void proto_reg_handoff_q932(void);
+
+static dissector_handle_t q932_ie_handle;
+
/* Subdissectors */
static dissector_handle_t q932_ros_handle;
@@ -133,7 +136,7 @@ static const value_string str_nd[] = {
static void
dissect_q932_facility_ie(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int length) {
gint8 appclass;
- gboolean pc;
+ bool pc;
gint32 tag;
guint32 len;
int hoffset, eoffset;
@@ -326,6 +329,7 @@ void proto_register_q932(void) {
/* Register protocol and dissector */
proto_q932 = proto_register_protocol(PNAME, PSNAME, PFNAME);
register_dissector("q932.apdu", dissect_q932_apdu, proto_q932);
+ q932_ie_handle = register_dissector("q932.ie", dissect_q932_ie, proto_q932);
/* Register fields and subtrees */
proto_register_field_array(proto_q932, hf, array_length(hf));
@@ -336,9 +340,9 @@ void proto_register_q932(void) {
rose_ctx_init(&q932_rose_ctx);
/* Register dissector tables */
- q932_rose_ctx.arg_global_dissector_table = register_dissector_table("q932.ros.global.arg", "Q.932 Operation Argument (global opcode)", proto_q932, FT_STRING, BASE_NONE);
- q932_rose_ctx.res_global_dissector_table = register_dissector_table("q932.ros.global.res", "Q.932 Operation Result (global opcode)", proto_q932, FT_STRING, BASE_NONE);
- q932_rose_ctx.err_global_dissector_table = register_dissector_table("q932.ros.global.err", "Q.932 Error (global opcode)", proto_q932, FT_STRING, BASE_NONE);
+ q932_rose_ctx.arg_global_dissector_table = register_dissector_table("q932.ros.global.arg", "Q.932 Operation Argument (global opcode)", proto_q932, FT_STRING, STRING_CASE_SENSITIVE);
+ q932_rose_ctx.res_global_dissector_table = register_dissector_table("q932.ros.global.res", "Q.932 Operation Result (global opcode)", proto_q932, FT_STRING, STRING_CASE_SENSITIVE);
+ q932_rose_ctx.err_global_dissector_table = register_dissector_table("q932.ros.global.err", "Q.932 Error (global opcode)", proto_q932, FT_STRING, STRING_CASE_SENSITIVE);
qsig_arg_local_dissector_table = register_dissector_table("q932.ros.local.arg", "Q.932 Operation Argument (local opcode)", proto_q932, FT_UINT32, BASE_HEX);
qsig_res_local_dissector_table = register_dissector_table("q932.ros.local.res", "Q.932 Operation Result (local opcode)", proto_q932, FT_UINT32, BASE_HEX);
@@ -358,17 +362,16 @@ void proto_register_q932(void) {
/*--- proto_reg_handoff_q932 ------------------------------------------------*/
void proto_reg_handoff_q932(void) {
- dissector_handle_t q932_ie_handle;
-
static gboolean q931_prefs_initialized = FALSE;
if (!q931_prefs_initialized) {
- q932_ie_handle = create_dissector_handle(dissect_q932_ie, proto_q932);
/* Facility */
dissector_add_uint("q931.ie", (0x00 << 8) | Q932_IE_FACILITY, q932_ie_handle);
/* Notification indicator */
dissector_add_uint("q931.ie", (0x00 << 8) | Q932_IE_NOTIFICATION_INDICATOR, q932_ie_handle);
q932_ros_handle = find_dissector_add_dependency("q932.ros", proto_q932);
+
+ q931_prefs_initialized = TRUE;
}
if(g_facility_encoding == FACILITY_QSIG){