diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:53 +0000 |
commit | a86c5f7cae7ec9a3398300555a0b644689d946a1 (patch) | |
tree | 39fe4b107c71174fd1e8a8ceb9a4d2aa14116248 /epan/dissectors/packet-acse.c | |
parent | Releasing progress-linux version 4.2.6-1~progress7.99u1. (diff) | |
download | wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.tar.xz wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.zip |
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-acse.c')
-rw-r--r-- | epan/dissectors/packet-acse.c | 379 |
1 files changed, 190 insertions, 189 deletions
diff --git a/epan/dissectors/packet-acse.c b/epan/dissectors/packet-acse.c index e2b5d61a..dad9489e 100644 --- a/epan/dissectors/packet-acse.c +++ b/epan/dissectors/packet-acse.c @@ -1,7 +1,7 @@ /* Do not modify this file. Changes will be overwritten. */ /* Generated automatically by the ASN.1 to Wireshark dissector compiler */ /* packet-acse.c */ -/* asn2wrs.py -b -C -L -p acse -c ./acse.cnf -s ./packet-acse-template -D . -O ../.. acse.asn */ +/* asn2wrs.py -b -C -q -L -p acse -c ./acse.cnf -s ./packet-acse-template -D . -O ../.. acse.asn */ /*XXX There is a bug in asn2wrs that it can not yet handle tagged assignments such @@ -31,6 +31,7 @@ #include <epan/expert.h> #include <epan/oids.h> #include <epan/asn1.h> +#include <wsutil/array.h> #include "packet-ber.h" #include "packet-acse.h" @@ -52,187 +53,187 @@ void proto_register_acse(void); void proto_reg_handoff_acse(void); /* Initialize the protocol and registered fields */ -int proto_acse = -1; -int proto_clacse = -1; - - - -static int hf_acse_direct_reference = -1; /* T_direct_reference */ -static int hf_acse_indirect_reference = -1; /* T_indirect_reference */ -static int hf_acse_data_value_descriptor = -1; /* ObjectDescriptor */ -static int hf_acse_encoding = -1; /* T_encoding */ -static int hf_acse_single_ASN1_type = -1; /* T_single_ASN1_type */ -static int hf_acse_octet_aligned = -1; /* T_octet_aligned */ -static int hf_acse_arbitrary = -1; /* BIT_STRING */ -static int hf_acse_aarq = -1; /* AARQ_apdu */ -static int hf_acse_aare = -1; /* AARE_apdu */ -static int hf_acse_rlrq = -1; /* RLRQ_apdu */ -static int hf_acse_rlre = -1; /* RLRE_apdu */ -static int hf_acse_abrt = -1; /* ABRT_apdu */ -static int hf_acse_adt = -1; /* A_DT_apdu */ -static int hf_acse_acrq = -1; /* ACRQ_apdu */ -static int hf_acse_acrp = -1; /* ACRP_apdu */ -static int hf_acse_aARQ_protocol_version = -1; /* T_AARQ_protocol_version */ -static int hf_acse_aARQ_aSO_context_name = -1; /* T_AARQ_aSO_context_name */ -static int hf_acse_called_AP_title = -1; /* AP_title */ -static int hf_acse_called_AE_qualifier = -1; /* AE_qualifier */ -static int hf_acse_called_AP_invocation_identifier = -1; /* AP_invocation_identifier */ -static int hf_acse_called_AE_invocation_identifier = -1; /* AE_invocation_identifier */ -static int hf_acse_calling_AP_title = -1; /* AP_title */ -static int hf_acse_calling_AE_qualifier = -1; /* AE_qualifier */ -static int hf_acse_calling_AP_invocation_identifier = -1; /* AP_invocation_identifier */ -static int hf_acse_calling_AE_invocation_identifier = -1; /* AE_invocation_identifier */ -static int hf_acse_sender_acse_requirements = -1; /* ACSE_requirements */ -static int hf_acse_mechanism_name = -1; /* Mechanism_name */ -static int hf_acse_calling_authentication_value = -1; /* Authentication_value */ -static int hf_acse_aSO_context_name_list = -1; /* ASO_context_name_list */ -static int hf_acse_implementation_information = -1; /* Implementation_data */ -static int hf_acse_p_context_definition_list = -1; /* Syntactic_context_list */ -static int hf_acse_called_asoi_tag = -1; /* ASOI_tag */ -static int hf_acse_calling_asoi_tag = -1; /* ASOI_tag */ -static int hf_acse_aARQ_user_information = -1; /* Association_data */ -static int hf_acse_aARE_protocol_version = -1; /* T_AARE_protocol_version */ -static int hf_acse_aARE_aSO_context_name = -1; /* T_AARE_aSO_context_name */ -static int hf_acse_result = -1; /* Associate_result */ -static int hf_acse_result_source_diagnostic = -1; /* Associate_source_diagnostic */ -static int hf_acse_responding_AP_title = -1; /* AP_title */ -static int hf_acse_responding_AE_qualifier = -1; /* AE_qualifier */ -static int hf_acse_responding_AP_invocation_identifier = -1; /* AP_invocation_identifier */ -static int hf_acse_responding_AE_invocation_identifier = -1; /* AE_invocation_identifier */ -static int hf_acse_responder_acse_requirements = -1; /* ACSE_requirements */ -static int hf_acse_responding_authentication_value = -1; /* Authentication_value */ -static int hf_acse_p_context_result_list = -1; /* P_context_result_list */ -static int hf_acse_aARE_user_information = -1; /* Association_data */ -static int hf_acse_rLRQ_reason = -1; /* Release_request_reason */ -static int hf_acse_aso_qualifier = -1; /* ASO_qualifier */ -static int hf_acse_asoi_identifier = -1; /* ASOI_identifier */ -static int hf_acse_rLRQ_user_information = -1; /* Association_data */ -static int hf_acse_rLRE_reason = -1; /* Release_response_reason */ -static int hf_acse_rLRE_user_information = -1; /* Association_data */ -static int hf_acse_abort_source = -1; /* ABRT_source */ -static int hf_acse_abort_diagnostic = -1; /* ABRT_diagnostic */ -static int hf_acse_aBRT_user_information = -1; /* Association_data */ -static int hf_acse_a_user_data = -1; /* User_Data */ -static int hf_acse_aCRQ_aSO_context_name = -1; /* T_ACRQ_aSO_context_name */ -static int hf_acse_user_information = -1; /* User_information */ -static int hf_acse_aSO_context_name = -1; /* T_ACRP_aSO_context_name */ -static int hf_acse_ap_title_form1 = -1; /* AP_title_form1 */ -static int hf_acse_ap_title_form2 = -1; /* AP_title_form2 */ -static int hf_acse_ap_title_form3 = -1; /* AP_title_form3 */ -static int hf_acse_aso_qualifier_form1 = -1; /* ASO_qualifier_form1 */ -static int hf_acse_aso_qualifier_form2 = -1; /* ASO_qualifier_form2 */ -static int hf_acse_aso_qualifier_form3 = -1; /* ASO_qualifier_form3 */ -static int hf_acse_aso_qualifier_form_any_octets = -1; /* ASO_qualifier_form_octets */ -static int hf_acse_ae_title_form1 = -1; /* AE_title_form1 */ -static int hf_acse_ae_title_form2 = -1; /* AE_title_form2 */ -static int hf_acse_ASOI_tag_item = -1; /* ASOI_tag_item */ -static int hf_acse_qualifier = -1; /* ASO_qualifier */ -static int hf_acse_identifier = -1; /* ASOI_identifier */ -static int hf_acse_ASO_context_name_list_item = -1; /* ASO_context_name */ -static int hf_acse_context_list = -1; /* Context_list */ -static int hf_acse_default_contact_list = -1; /* Default_Context_List */ -static int hf_acse_Context_list_item = -1; /* Context_list_item */ -static int hf_acse_pci = -1; /* Presentation_context_identifier */ -static int hf_acse_abstract_syntax = -1; /* Abstract_syntax_name */ -static int hf_acse_transfer_syntaxes = -1; /* SEQUENCE_OF_TransferSyntaxName */ -static int hf_acse_transfer_syntaxes_item = -1; /* TransferSyntaxName */ -static int hf_acse_Default_Context_List_item = -1; /* Default_Context_List_item */ -static int hf_acse_abstract_syntax_name = -1; /* Abstract_syntax_name */ -static int hf_acse_transfer_syntax_name = -1; /* TransferSyntaxName */ -static int hf_acse_P_context_result_list_item = -1; /* P_context_result_list_item */ -static int hf_acse_pcontext_result = -1; /* Result */ -static int hf_acse_concrete_syntax_name = -1; /* Concrete_syntax_name */ -static int hf_acse_provider_reason = -1; /* T_provider_reason */ -static int hf_acse_service_user = -1; /* T_service_user */ -static int hf_acse_service_provider = -1; /* T_service_provider */ -static int hf_acse_Association_data_item = -1; /* EXTERNALt */ -static int hf_acse_simply_encoded_data = -1; /* Simply_encoded_data */ -static int hf_acse_fully_encoded_data = -1; /* PDV_list */ -static int hf_acse_presentation_context_identifier = -1; /* Presentation_context_identifier */ -static int hf_acse_presentation_data_values = -1; /* T_presentation_data_values */ -static int hf_acse_simple_ASN1_type = -1; /* T_simple_ASN1_type */ -static int hf_acse_pDVList_octet_aligned = -1; /* OCTET_STRING */ -static int hf_acse_other_mechanism_name = -1; /* T_other_mechanism_name */ -static int hf_acse_other_mechanism_value = -1; /* T_other_mechanism_value */ -static int hf_acse_charstring = -1; /* GraphicString */ -static int hf_acse_bitstring = -1; /* BIT_STRING */ -static int hf_acse_external = -1; /* EXTERNALt */ -static int hf_acse_other = -1; /* Authentication_value_other */ +int proto_acse; +int proto_clacse; + + + +static int hf_acse_direct_reference; /* T_direct_reference */ +static int hf_acse_indirect_reference; /* T_indirect_reference */ +static int hf_acse_data_value_descriptor; /* ObjectDescriptor */ +static int hf_acse_encoding; /* T_encoding */ +static int hf_acse_single_ASN1_type; /* T_single_ASN1_type */ +static int hf_acse_octet_aligned; /* T_octet_aligned */ +static int hf_acse_arbitrary; /* BIT_STRING */ +static int hf_acse_aarq; /* AARQ_apdu */ +static int hf_acse_aare; /* AARE_apdu */ +static int hf_acse_rlrq; /* RLRQ_apdu */ +static int hf_acse_rlre; /* RLRE_apdu */ +static int hf_acse_abrt; /* ABRT_apdu */ +static int hf_acse_adt; /* A_DT_apdu */ +static int hf_acse_acrq; /* ACRQ_apdu */ +static int hf_acse_acrp; /* ACRP_apdu */ +static int hf_acse_aARQ_protocol_version; /* T_AARQ_protocol_version */ +static int hf_acse_aARQ_aSO_context_name; /* T_AARQ_aSO_context_name */ +static int hf_acse_called_AP_title; /* AP_title */ +static int hf_acse_called_AE_qualifier; /* AE_qualifier */ +static int hf_acse_called_AP_invocation_identifier; /* AP_invocation_identifier */ +static int hf_acse_called_AE_invocation_identifier; /* AE_invocation_identifier */ +static int hf_acse_calling_AP_title; /* AP_title */ +static int hf_acse_calling_AE_qualifier; /* AE_qualifier */ +static int hf_acse_calling_AP_invocation_identifier; /* AP_invocation_identifier */ +static int hf_acse_calling_AE_invocation_identifier; /* AE_invocation_identifier */ +static int hf_acse_sender_acse_requirements; /* ACSE_requirements */ +static int hf_acse_mechanism_name; /* Mechanism_name */ +static int hf_acse_calling_authentication_value; /* Authentication_value */ +static int hf_acse_aSO_context_name_list; /* ASO_context_name_list */ +static int hf_acse_implementation_information; /* Implementation_data */ +static int hf_acse_p_context_definition_list; /* Syntactic_context_list */ +static int hf_acse_called_asoi_tag; /* ASOI_tag */ +static int hf_acse_calling_asoi_tag; /* ASOI_tag */ +static int hf_acse_aARQ_user_information; /* Association_data */ +static int hf_acse_aARE_protocol_version; /* T_AARE_protocol_version */ +static int hf_acse_aARE_aSO_context_name; /* T_AARE_aSO_context_name */ +static int hf_acse_result; /* Associate_result */ +static int hf_acse_result_source_diagnostic; /* Associate_source_diagnostic */ +static int hf_acse_responding_AP_title; /* AP_title */ +static int hf_acse_responding_AE_qualifier; /* AE_qualifier */ +static int hf_acse_responding_AP_invocation_identifier; /* AP_invocation_identifier */ +static int hf_acse_responding_AE_invocation_identifier; /* AE_invocation_identifier */ +static int hf_acse_responder_acse_requirements; /* ACSE_requirements */ +static int hf_acse_responding_authentication_value; /* Authentication_value */ +static int hf_acse_p_context_result_list; /* P_context_result_list */ +static int hf_acse_aARE_user_information; /* Association_data */ +static int hf_acse_rLRQ_reason; /* Release_request_reason */ +static int hf_acse_aso_qualifier; /* ASO_qualifier */ +static int hf_acse_asoi_identifier; /* ASOI_identifier */ +static int hf_acse_rLRQ_user_information; /* Association_data */ +static int hf_acse_rLRE_reason; /* Release_response_reason */ +static int hf_acse_rLRE_user_information; /* Association_data */ +static int hf_acse_abort_source; /* ABRT_source */ +static int hf_acse_abort_diagnostic; /* ABRT_diagnostic */ +static int hf_acse_aBRT_user_information; /* Association_data */ +static int hf_acse_a_user_data; /* User_Data */ +static int hf_acse_aCRQ_aSO_context_name; /* T_ACRQ_aSO_context_name */ +static int hf_acse_user_information; /* User_information */ +static int hf_acse_aSO_context_name; /* T_ACRP_aSO_context_name */ +static int hf_acse_ap_title_form1; /* AP_title_form1 */ +static int hf_acse_ap_title_form2; /* AP_title_form2 */ +static int hf_acse_ap_title_form3; /* AP_title_form3 */ +static int hf_acse_aso_qualifier_form1; /* ASO_qualifier_form1 */ +static int hf_acse_aso_qualifier_form2; /* ASO_qualifier_form2 */ +static int hf_acse_aso_qualifier_form3; /* ASO_qualifier_form3 */ +static int hf_acse_aso_qualifier_form_any_octets; /* ASO_qualifier_form_octets */ +static int hf_acse_ae_title_form1; /* AE_title_form1 */ +static int hf_acse_ae_title_form2; /* AE_title_form2 */ +static int hf_acse_ASOI_tag_item; /* ASOI_tag_item */ +static int hf_acse_qualifier; /* ASO_qualifier */ +static int hf_acse_identifier; /* ASOI_identifier */ +static int hf_acse_ASO_context_name_list_item; /* ASO_context_name */ +static int hf_acse_context_list; /* Context_list */ +static int hf_acse_default_contact_list; /* Default_Context_List */ +static int hf_acse_Context_list_item; /* Context_list_item */ +static int hf_acse_pci; /* Presentation_context_identifier */ +static int hf_acse_abstract_syntax; /* Abstract_syntax_name */ +static int hf_acse_transfer_syntaxes; /* SEQUENCE_OF_TransferSyntaxName */ +static int hf_acse_transfer_syntaxes_item; /* TransferSyntaxName */ +static int hf_acse_Default_Context_List_item; /* Default_Context_List_item */ +static int hf_acse_abstract_syntax_name; /* Abstract_syntax_name */ +static int hf_acse_transfer_syntax_name; /* TransferSyntaxName */ +static int hf_acse_P_context_result_list_item; /* P_context_result_list_item */ +static int hf_acse_pcontext_result; /* Result */ +static int hf_acse_concrete_syntax_name; /* Concrete_syntax_name */ +static int hf_acse_provider_reason; /* T_provider_reason */ +static int hf_acse_service_user; /* T_service_user */ +static int hf_acse_service_provider; /* T_service_provider */ +static int hf_acse_Association_data_item; /* EXTERNALt */ +static int hf_acse_simply_encoded_data; /* Simply_encoded_data */ +static int hf_acse_fully_encoded_data; /* PDV_list */ +static int hf_acse_presentation_context_identifier; /* Presentation_context_identifier */ +static int hf_acse_presentation_data_values; /* T_presentation_data_values */ +static int hf_acse_simple_ASN1_type; /* T_simple_ASN1_type */ +static int hf_acse_pDVList_octet_aligned; /* OCTET_STRING */ +static int hf_acse_other_mechanism_name; /* T_other_mechanism_name */ +static int hf_acse_other_mechanism_value; /* T_other_mechanism_value */ +static int hf_acse_charstring; /* GraphicString */ +static int hf_acse_bitstring; /* BIT_STRING */ +static int hf_acse_external; /* EXTERNALt */ +static int hf_acse_other; /* Authentication_value_other */ /* named bits */ -static int hf_acse_T_AARQ_protocol_version_version1 = -1; -static int hf_acse_T_AARE_protocol_version_version1 = -1; -static int hf_acse_ACSE_requirements_authentication = -1; -static int hf_acse_ACSE_requirements_aSO_context_negotiation = -1; -static int hf_acse_ACSE_requirements_higher_level_association = -1; -static int hf_acse_ACSE_requirements_nested_association = -1; -static gint hf_acse_user_data = -1; +static int hf_acse_T_AARQ_protocol_version_version1; +static int hf_acse_T_AARE_protocol_version_version1; +static int hf_acse_ACSE_requirements_authentication; +static int hf_acse_ACSE_requirements_aSO_context_negotiation; +static int hf_acse_ACSE_requirements_higher_level_association; +static int hf_acse_ACSE_requirements_nested_association; +static int hf_acse_user_data; /* Initialize the subtree pointers */ -static gint ett_acse = -1; -static gint ett_acse_EXTERNALt_U = -1; -static gint ett_acse_T_encoding = -1; -static gint ett_acse_ACSE_apdu = -1; -static gint ett_acse_AARQ_apdu_U = -1; -static gint ett_acse_T_AARQ_protocol_version = -1; -static gint ett_acse_AARE_apdu_U = -1; -static gint ett_acse_T_AARE_protocol_version = -1; -static gint ett_acse_RLRQ_apdu_U = -1; -static gint ett_acse_RLRE_apdu_U = -1; -static gint ett_acse_ABRT_apdu_U = -1; -static gint ett_acse_A_DT_apdu_U = -1; -static gint ett_acse_ACRQ_apdu_U = -1; -static gint ett_acse_ACRP_apdu_U = -1; -static gint ett_acse_ACSE_requirements = -1; -static gint ett_acse_AP_title = -1; -static gint ett_acse_ASO_qualifier = -1; -static gint ett_acse_AE_title = -1; -static gint ett_acse_ASOI_tag = -1; -static gint ett_acse_ASOI_tag_item = -1; -static gint ett_acse_ASO_context_name_list = -1; -static gint ett_acse_Syntactic_context_list = -1; -static gint ett_acse_Context_list = -1; -static gint ett_acse_Context_list_item = -1; -static gint ett_acse_SEQUENCE_OF_TransferSyntaxName = -1; -static gint ett_acse_Default_Context_List = -1; -static gint ett_acse_Default_Context_List_item = -1; -static gint ett_acse_P_context_result_list = -1; -static gint ett_acse_P_context_result_list_item = -1; -static gint ett_acse_Associate_source_diagnostic = -1; -static gint ett_acse_Association_data = -1; -static gint ett_acse_User_Data = -1; -static gint ett_acse_PDV_list = -1; -static gint ett_acse_T_presentation_data_values = -1; -static gint ett_acse_Authentication_value_other = -1; -static gint ett_acse_Authentication_value = -1; - -static expert_field ei_acse_dissector_not_available = EI_INIT; -static expert_field ei_acse_malformed = EI_INIT; -static expert_field ei_acse_invalid_oid = EI_INIT; - -static dissector_handle_t acse_handle = NULL; +static int ett_acse; +static int ett_acse_EXTERNALt_U; +static int ett_acse_T_encoding; +static int ett_acse_ACSE_apdu; +static int ett_acse_AARQ_apdu_U; +static int ett_acse_T_AARQ_protocol_version; +static int ett_acse_AARE_apdu_U; +static int ett_acse_T_AARE_protocol_version; +static int ett_acse_RLRQ_apdu_U; +static int ett_acse_RLRE_apdu_U; +static int ett_acse_ABRT_apdu_U; +static int ett_acse_A_DT_apdu_U; +static int ett_acse_ACRQ_apdu_U; +static int ett_acse_ACRP_apdu_U; +static int ett_acse_ACSE_requirements; +static int ett_acse_AP_title; +static int ett_acse_ASO_qualifier; +static int ett_acse_AE_title; +static int ett_acse_ASOI_tag; +static int ett_acse_ASOI_tag_item; +static int ett_acse_ASO_context_name_list; +static int ett_acse_Syntactic_context_list; +static int ett_acse_Context_list; +static int ett_acse_Context_list_item; +static int ett_acse_SEQUENCE_OF_TransferSyntaxName; +static int ett_acse_Default_Context_List; +static int ett_acse_Default_Context_List_item; +static int ett_acse_P_context_result_list; +static int ett_acse_P_context_result_list_item; +static int ett_acse_Associate_source_diagnostic; +static int ett_acse_Association_data; +static int ett_acse_User_Data; +static int ett_acse_PDV_list; +static int ett_acse_T_presentation_data_values; +static int ett_acse_Authentication_value_other; +static int ett_acse_Authentication_value; + +static expert_field ei_acse_dissector_not_available; +static expert_field ei_acse_malformed; +static expert_field ei_acse_invalid_oid; + +static dissector_handle_t acse_handle; /* indirect_reference, used to pick up the signalling so we know what kind of data is transferred in SES_DATA_TRANSFER_PDUs */ -static guint32 indir_ref=0; +static uint32_t indir_ref=0; #if NOT_NEEDED /* to keep track of presentation context identifiers and protocol-oids */ typedef struct _acse_ctx_oid_t { /* XXX here we should keep track of ADDRESS/PORT as well */ - guint32 ctx_id; + uint32_t ctx_id; char *oid; } acse_ctx_oid_t; -static wmem_map_t *acse_ctx_oid_table = NULL; +static wmem_map_t *acse_ctx_oid_table; -static guint -acse_ctx_oid_hash(gconstpointer k) +static unsigned +acse_ctx_oid_hash(const void *k) { acse_ctx_oid_t *aco=(acse_ctx_oid_t *)k; return aco->ctx_id; } /* XXX this one should be made ADDRESS/PORT aware */ -static gint -acse_ctx_oid_equal(gconstpointer k1, gconstpointer k2) +static int +acse_ctx_oid_equal(const void *k1, const void *k2) { acse_ctx_oid_t *aco1=(acse_ctx_oid_t *)k1; acse_ctx_oid_t *aco2=(acse_ctx_oid_t *)k2; @@ -240,7 +241,7 @@ acse_ctx_oid_equal(gconstpointer k1, gconstpointer k2) } static void -register_ctx_id_and_oid(packet_info *pinfo _U_, guint32 idx, char *oid) +register_ctx_id_and_oid(packet_info *pinfo _U_, uint32_t idx, char *oid) { acse_ctx_oid_t *aco, *tmpaco; aco=wmem_new(wmem_file_scope(), acse_ctx_oid_t); @@ -255,7 +256,7 @@ register_ctx_id_and_oid(packet_info *pinfo _U_, guint32 idx, char *oid) wmem_map_insert(acse_ctx_oid_table, aco, aco); } static char * -find_oid_by_ctx_id(packet_info *pinfo _U_, guint32 idx) +find_oid_by_ctx_id(packet_info *pinfo _U_, uint32_t idx) { acse_ctx_oid_t aco, *tmpaco; aco.ctx_id=idx; @@ -274,7 +275,7 @@ static int dissect_acse_T_direct_reference(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &actx->external.direct_reference); - actx->external.direct_ref_present = (actx->external.direct_reference != NULL) ? TRUE : FALSE; + actx->external.direct_ref_present = (actx->external.direct_reference != NULL) ? true : false; return offset; @@ -287,14 +288,14 @@ dissect_acse_T_indirect_reference(bool implicit_tag _U_, tvbuff_t *tvb _U_, int char *oid; struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE*) actx->private_data; - offset = dissect_ber_integer(FALSE, actx, tree, tvb, offset, + offset = dissect_ber_integer(false, actx, tree, tvb, offset, hf_acse_indirect_reference, &indir_ref); /* look up the indirect reference */ if((oid = find_oid_by_pres_ctx_id(actx->pinfo, indir_ref)) != NULL) { actx->external.direct_reference = wmem_strdup(actx->pinfo->pool, oid); - actx->external.direct_ref_present = TRUE; + actx->external.direct_ref_present = true; } if(session) @@ -396,7 +397,7 @@ dissect_acse_EXTERNALt_U(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U int dissect_acse_EXTERNALt(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset, - hf_index, BER_CLASS_UNI, 8, TRUE, dissect_acse_EXTERNALt_U); + hf_index, BER_CLASS_UNI, 8, true, dissect_acse_EXTERNALt_U); return offset; } @@ -429,9 +430,9 @@ dissect_acse_ASO_context_name(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offs static int dissect_acse_T_AARQ_aSO_context_name(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_object_identifier_str(FALSE, actx, tree, tvb, offset, + offset = dissect_ber_object_identifier_str(false, actx, tree, tvb, offset, hf_index, &actx->external.direct_reference); - actx->external.direct_ref_present = (actx->external.direct_reference != NULL) ? TRUE : FALSE; + actx->external.direct_ref_present = (actx->external.direct_reference != NULL) ? true : false; return offset; @@ -629,7 +630,7 @@ static int dissect_acse_T_other_mechanism_name(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &actx->external.direct_reference); - actx->external.direct_ref_present = (actx->external.direct_reference != NULL) ? TRUE : FALSE; + actx->external.direct_ref_present = (actx->external.direct_reference != NULL) ? true : false; return offset; @@ -922,7 +923,7 @@ dissect_acse_AARQ_apdu(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, col_append_str(actx->pinfo->cinfo, COL_INFO, "A-Associate-Request"); offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset, - hf_index, BER_CLASS_APP, 0, TRUE, dissect_acse_AARQ_apdu_U); + hf_index, BER_CLASS_APP, 0, true, dissect_acse_AARQ_apdu_U); @@ -948,9 +949,9 @@ dissect_acse_T_AARE_protocol_version(bool implicit_tag _U_, tvbuff_t *tvb _U_, i static int dissect_acse_T_AARE_aSO_context_name(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_object_identifier_str(FALSE, actx, tree, tvb, offset, + offset = dissect_ber_object_identifier_str(false, actx, tree, tvb, offset, hf_index, &actx->external.direct_reference); - actx->external.direct_ref_present = (actx->external.direct_reference != NULL) ? TRUE : FALSE; + actx->external.direct_ref_present = (actx->external.direct_reference != NULL) ? true : false; return offset; @@ -1151,7 +1152,7 @@ dissect_acse_AARE_apdu(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, col_append_str(actx->pinfo->cinfo, COL_INFO, "A-Associate-Response"); offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset, - hf_index, BER_CLASS_APP, 1, TRUE, dissect_acse_AARE_apdu_U); + hf_index, BER_CLASS_APP, 1, true, dissect_acse_AARE_apdu_U); @@ -1206,7 +1207,7 @@ dissect_acse_RLRQ_apdu(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, col_append_str(actx->pinfo->cinfo, COL_INFO, "Release-Request"); offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset, - hf_index, BER_CLASS_APP, 2, TRUE, dissect_acse_RLRQ_apdu_U); + hf_index, BER_CLASS_APP, 2, true, dissect_acse_RLRQ_apdu_U); @@ -1261,7 +1262,7 @@ dissect_acse_RLRE_apdu(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, col_append_str(actx->pinfo->cinfo, COL_INFO, "Release-Response"); offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset, - hf_index, BER_CLASS_APP, 3, TRUE, dissect_acse_RLRE_apdu_U); + hf_index, BER_CLASS_APP, 3, true, dissect_acse_RLRE_apdu_U); @@ -1336,7 +1337,7 @@ dissect_acse_ABRT_apdu(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, col_append_str(actx->pinfo->cinfo, COL_INFO, "Abort"); offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset, - hf_index, BER_CLASS_APP, 4, TRUE, dissect_acse_ABRT_apdu_U); + hf_index, BER_CLASS_APP, 4, true, dissect_acse_ABRT_apdu_U); @@ -1467,7 +1468,7 @@ dissect_acse_A_DT_apdu_U(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U static int dissect_acse_A_DT_apdu(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset, - hf_index, BER_CLASS_APP, 5, TRUE, dissect_acse_A_DT_apdu_U); + hf_index, BER_CLASS_APP, 5, true, dissect_acse_A_DT_apdu_U); return offset; } @@ -1476,9 +1477,9 @@ dissect_acse_A_DT_apdu(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, static int dissect_acse_T_ACRQ_aSO_context_name(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_object_identifier_str(FALSE, actx, tree, tvb, offset, + offset = dissect_ber_object_identifier_str(false, actx, tree, tvb, offset, hf_index, &actx->external.direct_reference); - actx->external.direct_ref_present = (actx->external.direct_reference != NULL) ? TRUE : FALSE; + actx->external.direct_ref_present = (actx->external.direct_reference != NULL) ? true : false; return offset; @@ -1508,7 +1509,7 @@ dissect_acse_ACRQ_apdu_U(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U static int dissect_acse_ACRQ_apdu(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset, - hf_index, BER_CLASS_APP, 6, TRUE, dissect_acse_ACRQ_apdu_U); + hf_index, BER_CLASS_APP, 6, true, dissect_acse_ACRQ_apdu_U); return offset; } @@ -1517,9 +1518,9 @@ dissect_acse_ACRQ_apdu(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, static int dissect_acse_T_ACRP_aSO_context_name(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_ber_object_identifier_str(FALSE, actx, tree, tvb, offset, + offset = dissect_ber_object_identifier_str(false, actx, tree, tvb, offset, hf_index, &actx->external.direct_reference); - actx->external.direct_ref_present = (actx->external.direct_reference != NULL) ? TRUE : FALSE; + actx->external.direct_ref_present = (actx->external.direct_reference != NULL) ? true : false; return offset; @@ -1548,7 +1549,7 @@ dissect_acse_ACRP_apdu_U(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U static int dissect_acse_ACRP_apdu(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset, - hf_index, BER_CLASS_APP, 7, TRUE, dissect_acse_ACRP_apdu_U); + hf_index, BER_CLASS_APP, 7, true, dissect_acse_ACRP_apdu_U); return offset; } @@ -1629,7 +1630,7 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d char *oid; struct SESSION_DATA_STRUCTURE* session; 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); /* do we have spdu type from the session dissector? */ if (data == NULL) { @@ -1707,7 +1708,7 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d /* postpone it before dissector will have more information */ while (tvb_reported_length_remaining(tvb, offset) > 0) { int old_offset=offset; - offset = dissect_acse_ACSE_apdu(FALSE, tvb, offset, &asn1_ctx, tree, -1); + offset = dissect_acse_ACSE_apdu(false, tvb, offset, &asn1_ctx, tree, -1); if (offset == old_offset) { proto_tree_add_expert(tree, pinfo, &ei_acse_malformed, tvb, offset, -1); break; @@ -2157,7 +2158,7 @@ void proto_register_acse(void) { }; /* List of subtrees */ - static gint *ett[] = { + static int *ett[] = { &ett_acse, &ett_acse_EXTERNALt_U, &ett_acse_T_encoding, |