diff options
Diffstat (limited to 'epan/dissectors/asn1/m2ap')
-rw-r--r-- | epan/dissectors/asn1/m2ap/m2ap.cnf | 6 | ||||
-rw-r--r-- | epan/dissectors/asn1/m2ap/packet-m2ap-template.c | 34 |
2 files changed, 21 insertions, 19 deletions
diff --git a/epan/dissectors/asn1/m2ap/m2ap.cnf b/epan/dissectors/asn1/m2ap/m2ap.cnf index f95a1357..bf9aab69 100644 --- a/epan/dissectors/asn1/m2ap/m2ap.cnf +++ b/epan/dissectors/asn1/m2ap/m2ap.cnf @@ -74,7 +74,7 @@ ProtocolIE-Field/value ie_field_value %(DEFAULT_BODY)s if (parameter_tvb) { proto_tree *subtree = proto_item_add_subtree(actx->created_item, ett_m2ap_PLMN_Identity); - dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, number_type, FALSE); + dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, number_type, false); } #.END @@ -87,7 +87,7 @@ ProtocolIE-Field/value ie_field_value tvbuff_t *parameter_tvb = NULL; %(DEFAULT_BODY)s if (parameter_tvb) { - gint tvb_len = tvb_reported_length(parameter_tvb); + int tvb_len = tvb_reported_length(parameter_tvb); proto_tree *subtree = proto_item_add_subtree(actx->created_item, ett_m2ap_IPAddress); switch (tvb_len) { @@ -105,7 +105,7 @@ ProtocolIE-Field/value ie_field_value #.END #.TYPE_ATTR -BitRate DISPLAY=BASE_DEC|BASE_UNIT_STRING STRINGS=&units_bit_sec +BitRate DISPLAY=BASE_DEC|BASE_UNIT_STRING STRINGS=UNS(&units_bit_sec) #.FN_HDR SessionStartRequest col_set_str(actx->pinfo->cinfo, COL_INFO, "MBMS Session Start Request"); diff --git a/epan/dissectors/asn1/m2ap/packet-m2ap-template.c b/epan/dissectors/asn1/m2ap/packet-m2ap-template.c index b7d9c229..fb3d51d4 100644 --- a/epan/dissectors/asn1/m2ap/packet-m2ap-template.c +++ b/epan/dissectors/asn1/m2ap/packet-m2ap-template.c @@ -18,6 +18,8 @@ #include <epan/asn1.h> #include <epan/expert.h> #include <epan/proto_data.h> +#include <epan/unit_strings.h> +#include <wsutil/array.h> #include "packet-per.h" #include "packet-e212.h" @@ -35,19 +37,19 @@ void proto_reg_handoff_m2ap(void); #include "packet-m2ap-val.h" /* Initialize the protocol and registered fields */ -static int proto_m2ap = -1; +static int proto_m2ap; -static int hf_m2ap_IPAddress_v4 = -1; -static int hf_m2ap_IPAddress_v6 = -1; +static int hf_m2ap_IPAddress_v4; +static int hf_m2ap_IPAddress_v6; #include "packet-m2ap-hf.c" /* Initialize the subtree pointers */ -static int ett_m2ap = -1; -static int ett_m2ap_PLMN_Identity = -1; -static int ett_m2ap_IPAddress = -1; +static int ett_m2ap; +static int ett_m2ap_PLMN_Identity; +static int ett_m2ap_IPAddress; #include "packet-m2ap-ett.c" -static expert_field ei_m2ap_invalid_ip_address_len = EI_INIT; +static expert_field ei_m2ap_invalid_ip_address_len; struct m2ap_private_data { e212_number_type_t number_type; @@ -60,9 +62,9 @@ enum{ }; /* Global variables */ -static guint32 ProcedureCode; -static guint32 ProtocolIE_ID; -static guint32 message_type; +static uint32_t ProcedureCode; +static uint32_t ProtocolIE_ID; +static uint32_t message_type; static dissector_handle_t m2ap_handle; /* Dissector tables */ @@ -94,31 +96,31 @@ m2ap_get_private_data(packet_info *pinfo) static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { - return (dissector_try_uint_new(m2ap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0; + return (dissector_try_uint_new(m2ap_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(m2ap_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0; + return (dissector_try_uint_new(m2ap_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(m2ap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0; + return (dissector_try_uint_new(m2ap_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(m2ap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0; + return (dissector_try_uint_new(m2ap_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(m2ap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0; + return (dissector_try_uint_new(m2ap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, false, NULL)) ? tvb_captured_length(tvb) : 0; } @@ -160,7 +162,7 @@ proto_register_m2ap(void) { }; /* List of subtrees */ - static gint *ett[] = { + static int *ett[] = { &ett_m2ap, &ett_m2ap_PLMN_Identity, &ett_m2ap_IPAddress, |