diff options
author | Tomas Kukosa <tomas.kukosa@siemens.com> | 2007-12-10 08:35:41 +0000 |
---|---|---|
committer | Tomas Kukosa <tomas.kukosa@siemens.com> | 2007-12-10 08:35:41 +0000 |
commit | 1e794fc49487a25df0796587a5a18e84304e7f3e (patch) | |
tree | 8d7db8816462050e7e7098962c1b54769d65ad4e /epan/dissectors/packet-ansi_tcap.c | |
parent | 554a21ac4ff1ff03ac984dd3fbeee02b9aa7c1d0 (diff) |
ANSI TCAP regenerated and tested with -T -X asn2wrs options
asn2wrs has -T (tagged types support) and -X (new BER sttructures) default behavior
remove all -T and -X usage
svn path=/trunk/; revision=23823
Diffstat (limited to 'epan/dissectors/packet-ansi_tcap.c')
-rw-r--r-- | epan/dissectors/packet-ansi_tcap.c | 590 |
1 files changed, 262 insertions, 328 deletions
diff --git a/epan/dissectors/packet-ansi_tcap.c b/epan/dissectors/packet-ansi_tcap.c index da891f51b3..13d9265130 100644 --- a/epan/dissectors/packet-ansi_tcap.c +++ b/epan/dissectors/packet-ansi_tcap.c @@ -1,7 +1,7 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ /* packet-ansi_tcap.c */ -/* ../../tools/asn2wrs.py -b -p ansi_tcap -c ./ansi_tcap.cnf -s ./packet-ansi_tcap-template -D . TCAP-Remote-Operations-Information-Objects.asn TCAPPackage.asn */ +/* ../../tools/asn2wrs.py -b -p ansi_tcap -c ansi_tcap.cnf -s packet-ansi_tcap-template TCAP-Remote-Operations-Information-Objects.asn TCAPPackage.asn */ /* Input file: packet-ansi_tcap-template.c */ @@ -94,11 +94,11 @@ static int hf_ansi_tcap_securityContext = -1; /* T_securityContext */ static int hf_ansi_tcap_integerSecurityId = -1; /* INTEGER */ static int hf_ansi_tcap_objectSecurityId = -1; /* OBJECT_IDENTIFIER */ static int hf_ansi_tcap_confidentiality = -1; /* Confidentiality */ -static int hf_ansi_tcap_UserInformation_item = -1; /* EXTERNAL */ +static int hf_ansi_tcap__untag_item = -1; /* EXTERNAL */ static int hf_ansi_tcap_confidentialityId = -1; /* T_confidentialityId */ static int hf_ansi_tcap_integerConfidentialityId = -1; /* INTEGER */ static int hf_ansi_tcap_objectConfidentialityId = -1; /* OBJECT_IDENTIFIER */ -static int hf_ansi_tcap_ComponentSequence_item = -1; /* ComponentPDU */ +static int hf_ansi_tcap__untag_item_01 = -1; /* ComponentPDU */ static int hf_ansi_tcap_invokeLast = -1; /* Invoke */ static int hf_ansi_tcap_returnResultLast = -1; /* ReturnResult */ static int hf_ansi_tcap_returnError = -1; /* ReturnError */ @@ -146,13 +146,13 @@ static gint ett_ansi_tcap_UniTransactionPDU = -1; static gint ett_ansi_tcap_TransactionPDU = -1; static gint ett_ansi_tcap_Abort = -1; static gint ett_ansi_tcap_T_causeInformation = -1; -static gint ett_ansi_tcap_DialoguePortion = -1; +static gint ett_ansi_tcap_DialoguePortion_U = -1; static gint ett_ansi_tcap_T_applicationContext = -1; static gint ett_ansi_tcap_T_securityContext = -1; -static gint ett_ansi_tcap_UserInformation = -1; +static gint ett_ansi_tcap_UserInformation_U = -1; static gint ett_ansi_tcap_Confidentiality = -1; static gint ett_ansi_tcap_T_confidentialityId = -1; -static gint ett_ansi_tcap_ComponentSequence = -1; +static gint ett_ansi_tcap_SEQUENCE_OF_ComponentPDU = -1; static gint ett_ansi_tcap_ComponentPDU = -1; static gint ett_ansi_tcap_Invoke = -1; static gint ett_ansi_tcap_ReturnResult = -1; @@ -412,9 +412,6 @@ find_tcap_subdissector(tvbuff_t *tvb, asn1_ctx_t *actx, proto_tree *tree){ /*--- Included file: packet-ansi_tcap-fn.c ---*/ #line 1 "packet-ansi_tcap-fn.c" -/*--- Fields for imported types ---*/ - - static int @@ -424,9 +421,6 @@ dissect_ansi_tcap_T_national(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o return offset; } -static int dissect_national_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_T_national(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_national); -} @@ -437,9 +431,6 @@ dissect_ansi_tcap_T_private(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of return offset; } -static int dissect_private_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_T_private(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_private); -} static const value_string ansi_tcap_OperationCode_vals[] = { @@ -448,26 +439,23 @@ static const value_string ansi_tcap_OperationCode_vals[] = { { 0, NULL } }; -static const ber_old_choice_t OperationCode_choice[] = { - { 16, BER_CLASS_PRI, 16, BER_FLAGS_IMPLTAG, dissect_national_impl }, - { 17, BER_CLASS_PRI, 17, BER_FLAGS_IMPLTAG, dissect_private_impl }, - { 0, 0, 0, 0, NULL } +static const ber_choice_t OperationCode_choice[] = { + { 16, &hf_ansi_tcap_national , BER_CLASS_PRI, 16, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_national }, + { 17, &hf_ansi_tcap_private , BER_CLASS_PRI, 17, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_private }, + { 0, NULL, 0, 0, 0, NULL } }; static int dissect_ansi_tcap_OperationCode(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_old_choice(actx, tree, tvb, offset, - OperationCode_choice, hf_index, ett_ansi_tcap_OperationCode, - &ansi_tcap_private.d.OperationCode); + offset = dissect_ber_choice(actx, tree, tvb, offset, + OperationCode_choice, hf_index, ett_ansi_tcap_OperationCode, + &ansi_tcap_private.d.OperationCode); #line 12 "ansi_tcap.cnf" ansi_tcap_private.d.OperationCode_item = actx->created_item; return offset; } -static int dissect_operationCode(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_OperationCode(FALSE, tvb, offset, actx, tree, hf_ansi_tcap_operationCode); -} @@ -478,9 +466,6 @@ dissect_ansi_tcap_INTEGER_M128_127(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, return offset; } -static int dissect_national_01(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_INTEGER_M128_127(FALSE, tvb, offset, actx, tree, hf_ansi_tcap_national_01); -} @@ -491,15 +476,6 @@ dissect_ansi_tcap_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs return offset; } -static int dissect_private_01(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_INTEGER(FALSE, tvb, offset, actx, tree, hf_ansi_tcap_private_01); -} -static int dissect_integerSecurityId_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_INTEGER(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_integerSecurityId); -} -static int dissect_integerConfidentialityId_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_INTEGER(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_integerConfidentialityId); -} static const value_string ansi_tcap_ErrorCode_vals[] = { @@ -508,23 +484,20 @@ static const value_string ansi_tcap_ErrorCode_vals[] = { { 0, NULL } }; -static const ber_old_choice_t ErrorCode_choice[] = { - { 19, BER_CLASS_PRI, 19, 0, dissect_national_01 }, - { 20, BER_CLASS_PRI, 20, 0, dissect_private_01 }, - { 0, 0, 0, 0, NULL } +static const ber_choice_t ErrorCode_choice[] = { + { 19, &hf_ansi_tcap_national_01, BER_CLASS_PRI, 19, 0, dissect_ansi_tcap_INTEGER_M128_127 }, + { 20, &hf_ansi_tcap_private_01, BER_CLASS_PRI, 20, 0, dissect_ansi_tcap_INTEGER }, + { 0, NULL, 0, 0, 0, NULL } }; static int dissect_ansi_tcap_ErrorCode(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_old_choice(actx, tree, tvb, offset, - ErrorCode_choice, hf_index, ett_ansi_tcap_ErrorCode, - NULL); + offset = dissect_ber_choice(actx, tree, tvb, offset, + ErrorCode_choice, hf_index, ett_ansi_tcap_ErrorCode, + NULL); return offset; } -static int dissect_errorCode(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_ErrorCode(FALSE, tvb, offset, actx, tree, hf_ansi_tcap_errorCode); -} @@ -539,40 +512,88 @@ dissect_ansi_tcap_Priority(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off static int -dissect_ansi_tcap_TransactionID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +dissect_ansi_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 115 "ansi_tcap.cnf" + +tvbuff_t *next_tvb; +guint8 len; + offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, - NULL); + &next_tvb); + + +if(next_tvb) { + if(tvb_length(next_tvb) !=0) + ansi_tcap_private.TransactionID_str = tvb_bytes_to_str(next_tvb, 0,tvb_length(next_tvb)); + len = tvb_length_remaining(next_tvb, 0); + switch(len) { + case 1: + gp_tcapsrt_info->src_tid=tvb_get_guint8(next_tvb, 0); + break; + case 2: + gp_tcapsrt_info->src_tid=tvb_get_ntohs(next_tvb, 0); + break; + case 4: + gp_tcapsrt_info->src_tid=tvb_get_ntohl(next_tvb, 0); + break; + default: + gp_tcapsrt_info->src_tid=0; + break; + } +} + + return offset; } -static int dissect_identifier(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_TransactionID(FALSE, tvb, offset, actx, tree, hf_ansi_tcap_identifier); + + + +static int +dissect_ansi_tcap_TransactionID(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_PRI, 7, TRUE, dissect_ansi_tcap_TransactionID_U); + + return offset; } static int -dissect_ansi_tcap_ProtocolVersion(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +dissect_ansi_tcap_OCTET_STRING_SIZE_1(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_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, NULL); return offset; } -static int dissect_version(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_ProtocolVersion(FALSE, tvb, offset, actx, tree, hf_ansi_tcap_version); + + + +static int +dissect_ansi_tcap_ProtocolVersion(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_PRI, 26, TRUE, dissect_ansi_tcap_OCTET_STRING_SIZE_1); + + return offset; } static int dissect_ansi_tcap_IntegerApplicationContext(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); + offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset, + hf_index, BER_CLASS_PRI, 27, TRUE, dissect_ansi_tcap_INTEGER); return offset; } -static int dissect_integerApplicationId(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_IntegerApplicationContext(FALSE, tvb, offset, actx, tree, hf_ansi_tcap_integerApplicationId); + + + +static int +dissect_ansi_tcap_OBJECT_IDENTIFIER(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; } @@ -583,7 +604,8 @@ dissect_ansi_tcap_ObjectIDApplicationContext(gboolean implicit_tag _U_, tvbuff_t static const char * oid_str; - offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &oid_str); + offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset, + hf_index, BER_CLASS_PRI, 28, TRUE, dissect_ansi_tcap_OBJECT_IDENTIFIER); ansi_tcap_private.objectApplicationId_oid= (void*) oid_str; ansi_tcap_private.oid_is_present=TRUE; @@ -592,9 +614,6 @@ dissect_ansi_tcap_ObjectIDApplicationContext(gboolean implicit_tag _U_, tvbuff_t return offset; } -static int dissect_objectApplicationId(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_ObjectIDApplicationContext(FALSE, tvb, offset, actx, tree, hf_ansi_tcap_objectApplicationId); -} static const value_string ansi_tcap_T_applicationContext_vals[] = { @@ -603,23 +622,20 @@ static const value_string ansi_tcap_T_applicationContext_vals[] = { { 0, NULL } }; -static const ber_old_choice_t T_applicationContext_choice[] = { - { 27, BER_CLASS_PRI, 27, BER_FLAGS_NOOWNTAG, dissect_integerApplicationId }, - { 28, BER_CLASS_PRI, 28, BER_FLAGS_NOOWNTAG, dissect_objectApplicationId }, - { 0, 0, 0, 0, NULL } +static const ber_choice_t T_applicationContext_choice[] = { + { 27, &hf_ansi_tcap_integerApplicationId, BER_CLASS_PRI, 27, BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_IntegerApplicationContext }, + { 28, &hf_ansi_tcap_objectApplicationId, BER_CLASS_PRI, 28, BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_ObjectIDApplicationContext }, + { 0, NULL, 0, 0, 0, NULL } }; static int dissect_ansi_tcap_T_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_old_choice(actx, tree, tvb, offset, - T_applicationContext_choice, hf_index, ett_ansi_tcap_T_applicationContext, - NULL); + offset = dissect_ber_choice(actx, tree, tvb, offset, + T_applicationContext_choice, hf_index, ett_ansi_tcap_T_applicationContext, + NULL); return offset; } -static int dissect_applicationContext(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_T_applicationContext(FALSE, tvb, offset, actx, tree, hf_ansi_tcap_applicationContext); -} @@ -629,40 +645,29 @@ dissect_ansi_tcap_EXTERNAL(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off return offset; } -static int dissect_UserInformation_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_EXTERNAL(FALSE, tvb, offset, actx, tree, hf_ansi_tcap_UserInformation_item); -} -static const ber_old_sequence_t UserInformation_sequence_of[1] = { - { BER_CLASS_UNI, BER_UNI_TAG_EXTERNAL, BER_FLAGS_NOOWNTAG, dissect_UserInformation_item }, +static const ber_sequence_t UserInformation_U_sequence_of[1] = { + { &hf_ansi_tcap__untag_item, BER_CLASS_UNI, BER_UNI_TAG_EXTERNAL, BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_EXTERNAL }, }; static int -dissect_ansi_tcap_UserInformation(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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - UserInformation_sequence_of, hf_index, ett_ansi_tcap_UserInformation); +dissect_ansi_tcap_UserInformation_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_of(implicit_tag, actx, tree, tvb, offset, + UserInformation_U_sequence_of, hf_index, ett_ansi_tcap_UserInformation_U); return offset; } -static int dissect_userInformation_01(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_UserInformation(FALSE, tvb, offset, actx, tree, hf_ansi_tcap_userInformation_01); -} static int -dissect_ansi_tcap_OBJECT_IDENTIFIER(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); +dissect_ansi_tcap_UserInformation(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_PRI, 29, TRUE, dissect_ansi_tcap_UserInformation_U); return offset; } -static int dissect_objectSecurityId_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_OBJECT_IDENTIFIER(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_objectSecurityId); -} -static int dissect_objectConfidentialityId_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_OBJECT_IDENTIFIER(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_objectConfidentialityId); -} static const value_string ansi_tcap_T_securityContext_vals[] = { @@ -671,23 +676,20 @@ static const value_string ansi_tcap_T_securityContext_vals[] = { { 0, NULL } }; -static const ber_old_choice_t T_securityContext_choice[] = { - { 0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_integerSecurityId_impl }, - { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_objectSecurityId_impl }, - { 0, 0, 0, 0, NULL } +static const ber_choice_t T_securityContext_choice[] = { + { 0, &hf_ansi_tcap_integerSecurityId, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_INTEGER }, + { 1, &hf_ansi_tcap_objectSecurityId, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_OBJECT_IDENTIFIER }, + { 0, NULL, 0, 0, 0, NULL } }; static int dissect_ansi_tcap_T_securityContext(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_old_choice(actx, tree, tvb, offset, - T_securityContext_choice, hf_index, ett_ansi_tcap_T_securityContext, - NULL); + offset = dissect_ber_choice(actx, tree, tvb, offset, + T_securityContext_choice, hf_index, ett_ansi_tcap_T_securityContext, + NULL); return offset; } -static int dissect_securityContext(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_T_securityContext(FALSE, tvb, offset, actx, tree, hf_ansi_tcap_securityContext); -} static const value_string ansi_tcap_T_confidentialityId_vals[] = { @@ -696,63 +698,61 @@ static const value_string ansi_tcap_T_confidentialityId_vals[] = { { 0, NULL } }; -static const ber_old_choice_t T_confidentialityId_choice[] = { - { 0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_integerConfidentialityId_impl }, - { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_objectConfidentialityId_impl }, - { 0, 0, 0, 0, NULL } +static const ber_choice_t T_confidentialityId_choice[] = { + { 0, &hf_ansi_tcap_integerConfidentialityId, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_INTEGER }, + { 1, &hf_ansi_tcap_objectConfidentialityId, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_OBJECT_IDENTIFIER }, + { 0, NULL, 0, 0, 0, NULL } }; static int dissect_ansi_tcap_T_confidentialityId(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_old_choice(actx, tree, tvb, offset, - T_confidentialityId_choice, hf_index, ett_ansi_tcap_T_confidentialityId, - NULL); + offset = dissect_ber_choice(actx, tree, tvb, offset, + T_confidentialityId_choice, hf_index, ett_ansi_tcap_T_confidentialityId, + NULL); return offset; } -static int dissect_confidentialityId(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_T_confidentialityId(FALSE, tvb, offset, actx, tree, hf_ansi_tcap_confidentialityId); -} -static const ber_old_sequence_t Confidentiality_sequence[] = { - { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_confidentialityId }, - { 0, 0, 0, NULL } +static const ber_sequence_t Confidentiality_sequence[] = { + { &hf_ansi_tcap_confidentialityId, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ansi_tcap_T_confidentialityId }, + { NULL, 0, 0, 0, NULL } }; static int dissect_ansi_tcap_Confidentiality(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_old_sequence(implicit_tag, actx, tree, tvb, offset, - Confidentiality_sequence, hf_index, ett_ansi_tcap_Confidentiality); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + Confidentiality_sequence, hf_index, ett_ansi_tcap_Confidentiality); return offset; } -static int dissect_confidentiality_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_Confidentiality(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_confidentiality); -} -static const ber_old_sequence_t DialoguePortion_sequence[] = { - { BER_CLASS_PRI, 26, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_version }, - { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_applicationContext }, - { BER_CLASS_PRI, 29, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_userInformation_01 }, - { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_securityContext }, - { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_confidentiality_impl }, - { 0, 0, 0, NULL } +static const ber_sequence_t DialoguePortion_U_sequence[] = { + { &hf_ansi_tcap_version , BER_CLASS_PRI, 26, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_ProtocolVersion }, + { &hf_ansi_tcap_applicationContext, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ansi_tcap_T_applicationContext }, + { &hf_ansi_tcap_userInformation_01, BER_CLASS_PRI, 29, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_UserInformation }, + { &hf_ansi_tcap_securityContext, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ansi_tcap_T_securityContext }, + { &hf_ansi_tcap_confidentiality, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_ansi_tcap_Confidentiality }, + { NULL, 0, 0, 0, NULL } }; static int -dissect_ansi_tcap_DialoguePortion(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_old_sequence(implicit_tag, actx, tree, tvb, offset, - DialoguePortion_sequence, hf_index, ett_ansi_tcap_DialoguePortion); +dissect_ansi_tcap_DialoguePortion_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, + DialoguePortion_U_sequence, hf_index, ett_ansi_tcap_DialoguePortion_U); return offset; } -static int dissect_dialoguePortion(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_DialoguePortion(FALSE, tvb, offset, actx, tree, hf_ansi_tcap_dialoguePortion); -} -static int dissect_dialogPortion(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_DialoguePortion(FALSE, tvb, offset, actx, tree, hf_ansi_tcap_dialogPortion); + + + +static int +dissect_ansi_tcap_DialoguePortion(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_PRI, 25, TRUE, dissect_ansi_tcap_DialoguePortion_U); + + return offset; } @@ -764,9 +764,6 @@ dissect_ansi_tcap_T_componentIDs(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, i return offset; } -static int dissect_componentIDs_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_T_componentIDs(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_componentIDs); -} @@ -786,16 +783,13 @@ tvbuff_t *parameter_tvb; return offset; } -static int dissect_parameter(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_T_parameter(FALSE, tvb, offset, actx, tree, hf_ansi_tcap_parameter); -} -static const ber_old_sequence_t Invoke_sequence[] = { - { BER_CLASS_PRI, 15, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_componentIDs_impl }, - { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_operationCode }, - { BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_parameter }, - { 0, 0, 0, NULL } +static const ber_sequence_t Invoke_sequence[] = { + { &hf_ansi_tcap_componentIDs, BER_CLASS_PRI, 15, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_componentIDs }, + { &hf_ansi_tcap_operationCode, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ansi_tcap_OperationCode }, + { &hf_ansi_tcap_parameter , BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_T_parameter }, + { NULL, 0, 0, 0, NULL } }; static int @@ -805,17 +799,11 @@ dissect_ansi_tcap_Invoke(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse - offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset, - Invoke_sequence, hf_index, ett_ansi_tcap_Invoke); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + Invoke_sequence, hf_index, ett_ansi_tcap_Invoke); return offset; } -static int dissect_invokeLast_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_Invoke(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_invokeLast); -} -static int dissect_invokeNotLast_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_Invoke(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_invokeNotLast); -} @@ -826,9 +814,6 @@ dissect_ansi_tcap_T_componentID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in return offset; } -static int dissect_componentID_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_T_componentID(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_componentID); -} @@ -849,15 +834,12 @@ tvbuff_t *parameter_tvb; return offset; } -static int dissect_parameter_01(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_T_parameter_01(FALSE, tvb, offset, actx, tree, hf_ansi_tcap_parameter_01); -} -static const ber_old_sequence_t ReturnResult_sequence[] = { - { BER_CLASS_PRI, 15, BER_FLAGS_IMPLTAG, dissect_componentID_impl }, - { BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_parameter_01 }, - { 0, 0, 0, NULL } +static const ber_sequence_t ReturnResult_sequence[] = { + { &hf_ansi_tcap_componentID, BER_CLASS_PRI, 15, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_componentID }, + { &hf_ansi_tcap_parameter_01, BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_T_parameter_01 }, + { NULL, 0, 0, 0, NULL } }; static int @@ -868,17 +850,11 @@ dissect_ansi_tcap_ReturnResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int - offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset, - ReturnResult_sequence, hf_index, ett_ansi_tcap_ReturnResult); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + ReturnResult_sequence, hf_index, ett_ansi_tcap_ReturnResult); return offset; } -static int dissect_returnResultLast_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_ReturnResult(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_returnResultLast); -} -static int dissect_returnResultNotLast_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_ReturnResult(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_returnResultNotLast); -} @@ -889,9 +865,6 @@ dissect_ansi_tcap_T_componentID_01(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, return offset; } -static int dissect_componentID_01_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_T_componentID_01(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_componentID_01); -} @@ -911,16 +884,13 @@ tvbuff_t *parameter_tvb; return offset; } -static int dissect_parameter_02(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_T_parameter_02(FALSE, tvb, offset, actx, tree, hf_ansi_tcap_parameter_02); -} -static const ber_old_sequence_t ReturnError_sequence[] = { - { BER_CLASS_PRI, 15, BER_FLAGS_IMPLTAG, dissect_componentID_01_impl }, - { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_errorCode }, - { BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_parameter_02 }, - { 0, 0, 0, NULL } +static const ber_sequence_t ReturnError_sequence[] = { + { &hf_ansi_tcap_componentID_01, BER_CLASS_PRI, 15, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_componentID_01 }, + { &hf_ansi_tcap_errorCode , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ansi_tcap_ErrorCode }, + { &hf_ansi_tcap_parameter_02, BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_T_parameter_02 }, + { NULL, 0, 0, 0, NULL } }; static int @@ -929,14 +899,11 @@ dissect_ansi_tcap_ReturnError(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int ansi_tcap_private.d.pdu = 3; - offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset, - ReturnError_sequence, hf_index, ett_ansi_tcap_ReturnError); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + ReturnError_sequence, hf_index, ett_ansi_tcap_ReturnError); return offset; } -static int dissect_returnError_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_ReturnError(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_returnError); -} @@ -947,9 +914,6 @@ dissect_ansi_tcap_OCTET_STRING_SIZE_0_1(gboolean implicit_tag _U_, tvbuff_t *tvb return offset; } -static int dissect_componentID_02_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_OCTET_STRING_SIZE_0_1(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_componentID_02); -} static const value_string ansi_tcap_Problem_vals[] = { @@ -986,41 +950,32 @@ dissect_ansi_tcap_Problem(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs return offset; } -static int dissect_rejectProblem_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_Problem(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_rejectProblem); -} -static const ber_old_sequence_t T_paramSequence_sequence[] = { - { 0, 0, 0, NULL } +static const ber_sequence_t T_paramSequence_sequence[] = { + { NULL, 0, 0, 0, NULL } }; static int dissect_ansi_tcap_T_paramSequence(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_old_sequence(implicit_tag, actx, tree, tvb, offset, - T_paramSequence_sequence, hf_index, ett_ansi_tcap_T_paramSequence); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + T_paramSequence_sequence, hf_index, ett_ansi_tcap_T_paramSequence); return offset; } -static int dissect_paramSequence_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_T_paramSequence(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_paramSequence); -} -static const ber_old_sequence_t T_paramSet_set[] = { - { 0, 0, 0, NULL } +static const ber_sequence_t T_paramSet_set[] = { + { NULL, 0, 0, 0, NULL } }; static int dissect_ansi_tcap_T_paramSet(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_old_set(implicit_tag, actx, tree, tvb, offset, - T_paramSet_set, hf_index, ett_ansi_tcap_T_paramSet); + offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset, + T_paramSet_set, hf_index, ett_ansi_tcap_T_paramSet); return offset; } -static int dissect_paramSet_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_T_paramSet(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_paramSet); -} static const value_string ansi_tcap_T_parameter_03_vals[] = { @@ -1029,42 +984,36 @@ static const value_string ansi_tcap_T_parameter_03_vals[] = { { 0, NULL } }; -static const ber_old_choice_t T_parameter_03_choice[] = { - { 16, BER_CLASS_PRI, 16, BER_FLAGS_IMPLTAG, dissect_paramSequence_impl }, - { 18, BER_CLASS_PRI, 18, BER_FLAGS_IMPLTAG, dissect_paramSet_impl }, - { 0, 0, 0, 0, NULL } +static const ber_choice_t T_parameter_03_choice[] = { + { 16, &hf_ansi_tcap_paramSequence, BER_CLASS_PRI, 16, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_paramSequence }, + { 18, &hf_ansi_tcap_paramSet , BER_CLASS_PRI, 18, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_paramSet }, + { 0, NULL, 0, 0, 0, NULL } }; static int dissect_ansi_tcap_T_parameter_03(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_old_choice(actx, tree, tvb, offset, - T_parameter_03_choice, hf_index, ett_ansi_tcap_T_parameter_03, - NULL); + offset = dissect_ber_choice(actx, tree, tvb, offset, + T_parameter_03_choice, hf_index, ett_ansi_tcap_T_parameter_03, + NULL); return offset; } -static int dissect_parameter_03(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_T_parameter_03(FALSE, tvb, offset, actx, tree, hf_ansi_tcap_parameter_03); -} -static const ber_old_sequence_t Reject_sequence[] = { - { BER_CLASS_PRI, 15, BER_FLAGS_IMPLTAG, dissect_componentID_02_impl }, - { BER_CLASS_PRI, 21, BER_FLAGS_IMPLTAG, dissect_rejectProblem_impl }, - { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_parameter_03 }, - { 0, 0, 0, NULL } +static const ber_sequence_t Reject_sequence[] = { + { &hf_ansi_tcap_componentID_02, BER_CLASS_PRI, 15, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_OCTET_STRING_SIZE_0_1 }, + { &hf_ansi_tcap_rejectProblem, BER_CLASS_PRI, 21, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_Problem }, + { &hf_ansi_tcap_parameter_03, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ansi_tcap_T_parameter_03 }, + { NULL, 0, 0, 0, NULL } }; static int dissect_ansi_tcap_Reject(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_old_sequence(implicit_tag, actx, tree, tvb, offset, - Reject_sequence, hf_index, ett_ansi_tcap_Reject); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + Reject_sequence, hf_index, ett_ansi_tcap_Reject); return offset; } -static int dissect_reject_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_Reject(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_reject); -} static const value_string ansi_tcap_ComponentPDU_vals[] = { @@ -1077,56 +1026,60 @@ static const value_string ansi_tcap_ComponentPDU_vals[] = { { 0, NULL } }; -static const ber_old_choice_t ComponentPDU_choice[] = { - { 9, BER_CLASS_PRI, 9, BER_FLAGS_IMPLTAG, dissect_invokeLast_impl }, - { 10, BER_CLASS_PRI, 10, BER_FLAGS_IMPLTAG, dissect_returnResultLast_impl }, - { 11, BER_CLASS_PRI, 11, BER_FLAGS_IMPLTAG, dissect_returnError_impl }, - { 12, BER_CLASS_PRI, 12, BER_FLAGS_IMPLTAG, dissect_reject_impl }, - { 13, BER_CLASS_PRI, 13, BER_FLAGS_IMPLTAG, dissect_invokeNotLast_impl }, - { 14, BER_CLASS_PRI, 14, BER_FLAGS_IMPLTAG, dissect_returnResultNotLast_impl }, - { 0, 0, 0, 0, NULL } +static const ber_choice_t ComponentPDU_choice[] = { + { 9, &hf_ansi_tcap_invokeLast, BER_CLASS_PRI, 9, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_Invoke }, + { 10, &hf_ansi_tcap_returnResultLast, BER_CLASS_PRI, 10, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_ReturnResult }, + { 11, &hf_ansi_tcap_returnError, BER_CLASS_PRI, 11, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_ReturnError }, + { 12, &hf_ansi_tcap_reject , BER_CLASS_PRI, 12, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_Reject }, + { 13, &hf_ansi_tcap_invokeNotLast, BER_CLASS_PRI, 13, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_Invoke }, + { 14, &hf_ansi_tcap_returnResultNotLast, BER_CLASS_PRI, 14, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_ReturnResult }, + { 0, NULL, 0, 0, 0, NULL } }; static int dissect_ansi_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_) { - offset = dissect_ber_old_choice(actx, tree, tvb, offset, - ComponentPDU_choice, hf_index, ett_ansi_tcap_ComponentPDU, - NULL); + offset = dissect_ber_choice(actx, tree, tvb, offset, + ComponentPDU_choice, hf_index, ett_ansi_tcap_ComponentPDU, + NULL); return offset; } -static int dissect_ComponentSequence_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_ComponentPDU(FALSE, tvb, offset, actx, tree, hf_ansi_tcap_ComponentSequence_item); -} -static const ber_old_sequence_t ComponentSequence_sequence_of[1] = { - { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ComponentSequence_item }, +static const ber_sequence_t SEQUENCE_OF_ComponentPDU_sequence_of[1] = { + { &hf_ansi_tcap__untag_item_01, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ansi_tcap_ComponentPDU }, }; static int -dissect_ansi_tcap_ComponentSequence(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_old_sequence_of(implicit_tag, actx, tree, tvb, offset, - ComponentSequence_sequence_of, hf_index, ett_ansi_tcap_ComponentSequence); +dissect_ansi_tcap_SEQUENCE_OF_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_) { + offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset, + SEQUENCE_OF_ComponentPDU_sequence_of, hf_index, ett_ansi_tcap_SEQUENCE_OF_ComponentPDU); return offset; } -static int dissect_componentPortion(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_ComponentSequence(FALSE, tvb, offset, actx, tree, hf_ansi_tcap_componentPortion); + + + +static int +dissect_ansi_tcap_ComponentSequence(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_PRI, 8, TRUE, dissect_ansi_tcap_SEQUENCE_OF_ComponentPDU); + + return offset; } -static const ber_old_sequence_t UniTransactionPDU_sequence[] = { - { BER_CLASS_PRI, 7, BER_FLAGS_NOOWNTAG, dissect_identifier }, - { BER_CLASS_PRI, 25, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_dialoguePortion }, - { BER_CLASS_PRI, 8, BER_FLAGS_NOOWNTAG, dissect_componentPortion }, - { 0, 0, 0, NULL } +static const ber_sequence_t UniTransactionPDU_sequence[] = { + { &hf_ansi_tcap_identifier, BER_CLASS_PRI, 7, BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_TransactionID }, + { &hf_ansi_tcap_dialoguePortion, BER_CLASS_PRI, 25, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_DialoguePortion }, + { &hf_ansi_tcap_componentPortion, BER_CLASS_PRI, 8, BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_ComponentSequence }, + { NULL, 0, 0, 0, NULL } }; static int dissect_ansi_tcap_UniTransactionPDU(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_old_sequence(implicit_tag, actx, tree, tvb, offset, - UniTransactionPDU_sequence, hf_index, ett_ansi_tcap_UniTransactionPDU); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + UniTransactionPDU_sequence, hf_index, ett_ansi_tcap_UniTransactionPDU); return offset; } @@ -1145,22 +1098,19 @@ if (check_col(actx->pinfo->cinfo, COL_INFO)) return offset; } -static int dissect_unidirectional_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_T_unidirectional(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_unidirectional); -} -static const ber_old_sequence_t TransactionPDU_sequence[] = { - { BER_CLASS_PRI, 7, BER_FLAGS_NOOWNTAG, dissect_identifier }, - { BER_CLASS_PRI, 25, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_dialoguePortion }, - { BER_CLASS_PRI, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_componentPortion }, - { 0, 0, 0, NULL } +static const ber_sequence_t TransactionPDU_sequence[] = { + { &hf_ansi_tcap_identifier, BER_CLASS_PRI, 7, BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_TransactionID }, + { &hf_ansi_tcap_dialoguePortion, BER_CLASS_PRI, 25, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_DialoguePortion }, + { &hf_ansi_tcap_componentPortion, BER_CLASS_PRI, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_ComponentSequence }, + { NULL, 0, 0, 0, NULL } }; static int dissect_ansi_tcap_TransactionPDU(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_old_sequence(implicit_tag, actx, tree, tvb, offset, - TransactionPDU_sequence, hf_index, ett_ansi_tcap_TransactionPDU); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + TransactionPDU_sequence, hf_index, ett_ansi_tcap_TransactionPDU); return offset; } @@ -1179,9 +1129,6 @@ if (check_col(actx->pinfo->cinfo, COL_INFO)) return offset; } -static int dissect_queryWithPerm_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_T_queryWithPerm(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_queryWithPerm); -} @@ -1197,9 +1144,6 @@ if (check_col(actx->pinfo->cinfo, COL_INFO)) return offset; } -static int dissect_queryWithoutPerm_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_T_queryWithoutPerm(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_queryWithoutPerm); -} @@ -1215,9 +1159,6 @@ if (check_col(actx->pinfo->cinfo, COL_INFO)) return offset; } -static int dissect_response_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_T_response(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_response); -} @@ -1233,9 +1174,6 @@ if (check_col(actx->pinfo->cinfo, COL_INFO)) return offset; } -static int dissect_conversationWithPerm_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_T_conversationWithPerm(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_conversationWithPerm); -} @@ -1251,12 +1189,9 @@ if (check_col(actx->pinfo->cinfo, COL_INFO)) return offset; } -static int dissect_conversationWithoutPerm_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_T_conversationWithoutPerm(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_conversationWithoutPerm); -} -static const value_string ansi_tcap_P_Abort_cause_vals[] = { +static const value_string ansi_tcap_P_Abort_cause_U_vals[] = { { 1, "unrecognizedPackageType" }, { 2, "incorrectTransactionPortion" }, { 3, "badlyStructuredTransactionPortion" }, @@ -1272,27 +1207,32 @@ static const value_string ansi_tcap_P_Abort_cause_vals[] = { static int -dissect_ansi_tcap_P_Abort_cause(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +dissect_ansi_tcap_P_Abort_cause_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_integer(implicit_tag, actx, tree, tvb, offset, hf_index, NULL); return offset; } -static int dissect_abortCause(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_P_Abort_cause(FALSE, tvb, offset, actx, tree, hf_ansi_tcap_abortCause); + + + +static int +dissect_ansi_tcap_P_Abort_cause(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_PRI, 23, TRUE, dissect_ansi_tcap_P_Abort_cause_U); + + return offset; } static int dissect_ansi_tcap_UserAbortInformation(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); + offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset, + hf_index, BER_CLASS_PRI, 24, FALSE, dissect_ansi_tcap_EXTERNAL); return offset; } -static int dissect_userInformation(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_UserAbortInformation(FALSE, tvb, offset, actx, tree, hf_ansi_tcap_userInformation); -} static const value_string ansi_tcap_T_causeInformation_vals[] = { @@ -1301,36 +1241,33 @@ static const value_string ansi_tcap_T_causeInformation_vals[] = { { 0, NULL } }; -static const ber_old_choice_t T_causeInformation_choice[] = { - { 23, BER_CLASS_PRI, 23, BER_FLAGS_NOOWNTAG, dissect_abortCause }, - { 24, BER_CLASS_PRI, 24, BER_FLAGS_NOOWNTAG, dissect_userInformation }, - { 0, 0, 0, 0, NULL } +static const ber_choice_t T_causeInformation_choice[] = { + { 23, &hf_ansi_tcap_abortCause, BER_CLASS_PRI, 23, BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_P_Abort_cause }, + { 24, &hf_ansi_tcap_userInformation, BER_CLASS_PRI, 24, BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_UserAbortInformation }, + { 0, NULL, 0, 0, 0, NULL } }; static int dissect_ansi_tcap_T_causeInformation(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_old_choice(actx, tree, tvb, offset, - T_causeInformation_choice, hf_index, ett_ansi_tcap_T_causeInformation, - NULL); + offset = dissect_ber_choice(actx, tree, tvb, offset, + T_causeInformation_choice, hf_index, ett_ansi_tcap_T_causeInformation, + NULL); return offset; } -static int dissect_causeInformation(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_T_causeInformation(FALSE, tvb, offset, actx, tree, hf_ansi_tcap_causeInformation); -} -static const ber_old_sequence_t Abort_sequence[] = { - { BER_CLASS_PRI, 7, BER_FLAGS_NOOWNTAG, dissect_identifier }, - { BER_CLASS_PRI, 25, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_dialogPortion }, - { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_causeInformation }, - { 0, 0, 0, NULL } +static const ber_sequence_t Abort_sequence[] = { + { &hf_ansi_tcap_identifier, BER_CLASS_PRI, 7, BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_TransactionID }, + { &hf_ansi_tcap_dialogPortion, BER_CLASS_PRI, 25, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_ansi_tcap_DialoguePortion }, + { &hf_ansi_tcap_causeInformation, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_ansi_tcap_T_causeInformation }, + { NULL, 0, 0, 0, NULL } }; static int dissect_ansi_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_) { - offset = dissect_ber_old_sequence(implicit_tag, actx, tree, tvb, offset, - Abort_sequence, hf_index, ett_ansi_tcap_Abort); + offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, + Abort_sequence, hf_index, ett_ansi_tcap_Abort); return offset; } @@ -1349,9 +1286,6 @@ if (check_col(actx->pinfo->cinfo, COL_INFO)) return offset; } -static int dissect_abort_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_ansi_tcap_T_abort(TRUE, tvb, offset, actx, tree, hf_ansi_tcap_abort); -} static const value_string ansi_tcap_PackageType_vals[] = { @@ -1365,22 +1299,22 @@ static const value_string ansi_tcap_PackageType_vals[] = { { 0, NULL } }; -static const ber_old_choice_t PackageType_choice[] = { - { 1, BER_CLASS_PRI, 1, BER_FLAGS_IMPLTAG, dissect_unidirectional_impl }, - { 2, BER_CLASS_PRI, 2, BER_FLAGS_IMPLTAG, dissect_queryWithPerm_impl }, - { 3, BER_CLASS_PRI, 3, BER_FLAGS_IMPLTAG, dissect_queryWithoutPerm_impl }, - { 4, BER_CLASS_PRI, 4, BER_FLAGS_IMPLTAG, dissect_response_impl }, - { 5, BER_CLASS_PRI, 5, BER_FLAGS_IMPLTAG, dissect_conversationWithPerm_impl }, - { 6, BER_CLASS_PRI, 6, BER_FLAGS_IMPLTAG, dissect_conversationWithoutPerm_impl }, - { 22, BER_CLASS_PRI, 22, BER_FLAGS_IMPLTAG, dissect_abort_impl }, - { 0, 0, 0, 0, NULL } +static const ber_choice_t PackageType_choice[] = { + { 1, &hf_ansi_tcap_unidirectional, BER_CLASS_PRI, 1, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_unidirectional }, + { 2, &hf_ansi_tcap_queryWithPerm, BER_CLASS_PRI, 2, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_queryWithPerm }, + { 3, &hf_ansi_tcap_queryWithoutPerm, BER_CLASS_PRI, 3, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_queryWithoutPerm }, + { 4, &hf_ansi_tcap_response , BER_CLASS_PRI, 4, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_response }, + { 5, &hf_ansi_tcap_conversationWithPerm, BER_CLASS_PRI, 5, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_conversationWithPerm }, + { 6, &hf_ansi_tcap_conversationWithoutPerm, BER_CLASS_PRI, 6, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_conversationWithoutPerm }, + { 22, &hf_ansi_tcap_abort , BER_CLASS_PRI, 22, BER_FLAGS_IMPLTAG, dissect_ansi_tcap_T_abort }, + { 0, NULL, 0, 0, 0, NULL } }; static int dissect_ansi_tcap_PackageType(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_old_choice(actx, tree, tvb, offset, - PackageType_choice, hf_index, ett_ansi_tcap_PackageType, - NULL); + offset = dissect_ber_choice(actx, tree, tvb, offset, + PackageType_choice, hf_index, ett_ansi_tcap_PackageType, + NULL); return offset; } @@ -1580,7 +1514,7 @@ proto_register_ansi_tcap(void) "ansi_tcap.T_causeInformation", HFILL }}, { &hf_ansi_tcap_abortCause, { "abortCause", "ansi_tcap.abortCause", - FT_INT32, BASE_DEC, VALS(ansi_tcap_P_Abort_cause_vals), 0, + FT_INT32, BASE_DEC, VALS(ansi_tcap_P_Abort_cause_U_vals), 0, "ansi_tcap.P_Abort_cause", HFILL }}, { &hf_ansi_tcap_userInformation, { "userInformation", "ansi_tcap.userInformation", @@ -1622,8 +1556,8 @@ proto_register_ansi_tcap(void) { "confidentiality", "ansi_tcap.confidentiality", FT_NONE, BASE_NONE, NULL, 0, "ansi_tcap.Confidentiality", HFILL }}, - { &hf_ansi_tcap_UserInformation_item, - { "Item", "ansi_tcap.UserInformation_item", + { &hf_ansi_tcap__untag_item, + { "Item", "ansi_tcap._untag_item", FT_NONE, BASE_NONE, NULL, 0, "ansi_tcap.EXTERNAL", HFILL }}, { &hf_ansi_tcap_confidentialityId, @@ -1638,8 +1572,8 @@ proto_register_ansi_tcap(void) { "objectConfidentialityId", "ansi_tcap.objectConfidentialityId", FT_OID, BASE_NONE, NULL, 0, "ansi_tcap.OBJECT_IDENTIFIER", HFILL }}, - { &hf_ansi_tcap_ComponentSequence_item, - { "Item", "ansi_tcap.ComponentSequence_item", + { &hf_ansi_tcap__untag_item_01, + { "Item", "ansi_tcap._untag_item", FT_UINT32, BASE_DEC, VALS(ansi_tcap_ComponentPDU_vals), 0, "ansi_tcap.ComponentPDU", HFILL }}, { &hf_ansi_tcap_invokeLast, @@ -1740,13 +1674,13 @@ proto_register_ansi_tcap(void) &ett_ansi_tcap_TransactionPDU, &ett_ansi_tcap_Abort, &ett_ansi_tcap_T_causeInformation, - &ett_ansi_tcap_DialoguePortion, + &ett_ansi_tcap_DialoguePortion_U, &ett_ansi_tcap_T_applicationContext, &ett_ansi_tcap_T_securityContext, - &ett_ansi_tcap_UserInformation, + &ett_ansi_tcap_UserInformation_U, &ett_ansi_tcap_Confidentiality, &ett_ansi_tcap_T_confidentialityId, - &ett_ansi_tcap_ComponentSequence, + &ett_ansi_tcap_SEQUENCE_OF_ComponentPDU, &ett_ansi_tcap_ComponentPDU, &ett_ansi_tcap_Invoke, &ett_ansi_tcap_ReturnResult, |