summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/m3ap
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
commita86c5f7cae7ec9a3398300555a0b644689d946a1 (patch)
tree39fe4b107c71174fd1e8a8ceb9a4d2aa14116248 /epan/dissectors/asn1/m3ap
parentReleasing progress-linux version 4.2.6-1~progress7.99u1. (diff)
downloadwireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.tar.xz
wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/asn1/m3ap')
-rw-r--r--epan/dissectors/asn1/m3ap/m3ap.cnf16
-rw-r--r--epan/dissectors/asn1/m3ap/packet-m3ap-template.c44
2 files changed, 31 insertions, 29 deletions
diff --git a/epan/dissectors/asn1/m3ap/m3ap.cnf b/epan/dissectors/asn1/m3ap/m3ap.cnf
index 420a6a5e..1d5bcb69 100644
--- a/epan/dissectors/asn1/m3ap/m3ap.cnf
+++ b/epan/dissectors/asn1/m3ap/m3ap.cnf
@@ -116,11 +116,11 @@ ProtocolIE-Field/value ie_field_value
e212_number_type_t number_type = m3ap_data->number_type;
m3ap_data->number_type = E212_NONE;
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
- 3, 3, FALSE, &parameter_tvb);
+ 3, 3, false, &parameter_tvb);
if (!parameter_tvb)
return offset;
- dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, number_type, FALSE);
+ dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, number_type, false);
#.END
#.FN_BODY ECGI
@@ -130,7 +130,7 @@ ProtocolIE-Field/value ie_field_value
#.FN_BODY IPAddress VAL_PTR = &parameter_tvb
tvbuff_t *parameter_tvb=NULL;
- gint tvb_len;
+ int tvb_len;
proto_tree *subtree;
%(DEFAULT_BODY)s
@@ -165,11 +165,11 @@ 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_BODY MBMS-Service-Area VAL_PTR = &parameter_tvb
tvbuff_t *parameter_tvb=NULL;
- guint16 tvb_len;
+ uint16_t tvb_len;
%(DEFAULT_BODY)s
@@ -183,10 +183,10 @@ BitRate DISPLAY=BASE_DEC|BASE_UNIT_STRING STRINGS=&units_bit_sec
#.FN_BODY MBMS-Session-Duration VAL_PTR = &parameter_tvb
tvbuff_t *parameter_tvb=NULL;
- guint16 tvb_len;
+ uint16_t tvb_len;
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
- 3, 3, FALSE, &parameter_tvb);
+ 3, 3, false, &parameter_tvb);
if (!parameter_tvb)
return offset;
@@ -199,7 +199,7 @@ BitRate DISPLAY=BASE_DEC|BASE_UNIT_STRING STRINGS=&units_bit_sec
#.FN_BODY MinimumTimeToMBMSDataTransfer VAL_PTR = &parameter_tvb
tvbuff_t *parameter_tvb=NULL;
- guint16 tvb_len;
+ uint16_t tvb_len;
%(DEFAULT_BODY)s
diff --git a/epan/dissectors/asn1/m3ap/packet-m3ap-template.c b/epan/dissectors/asn1/m3ap/packet-m3ap-template.c
index d2c2c389..c97064c1 100644
--- a/epan/dissectors/asn1/m3ap/packet-m3ap-template.c
+++ b/epan/dissectors/asn1/m3ap/packet-m3ap-template.c
@@ -19,6 +19,8 @@
#include <epan/sctpppids.h>
#include <epan/expert.h>
#include <epan/proto_data.h>
+#include <epan/unit_strings.h>
+#include <wsutil/array.h>
#include "packet-ber.h"
#include "packet-per.h"
@@ -34,25 +36,25 @@ void proto_reg_handoff_m3ap(void);
/* M3AP uses port 36444 as recommended by IANA. */
#define M3AP_PORT 36444
-static dissector_handle_t m3ap_handle=NULL;
+static dissector_handle_t m3ap_handle;
#include "packet-m3ap-val.h"
/* Initialize the protocol and registered fields */
-static int proto_m3ap = -1;
+static int proto_m3ap;
-static int hf_m3ap_Absolute_Time_ofMBMS_Data_value = -1;
-static int hf_m3ap_IPAddress_v4 = -1;
-static int hf_m3ap_IPAddress_v6 = -1;
+static int hf_m3ap_Absolute_Time_ofMBMS_Data_value;
+static int hf_m3ap_IPAddress_v4;
+static int hf_m3ap_IPAddress_v6;
#include "packet-m3ap-hf.c"
/* Initialize the subtree pointers */
-static int ett_m3ap = -1;
-static int ett_m3ap_IPAddress = -1;
+static int ett_m3ap;
+static int ett_m3ap_IPAddress;
#include "packet-m3ap-ett.c"
-static expert_field ei_m3ap_invalid_ip_address_len = EI_INIT;
+static expert_field ei_m3ap_invalid_ip_address_len;
struct m3ap_private_data {
e212_number_type_t number_type;
@@ -65,11 +67,11 @@ enum{
};
/* Global variables */
-static guint32 ProcedureCode;
-static guint32 ProtocolIE_ID;
-/*static guint32 ProtocolExtensionID; */
+static uint32_t ProcedureCode;
+static uint32_t ProtocolIE_ID;
+/*static uint32_t ProtocolExtensionID; */
static int global_m3ap_port = M3AP_PORT;
-static guint32 message_type;
+static uint32_t message_type;
/* Dissector tables */
static dissector_table_t m3ap_ies_dissector_table;
@@ -99,27 +101,27 @@ m3ap_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(m3ap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
+ return (dissector_try_uint_new(m3ap_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(m3ap_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
+ return (dissector_try_uint_new(m3ap_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(m3ap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
+ return (dissector_try_uint_new(m3ap_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(m3ap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
+ return (dissector_try_uint_new(m3ap_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(m3ap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
+ return (dissector_try_uint_new(m3ap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, false, NULL)) ? tvb_captured_length(tvb) : 0;
}
@@ -166,7 +168,7 @@ void proto_register_m3ap(void) {
};
/* List of subtrees */
- static gint *ett[] = {
+ static int *ett[] = {
&ett_m3ap,
&ett_m3ap_IPAddress,
#include "packet-m3ap-ettarr.c"
@@ -201,12 +203,12 @@ void proto_register_m3ap(void) {
void
proto_reg_handoff_m3ap(void)
{
- static gboolean inited = FALSE;
- static guint SctpPort;
+ static bool inited = false;
+ static unsigned SctpPort;
if( !inited ) {
dissector_add_uint("sctp.ppi", PROTO_3GPP_M3AP_PROTOCOL_ID, m3ap_handle);
- inited = TRUE;
+ inited = true;
#include "packet-m3ap-dis-tab.c"
dissector_add_uint("m3ap.extension", 17, create_dissector_handle(dissect_AllocationAndRetentionPriority_PDU, proto_m3ap));
}