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/t124 | |
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/t124')
-rw-r--r-- | epan/dissectors/asn1/t124/packet-t124-template.c | 47 | ||||
-rw-r--r-- | epan/dissectors/asn1/t124/packet-t124-template.h | 4 | ||||
-rw-r--r-- | epan/dissectors/asn1/t124/t124.cnf | 29 |
3 files changed, 32 insertions, 48 deletions
diff --git a/epan/dissectors/asn1/t124/packet-t124-template.c b/epan/dissectors/asn1/t124/packet-t124-template.c index fa29e3a8..95b9f628 100644 --- a/epan/dissectors/asn1/t124/packet-t124-template.c +++ b/epan/dissectors/asn1/t124/packet-t124-template.c @@ -15,6 +15,7 @@ #include <epan/packet.h> #include <epan/exceptions.h> #include <epan/conversation.h> +#include <wsutil/array.h> #include <epan/asn1.h> #include "packet-per.h" @@ -34,23 +35,23 @@ void proto_register_t124(void); void proto_reg_handoff_t124(void); /* Initialize the protocol and registered fields */ -static int proto_t124 = -1; -static proto_tree *top_tree = NULL; +static int proto_t124; +static proto_tree *top_tree; #include "packet-t124-hf.c" /* Initialize the subtree pointers */ -static int ett_t124 = -1; -static int ett_t124_connectGCCPDU = -1; +static int ett_t124; +static int ett_t124_connectGCCPDU; -static int hf_t124_ConnectData = -1; -static int hf_t124_connectGCCPDU = -1; -static int hf_t124_DomainMCSPDU_PDU = -1; +static int hf_t124_ConnectData; +static int hf_t124_connectGCCPDU; +static int hf_t124_DomainMCSPDU_PDU; -static guint32 channelId = -1; +static uint32_t channelId = -1; -static dissector_table_t t124_ns_dissector_table=NULL; -static dissector_table_t t124_sd_dissector_table=NULL; +static dissector_table_t t124_ns_dissector_table; +static dissector_table_t t124_sd_dissector_table; #include "packet-t124-ett.c" @@ -70,7 +71,7 @@ register_t124_ns_dissector(const char *nsKey, dissector_t dissector, int proto) dissector_add_string("t124.ns", nsKey, dissector_handle); } -void register_t124_sd_dissector(packet_info *pinfo _U_, guint32 channelId_param, dissector_t dissector, int proto) +void register_t124_sd_dissector(packet_info *pinfo _U_, uint32_t channelId_param, dissector_t dissector, int proto) { /* XXX: we should keep the sub-dissectors list per conversation as the same channels may be used. @@ -84,7 +85,7 @@ void register_t124_sd_dissector(packet_info *pinfo _U_, guint32 channelId_param, } -guint32 t124_get_last_channelId(void) +uint32_t t124_get_last_channelId(void) { return channelId; } @@ -97,7 +98,7 @@ void t124_set_top_tree(proto_tree *tree) int dissect_DomainMCSPDU_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { int offset = 0; asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); + asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, true, pinfo); offset = dissect_t124_DomainMCSPDU(tvb, offset, &asn1_ctx, tree, hf_t124_DomainMCSPDU_PDU); offset += 7; offset >>= 3; @@ -119,23 +120,23 @@ dissect_t124(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *d item = proto_tree_add_item(parent_tree, proto_t124, tvb, 0, tvb_captured_length(tvb), ENC_NA); tree = proto_item_add_subtree(item, ett_t124); - asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); + asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, true, pinfo); dissect_t124_ConnectData(tvb, 0, &asn1_ctx, tree, hf_t124_ConnectData); return tvb_captured_length(tvb); } -static gboolean -dissect_t124_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U_) +static bool +dissect_t124_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data) { asn1_ctx_t asn1_ctx; - volatile gboolean failed = FALSE; + volatile bool failed = false; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); + asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, true, pinfo); /* * We must catch all the "ran past the end of the packet" exceptions - * here and, if we catch one, just return FALSE. It's too painful + * here and, if we catch one, just return false. It's too painful * to have a version of dissect_per_sequence() that checks all * references to the tvbuff before making them and returning "no" * if they would fail. @@ -145,17 +146,17 @@ dissect_t124_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, vo TRY { (void) dissect_per_sequence(tvb, 0, &asn1_ctx, NULL, hf_t124_connectGCCPDU, -1, t124Heur_sequence); } CATCH_BOUNDS_ERRORS { - failed = TRUE; + failed = true; } ENDTRY; if (!failed && ((asn1_ctx.external.direct_reference != NULL) && (strcmp(asn1_ctx.external.direct_reference, "0.0.20.124.0.1") == 0))) { dissect_t124(tvb, pinfo, parent_tree, data); - return TRUE; + return true; } - return FALSE; + return false; } /*--- proto_register_t124 -------------------------------------------*/ @@ -179,7 +180,7 @@ void proto_register_t124(void) { }; /* List of subtrees */ - static gint *ett[] = { + static int *ett[] = { &ett_t124, &ett_t124_connectGCCPDU, #include "packet-t124-ettarr.c" diff --git a/epan/dissectors/asn1/t124/packet-t124-template.h b/epan/dissectors/asn1/t124/packet-t124-template.h index 9869ca1d..df0bddbd 100644 --- a/epan/dissectors/asn1/t124/packet-t124-template.h +++ b/epan/dissectors/asn1/t124/packet-t124-template.h @@ -16,11 +16,11 @@ #include "packet-per.h" extern int dissect_DomainMCSPDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_); -extern guint32 t124_get_last_channelId(void); +extern uint32_t t124_get_last_channelId(void); extern void t124_set_top_tree(proto_tree *tree); extern void register_t124_ns_dissector(const char *nsKey, dissector_t dissector, int proto); -extern void register_t124_sd_dissector(packet_info *pinfo, guint32 channelId, dissector_t dissector, int proto); +extern void register_t124_sd_dissector(packet_info *pinfo, uint32_t channelId, dissector_t dissector, int proto); #include "packet-t124-exp.h" diff --git a/epan/dissectors/asn1/t124/t124.cnf b/epan/dissectors/asn1/t124/t124.cnf index f3281d6b..0ffa391b 100644 --- a/epan/dissectors/asn1/t124/t124.cnf +++ b/epan/dissectors/asn1/t124/t124.cnf @@ -97,27 +97,9 @@ TransportAddress #.TF_RENAME -ISDNConnection/circuitTypes ISDNCircuitTypes -ISDNConnection/circuitTypes/_item ISDNCircuitTypes_item -ISDNConnection/highLayerCompatibility ISDNHighLayerCompatibility -PSDNConnection/networkAddress PSDNNetworkAddress -ConferenceTerminateRequest/reason TerminateRequestReason -ConferenceTerminateIndication/reason TerminateIndicationReason -ConferenceEjectUserRequest/reason EjectUserRequestReason -RosterUpdateIndication/nodeInformation/nodeRecordList/refresh NodeRefresh -RosterUpdateIndication/applicationInformation/_item/applicationRecordList/refresh ApplicationRefresh -RosterUpdateIndication/applicationInformation/_item/applicationRecordList/update ApplicationUpdate -RosterUpdateIndication/applicationInformation/_item/applicationRecordList/update/_item ApplicationUpdateItem ConferenceQueryResponse/result QueryResponseResult ConferenceJoinResponse/result JoinResponseResult ConferenceInviteResponse/result InviteResponseResult -ConferenceAddResponse/result AddResponseResult -ConferenceLockResponse/result LockResponseResult -ConferenceUnlockResponse/result UnlockResponseResult -ConferenceTerminateResponse/result TerminateResponseResult -ConferenceEjectUserResponse/result EjectUserResponseResult -ConferenceTransferResponse/result TransferResponseResult -RegistryAllocateHandleResponse/result AllocateHandleResponseResult #.FN_BODY ConnectData/connectPDU VAL_PTR = &next_tvb tvbuff_t *next_tvb = NULL; @@ -148,7 +130,7 @@ RegistryAllocateHandleResponse/result AllocateHandleResponseResult #.FN_BODY UserData/_item/value VAL_PTR = &next_tvb tvbuff_t *next_tvb = NULL; tvbuff_t *t124NSIdentifier = (tvbuff_t*)actx->private_data; - guint8 *ns = NULL; + uint8_t *ns = NULL; %(DEFAULT_BODY)s @@ -156,7 +138,7 @@ RegistryAllocateHandleResponse/result AllocateHandleResponseResult ns = tvb_get_string_enc(actx->pinfo->pool, t124NSIdentifier, 0, tvb_reported_length(t124NSIdentifier), ENC_ASCII|ENC_NA); if(ns != NULL) { - dissector_try_string_new(t124_ns_dissector_table, ns, next_tvb, actx->pinfo, top_tree, FALSE, NULL); + dissector_try_string_new(t124_ns_dissector_table, ns, next_tvb, actx->pinfo, top_tree, false, NULL); } } @@ -169,7 +151,7 @@ RegistryAllocateHandleResponse/result AllocateHandleResponseResult if(next_tvb) { - dissector_try_uint_new(t124_sd_dissector_table, channelId, next_tvb, actx->pinfo, top_tree, FALSE, NULL); + dissector_try_uint_new(t124_sd_dissector_table, channelId, next_tvb, actx->pinfo, top_tree, false, NULL); } @@ -190,7 +172,7 @@ RegistryAllocateHandleResponse/result AllocateHandleResponseResult #.FN_BODY DomainMCSPDU VAL_PTR = &domainmcs_value - gint domainmcs_value; + int domainmcs_value; %(DEFAULT_BODY)s switch(domainmcs_value) { @@ -201,7 +183,8 @@ RegistryAllocateHandleResponse/result AllocateHandleResponseResult /* Do nothing */ break; default: - col_prepend_fstr(%(ACTX)s->pinfo->cinfo, COL_INFO, "%%s ", val_to_str(domainmcs_value, t124_DomainMCSPDU_vals, "Unknown")); + col_prepend_fstr(%(ACTX)s->pinfo->cinfo, COL_INFO, "%%s ", + val_to_str_const(domainmcs_value, t124_DomainMCSPDU_vals, "Unknown")); break; } |