diff options
Diffstat (limited to 'epan/dissectors/asn1/rua')
-rw-r--r-- | epan/dissectors/asn1/rua/packet-rua-template.c | 21 | ||||
-rw-r--r-- | epan/dissectors/asn1/rua/rua.cnf | 5 |
2 files changed, 14 insertions, 12 deletions
diff --git a/epan/dissectors/asn1/rua/packet-rua-template.c b/epan/dissectors/asn1/rua/packet-rua-template.c index cd4ba112..f903201f 100644 --- a/epan/dissectors/asn1/rua/packet-rua-template.c +++ b/epan/dissectors/asn1/rua/packet-rua-template.c @@ -17,6 +17,7 @@ #include <epan/sctpppids.h> #include <epan/asn1.h> #include <epan/prefs.h> +#include <wsutil/array.h> #include "packet-per.h" @@ -36,12 +37,12 @@ void proto_register_rua(void); #include "packet-rua-val.h" /* Initialize the protocol and registered fields */ -static int proto_rua = -1; +static int proto_rua; #include "packet-rua-hf.c" /* Initialize the subtree pointers */ -static int ett_rua = -1; +static int ett_rua; /* initialise sub-dissector handles */ static dissector_handle_t ranap_handle = NULL; @@ -49,8 +50,8 @@ static int ett_rua = -1; #include "packet-rua-ett.c" /* Global variables */ -static guint32 ProcedureCode; -static guint32 ProtocolIE_ID; +static uint32_t ProcedureCode; +static uint32_t ProtocolIE_ID; /* Dissector tables */ static dissector_table_t rua_ies_dissector_table; @@ -73,27 +74,27 @@ void proto_reg_handoff_rua(void); static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { - return (dissector_try_uint_new(rua_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0; + return (dissector_try_uint_new(rua_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, false, NULL)) ? tvb_captured_length(tvb) : 0; } static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { - return (dissector_try_uint_new(rua_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0; + return (dissector_try_uint_new(rua_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, false, NULL)) ? tvb_captured_length(tvb) : 0; } static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { - return (dissector_try_uint_new(rua_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0; + return (dissector_try_uint_new(rua_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree, false, NULL)) ? tvb_captured_length(tvb) : 0; } static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { - return (dissector_try_uint_new(rua_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0; + return (dissector_try_uint_new(rua_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree, false, NULL)) ? tvb_captured_length(tvb) : 0; } static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { - return (dissector_try_uint_new(rua_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0; + return (dissector_try_uint_new(rua_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, false, NULL)) ? tvb_captured_length(tvb) : 0; } static int @@ -123,7 +124,7 @@ void proto_register_rua(void) { }; /* List of subtrees */ - static gint *ett[] = { + static int *ett[] = { &ett_rua, #include "packet-rua-ettarr.c" }; diff --git a/epan/dissectors/asn1/rua/rua.cnf b/epan/dissectors/asn1/rua/rua.cnf index f173d7d7..3446eb54 100644 --- a/epan/dissectors/asn1/rua/rua.cnf +++ b/epan/dissectors/asn1/rua/rua.cnf @@ -39,7 +39,8 @@ ProtocolIE-Single-Container #.FN_PARS ProtocolIE-ID VAL_PTR = &ProtocolIE_ID #.FN_FTR ProtocolIE-ID if (tree) { - proto_item_append_text(proto_item_get_parent_nth(actx->created_item, 2), ": %s", val_to_str(ProtocolIE_ID, VALS(rua_ProtocolIE_ID_vals), "unknown (%d)")); + proto_item_append_text(proto_item_get_parent_nth(actx->created_item, 2), ": %s", + val_to_str(ProtocolIE_ID, VALS(rua_ProtocolIE_ID_vals), "unknown (%d)")); } #.END @@ -49,7 +50,7 @@ ProtocolIE-Single-Container #.FN_PARS ProcedureCode VAL_PTR = &ProcedureCode #.FN_FTR ProcedureCode - if (strcmp(val_to_str(ProcedureCode, rua_ProcedureCode_vals, "Unknown"), "Unknown") == 0) { + if (strcmp(val_to_str_const(ProcedureCode, rua_ProcedureCode_vals, "Unknown"), "Unknown") == 0) { col_set_str(actx->pinfo->cinfo, COL_INFO, "Unknown Message "); } /* Known Procedures should be included below and broken out as ELEMENTARY names to avoid confusion */ |