diff options
-rw-r--r-- | asn1/tcap/Makefile.common | 8 | ||||
-rw-r--r-- | asn1/tcap/tcap.asn | 33 | ||||
-rw-r--r-- | asn1/tcap/tcap.cnf | 34 | ||||
-rw-r--r-- | epan/dissectors/packet-tcap.c | 388 | ||||
-rw-r--r-- | epan/dissectors/packet-tcap.h | 2 |
5 files changed, 282 insertions, 183 deletions
diff --git a/asn1/tcap/Makefile.common b/asn1/tcap/Makefile.common index 6d6f8fea6f..b64d89b033 100644 --- a/asn1/tcap/Makefile.common +++ b/asn1/tcap/Makefile.common @@ -29,7 +29,8 @@ NEED_PACKET_PROTO_H = 1 EXT_ASN_FILE_LIST = -ASN_FILE_LIST = $(PROTOCOL_NAME).asn +ASN_FILE_LIST = $(PROTOCOL_NAME).asn\ + UnidialoguePDUs.asn # The packet-$(PROTOCOL_NAME)-template.h and $(PROTOCOL_NAME).asn # files do not exist for all protocols: Please add/remove as required. @@ -42,11 +43,10 @@ EXTRA_DIST = \ SRC_FILES = \ $(EXTRA_DIST) \ - $(EXT_ASN_FILE_LIST) + $(EXT_ASN_FILE_LIST) \ DialoguePDUs.asn \ TCAPMessages.asn \ - TC-Notation-Extensions.asn \ - UnidialoguePDUs.asn + TC-Notation-Extensions.asn A2W_FLAGS= -b diff --git a/asn1/tcap/tcap.asn b/asn1/tcap/tcap.asn index 0ebd11030e..bcbbdfc415 100644 --- a/asn1/tcap/tcap.asn +++ b/asn1/tcap/tcap.asn @@ -43,14 +43,14 @@ Applicationcontext ::= OBJECT IDENTIFIER AARQ-apdu ::= [APPLICATION 0] IMPLICIT SEQUENCE { protocol-versionrq [0] IMPLICIT BIT STRING { version1 (0) } DEFAULT { version1 }, - application-context-name [1] Applicationcontext, - user-information [30] IMPLICIT User-information - OPTIONAL } + application-context-name [1] OBJECT IDENTIFIER, + user-information [30] IMPLICIT SEQUENCE OF EXTERNAL OPTIONAL +} AARE-apdu ::= [APPLICATION 1] IMPLICIT SEQUENCE { protocol-versionre [0] IMPLICIT BIT STRING { version1 (0) } DEFAULT { version1 }, - application-context-name [1] Applicationcontext, + application-context-name [1] OBJECT IDENTIFIER, result [2] Associate-result, result-source-diagnostic [3] Associate-source-diagnostic, user-information [30] IMPLICIT User-information @@ -111,31 +111,6 @@ Release-request-reason ::= INTEGER { normal (0), Release-response-reason ::= INTEGER { normal (0), not-finished (1), user-defined (30) } ---END - - ---UnidialoguePDUs { ccitt recommendation q 773 modules (2) unidialoguePDUs (3) version1 (1) } - ---DEFINITIONS ::= - ---BEGIN - ---EXPORTS uniDialogue-as-id, UniDialoguePDU; - --- Abstract syntax name for unstructured dialogue APDUs - -uniDialogue-as-id OBJECT IDENTIFIER ::= { ccitt recommendation q 773 as (1) - unidialogue-as (2) version1 (1) } - -UniDialoguePDU ::= CHOICE { unidialoguePDU AUDT-apdu } - -AUDT-apdu ::= [APPLICATION 0] IMPLICIT SEQUENCE { - protocol-version3 [0] IMPLICIT BIT STRING {version1 (0) } - DEFAULT { version1 }, - application-context-name [1] Applicationcontext, - user-information [30] IMPLICIT User-information - OPTIONAL } - END diff --git a/asn1/tcap/tcap.cnf b/asn1/tcap/tcap.cnf index c7cbf6722e..f911f6ee70 100644 --- a/asn1/tcap/tcap.cnf +++ b/asn1/tcap/tcap.cnf @@ -5,6 +5,8 @@ #.OMIT_ASSIGNMENT RLRQ-apdu RLRE-apdu +Release-request-reason +Release-response-reason #.END #.MODULE_IMPORT @@ -23,8 +25,26 @@ UniDialoguePDU B "0.0.17.773.1.2.1" "uniDialogue-as-id" #.NO_EMIT #.TYPE_RENAME +AARE-apdu/_untag/application-context-name AARE_application_context_name +AARQ-apdu/_untag/application-context-name AARQ_application_context_name +AUDT-apdu/_untag/application-context-name AUDT_application_context_name + +AARQ-apdu/_untag/user-information AARQ_user_information +AARE-apdu/_untag/user-information AARE_user_information +ABRT-apdu/_untag/user-information ABRT_user_information +AUDT-apdu/_untag/user-information AUDT_user_information #.FIELD_RENAME +AARQ-apdu/_untag/application-context-name aarq_application_context_name +AARE-apdu/_untag/application-context-name aare_application_context_name +AUDT-apdu/_untag/application-context-name audt_application_context_name + +AARQ-apdu/_untag/user-information aarq_user_information +AARE-apdu/_untag/user-information aare_user_information +AUDT-apdu/_untag/user-information audt_user_information +ABRT-apdu/_untag/user-information abrt_user_information +#.END + #---------------------------------------------------------------------------------------- #.FN_BODY DialogueOC @@ -75,11 +95,21 @@ if (!next_tvb) /* return comp_offset+len; or return offset (will be automatically added */ #---------------------------------------------------------------------------------------- -#.FN_BODY Applicationcontext FN_VARIANT = _str VAL_PTR = &cur_oid +#.FN_BODY AUDT-apdu/_untag/application-context-name FN_VARIANT = _str VAL_PTR = &cur_oid %(DEFAULT_BODY)s tcap_private.oid= (void*) cur_oid; tcap_private.acv=TRUE; - +#---------------------------------------------------------------------------------------- +#.FN_BODY AARQ-apdu/_untag/application-context-name FN_VARIANT = _str VAL_PTR = &cur_oid +%(DEFAULT_BODY)s + tcap_private.oid= (void*) cur_oid; + tcap_private.acv=TRUE; +#---------------------------------------------------------------------------------------- +#.FN_BODY AARE-apdu/_untag/application-context-name FN_VARIANT = _str VAL_PTR = &cur_oid +%(DEFAULT_BODY)s + tcap_private.oid= (void*) cur_oid; + tcap_private.acv=TRUE; +#---------------------------------------------------------------------------------------- # Do not overwrite the ApplicationContext with the UserInfoOID ! # #---------------------------------------------------------------------------------------- diff --git a/epan/dissectors/packet-tcap.c b/epan/dissectors/packet-tcap.c index a822fde870..af75159ff0 100644 --- a/epan/dissectors/packet-tcap.c +++ b/epan/dissectors/packet-tcap.c @@ -1,7 +1,7 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ /* packet-tcap.c */ -/* ../../tools/asn2wrs.py -b -p tcap -c tcap.cnf -s packet-tcap-template tcap.asn */ +/* ../../tools/asn2wrs.py -b -p tcap -c tcap.cnf -s packet-tcap-template tcap.asn UnidialoguePDUs.asn */ /* Input file: packet-tcap-template.c */ @@ -82,16 +82,18 @@ static int hf_tcap_dialog = -1; /* Dialog1 */ static int hf_tcap_useroid = -1; /* UserInfoOID */ static int hf_tcap_externuserinfo = -1; /* ExternUserInfo */ static int hf_tcap_protocol_versionrq = -1; /* T_protocol_versionrq */ -static int hf_tcap_application_context_name = -1; /* Applicationcontext */ -static int hf_tcap_user_information = -1; /* User_information */ +static int hf_tcap_aarq_application_context_name = -1; /* AARQ_application_context_name */ +static int hf_tcap_aarq_user_information = -1; /* AARQ_user_information */ +static int hf_tcap_aarq_user_information_item = -1; /* EXTERNAL */ static int hf_tcap_protocol_versionre = -1; /* T_protocol_versionre */ +static int hf_tcap_aare_application_context_name = -1; /* AARE_application_context_name */ static int hf_tcap_result = -1; /* Associate_result */ static int hf_tcap_result_source_diagnostic = -1; /* Associate_source_diagnostic */ +static int hf_tcap_aare_user_information = -1; /* AARE_user_information */ static int hf_tcap_abort_source = -1; /* ABRT_source */ +static int hf_tcap_abrt_user_information = -1; /* ABRT_user_information */ static int hf_tcap_dialogue_service_user = -1; /* T_dialogue_service_user */ static int hf_tcap_dialogue_service_provider = -1; /* T_dialogue_service_provider */ -static int hf_tcap_unidialoguePDU = -1; /* AUDT_apdu */ -static int hf_tcap_protocol_version3 = -1; /* T_protocol_version3 */ static int hf_tcap_unidirectional = -1; /* Unidirectional */ static int hf_tcap_begin = -1; /* Begin */ static int hf_tcap_end = -1; /* End */ @@ -191,10 +193,15 @@ static int hf_tcap_national = -1; /* INTEGER_M32768_32767 */ static int hf_tcap_private = -1; /* INTEGER */ static int hf_tcap_nationaler = -1; /* INTEGER_M32768_32767 */ static int hf_tcap_privateer = -1; /* INTEGER */ +static int hf_tcap_unidialoguePDU = -1; /* AUDT_apdu */ +static int hf_tcap_protocol_version = -1; /* T_protocol_version */ +static int hf_tcap_audt_application_context_name = -1; /* AUDT_application_context_name */ +static int hf_tcap_audt_user_information = -1; /* AUDT_user_information */ +static int hf_tcap_audt_user_information_item = -1; /* EXTERNAL */ /* named bits */ static int hf_tcap_T_protocol_versionrq_version1 = -1; static int hf_tcap_T_protocol_versionre_version1 = -1; -static int hf_tcap_T_protocol_version3_version1 = -1; +static int hf_tcap_T_protocol_version_version1 = -1; /*--- End of included file: packet-tcap-hf.c ---*/ #line 65 "packet-tcap-template.c" @@ -221,13 +228,11 @@ static gint ett_tcap_ExternalPDU_U = -1; static gint ett_tcap_UserInformation_U = -1; static gint ett_tcap_AARQ_apdu_U = -1; static gint ett_tcap_T_protocol_versionrq = -1; +static gint ett_tcap_AARQ_user_information = -1; static gint ett_tcap_AARE_apdu_U = -1; static gint ett_tcap_T_protocol_versionre = -1; static gint ett_tcap_ABRT_apdu_U = -1; static gint ett_tcap_Associate_source_diagnostic = -1; -static gint ett_tcap_UniDialoguePDU = -1; -static gint ett_tcap_AUDT_apdu_U = -1; -static gint ett_tcap_T_protocol_version3 = -1; static gint ett_tcap_TCMessage = -1; static gint ett_tcap_Unidirectional = -1; static gint ett_tcap_Begin = -1; @@ -264,6 +269,10 @@ static gint ett_tcap_ReturnErrorPDU = -1; static gint ett_tcap_RejectPDU = -1; static gint ett_tcap_OperationCode = -1; static gint ett_tcap_ErrorCode = -1; +static gint ett_tcap_UniDialoguePDU = -1; +static gint ett_tcap_AUDT_apdu_U = -1; +static gint ett_tcap_T_protocol_version = -1; +static gint ett_tcap_AUDT_user_information = -1; /*--- End of included file: packet-tcap-ett.c ---*/ #line 81 "packet-tcap-template.c" @@ -353,27 +362,35 @@ dissect_tcap_T_protocol_versionrq(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, static int -dissect_tcap_Applicationcontext(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 79 "tcap.cnf" +dissect_tcap_AARQ_application_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 104 "tcap.cnf" offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &cur_oid); tcap_private.oid= (void*) cur_oid; tcap_private.acv=TRUE; - return offset; } static int -dissect_tcap_User_information(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 51 "tcap.cnf" +dissect_tcap_EXTERNAL(gboolean 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_external_type(implicit_tag, tree, tvb, offset, actx, hf_index, NULL); + + return offset; +} -return dissect_tcap_UserInformation(FALSE, tvb, offset, actx, tree, -1); +static const ber_sequence_t AARQ_user_information_sequence_of[1] = { + { &hf_tcap_aarq_user_information_item, BER_CLASS_UNI, BER_UNI_TAG_EXTERNAL, BER_FLAGS_NOOWNTAG, dissect_tcap_EXTERNAL }, +}; +static int +dissect_tcap_AARQ_user_information(gboolean 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_sequence_of(implicit_tag, actx, tree, tvb, offset, + AARQ_user_information_sequence_of, hf_index, ett_tcap_AARQ_user_information); return offset; } @@ -381,8 +398,8 @@ return dissect_tcap_UserInformation(FALSE, tvb, offset, actx, tree, -1); static const ber_sequence_t AARQ_apdu_U_sequence[] = { { &hf_tcap_protocol_versionrq, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_T_protocol_versionrq }, - { &hf_tcap_application_context_name, BER_CLASS_CON, 1, 0, dissect_tcap_Applicationcontext }, - { &hf_tcap_user_information, BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_User_information }, + { &hf_tcap_aarq_application_context_name, BER_CLASS_CON, 1, 0, dissect_tcap_AARQ_application_context_name }, + { &hf_tcap_aarq_user_information, BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_AARQ_user_information }, { NULL, 0, 0, 0, NULL } }; @@ -420,6 +437,20 @@ dissect_tcap_T_protocol_versionre(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, } + +static int +dissect_tcap_AARE_application_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 109 "tcap.cnf" + offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &cur_oid); + + tcap_private.oid= (void*) cur_oid; + tcap_private.acv=TRUE; + + + return offset; +} + + static const value_string tcap_Associate_result_vals[] = { { 0, "accepted" }, { 1, "reject-permanent" }, @@ -492,12 +523,34 @@ dissect_tcap_Associate_source_diagnostic(gboolean implicit_tag _U_, tvbuff_t *tv } + +static int +dissect_tcap_User_information(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 71 "tcap.cnf" + +return dissect_tcap_UserInformation(FALSE, tvb, offset, actx, tree, -1); + + + + return offset; +} + + + +static int +dissect_tcap_AARE_user_information(gboolean 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_tcap_User_information(implicit_tag, tvb, offset, actx, tree, hf_index); + + return offset; +} + + static const ber_sequence_t AARE_apdu_U_sequence[] = { { &hf_tcap_protocol_versionre, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_T_protocol_versionre }, - { &hf_tcap_application_context_name, BER_CLASS_CON, 1, 0, dissect_tcap_Applicationcontext }, + { &hf_tcap_aare_application_context_name, BER_CLASS_CON, 1, 0, dissect_tcap_AARE_application_context_name }, { &hf_tcap_result , BER_CLASS_CON, 2, 0, dissect_tcap_Associate_result }, { &hf_tcap_result_source_diagnostic, BER_CLASS_CON, 3, BER_FLAGS_NOTCHKTAG, dissect_tcap_Associate_source_diagnostic }, - { &hf_tcap_user_information, BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_User_information }, + { &hf_tcap_aare_user_information, BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_AARE_user_information }, { NULL, 0, 0, 0, NULL } }; @@ -536,9 +589,18 @@ dissect_tcap_ABRT_source(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse } + +static int +dissect_tcap_ABRT_user_information(gboolean 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_tcap_User_information(implicit_tag, tvb, offset, actx, tree, hf_index); + + return offset; +} + + static const ber_sequence_t ABRT_apdu_U_sequence[] = { { &hf_tcap_abort_source , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_tcap_ABRT_source }, - { &hf_tcap_user_information, BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_User_information }, + { &hf_tcap_abrt_user_information, BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_ABRT_user_information }, { NULL, 0, 0, 0, NULL } }; @@ -597,7 +659,7 @@ dissect_tcap_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int static int dissect_tcap_Dialog1(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 41 "tcap.cnf" +#line 61 "tcap.cnf" return dissect_tcap_DialoguePDU(TRUE, tvb, offset, actx, tree, -1); @@ -625,7 +687,7 @@ dissect_tcap_ExternalPDU_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off static int dissect_tcap_ExternalPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 36 "tcap.cnf" +#line 56 "tcap.cnf" offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset, hf_index, BER_CLASS_UNI, 8, TRUE, dissect_tcap_ExternalPDU_U); @@ -640,7 +702,7 @@ dissect_tcap_ExternalPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse static int dissect_tcap_UserInfoOID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 87 "tcap.cnf" +#line 117 "tcap.cnf" offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &tcapext_oid); @@ -653,7 +715,7 @@ dissect_tcap_UserInfoOID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse static int dissect_tcap_ExternUserInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 91 "tcap.cnf" +#line 121 "tcap.cnf" tvbuff_t *next_tvb; gint8 class; gboolean pc; @@ -708,96 +770,10 @@ dissect_tcap_UserInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o } -static const value_string tcap_Release_request_reason_vals[] = { - { 0, "normal" }, - { 1, "urgent" }, - { 30, "user-defined" }, - { 0, NULL } -}; - static int -dissect_tcap_Release_request_reason(gboolean 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_integer(implicit_tag, actx, tree, tvb, offset, hf_index, - NULL); - - return offset; -} - - -static const value_string tcap_Release_response_reason_vals[] = { - { 0, "normal" }, - { 1, "not-finished" }, - { 30, "user-defined" }, - { 0, NULL } -}; - - -static int -dissect_tcap_Release_response_reason(gboolean 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_integer(implicit_tag, actx, tree, tvb, offset, hf_index, - NULL); - - return offset; -} - - -static const asn_namedbit T_protocol_version3_bits[] = { - { 0, &hf_tcap_T_protocol_version3_version1, -1, -1, "version1", NULL }, - { 0, NULL, 0, 0, NULL, NULL } -}; - -static int -dissect_tcap_T_protocol_version3(gboolean 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_bitstring(implicit_tag, actx, tree, tvb, offset, - T_protocol_version3_bits, hf_index, ett_tcap_T_protocol_version3, - NULL); - - return offset; -} - - -static const ber_sequence_t AUDT_apdu_U_sequence[] = { - { &hf_tcap_protocol_version3, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_T_protocol_version3 }, - { &hf_tcap_application_context_name, BER_CLASS_CON, 1, 0, dissect_tcap_Applicationcontext }, - { &hf_tcap_user_information, BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_User_information }, - { NULL, 0, 0, 0, NULL } -}; - -static int -dissect_tcap_AUDT_apdu_U(gboolean 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_sequence(implicit_tag, actx, tree, tvb, offset, - AUDT_apdu_U_sequence, hf_index, ett_tcap_AUDT_apdu_U); - - return offset; -} - - - -static int -dissect_tcap_AUDT_apdu(gboolean 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, 0, TRUE, dissect_tcap_AUDT_apdu_U); - - return offset; -} - - -const value_string tcap_UniDialoguePDU_vals[] = { - { 0, "unidialoguePDU" }, - { 0, NULL } -}; - -static const ber_choice_t UniDialoguePDU_choice[] = { - { 0, &hf_tcap_unidialoguePDU , BER_CLASS_APP, 0, BER_FLAGS_NOOWNTAG, dissect_tcap_AUDT_apdu }, - { 0, NULL, 0, 0, 0, NULL } -}; - -int -dissect_tcap_UniDialoguePDU(gboolean 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_choice(actx, tree, tvb, offset, - UniDialoguePDU_choice, hf_index, ett_tcap_UniDialoguePDU, - NULL); +dissect_tcap_Applicationcontext(gboolean 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(implicit_tag, actx, tree, tvb, offset, hf_index, NULL); return offset; } @@ -806,7 +782,7 @@ dissect_tcap_UniDialoguePDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of static int dissect_tcap_DialogueOC(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 31 "tcap.cnf" +#line 51 "tcap.cnf" return dissect_tcap_ExternalPDU(FALSE /*implicit_tag*/, tvb, offset, actx, tree, -1); @@ -871,7 +847,7 @@ dissect_tcap_OPERATION(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset static int dissect_tcap_Parameter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 46 "tcap.cnf" +#line 66 "tcap.cnf" return dissect_tcap_param(actx,tree,tvb,offset); @@ -1143,7 +1119,7 @@ static const ber_choice_t Component_choice[] = { static int dissect_tcap_Component(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 56 "tcap.cnf" +#line 76 "tcap.cnf" tvbuff_t *next_tvb; gint8 class; gboolean pc; @@ -1225,7 +1201,7 @@ dissect_tcap_OCTET_STRING_SIZE_1_4(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, static int dissect_tcap_OrigTransactionID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 146 "tcap.cnf" +#line 176 "tcap.cnf" tvbuff_t *parameter_tvb; guint8 len, i; proto_item *tid_item; @@ -1278,7 +1254,7 @@ static const ber_sequence_t Begin_sequence[] = { static int dissect_tcap_Begin(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 220 "tcap.cnf" +#line 250 "tcap.cnf" gp_tcapsrt_info->ope=TC_BEGIN; /* Do not change col_add_str() to col_append_str() here: we _want_ this call @@ -1301,7 +1277,7 @@ if (check_col(actx->pinfo->cinfo, COL_INFO)) static int dissect_tcap_DestTransactionID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 185 "tcap.cnf" +#line 215 "tcap.cnf" tvbuff_t *parameter_tvb; guint8 len , i; proto_item *tid_item; @@ -1351,7 +1327,7 @@ static const ber_sequence_t End_sequence[] = { static int dissect_tcap_End(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 235 "tcap.cnf" +#line 265 "tcap.cnf" gp_tcapsrt_info->ope=TC_END; if (check_col(actx->pinfo->cinfo, COL_INFO)) @@ -1374,7 +1350,7 @@ static const ber_sequence_t Continue_sequence[] = { static int dissect_tcap_Continue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 243 "tcap.cnf" +#line 273 "tcap.cnf" gp_tcapsrt_info->ope=TC_CONT; if (check_col(actx->pinfo->cinfo, COL_INFO)) @@ -1446,7 +1422,7 @@ static const ber_sequence_t Abort_sequence[] = { static int dissect_tcap_Abort(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 251 "tcap.cnf" +#line 281 "tcap.cnf" gp_tcapsrt_info->ope=TC_ABORT; if (check_col(actx->pinfo->cinfo, COL_INFO)) @@ -1462,7 +1438,7 @@ if (check_col(actx->pinfo->cinfo, COL_INFO)) static int dissect_tcap_TransactionID_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 291 "tcap.cnf" +#line 321 "tcap.cnf" tvbuff_t *next_tvb; guint8 len; @@ -1689,7 +1665,7 @@ dissect_tcap_OperationCode(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off static int dissect_tcap_ANSIParameters(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 114 "tcap.cnf" +#line 144 "tcap.cnf" /* we are doing the ParamSet here so need to look at the tags*/ guint32 len; len = tvb_length_remaining(tvb, offset); @@ -1852,7 +1828,7 @@ static const ber_choice_t ComponentPDU_choice[] = { static int dissect_tcap_ComponentPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 125 "tcap.cnf" +#line 155 "tcap.cnf" tvbuff_t *next_tvb; gint8 class; gboolean pc; @@ -1939,7 +1915,7 @@ dissect_tcap_TransactionPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of static int dissect_tcap_T_ansiqueryWithPerm(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 267 "tcap.cnf" +#line 297 "tcap.cnf" gp_tcapsrt_info->ope=TC_ANSI_ALL; if (check_col(actx->pinfo->cinfo, COL_INFO)) col_set_str(actx->pinfo->cinfo, COL_INFO, "QueryWithPerm "); @@ -1953,7 +1929,7 @@ if (check_col(actx->pinfo->cinfo, COL_INFO)) static int dissect_tcap_T_ansiqueryWithoutPerm(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 271 "tcap.cnf" +#line 301 "tcap.cnf" gp_tcapsrt_info->ope=TC_ANSI_ALL; if (check_col(actx->pinfo->cinfo, COL_INFO)) col_set_str(actx->pinfo->cinfo, COL_INFO, "QueryWithOutPerm "); @@ -1967,7 +1943,7 @@ if (check_col(actx->pinfo->cinfo, COL_INFO)) static int dissect_tcap_T_ansiresponse(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 275 "tcap.cnf" +#line 305 "tcap.cnf" gp_tcapsrt_info->ope=TC_ANSI_ALL; if (check_col(actx->pinfo->cinfo, COL_INFO)) col_set_str(actx->pinfo->cinfo, COL_INFO, "Response "); @@ -1981,7 +1957,7 @@ if (check_col(actx->pinfo->cinfo, COL_INFO)) static int dissect_tcap_T_ansiconversationWithPerm(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 279 "tcap.cnf" +#line 309 "tcap.cnf" gp_tcapsrt_info->ope=TC_ANSI_ALL; if (check_col(actx->pinfo->cinfo, COL_INFO)) col_set_str(actx->pinfo->cinfo, COL_INFO, "ConversationWithPerm "); @@ -1995,7 +1971,7 @@ if (check_col(actx->pinfo->cinfo, COL_INFO)) static int dissect_tcap_T_ansiconversationWithoutPerm(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 283 "tcap.cnf" +#line 313 "tcap.cnf" gp_tcapsrt_info->ope=TC_ANSI_ALL; if (check_col(actx->pinfo->cinfo, COL_INFO)) col_set_str(actx->pinfo->cinfo, COL_INFO, "ConversationWithoutPerm "); @@ -2072,7 +2048,7 @@ static const ber_sequence_t AbortPDU_sequence[] = { static int dissect_tcap_AbortPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 259 "tcap.cnf" +#line 289 "tcap.cnf" gp_tcapsrt_info->ope=TC_ANSI_ABORT; if (check_col(actx->pinfo->cinfo, COL_INFO)) @@ -2148,6 +2124,94 @@ dissect_tcap_ERROR(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, return offset; } + +static const asn_namedbit T_protocol_version_bits[] = { + { 0, &hf_tcap_T_protocol_version_version1, -1, -1, "version1", NULL }, + { 0, NULL, 0, 0, NULL, NULL } +}; + +static int +dissect_tcap_T_protocol_version(gboolean 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_bitstring(implicit_tag, actx, tree, tvb, offset, + T_protocol_version_bits, hf_index, ett_tcap_T_protocol_version, + NULL); + + return offset; +} + + + +static int +dissect_tcap_AUDT_application_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 99 "tcap.cnf" + offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &cur_oid); + + tcap_private.oid= (void*) cur_oid; + tcap_private.acv=TRUE; + + + return offset; +} + + +static const ber_sequence_t AUDT_user_information_sequence_of[1] = { + { &hf_tcap_audt_user_information_item, BER_CLASS_UNI, BER_UNI_TAG_EXTERNAL, BER_FLAGS_NOOWNTAG, dissect_tcap_EXTERNAL }, +}; + +static int +dissect_tcap_AUDT_user_information(gboolean 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_sequence_of(implicit_tag, actx, tree, tvb, offset, + AUDT_user_information_sequence_of, hf_index, ett_tcap_AUDT_user_information); + + return offset; +} + + +static const ber_sequence_t AUDT_apdu_U_sequence[] = { + { &hf_tcap_protocol_version, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_T_protocol_version }, + { &hf_tcap_audt_application_context_name, BER_CLASS_CON, 1, 0, dissect_tcap_AUDT_application_context_name }, + { &hf_tcap_audt_user_information, BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_tcap_AUDT_user_information }, + { NULL, 0, 0, 0, NULL } +}; + +static int +dissect_tcap_AUDT_apdu_U(gboolean 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_sequence(implicit_tag, actx, tree, tvb, offset, + AUDT_apdu_U_sequence, hf_index, ett_tcap_AUDT_apdu_U); + + return offset; +} + + + +static int +dissect_tcap_AUDT_apdu(gboolean 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, 0, TRUE, dissect_tcap_AUDT_apdu_U); + + return offset; +} + + +const value_string tcap_UniDialoguePDU_vals[] = { + { 0, "unidialoguePDU" }, + { 0, NULL } +}; + +static const ber_choice_t UniDialoguePDU_choice[] = { + { 0, &hf_tcap_unidialoguePDU , BER_CLASS_APP, 0, BER_FLAGS_NOOWNTAG, dissect_tcap_AUDT_apdu }, + { 0, NULL, 0, 0, 0, NULL } +}; + +int +dissect_tcap_UniDialoguePDU(gboolean 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_choice(actx, tree, tvb, offset, + UniDialoguePDU_choice, hf_index, ett_tcap_UniDialoguePDU, + NULL); + + return offset; +} + /*--- PDUs ---*/ static void dissect_DialoguePDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { @@ -2391,18 +2455,26 @@ proto_register_tcap(void) { "protocol-versionrq", "tcap.protocol_versionrq", FT_BYTES, BASE_HEX, NULL, 0, "tcap.T_protocol_versionrq", HFILL }}, - { &hf_tcap_application_context_name, + { &hf_tcap_aarq_application_context_name, { "application-context-name", "tcap.application_context_name", FT_OID, BASE_NONE, NULL, 0, - "tcap.Applicationcontext", HFILL }}, - { &hf_tcap_user_information, + "tcap.AARQ_application_context_name", HFILL }}, + { &hf_tcap_aarq_user_information, { "user-information", "tcap.user_information", - FT_BYTES, BASE_HEX, NULL, 0, - "tcap.User_information", HFILL }}, + FT_UINT32, BASE_DEC, NULL, 0, + "tcap.AARQ_user_information", HFILL }}, + { &hf_tcap_aarq_user_information_item, + { "Item", "tcap.user_information_item", + FT_NONE, BASE_NONE, NULL, 0, + "tcap.EXTERNAL", HFILL }}, { &hf_tcap_protocol_versionre, { "protocol-versionre", "tcap.protocol_versionre", FT_BYTES, BASE_HEX, NULL, 0, "tcap.T_protocol_versionre", HFILL }}, + { &hf_tcap_aare_application_context_name, + { "application-context-name", "tcap.application_context_name", + FT_OID, BASE_NONE, NULL, 0, + "tcap.AARE_application_context_name", HFILL }}, { &hf_tcap_result, { "result", "tcap.result", FT_INT32, BASE_DEC, VALS(tcap_Associate_result_vals), 0, @@ -2411,10 +2483,18 @@ proto_register_tcap(void) { "result-source-diagnostic", "tcap.result_source_diagnostic", FT_UINT32, BASE_DEC, VALS(tcap_Associate_source_diagnostic_vals), 0, "tcap.Associate_source_diagnostic", HFILL }}, + { &hf_tcap_aare_user_information, + { "user-information", "tcap.user_information", + FT_BYTES, BASE_HEX, NULL, 0, + "tcap.AARE_user_information", HFILL }}, { &hf_tcap_abort_source, { "abort-source", "tcap.abort_source", FT_INT32, BASE_DEC, VALS(tcap_ABRT_source_vals), 0, "tcap.ABRT_source", HFILL }}, + { &hf_tcap_abrt_user_information, + { "user-information", "tcap.user_information", + FT_BYTES, BASE_HEX, NULL, 0, + "tcap.ABRT_user_information", HFILL }}, { &hf_tcap_dialogue_service_user, { "dialogue-service-user", "tcap.dialogue_service_user", FT_INT32, BASE_DEC, VALS(tcap_T_dialogue_service_user_vals), 0, @@ -2423,14 +2503,6 @@ proto_register_tcap(void) { "dialogue-service-provider", "tcap.dialogue_service_provider", FT_INT32, BASE_DEC, VALS(tcap_T_dialogue_service_provider_vals), 0, "tcap.T_dialogue_service_provider", HFILL }}, - { &hf_tcap_unidialoguePDU, - { "unidialoguePDU", "tcap.unidialoguePDU", - FT_NONE, BASE_NONE, NULL, 0, - "tcap.AUDT_apdu", HFILL }}, - { &hf_tcap_protocol_version3, - { "protocol-version3", "tcap.protocol_version3", - FT_BYTES, BASE_HEX, NULL, 0, - "tcap.T_protocol_version3", HFILL }}, { &hf_tcap_unidirectional, { "unidirectional", "tcap.unidirectional", FT_NONE, BASE_NONE, NULL, 0, @@ -2827,6 +2899,26 @@ proto_register_tcap(void) { "privateer", "tcap.privateer", FT_INT32, BASE_DEC, NULL, 0, "tcap.INTEGER", HFILL }}, + { &hf_tcap_unidialoguePDU, + { "unidialoguePDU", "tcap.unidialoguePDU", + FT_NONE, BASE_NONE, NULL, 0, + "tcap.AUDT_apdu", HFILL }}, + { &hf_tcap_protocol_version, + { "protocol-version", "tcap.protocol_version", + FT_BYTES, BASE_HEX, NULL, 0, + "tcap.T_protocol_version", HFILL }}, + { &hf_tcap_audt_application_context_name, + { "application-context-name", "tcap.application_context_name", + FT_OID, BASE_NONE, NULL, 0, + "tcap.AUDT_application_context_name", HFILL }}, + { &hf_tcap_audt_user_information, + { "user-information", "tcap.user_information", + FT_UINT32, BASE_DEC, NULL, 0, + "tcap.AUDT_user_information", HFILL }}, + { &hf_tcap_audt_user_information_item, + { "Item", "tcap.user_information_item", + FT_NONE, BASE_NONE, NULL, 0, + "tcap.EXTERNAL", HFILL }}, { &hf_tcap_T_protocol_versionrq_version1, { "version1", "tcap.version1", FT_BOOLEAN, 8, NULL, 0x80, @@ -2835,7 +2927,7 @@ proto_register_tcap(void) { "version1", "tcap.version1", FT_BOOLEAN, 8, NULL, 0x80, "", HFILL }}, - { &hf_tcap_T_protocol_version3_version1, + { &hf_tcap_T_protocol_version_version1, { "version1", "tcap.version1", FT_BOOLEAN, 8, NULL, 0x80, "", HFILL }}, @@ -2859,13 +2951,11 @@ proto_register_tcap(void) &ett_tcap_UserInformation_U, &ett_tcap_AARQ_apdu_U, &ett_tcap_T_protocol_versionrq, + &ett_tcap_AARQ_user_information, &ett_tcap_AARE_apdu_U, &ett_tcap_T_protocol_versionre, &ett_tcap_ABRT_apdu_U, &ett_tcap_Associate_source_diagnostic, - &ett_tcap_UniDialoguePDU, - &ett_tcap_AUDT_apdu_U, - &ett_tcap_T_protocol_version3, &ett_tcap_TCMessage, &ett_tcap_Unidirectional, &ett_tcap_Begin, @@ -2902,6 +2992,10 @@ proto_register_tcap(void) &ett_tcap_RejectPDU, &ett_tcap_OperationCode, &ett_tcap_ErrorCode, + &ett_tcap_UniDialoguePDU, + &ett_tcap_AUDT_apdu_U, + &ett_tcap_T_protocol_version, + &ett_tcap_AUDT_user_information, /*--- End of included file: packet-tcap-ettarr.c ---*/ #line 334 "packet-tcap-template.c" diff --git a/epan/dissectors/packet-tcap.h b/epan/dissectors/packet-tcap.h index 58a1913e97..e58f39b366 100644 --- a/epan/dissectors/packet-tcap.h +++ b/epan/dissectors/packet-tcap.h @@ -1,7 +1,7 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ /* packet-tcap.h */ -/* ../../tools/asn2wrs.py -b -p tcap -c tcap.cnf -s packet-tcap-template tcap.asn */ +/* ../../tools/asn2wrs.py -b -p tcap -c tcap.cnf -s packet-tcap-template tcap.asn UnidialoguePDUs.asn */ /* Input file: packet-tcap-template.h */ |