summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/hnbap
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:26 +0000
commitc4e8a3222648fcf22ca207f1815ebbf7cd144eeb (patch)
tree93d5c6aa93d9987680dd1adad5685e2ad698f223 /epan/dissectors/asn1/hnbap
parentAdding upstream version 4.2.6. (diff)
downloadwireshark-upstream.tar.xz
wireshark-upstream.zip
Adding upstream version 4.4.0.upstream/4.4.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/asn1/hnbap')
-rw-r--r--epan/dissectors/asn1/hnbap/hnbap.cnf12
-rw-r--r--epan/dissectors/asn1/hnbap/packet-hnbap-template.c23
2 files changed, 17 insertions, 18 deletions
diff --git a/epan/dissectors/asn1/hnbap/hnbap.cnf b/epan/dissectors/asn1/hnbap/hnbap.cnf
index 7c5429a0..d3d803e2 100644
--- a/epan/dissectors/asn1/hnbap/hnbap.cnf
+++ b/epan/dissectors/asn1/hnbap/hnbap.cnf
@@ -33,9 +33,6 @@ GeographicalLocation/geographicalCoordinates geographical_location_geographical_
HNB-Location-Information/geographicalCoordinates hnb_location_information_geographical_coordinates
MacroCoverageInformation/cellIdentity macroCellID
-#.FIELD_ATTR
-acroCoverageInformation/cellIdentity ABBREV=cellIdentity.macroCellID
-
#.OMIT_ASSIGNMENT
Presence
ProtocolIE-ContainerList
@@ -49,7 +46,8 @@ AccessResult
#.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(hnbap_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(hnbap_ProtocolIE_ID_vals), "unknown (%d)"));
}
#.END
@@ -59,7 +57,7 @@ AccessResult
#.FN_PARS ProcedureCode VAL_PTR = &ProcedureCode
#.FN_FTR ProcedureCode
- if (strcmp(val_to_str(ProcedureCode, hnbap_ProcedureCode_vals, "Unknown"), "Unknown") == 0) {
+ if (strcmp(val_to_str_const(ProcedureCode, hnbap_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 */
@@ -159,7 +157,7 @@ AccessResult
%(DEFAULT_BODY)s
if (parameter_tvb) {
proto_tree *subtree = proto_item_add_subtree(actx->created_item, ett_hnbap_imsi);
- dissect_e212_imsi(parameter_tvb, actx->pinfo, subtree, 0, tvb_reported_length(parameter_tvb), FALSE);
+ dissect_e212_imsi(parameter_tvb, actx->pinfo, subtree, 0, tvb_reported_length(parameter_tvb), false);
}
#.FN_BODY PLMNidentity VAL_PTR = &parameter_tvb
@@ -169,7 +167,7 @@ AccessResult
hnbap_data->number_type = E212_NONE;
%(DEFAULT_BODY)s
if (parameter_tvb) {
- 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
diff --git a/epan/dissectors/asn1/hnbap/packet-hnbap-template.c b/epan/dissectors/asn1/hnbap/packet-hnbap-template.c
index 1568cca2..73908afc 100644
--- a/epan/dissectors/asn1/hnbap/packet-hnbap-template.c
+++ b/epan/dissectors/asn1/hnbap/packet-hnbap-template.c
@@ -18,6 +18,7 @@
#include <epan/asn1.h>
#include <epan/prefs.h>
#include <epan/proto_data.h>
+#include <wsutil/array.h>
#include "packet-per.h"
#include "packet-e212.h"
@@ -38,13 +39,13 @@ void proto_register_hnbap(void);
#include "packet-hnbap-val.h"
/* Initialize the protocol and registered fields */
-static int proto_hnbap = -1;
+static int proto_hnbap;
#include "packet-hnbap-hf.c"
/* Initialize the subtree pointers */
-static int ett_hnbap = -1;
-static int ett_hnbap_imsi = -1;
+static int ett_hnbap;
+static int ett_hnbap_imsi;
#include "packet-hnbap-ett.c"
struct hnbap_private_data {
@@ -52,8 +53,8 @@ struct hnbap_private_data {
};
/* Global variables */
-static guint32 ProcedureCode;
-static guint32 ProtocolIE_ID;
+static uint32_t ProcedureCode;
+static uint32_t ProtocolIE_ID;
/* Dissector tables */
static dissector_table_t hnbap_ies_dissector_table;
@@ -86,12 +87,12 @@ hnbap_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(hnbap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
+ return (dissector_try_uint_new(hnbap_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(hnbap_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
+ return (dissector_try_uint_new(hnbap_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, false, NULL)) ? tvb_captured_length(tvb) : 0;
}
#if 0
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
@@ -115,17 +116,17 @@ static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, p
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
- return (dissector_try_uint_new(hnbap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
+ return (dissector_try_uint_new(hnbap_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(hnbap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
+ return (dissector_try_uint_new(hnbap_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(hnbap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
+ return (dissector_try_uint_new(hnbap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, false, NULL)) ? tvb_captured_length(tvb) : 0;
}
static int
@@ -155,7 +156,7 @@ void proto_register_hnbap(void) {
};
/* List of subtrees */
- static gint *ett[] = {
+ static int *ett[] = {
&ett_hnbap,
&ett_hnbap_imsi,
#include "packet-hnbap-ettarr.c"