summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/lnpdqp
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/lnpdqp
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/lnpdqp')
-rw-r--r--epan/dissectors/asn1/lnpdqp/lnpdqp.cnf4
-rw-r--r--epan/dissectors/asn1/lnpdqp/packet-lnpdqp-template.c49
2 files changed, 27 insertions, 26 deletions
diff --git a/epan/dissectors/asn1/lnpdqp/lnpdqp.cnf b/epan/dissectors/asn1/lnpdqp/lnpdqp.cnf
index d9884247..05731a45 100644
--- a/epan/dissectors/asn1/lnpdqp/lnpdqp.cnf
+++ b/epan/dissectors/asn1/lnpdqp/lnpdqp.cnf
@@ -11,10 +11,10 @@ ProvideInstructionArg
#.FN_BODY Digits VAL_PTR = &parameter_tvb
tvbuff_t *parameter_tvb = NULL;
- guint8 type_of_dgt;
+ uint8_t type_of_dgt;
proto_tree *subtree;
- type_of_dgt = tvb_get_guint8(tvb,offset);
+ type_of_dgt = tvb_get_uint8(tvb,offset);
switch(type_of_dgt){
case 2:
/* Calling Party Number */
diff --git a/epan/dissectors/asn1/lnpdqp/packet-lnpdqp-template.c b/epan/dissectors/asn1/lnpdqp/packet-lnpdqp-template.c
index f3ecee1d..8fe8ca46 100644
--- a/epan/dissectors/asn1/lnpdqp/packet-lnpdqp-template.c
+++ b/epan/dissectors/asn1/lnpdqp/packet-lnpdqp-template.c
@@ -11,6 +11,7 @@
#include <epan/packet.h>
#include <epan/asn1.h>
+#include <wsutil/array.h>
#include "packet-ber.h"
#define PNAME "Local Number Portability Database Query"
@@ -28,37 +29,37 @@
* Operation Family = ProvideInstruction, Reply Required (131) 0x83
* Operation Specifier = Start (1)
*/
-/* Exluding H bit */
+/* Excluding H bit */
#define LNPDQP_ANSI_TCAP_OPCODE_PI 0x0301
void proto_reg_handoff_lnpdqp(void);
void proto_register_lnpdqp(void);
/* Initialize the protocol and registered fields */
-static int proto_lnpdqp = -1;
+static int proto_lnpdqp;
-static int hf_lnpdqp_type_of_digits = -1;
-static int hf_lnpdqp_nature_of_number = -1;
-static int hf_lnpdqp_digits_enc = -1;
-static int hf_lnpdqp_np = -1;
-static int hf_lnpdqp_nr_digits = -1;
-static int hf_lnpdqp_bcd_digits = -1;
-static int hf_lnpdqp_ia5_digits = -1;
+static int hf_lnpdqp_type_of_digits;
+static int hf_lnpdqp_nature_of_number;
+static int hf_lnpdqp_digits_enc;
+static int hf_lnpdqp_np;
+static int hf_lnpdqp_nr_digits;
+static int hf_lnpdqp_bcd_digits;
+static int hf_lnpdqp_ia5_digits;
/* asn2wrs/the ber dissector does not handle the same tag used multiple times
* in asn1 description, do some magic to handle.
*/
-static int hf_lnpdqp_networkRoutingNumber = -1; /* Digits */
-static int hf_lnpdqp_callingPartyANI = -1; /* Digits */
-static int hf_lnpdqp_originatingLATA = -1; /* Digits */
-static int hf_lnpdqp_carrierID = -1; /* Digits */
+static int hf_lnpdqp_networkRoutingNumber; /* Digits */
+static int hf_lnpdqp_callingPartyANI; /* Digits */
+static int hf_lnpdqp_originatingLATA; /* Digits */
+static int hf_lnpdqp_carrierID; /* Digits */
#include "packet-lnpdqp-hf.c"
-static int ett_lnpdqp = -1;
-static int ett_lnpdqp_digitstype = -1;
-static int ett_lnpdqp_digits = -1;
+static int ett_lnpdqp;
+static int ett_lnpdqp_digitstype;
+static int ett_lnpdqp_digits;
#include "packet-lnpdqp-ett.c"
@@ -163,7 +164,7 @@ static const value_string lnpdqp_OriginatingStationType_vals[] = {
static void
dissect_lnpdqp_digits_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
- guint8 octet , no_of_digits;
+ uint8_t octet , no_of_digits;
int offset = 0;
char *digit_str;
@@ -179,7 +180,7 @@ dissect_lnpdqp_digits_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
proto_tree_add_item(subtree, hf_lnpdqp_nature_of_number, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Octet 3 Numbering Plan |Encoding Scheme| */
- octet = tvb_get_guint8(tvb,offset);
+ octet = tvb_get_uint8(tvb,offset);
proto_tree_add_item(subtree, hf_lnpdqp_np, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lnpdqp_digits_enc, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
@@ -187,17 +188,17 @@ dissect_lnpdqp_digits_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
switch ((octet&0xf)){
case 1:
/* BCD Coding */
- no_of_digits = tvb_get_guint8(tvb,offset);
+ no_of_digits = tvb_get_uint8(tvb,offset);
proto_tree_add_item(subtree, hf_lnpdqp_nr_digits, tvb, offset, 1, ENC_BIG_ENDIAN);
if(no_of_digits == 0)
return;
offset++;
- proto_tree_add_item_ret_display_string(subtree, hf_lnpdqp_bcd_digits, tvb, offset, -1, ENC_KEYPAD_BC_TBCD, pinfo->pool, &digit_str);
+ proto_tree_add_item_ret_display_string(subtree, hf_lnpdqp_bcd_digits, tvb, offset, -1, ENC_KEYPAD_BC_TBCD|ENC_LITTLE_ENDIAN, pinfo->pool, &digit_str);
proto_item_append_text(actx->created_item, " - %s", digit_str);
break;
case 2:
/* IA5 Coding */
- no_of_digits = tvb_get_guint8(tvb,offset);
+ no_of_digits = tvb_get_uint8(tvb,offset);
proto_tree_add_item(subtree, hf_lnpdqp_nr_digits, tvb, offset, 1, ENC_BIG_ENDIAN);
if(no_of_digits == 0)
return;
@@ -221,7 +222,7 @@ dissect_lnpdqp_cc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, vo
proto_tree *tree=NULL;
asn1_ctx_t asn1_ctx;
- asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
+ asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
col_set_str(pinfo->cinfo, COL_INFO, "ConnectionControl");
@@ -241,7 +242,7 @@ dissect_lnpdqp_pi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, vo
proto_tree *tree=NULL;
asn1_ctx_t asn1_ctx;
- asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
+ asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
col_set_str(pinfo->cinfo, COL_INFO, "ProvideInstruction");
@@ -314,7 +315,7 @@ void proto_register_lnpdqp(void) {
};
/* List of subtrees */
- static gint *ett[] = {
+ static int *ett[] = {
&ett_lnpdqp,
&ett_lnpdqp_digitstype,
&ett_lnpdqp_digits,