summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/gprscdr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:33 +0000
commit9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9 (patch)
tree2784370cda9bbf2da9114d70f05399c0b229d28c /epan/dissectors/asn1/gprscdr
parentAdding debian version 4.2.6-1. (diff)
downloadwireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.tar.xz
wireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/asn1/gprscdr')
-rw-r--r--epan/dissectors/asn1/gprscdr/gprscdr.cnf32
-rw-r--r--epan/dissectors/asn1/gprscdr/packet-gprscdr-template.c27
2 files changed, 30 insertions, 29 deletions
diff --git a/epan/dissectors/asn1/gprscdr/gprscdr.cnf b/epan/dissectors/asn1/gprscdr/gprscdr.cnf
index c3c85b3e..f14e56bc 100644
--- a/epan/dissectors/asn1/gprscdr/gprscdr.cnf
+++ b/epan/dissectors/asn1/gprscdr/gprscdr.cnf
@@ -90,15 +90,15 @@ GPRSRecord
return offset;
proto_item_append_text(actx->created_item, " (UTC %%x-%%x-%%x %%x:%%x:%%x %%s%%x:%%x)",
- tvb_get_guint8(parameter_tvb,0), /* Year */
- tvb_get_guint8(parameter_tvb,1), /* Month */
- tvb_get_guint8(parameter_tvb,2), /* Day */
- tvb_get_guint8(parameter_tvb,3), /* Hour */
- tvb_get_guint8(parameter_tvb,4), /* Minute */
- tvb_get_guint8(parameter_tvb,5), /* Second */
+ tvb_get_uint8(parameter_tvb,0), /* Year */
+ tvb_get_uint8(parameter_tvb,1), /* Month */
+ tvb_get_uint8(parameter_tvb,2), /* Day */
+ tvb_get_uint8(parameter_tvb,3), /* Hour */
+ tvb_get_uint8(parameter_tvb,4), /* Minute */
+ tvb_get_uint8(parameter_tvb,5), /* Second */
tvb_get_string_enc(actx->pinfo->pool, parameter_tvb,6,1,ENC_ASCII|ENC_NA), /* Sign */
- tvb_get_guint8(parameter_tvb,7), /* Hour */
- tvb_get_guint8(parameter_tvb,8) /* Minute */
+ tvb_get_uint8(parameter_tvb,7), /* Hour */
+ tvb_get_uint8(parameter_tvb,8) /* Minute */
);
#.FN_BODY MSTimeZone VAL_PTR = &parameter_tvb
@@ -107,7 +107,7 @@ GPRSRecord
* 1.Octet: Time Zone and 2. Octet: Daylight saving time, see TS 29.060 [75]
*/
tvbuff_t *parameter_tvb;
- guint8 data, data2;
+ uint8_t data, data2;
char sign;
%(DEFAULT_BODY)s
@@ -115,11 +115,11 @@ GPRSRecord
if (!parameter_tvb)
return offset;
- data = tvb_get_guint8(parameter_tvb, 0);
+ data = tvb_get_uint8(parameter_tvb, 0);
sign = (data & 0x08) ? '-' : '+';
data = (data >> 4) + (data & 0x07) * 10;
- data2 = tvb_get_guint8(tvb, 1) & 0x3;
+ data2 = tvb_get_uint8(tvb, 1) & 0x3;
proto_item_append_text(actx->created_item, " (GMT %%c %%d hours %%d minutes %%s)",
sign,
@@ -138,7 +138,7 @@ GPRSRecord
return offset;
subtree = proto_item_add_subtree(actx->created_item, ett_gprscdr_plmn_id);
- dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, E212_NONE, TRUE);
+ dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, E212_NONE, true);
#.FN_BODY QoSInformation
@@ -154,7 +154,7 @@ GPRSRecord
#.FN_BODY EPCQoSInformation/aRP
proto_tree *ext_tree_arp;
- guint length;
+ unsigned length;
/*
* 8.86 Allocation/Retention Priority (ARP)
@@ -227,7 +227,7 @@ GPRSRecord
#.FN_BODY PDPType
proto_tree *ext_tree_pdp_pdn_type;
- guint length;
+ unsigned length;
length = tvb_reported_length(tvb);
@@ -254,8 +254,8 @@ GPRSRecord
#.FN_BODY GPRSRecord VAL_PTR = &branch_taken
proto_item *item;
-gint branch_taken, t_offset = offset;
-gint32 tag;
+int branch_taken, t_offset = offset;
+int32_t tag;
%(DEFAULT_BODY)s
diff --git a/epan/dissectors/asn1/gprscdr/packet-gprscdr-template.c b/epan/dissectors/asn1/gprscdr/packet-gprscdr-template.c
index 160114f4..acc4957e 100644
--- a/epan/dissectors/asn1/gprscdr/packet-gprscdr-template.c
+++ b/epan/dissectors/asn1/gprscdr/packet-gprscdr-template.c
@@ -17,6 +17,7 @@
#include <epan/packet.h>
#include <epan/expert.h>
#include <epan/asn1.h>
+#include <wsutil/array.h>
#include "packet-ber.h"
#include "packet-gsm_map.h"
@@ -33,24 +34,24 @@
void proto_register_gprscdr(void);
/* Define the GPRS CDR proto */
-static int proto_gprscdr = -1;
+static int proto_gprscdr;
#include "packet-gprscdr-hf.c"
-static int ett_gprscdr = -1;
-static int ett_gprscdr_timestamp = -1;
-static int ett_gprscdr_plmn_id = -1;
-static int ett_gprscdr_pdp_pdn_type = -1;
-static int ett_gprscdr_eps_qos_arp = -1;
-static int ett_gprscdr_managementextension_information = -1;
-static int ett_gprscdr_userlocationinformation = -1;
+static int ett_gprscdr;
+static int ett_gprscdr_timestamp;
+static int ett_gprscdr_plmn_id;
+static int ett_gprscdr_pdp_pdn_type;
+static int ett_gprscdr_eps_qos_arp;
+static int ett_gprscdr_managementextension_information;
+static int ett_gprscdr_userlocationinformation;
#include "packet-gprscdr-ett.c"
-static expert_field ei_gprscdr_not_dissected = EI_INIT;
-static expert_field ei_gprscdr_choice_not_found = EI_INIT;
+static expert_field ei_gprscdr_not_dissected;
+static expert_field ei_gprscdr_choice_not_found;
/* Global variables */
-static const char *obj_id = NULL;
+static const char *obj_id;
static const value_string gprscdr_daylight_saving_time_vals[] = {
{0, "No adjustment"},
@@ -86,7 +87,7 @@ static const value_string gprscdr_rat_type_vals[] = {
static int
dissect_gprscdr_uli(tvbuff_t *tvb _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int type) {
proto_tree *ext_tree_uli;
- guint length;
+ unsigned length;
length = tvb_reported_length(tvb);
ext_tree_uli = proto_tree_add_subtree(tree, tvb, 0, length, ett_gprscdr_userlocationinformation, NULL, "UserLocationInformation");
@@ -128,7 +129,7 @@ proto_register_gprscdr(void)
};
/* List of subtrees */
- static gint *ett[] = {
+ static int *ett[] = {
&ett_gprscdr,
&ett_gprscdr_timestamp,
&ett_gprscdr_plmn_id,