Formating changes and align a bit to spec.

svn path=/trunk/; revision=21521
This commit is contained in:
Anders Broman 2007-04-23 06:24:39 +00:00
parent e7931530dd
commit 9344195101
2 changed files with 98 additions and 70 deletions

View File

@ -137,7 +137,7 @@ END
TCAPMessages { ccitt recommendation q 773 modules (2) messages (1) version2 (2) }
TCAPMessages {itu-t recommendation q 773 modules(2) messages(1) version3(3)}
DEFINITIONS ::=
@ -147,7 +147,7 @@ BEGIN
-- Transaction Portion fields
MessageType ::= CHOICE {
TCMessage ::= CHOICE {
unidirectional [APPLICATION 1] IMPLICIT Unidirectional,
begin [APPLICATION 2] IMPLICIT Begin,
end [APPLICATION 4] IMPLICIT End,
@ -163,36 +163,50 @@ MessageType ::= CHOICE {
ansiabort [ PRIVATE 22 ] IMPLICIT AbortPDU
}
Unidirectional ::= SEQUENCE { dialoguePortion DialoguePortion OPTIONAL,
components ComponentPortion }
Unidirectional ::= SEQUENCE{
dialoguePortion DialoguePortion OPTIONAL,
components ComponentPortion
}
Begin ::= SEQUENCE { otid OrigTransactionID,
dialoguePortion DialoguePortion OPTIONAL,
components ComponentPortion OPTIONAL }
Begin ::= SEQUENCE{
otid OrigTransactionID,
dialoguePortion DialoguePortion OPTIONAL,
components ComponentPortion OPTIONAL
}
End ::= SEQUENCE { dtid DestTransactionID,
dialoguePortion DialoguePortion OPTIONAL,
components ComponentPortion OPTIONAL }
End ::= SEQUENCE{
dtid DestTransactionID,
dialoguePortion DialoguePortion OPTIONAL,
components ComponentPortion OPTIONAL
}
Continue ::= SEQUENCE { otid OrigTransactionID,
dtid DestTransactionID,
dialoguePortion DialoguePortion OPTIONAL,
components ComponentPortion OPTIONAL }
Abort ::= SEQUENCE {
dtid DestTransactionID,
reason Reason OPTIONAL
}
Reason ::= CHOICE
{ p-abortCause P-AbortCause,
u-abortCause DialoguePortion }
-- NOTE When the Abort Message is generated by the Transaction sublayer, a p-Abort Cause must be
-- present.The u-abortCause may be generated by the component sublayer in which case it is an ABRT
Continue ::= SEQUENCE {
otid OrigTransactionID,
dtid DestTransactionID,
dialoguePortion DialoguePortion OPTIONAL,
components ComponentPortion OPTIONAL
}
Abort ::= SEQUENCE{
dtid DestTransactionID,
reason Reason OPTIONAL
}
Reason ::= CHOICE{
p-abortCause P-AbortCause,
u-abortCause DialoguePortion
}
-- NOTE - When the Abort Message is generated by the Transaction sublayer, a p-Abort Cause may be
-- present. The u-abortCause may be generated by the component sublayer in which case it is an ABRT
-- APDU, or by the TC-User in which case it could be either an ABRT APDU or data in some user-defined
-- abstract syntax.
--DialoguePortion ::= [APPLICATION 11] EXPLICIT EXTERNAL
-- WS adaptation
DialoguePortion ::= [APPLICATION 11] IMPLICIT DialogueOC
--[UNIVERSAL 11] DialoguePDU
DialogueOC ::= OCTET STRING
-- The dialogue portion carries the dialogue control PDUs as value of the external data type.
@ -201,33 +215,34 @@ DialogueOC ::= OCTET STRING
-- if unstructured dialogue is used or any user defined abstract syntax name when only user information
-- is carried (e.g. when user information is sent in a 1988 Abort message).
OrigTransactionID ::= [APPLICATION 8] IMPLICIT OCTET STRING (SIZE (1..4) )
OrigTransactionID ::= [APPLICATION 8] IMPLICIT OCTET STRING (SIZE (1..4) )
DestTransactionID ::= [APPLICATION 9] IMPLICIT OCTET STRING (SIZE (1..4) )
DestTransactionID ::=[APPLICATION 9] IMPLICIT OCTET STRING (SIZE (1..4) )
P-AbortCause ::= [APPLICATION 10] IMPLICIT INTEGER {
unrecognizedMessageType (0),
unrecognizedTransactionID (1),
badlyFormattedTransactionPortion (2),
incorrectTransactionPortion (3),
resourceLimitation (4) }
P-AbortCause ::= [APPLICATION 10] IMPLICIT INTEGER {
unrecognizedMessageType (0),
unrecognizedTransactionID (1),
badlyFormattedTransactionPortion (2),
incorrectTransactionPortion (3),
resourceLimitation (4)}(0..127)
-- COMPONENT PORTION. The last field in the transaction portion of the TCAP message is the Component Portion.
-- The Component Portion may be absent.
ComponentPortion ::= --[APPLICATION 12] IMPLICIT SEQUENCE SIZE (1..MAX) OF Component
[APPLICATION 12] IMPLICIT SEQUENCE SIZE (1..MAX) OF Component
-- Component Portion fields
ComponentPortion ::= [APPLICATION 12] IMPLICIT SEQUENCE SIZE (1..MAX) OF Component
-- COMPONENT TYPE. Recommendation X.229 defines four Application Protocol Data Units (APDUs).
-- Component Portion fields
-- Recommendation X.880 defines four Application Protocol Data Units (APDUs) for invoking
-- operations, returning results or error, and for the rejection of invalid PDUs.
-- TCAP adds returnResultNotLast to allow for the segmentation of a result.
Component ::= CHOICE {
invoke [1] IMPLICIT Invoke,
returnResultLast [2] IMPLICIT ReturnResult,
returnError [3] IMPLICIT ReturnError,
reject [4] IMPLICIT Reject,
returnResultNotLast [7] IMPLICIT ReturnResult }
invoke [1] IMPLICIT Invoke,
returnResultLast [2] IMPLICIT ReturnResult,
returnError [3] IMPLICIT ReturnError,
reject [4] IMPLICIT Reject,
returnResultNotLast [7] IMPLICIT ReturnResult
}
-- The Components are sequences of data elements.
@ -243,12 +258,12 @@ Parameter ::= ANY
-- in the type definition of a particular operation.
ReturnResult ::= SEQUENCE {
invokeID InvokeIdType,
resultretres SEQUENCE {
opCode OPERATION,
parameter Parameter OPTIONAL
} OPTIONAL
}
invokeID InvokeIdType,
resultretres SEQUENCE {
opCode OPERATION,
parameter Parameter OPTIONAL
} OPTIONAL
}
-- ANY is filled by the single ASN.1 data type following the keyword RESULT in the type definition
-- of a particular operation.

View File

@ -229,7 +229,7 @@ static gint ett_tcap_Associate_source_diagnostic = -1;
static gint ett_tcap_UniDialoguePDU = -1;
static gint ett_tcap_AUDT_apdu = -1;
static gint ett_tcap_T_protocol_version3 = -1;
static gint ett_tcap_MessageType = -1;
static gint ett_tcap_TCMessage = -1;
static gint ett_tcap_Unidirectional = -1;
static gint ett_tcap_Begin = -1;
static gint ett_tcap_End = -1;
@ -1500,8 +1500,11 @@ gp_tcapsrt_info->ope=TC_END;
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, " End ");
offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
End_sequence, hf_index, ett_tcap_End);
offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
End_sequence, hf_index, ett_tcap_End);
return offset;
@ -1521,13 +1524,16 @@ static const ber_sequence_t Continue_sequence[] = {
static int
dissect_tcap_Continue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 244 "tcap.cnf"
#line 245 "tcap.cnf"
gp_tcapsrt_info->ope=TC_CONT;
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, " Continue ");
offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
Continue_sequence, hf_index, ett_tcap_Continue);
offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
Continue_sequence, hf_index, ett_tcap_Continue);
return offset;
@ -1592,13 +1598,16 @@ static const ber_sequence_t Abort_sequence[] = {
static int
dissect_tcap_Abort(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 251 "tcap.cnf"
#line 253 "tcap.cnf"
gp_tcapsrt_info->ope=TC_ABORT;
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, " Abort ");
offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
Abort_sequence, hf_index, ett_tcap_Abort);
offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
Abort_sequence, hf_index, ett_tcap_Abort);
return offset;
@ -1611,7 +1620,7 @@ static int dissect_abort_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbu
static int
dissect_tcap_TransactionID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 282 "tcap.cnf"
#line 285 "tcap.cnf"
tvbuff_t *next_tvb;
@ -2159,7 +2168,7 @@ static const ber_sequence_t TransactionPDU_sequence[] = {
static int
dissect_tcap_TransactionPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 263 "tcap.cnf"
#line 267 "tcap.cnf"
if ((hf_index == hf_tcap_ansiqueryWithPerm)&&(check_col(pinfo->cinfo, COL_INFO)))
col_append_fstr(pinfo->cinfo, COL_INFO, " QueryWithPerm");
@ -2175,8 +2184,9 @@ if ((hf_index == hf_tcap_ansiconversationWithPerm)&&(check_col(pinfo->cinfo, COL
if ((hf_index == hf_tcap_ansiconversationWithoutPerm)&&(check_col(pinfo->cinfo, COL_INFO)))
col_append_fstr(pinfo->cinfo, COL_INFO, " ConversationWithoutPerm");
offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
TransactionPDU_sequence, hf_index, ett_tcap_TransactionPDU);
offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
TransactionPDU_sequence, hf_index, ett_tcap_TransactionPDU);
@ -2260,11 +2270,14 @@ static const ber_sequence_t AbortPDU_sequence[] = {
static int
dissect_tcap_AbortPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 258 "tcap.cnf"
#line 261 "tcap.cnf"
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, " Abort ");
offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
AbortPDU_sequence, hf_index, ett_tcap_AbortPDU);
offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
AbortPDU_sequence, hf_index, ett_tcap_AbortPDU);
return offset;
@ -2274,7 +2287,7 @@ static int dissect_ansiabort_impl(packet_info *pinfo _U_, proto_tree *tree _U_,
}
static const value_string tcap_MessageType_vals[] = {
static const value_string tcap_TCMessage_vals[] = {
{ 0, "unidirectional" },
{ 1, "begin" },
{ 2, "end" },
@ -2290,7 +2303,7 @@ static const value_string tcap_MessageType_vals[] = {
{ 0, NULL }
};
static const ber_choice_t MessageType_choice[] = {
static const ber_choice_t TCMessage_choice[] = {
{ 0, BER_CLASS_APP, 1, BER_FLAGS_IMPLTAG, dissect_unidirectional_impl },
{ 1, BER_CLASS_APP, 2, BER_FLAGS_IMPLTAG, dissect_begin_impl },
{ 2, BER_CLASS_APP, 4, BER_FLAGS_IMPLTAG, dissect_end_impl },
@ -2307,9 +2320,9 @@ static const ber_choice_t MessageType_choice[] = {
};
static int
dissect_tcap_MessageType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
dissect_tcap_TCMessage(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_choice(pinfo, tree, tvb, offset,
MessageType_choice, hf_index, ett_tcap_MessageType,
TCMessage_choice, hf_index, ett_tcap_TCMessage,
NULL);
return offset;
@ -2392,7 +2405,7 @@ dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
gp_tcapsrt_info=tcapsrt_razinfo();
tcap_subdissector_used=FALSE;
gp_tcap_context=NULL;
dissect_tcap_MessageType(FALSE, tvb, 0, pinfo, tree, -1);
dissect_tcap_TCMessage(FALSE, tvb, 0, pinfo, tree, -1);
if (gtcap_HandleSRT &&
!tcap_subdissector_used ) {
@ -2671,7 +2684,7 @@ proto_register_tcap(void)
"tcap.Reason", HFILL }},
{ &hf_tcap_p_abortCause,
{ "p-abortCause", "tcap.p_abortCause",
FT_INT32, BASE_DEC, VALS(tcap_P_AbortCause_vals), 0,
FT_UINT32, BASE_DEC, VALS(tcap_P_AbortCause_vals), 0,
"tcap.P_AbortCause", HFILL }},
{ &hf_tcap_u_abortCause,
{ "u-abortCause", "tcap.u_abortCause",
@ -3038,7 +3051,7 @@ proto_register_tcap(void)
&ett_tcap_UniDialoguePDU,
&ett_tcap_AUDT_apdu,
&ett_tcap_T_protocol_version3,
&ett_tcap_MessageType,
&ett_tcap_TCMessage,
&ett_tcap_Unidirectional,
&ett_tcap_Begin,
&ett_tcap_End,