diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:33 +0000 |
commit | 9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9 (patch) | |
tree | 2784370cda9bbf2da9114d70f05399c0b229d28c /epan/dissectors/asn1/idmp | |
parent | Adding debian version 4.2.6-1. (diff) | |
download | wireshark-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/idmp')
-rw-r--r-- | epan/dissectors/asn1/idmp/packet-idmp-template.c | 75 |
1 files changed, 38 insertions, 37 deletions
diff --git a/epan/dissectors/asn1/idmp/packet-idmp-template.c b/epan/dissectors/asn1/idmp/packet-idmp-template.c index dbe11886..f78784d5 100644 --- a/epan/dissectors/asn1/idmp/packet-idmp-template.c +++ b/epan/dissectors/asn1/idmp/packet-idmp-template.c @@ -21,6 +21,7 @@ #include <epan/strutil.h> #include <wsutil/str_util.h> +#include <wsutil/array.h> #include "packet-tcp.h" @@ -37,40 +38,40 @@ void proto_register_idmp(void); void proto_reg_handoff_idm(void); void register_idmp_protocol_info(const char *oid, const ros_info_t *rinfo, int proto _U_, const char *name); -static gboolean idmp_desegment = TRUE; +static bool idmp_desegment = true; #define IDMP_TCP_PORT 1102 /* made up for now - not IANA registered */ -static gboolean idmp_reassemble = TRUE; -static dissector_handle_t idmp_handle = NULL; +static bool idmp_reassemble = true; +static dissector_handle_t idmp_handle; -static proto_tree *top_tree = NULL; -static const char *protocolID = NULL; -static const char *saved_protocolID = NULL; -static guint32 opcode = -1; +static proto_tree *top_tree; +static const char *protocolID; +static const char *saved_protocolID; +static uint32_t opcode = -1; /* Initialize the protocol and registered fields */ -int proto_idmp = -1; +int proto_idmp; -static int hf_idmp_version = -1; -static int hf_idmp_final = -1; -static int hf_idmp_length = -1; -static int hf_idmp_PDU = -1; +static int hf_idmp_version; +static int hf_idmp_final; +static int hf_idmp_length; +static int hf_idmp_PDU; static reassembly_table idmp_reassembly_table; -static int hf_idmp_fragments = -1; -static int hf_idmp_fragment = -1; -static int hf_idmp_fragment_overlap = -1; -static int hf_idmp_fragment_overlap_conflicts = -1; -static int hf_idmp_fragment_multiple_tails = -1; -static int hf_idmp_fragment_too_long_fragment = -1; -static int hf_idmp_fragment_error = -1; -static int hf_idmp_fragment_count = -1; -static int hf_idmp_reassembled_in = -1; -static int hf_idmp_reassembled_length = -1; -static int hf_idmp_segment_data = -1; - -static gint ett_idmp_fragment = -1; -static gint ett_idmp_fragments = -1; +static int hf_idmp_fragments; +static int hf_idmp_fragment; +static int hf_idmp_fragment_overlap; +static int hf_idmp_fragment_overlap_conflicts; +static int hf_idmp_fragment_multiple_tails; +static int hf_idmp_fragment_too_long_fragment; +static int hf_idmp_fragment_error; +static int hf_idmp_fragment_count; +static int hf_idmp_reassembled_in; +static int hf_idmp_reassembled_length; +static int hf_idmp_segment_data; + +static int ett_idmp_fragment; +static int ett_idmp_fragments; static const fragment_items idmp_frag_items = { /* Fragment subtrees */ @@ -117,7 +118,7 @@ static int call_idmp_oid_callback(tvbuff_t *tvb, int offset, packet_info *pinfo, #include "packet-idmp-hf.c" /* Initialize the subtree pointers */ -static gint ett_idmp = -1; +static int ett_idmp; #include "packet-idmp-ett.c" #include "packet-idmp-fn.c" @@ -126,7 +127,7 @@ void register_idmp_protocol_info(const char *oid, const ros_info_t *rinfo, int proto _U_, const char *name) { /* just register with ROS for now */ - register_ros_protocol_info(oid, rinfo, proto, name, FALSE); + register_ros_protocol_info(oid, rinfo, proto, name, false); } @@ -138,13 +139,13 @@ static int dissect_idmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr proto_tree *tree; asn1_ctx_t asn1_ctx; struct SESSION_DATA_STRUCTURE session; - gboolean idmp_final; - guint32 idmp_length; + bool idmp_final; + uint32_t idmp_length; fragment_head *fd_head; conversation_t *conv; - guint32 dst_ref = 0; + uint32_t dst_ref = 0; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); + asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo); conv = find_conversation_pinfo(pinfo, 0); if (conv) { @@ -164,7 +165,7 @@ static int dissect_idmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr proto_tree_add_item(tree, hf_idmp_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; proto_tree_add_item(tree, hf_idmp_final, tvb, offset, 1, ENC_BIG_ENDIAN); - idmp_final = tvb_get_guint8(tvb, offset); offset++; + idmp_final = tvb_get_uint8(tvb, offset); offset++; proto_tree_add_item(tree, hf_idmp_length, tvb, offset, 4, ENC_BIG_ENDIAN); idmp_length = tvb_get_ntohl(tvb, offset); offset += 4; @@ -210,16 +211,16 @@ static int dissect_idmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr /* not reassembling - just dissect */ if(idmp_final) { asn1_ctx.private_data = &session; - dissect_idmp_IDM_PDU(FALSE, tvb, offset, &asn1_ctx, tree, hf_idmp_PDU); + dissect_idmp_IDM_PDU(false, tvb, offset, &asn1_ctx, tree, hf_idmp_PDU); } return tvb_captured_length(tvb); } -static guint get_idmp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, +static unsigned get_idmp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_) { - guint32 len; + uint32_t len; len = tvb_get_ntohl(tvb, offset + 2); @@ -301,7 +302,7 @@ void proto_register_idmp(void) }; /* List of subtrees */ - static gint *ett[] = { + static int *ett[] = { &ett_idmp, &ett_idmp_fragment, &ett_idmp_fragments, |