summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/qsig
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/qsig
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/qsig')
-rw-r--r--epan/dissectors/asn1/qsig/packet-qsig-template.c81
-rw-r--r--epan/dissectors/asn1/qsig/qsig.cnf2
2 files changed, 42 insertions, 41 deletions
diff --git a/epan/dissectors/asn1/qsig/packet-qsig-template.c b/epan/dissectors/asn1/qsig/packet-qsig-template.c
index b7d3fb4a..95c2e189 100644
--- a/epan/dissectors/asn1/qsig/packet-qsig-template.c
+++ b/epan/dissectors/asn1/qsig/packet-qsig-template.c
@@ -16,6 +16,7 @@
#include <epan/strutil.h>
#include <epan/asn1.h>
#include <wsutil/strtoi.h>
+#include <wsutil/array.h>
#include "packet-ber.h"
#include "packet-qsig.h"
@@ -138,7 +139,7 @@ static const value_string qsig_str_service_name[] = {
};
#define NO_SRV (-1)
-static const gint32 op2srv_tab[] = {
+static const int32_t op2srv_tab[] = {
/* 0 */ 13868,
/* 1 */ 13868,
/* 2 */ 13868,
@@ -273,17 +274,17 @@ static const value_string qsig_str_error[] = {
};
/* Initialize the protocol and registered fields */
-static int proto_qsig = -1;
-static int hf_qsig_operation = -1;
-static int hf_qsig_service = -1;
-static int hf_qsig_error = -1;
-static int hf_qsig_ie_type = -1;
-static int hf_qsig_ie_type_cs4 = -1;
-static int hf_qsig_ie_type_cs5 = -1;
-static int hf_qsig_ie_len = -1;
-static int hf_qsig_ie_data = -1;
-static int hf_qsig_tc = -1;
-static int hf_qsig_pc = -1;
+static int proto_qsig;
+static int hf_qsig_operation;
+static int hf_qsig_service;
+static int hf_qsig_error;
+static int hf_qsig_ie_type;
+static int hf_qsig_ie_type_cs4;
+static int hf_qsig_ie_type_cs5;
+static int hf_qsig_ie_len;
+static int hf_qsig_ie_data;
+static int hf_qsig_tc;
+static int hf_qsig_pc;
#include "packet-qsig-hf.c"
static int *hf_qsig_ie_type_arr[] = {
@@ -298,23 +299,23 @@ static int *hf_qsig_ie_type_arr[] = {
};
/* Initialize the subtree pointers */
-static gint ett_qsig = -1;
-static gint ett_qsig_ie = -1;
-static gint ett_qsig_unknown_extension = -1;
+static int ett_qsig;
+static int ett_qsig_ie;
+static int ett_qsig_unknown_extension;
#include "packet-qsig-ett.c"
-static gint ett_cnq_PSS1InformationElement = -1;
+static int ett_cnq_PSS1InformationElement;
-/* static expert_field ei_qsig_unsupported_arg_type = EI_INIT; */
-static expert_field ei_qsig_unsupported_result_type = EI_INIT;
-static expert_field ei_qsig_unsupported_error_type = EI_INIT;
+/* static expert_field ei_qsig_unsupported_arg_type; */
+static expert_field ei_qsig_unsupported_result_type;
+static expert_field ei_qsig_unsupported_error_type;
/* Preferences */
/* Subdissectors */
-static dissector_handle_t q931_ie_handle = NULL;
+static dissector_handle_t q931_ie_handle;
/* Global variables */
-static const char *extension_oid = NULL;
+static const char *extension_oid;
/* Dissector tables */
static dissector_table_t extension_dissector_table;
@@ -322,7 +323,7 @@ static dissector_table_t extension_dissector_table;
#include "packet-qsig-fn.c"
typedef struct _qsig_op_t {
- gint32 opcode;
+ int32_t opcode;
dissector_t arg_pdu;
dissector_t res_pdu;
} qsig_op_t;
@@ -332,7 +333,7 @@ static const qsig_op_t qsig_op_tab[] = {
};
typedef struct _qsig_err_t {
- gint32 errcode;
+ int32_t errcode;
dissector_t err_pdu;
} qsig_err_t;
@@ -340,7 +341,7 @@ static const qsig_err_t qsig_err_tab[] = {
#include "packet-qsig-table21.c"
};
-static const qsig_op_t *get_op(gint32 opcode) {
+static const qsig_op_t *get_op(int32_t opcode) {
int i;
/* search from the end to get the last occurrence if the operation is redefined in some newer specification */
@@ -350,13 +351,13 @@ static const qsig_op_t *get_op(gint32 opcode) {
return NULL;
}
-static gint32 get_service(gint32 opcode) {
+static int32_t get_service(int32_t opcode) {
if ((opcode < 0) || (opcode >= (int)array_length(op2srv_tab)))
return NO_SRV;
return op2srv_tab[opcode];
}
-static const qsig_err_t *get_err(gint32 errcode) {
+static const qsig_err_t *get_err(int32_t errcode) {
int i;
/* search from the end to get the last occurrence if the operation is redefined in some newer specification */
@@ -371,9 +372,9 @@ static int
dissect_qsig_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) {
int offset = 0;
rose_ctx_t *rctx;
- gint32 opcode = 0, service, oid_num;
+ int32_t opcode = 0, service, oid_num;
const qsig_op_t *op_ptr = NULL;
- const gchar *p, *oid;
+ const char *p, *oid;
proto_item *ti, *ti_tmp;
proto_tree *qsig_tree;
@@ -433,11 +434,11 @@ dissect_qsig_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
/*--- dissect_qsig_res -------------------------------------------------------*/
static int
dissect_qsig_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) {
- gint offset = 0;
+ int offset = 0;
rose_ctx_t *rctx;
- gint32 opcode, service;
+ int32_t opcode, service;
const qsig_op_t *op_ptr;
- const gchar *p;
+ const char *p;
proto_item *ti, *ti_tmp;
proto_tree *qsig_tree;
@@ -489,9 +490,9 @@ static int
dissect_qsig_err(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) {
int offset = 0;
rose_ctx_t *rctx;
- gint32 errcode;
+ int32_t errcode;
const qsig_err_t *err_ptr;
- const gchar *p;
+ const char *p;
proto_item *ti;
proto_tree *qsig_tree;
@@ -551,18 +552,18 @@ dissect_qsig_party_category_ie(tvbuff_t *tvb, int offset, packet_info *pinfo _U
/*--- dissect_qsig_ie -------------------------------------------------------*/
static void
dissect_qsig_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int codeset) {
- gint offset;
+ int offset;
proto_item *ti, *hidden_item;
proto_tree *ie_tree;
- guint8 ie_type, ie_len;
+ uint8_t ie_type, ie_len;
offset = 0;
ti = proto_tree_add_item(tree, proto_qsig, tvb, offset, -1, ENC_NA);
proto_item_set_hidden(ti);
- ie_type = tvb_get_guint8(tvb, offset);
- ie_len = tvb_get_guint8(tvb, offset + 1);
+ ie_type = tvb_get_uint8(tvb, offset);
+ ie_len = tvb_get_uint8(tvb, offset + 1);
ie_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_qsig_ie, NULL,
val_to_str(ie_type, VALS(qsig_str_ie_type[codeset]), "unknown (0x%02X)"));
@@ -612,7 +613,7 @@ void proto_register_qsig(void) {
FT_UINT16, BASE_DEC, VALS(qsig_str_service), 0x0,
"Supplementary Service", HFILL }},
{ &hf_qsig_error, { "Error", "qsig.error",
- FT_UINT8, BASE_DEC, VALS(qsig_str_error), 0x0,
+ FT_UINT16, BASE_DEC, VALS(qsig_str_error), 0x0,
NULL, HFILL }},
{ &hf_qsig_ie_type, { "Type", "qsig.ie.type",
FT_UINT8, BASE_HEX, NULL, 0x0,
@@ -639,7 +640,7 @@ void proto_register_qsig(void) {
};
/* List of subtrees */
- static gint *ett[] = {
+ static int *ett[] = {
&ett_qsig,
&ett_qsig_ie,
&ett_qsig_unknown_extension,
@@ -681,7 +682,7 @@ void proto_register_qsig(void) {
/*--- proto_reg_handoff_qsig ------------------------------------------------*/
void proto_reg_handoff_qsig(void) {
int i;
- gchar *oid;
+ char *oid;
dissector_handle_t q931_handle;
q931_handle = find_dissector_add_dependency("q931", proto_qsig);
diff --git a/epan/dissectors/asn1/qsig/qsig.cnf b/epan/dissectors/asn1/qsig/qsig.cnf
index abdd580b..d3d2c541 100644
--- a/epan/dissectors/asn1/qsig/qsig.cnf
+++ b/epan/dissectors/asn1/qsig/qsig.cnf
@@ -146,7 +146,7 @@ NameData TYPE = FT_STRING DISPLAY = BASE_NONE
tvbuff_t *next_tvb;
next_tvb = tvb_new_subset_remaining(tvb, offset);
- if (!dissector_try_string_new(extension_dissector_table, extension_oid, next_tvb, actx->pinfo, tree, FALSE, NULL)) {
+ if (!dissector_try_string_new(extension_dissector_table, extension_oid, next_tvb, actx->pinfo, tree, false, NULL)) {
proto_tree *next_tree;
next_tree=proto_tree_add_subtree_format(tree, next_tvb, 0, -1, ett_qsig_unknown_extension, NULL,