Initial import of TCAP project from Motivity.

This commit is contained in:
Vance Shipley 2011-03-07 23:57:05 +01:00
commit 2c7a40e5ba
67 changed files with 33991 additions and 0 deletions

17
TCAP/Makefile Normal file
View File

@ -0,0 +1,17 @@
.PHONY: all
all:
cd asn_src && $(MAKE)
cd src && $(MAKE)
cd doc && $(MAKE)
.PHONY: doc
doc:
cd doc && $(MAKE) $@
.PHONY: clean
clean:
cd asn_src && $(MAKE) $@
cd src && $(MAKE) $@
cd doc && $(MAKE) $@

View File

@ -0,0 +1,38 @@
ROSEINCLUDES = -I ../itu
EBIN = ../../ebin/ansi
ERLC = erlc
ERLCFLAGS = -b beam -W -v -o $(EBIN)
ASNC = $(ERLC)
ASNCFLAGS = -W -b ber_bin +optimize +driver +noobj $(ROSEINCLUDES)
$(EBIN)/%.beam:%.erl
$(ERLC) $(ERLCFLAGS) $<
.SECONDARY: %.erl
%.erl:%.asn
$(ASNC) $(ASNCFLAGS) $<
.PHONY: default
default: all
.PHONY: all
all: $(EBIN)/TR.beam
# $(EBIN)/TCAPPackage.beam \
# $(EBIN)/TCAP-Remote-Operations-Information-Objects.beam
TCAPPackage.erl: $(EBIN)/TCAP-Remote-Operations-Information-Objects.beam
.PHONY: clean
clean:
- rm -f *.asn1db
- rm -f $(EBIN)/TR.beam
# $(EBIN)/TCAPPackage.beam \
# $(EBIN)/TCAP-Remote-Operations-Information-Objects.beam
- rm -f TR.erl TCAPPackage.erl
- rm -f TR.hrl TCAPPackage.hrl

View File

@ -0,0 +1,116 @@
TCAP-Remote-Operations-Information-Objects
{iso(1) memberbody(2) usa(840) t1-114(10013) modules(0) informationObjects(1) version4(4)} DEFINITIONS ::=
BEGIN
--Exports Everything
IMPORTS
emptyBind, emptyUnbind
FROM Remote-Operations-Useful-Definitions
{joint-iso-ccitt remote-operations(4) useful-definitions(7) version1(0)};
OPERATION ::= CLASS {
&ArgumentType OPTIONAL,
&argumentTypeOptional BOOLEAN OPTIONAL,
&returnResult BOOLEAN DEFAULT TRUE,
&ResultType OPTIONAL,
&resultTypeOptional BOOLEAN OPTIONAL,
&Errors ERROR OPTIONAL,
&Linked OPERATION OPTIONAL,
&synchronous BOOLEAN DEFAULT FALSE,
&alwaysReturns BOOLEAN DEFAULT TRUE,
&InvokePriority Priority OPTIONAL,
&ResultPriority Priority OPTIONAL,
&invokeLast BOOLEAN DEFAULT FALSE,
&operationCode OperationCode UNIQUE OPTIONAL
} WITH SYNTAX {
[ARGUMENT &ArgumentType [OPTIONAL &argumentTypeOptional]]
[RESULT &ResultType [OPTIONAL &resultTypeOptional]]
[RETURN RESULT &returnResult]
[ERRORS &Errors]
[LINKED &Linked]
[SYNCHRONOUS &synchronous]
[ALWAYS RETURNS &alwaysReturns]
[INVOKE PRIORITY &InvokePriority]
[RESULT PRIORITY &ResultPriority]
[LAST &invokeLast]
[CODE &operationCode]
}
ERROR ::= CLASS {
&ParameterType OPTIONAL,
&parameterTypeOptional BOOLEAN OPTIONAL,
&ErrorPriority Priority OPTIONAL,
&errorCode ErrorCode UNIQUE OPTIONAL
} WITH SYNTAX {
[PARAMETER &ParameterType [OPTIONAL &parameterTypeOptional]]
[PRIORITY &ErrorPriority]
[CODE &errorCode]
}
OPERATION-PACKAGE ::= CLASS {
&Both OPERATION OPTIONAL,
&Consumer OPERATION OPTIONAL,
&Supplier OPERATION OPTIONAL,
&id OBJECT IDENTIFIER UNIQUE OPTIONAL
} WITH SYNTAX {
[OPERATIONS &Both]
[CONSUMER INVOKES &Supplier]
[SUPPLIER INVOKES &Consumer]
[ID &id]
}
CONNECTION-PACKAGE ::= CLASS {
&bind OPERATION DEFAULT emptyBind,
&unbind OPERATION DEFAULT emptyUnbind,
&responderCanUnbind BOOLEAN DEFAULT FALSE,
&unbindCanFail BOOLEAN DEFAULT FALSE,
&id OBJECT IDENTIFIER UNIQUE OPTIONAL
} WITH SYNTAX {
[BIND &bind]
[UNBIND &unbind]
[RESPONDER UNBIND &responderCanUnbind]
[FAILURE TO UNBIND &unbindCanFail]
[ID &id]
}
CONTRACT ::= CLASS {
&connection CONNECTION-PACKAGE OPTIONAL,
&OperationsOf OPERATION-PACKAGE OPTIONAL,
&InitiatorConsumerOf OPERATION-PACKAGE OPTIONAL,
&InitiatorSupplierOf OPERATION-PACKAGE OPTIONAL,
&id OBJECT IDENTIFIER UNIQUE OPTIONAL
} WITH SYNTAX {
[CONNECTION &connection]
[OPERATIONS OF &OperationsOf]
[INITIATOR CONSUMER OF &InitiatorConsumerOf]
[RESPONDER CONSUMER OF &InitiatorSupplierOf]
[ID &id]
}
ROS-OBJECT-CLASS ::= CLASS {
&Is ROS-OBJECT-CLASS OPTIONAL,
&Initiates CONTRACT OPTIONAL,
&Responds CONTRACT OPTIONAL,
&InitiatesAndResponds CONTRACT OPTIONAL,
&id OBJECT IDENTIFIER UNIQUE
} WITH SYNTAX {
[IS &Is]
[BOTH &InitiatesAndResponds]
[INITIATES &Initiates]
[RESPONDS &Responds]
ID &id
}
OperationCode ::= CHOICE {
national [PRIVATE 16] IMPLICIT INTEGER(-32768..32767),
private [PRIVATE 17] IMPLICIT INTEGER
}
ErrorCode ::= CHOICE {
national [PRIVATE 19] INTEGER(-128..127),
private [PRIVATE 20] INTEGER
}
Priority ::= INTEGER(0..MAX)
END --end of Information Object Specifications

View File

@ -0,0 +1,211 @@
TCAPPackage
{iso(1) memberbody(2) usa(840) t1-114(10013) modules(0) tcapPackage(0) version4(4)} DEFINITIONS ::=
BEGIN
IMPORTS
OPERATION, ERROR
FROM TCAP-Remote-Operations-Information-Objects
{iso(1) memberbody(2) usa(840) t1-114(10013) modules(0) informationObjects(1) version4(4)};
PackageType ::= CHOICE {
unidirectional [PRIVATE 1] IMPLICIT UniTransactionPDU,
queryWithPerm [PRIVATE 2] IMPLICIT TransactionPDU,
queryWithoutPerm [PRIVATE 3] IMPLICIT TransactionPDU,
response [PRIVATE 4] IMPLICIT TransactionPDU,
conversationWithPerm [PRIVATE 5] IMPLICIT TransactionPDU,
conversationWithoutPerm [PRIVATE 6] IMPLICIT TransactionPDU,
abort [PRIVATE 22] IMPLICIT Abort
}
UniTransactionPDU ::= SEQUENCE {
identifier TransactionID,
dialoguePortion DialoguePortion OPTIONAL,
componentPortion ComponentSequence
}
TransactionPDU ::= SEQUENCE {
identifier TransactionID,
dialoguePortion DialoguePortion OPTIONAL,
componentPortion ComponentSequence OPTIONAL
}
-- TransactionPDU should include either a Dialogue Portion,
-- a Component Sequence or both
TransactionID ::= [PRIVATE 7] IMPLICIT OCTET STRING
-- 0 octets for the Unidirectional, 4 octets for Query, Response & Abort
-- 8 octets for Conversation in the order Originating then Responding TID
Abort ::= SEQUENCE {
identifier TransactionID,
dialoguePortion DialoguePortion OPTIONAL,
causeInformation CHOICE {
abortCause P-Abort-cause,
userInformation UserAbortInformation
} OPTIONAL
}
-- When the Abort package is generated by the Transaction sublayer,
-- the P-Abort-cause must be present
P-Abort-cause ::= [PRIVATE 23] IMPLICIT INTEGER {
unrecognizedPackageType(1),
incorrectTransactionPortion(2),
badlyStructuredTransactionPortion(3),
unassignedRespondingTransactionID(4),
permissionToReleaseProblem(5), -- for further study
resourceUnavailable(6),
unrecognizedDialoguePortionID(7),
badlyStructuredDialoguePortion(8),
missingDialoguePortion(9),
inconsistentDialoguePortion(10)
}
DialoguePortion ::= [PRIVATE 25] IMPLICIT SEQUENCE {
version ProtocolVersion OPTIONAL,
applicationContext CHOICE {
integerApplicationId IntegerApplicationContext,
objectApplicationId ObjectIDApplicationContext
} OPTIONAL,
userInformation UserInformation OPTIONAL,
securityContext CHOICE {
integerSecurityId [0] IMPLICIT INTEGER,
objectSecurityId [1] IMPLICIT OBJECT IDENTIFIER
} OPTIONAL,
confidentiality [2] IMPLICIT Confidentiality OPTIONAL
}
ProtocolVersion ::= [PRIVATE 26] IMPLICIT OCTET STRING(SIZE (1))
-- 0000 0000 not used
-- 0000 0001 T1.114-1996
-- 0000 0010 T1.114-2000
-- other reserved
-- These values can be combined using the bit-wise logical or operation
-- to indicate support for more than one version, e.g. the value 0000 0011
-- means that both 1996 and 2000 versions are supported
IntegerApplicationContext ::= [PRIVATE 27] IMPLICIT INTEGER
ObjectIDApplicationContext ::= [PRIVATE 28] IMPLICIT OBJECT IDENTIFIER
UserInformation ::= [PRIVATE 29] IMPLICIT SEQUENCE OF EXTERNAL
Confidentiality ::= SEQUENCE {
confidentialityId CHOICE {
integerConfidentialityId [0] IMPLICIT INTEGER,
objectConfidentialityId [1] IMPLICIT OBJECT IDENTIFIER
} OPTIONAL,
...
-- The extension marker indicates the possible presence of items
-- in the confidentiality set that are used by the confidentiality
-- algorithm.
}
UserAbortInformation ::= [PRIVATE 24] EXTERNAL
ComponentSequence ::= [PRIVATE 8] IMPLICIT SEQUENCE OF ComponentPDU{InvokeId, {Invocable}, {Returnable}}
-- Component Portion specification starts below
ComponentPDU{InvokeId:InvokeIdSet, OPERATION:Invocable, OPERATION:Returnable}
::= CHOICE {
invokeLast [PRIVATE 9] IMPLICIT Invoke{{InvokeIdSet}, {Invocable}}
(CONSTRAINED BY { -- invocable.&invokeLast must be TRUE --}
! RejectProblem:generalincorrectComponentPortion),
returnResultLast [PRIVATE 10] IMPLICIT ReturnResult{{Returnable}},
returnError [PRIVATE 11] IMPLICIT ReturnError{{Errors {{Returnable}}}},
reject [PRIVATE 12] IMPLICIT Reject,
invokeNotLast [PRIVATE 13] IMPLICIT Invoke{{InvokeIdSet}, {Invocable}}
(CONSTRAINED BY { -- invocable.&invokeLast must be FALSE --}
! RejectProblem:generalincorrectComponentPortion),
returnResultNotLast [PRIVATE 14] IMPLICIT ReturnResult{{Returnable}}
} (CONSTRAINED BY {-- must conform to the above definition --} ! RejectProblem:generalunrecognisedComponentType)
Invoke{InvokeId:InvokeIdSet, OPERATION:Operations} ::= SEQUENCE {
componentIDs [PRIVATE 15] IMPLICIT OCTET STRING(SIZE (0..2))
-- The invoke ID precedes the correlation id. There may be no
-- identifier,only an invoke ID, or both invoke and correlation ID.
(CONSTRAINED BY {-- must be unambiguous --}
! RejectProblem:invokeduplicateInvocation)
(CONSTRAINED BY {-- correlation ID must identify an outstanding operation --}
! RejectProblem:invokeunrecognisedCorrelationId) OPTIONAL,
-- operationCode
opcode OPERATION.&operationCode ({Operations} ! RejectProblem:invokeunrecognisedOperation),
-- OPERATION.&ParameterType
parameter OPERATION.&ResultType ({Operations}{@opcode}
! RejectProblem:invoke-mistypedArgument) OPTIONAL
} (CONSTRAINED BY {-- must conform to the above definition --} ! RejectProblem:generalincorrectComponentPortion)
(CONSTRAINED BY {-- must have consistent encoding --} ! RejectProblem:generalbadlyStructuredCompPortion)
(CONSTRAINED BY {-- must conform to T1.114.3 encoding rules --} ! RejectProblem:generalincorrectComponentCoding)
ReturnResult{OPERATION:Operations} ::= SEQUENCE {
componentID [PRIVATE 15] IMPLICIT OCTET STRING(SIZE (1))
(CONSTRAINED BY {-- must be that of an outstanding operation --}
! RejectProblem:returnResultunrecognisedCorrelationId)
(CONSTRAINED BY {-- which returns a result --}
! RejectProblem:returnResultunexpectedReturnResult),
parameter OPERATION.&ResultType
-- ({Operations}{@opcode} !RejectProblem:returnResultincorrectParameter)
OPTIONAL
} (CONSTRAINED BY {-- must conform to the above definition --} ! RejectProblem:generalincorrectComponentPortion)
(CONSTRAINED BY {-- must have consistent encoding --} ! RejectProblem:generalbadlyStructuredCompPortion)
(CONSTRAINED BY {-- must conform to T1.114.3 encoding rules --} ! RejectProblem:generalincorrectComponentCoding)
ReturnError{ERROR:Errors} ::= SEQUENCE {
componentID [PRIVATE 15] IMPLICIT OCTET STRING(SIZE (1))
(CONSTRAINED BY {-- must be that of an outstanding operation --}
! RejectProblem:returnErrorunrecognisedCorrelationId)
(CONSTRAINED BY {-- which returns an error --}
! RejectProblem:returnErrorunexpectedReturnError),
errorCode ERROR.&errorCode({Errors} ! RejectProblem:returnErrorunrecognisedError)
(CONSTRAINED BY {-- must be in the &Errors field of the associated operation --}
! RejectProblem:returnErrorunexpectedError),
parameter ERROR.&ParameterType ({Errors}{@errorCode} !RejectProblem:returnErrorincorrectParameter) OPTIONAL
} (CONSTRAINED BY {-- must conform to the above definition --} ! RejectProblem:generalincorrectComponentPortion)
(CONSTRAINED BY {-- must have consistent encoding --} ! RejectProblem:generalbadlyStructuredCompPortion)
(CONSTRAINED BY {-- must conform to T1.114.3 encoding rules --} ! RejectProblem:generalincorrectComponentCoding)
Reject ::= SEQUENCE {
componentID [PRIVATE 15] IMPLICIT OCTET STRING(SIZE (0..1)),
rejectProblem [PRIVATE 21] IMPLICIT Problem,
parameter CHOICE {
paramSequence [PRIVATE 16] IMPLICIT SEQUENCE {},
paramSet [PRIVATE 18] IMPLICIT SET {}
-- The choice between paramSequence and paramSet is implementation
-- dependent, however paramSequence is preferred.
}
} (CONSTRAINED BY {-- must conform to the above definition --} ! RejectProblem:generalincorrectComponentPortion)
(CONSTRAINED BY {-- must have consistent encoding --} ! RejectProblem:generalbadlyStructuredCompPortion)
(CONSTRAINED BY {-- must conform to T1.114.3 encoding rules --} ! RejectProblem:generalincorrectComponentCoding)
-- PROBLEMS, the specification of Problems follows
Problem ::= INTEGER {
generalunrecognisedComponentType(257),
generalincorrectComponentPortion(258),
generalbadlyStructuredCompPortion(259),
generalincorrectComponentCoding(260),
invokeduplicateInvocation(513),
invokeunrecognisedOperation(514),
invokeincorrectParameter(515),
invokeunrecognisedCorrelationID(516),
returnResultunrecognisedCorrelationID(769),
returnResultunexpectedReturnResult(770),
returnResultincorrectParameter(771),
returnErrorunrecognisedCorrelationID(1025),
returnErrorunexpectedReturnError(1026),
returnErrorunrecognisedError(1027),
returnErrorunexpectedError(1028),
returnErrorincorrectParameter(1029),
-- Applications using T1.114-1988 report Transaction portion
-- problems using a Reject component with a problem code in
-- the range 1281e6
-- It is preferred that other applications report
-- these problems using the Abort package type
transactionunrecognizedPackageType(1281),
transactionincorrectTransPortion(1282),
transactionbadlyStructuredTransPortion(1283),
transactionunassignedRespondingTransID(1284),
transactionpermissionToReleaseProblem(1285),
transactionresourceUnavailable(1286)
}
TCInvokeIdSet ::= InvokeId(WITH COMPONENTS { present (-128..127) })
END

103
TCAP/asn_src/ANSI/TR.asn Normal file
View File

@ -0,0 +1,103 @@
TR
{joint-iso-itu-t(2) country(16) ca(124) motivity(113594) tcap(10) modules(0) ansi(1) tr(0) version1(1)} DEFINITIONS ::=
BEGIN
PackageType ::= CHOICE {
unidirectional [PRIVATE 1] IMPLICIT UniTransactionPDU,
queryWithPerm [PRIVATE 2] IMPLICIT TransactionPDU,
queryWithoutPerm [PRIVATE 3] IMPLICIT TransactionPDU,
response [PRIVATE 4] IMPLICIT TransactionPDU,
conversationWithPerm [PRIVATE 5] IMPLICIT TransactionPDU,
conversationWithoutPerm [PRIVATE 6] IMPLICIT TransactionPDU,
abort [PRIVATE 22] IMPLICIT Abort
}
UniTransactionPDU ::= SEQUENCE {
identifier TransactionID,
dialoguePortion DialoguePortion OPTIONAL,
componentPortion ComponentSequence
}
TransactionPDU ::= SEQUENCE {
identifier TransactionID,
dialoguePortion DialoguePortion OPTIONAL,
componentPortion ComponentSequence OPTIONAL
}
-- TransactionPDU should include either a Dialogue Portion,
-- a Component Sequence or both
TransactionID ::= [PRIVATE 7] IMPLICIT OCTET STRING
-- 0 octets for the Unidirectional, 4 octets for Query, Response & Abort
-- 8 octets for Conversation in the order Originating then Responding TID
Abort ::= SEQUENCE {
identifier TransactionID,
dialoguePortion DialoguePortion OPTIONAL,
causeInformation CHOICE {
abortCause P-Abort-cause,
userInformation UserAbortInformation
} OPTIONAL
}
-- When the Abort package is generated by the Transaction sublayer,
-- the P-Abort-cause must be present
P-Abort-cause ::= [PRIVATE 23] IMPLICIT INTEGER {
unrecognizedPackageType(1),
incorrectTransactionPortion(2),
badlyStructuredTransactionPortion(3),
unassignedRespondingTransactionID(4),
permissionToReleaseProblem(5), -- for further study
resourceUnavailable(6),
unrecognizedDialoguePortionID(7),
badlyStructuredDialoguePortion(8),
missingDialoguePortion(9),
inconsistentDialoguePortion(10)
}
DialoguePortion ::= [PRIVATE 25] IMPLICIT SEQUENCE {
version ProtocolVersion OPTIONAL,
applicationContext CHOICE {
integerApplicationId IntegerApplicationContext,
objectApplicationId ObjectIDApplicationContext
} OPTIONAL,
userInformation UserInformation OPTIONAL,
securityContext CHOICE {
integerSecurityId [0] IMPLICIT INTEGER,
objectSecurityId [1] IMPLICIT OBJECT IDENTIFIER
} OPTIONAL,
confidentiality [2] IMPLICIT Confidentiality OPTIONAL
}
ProtocolVersion ::= [PRIVATE 26] IMPLICIT OCTET STRING(SIZE (1))
-- 0000 0000 not used
-- 0000 0001 T1.114-1996
-- 0000 0010 T1.114-2000
-- other reserved
-- These values can be combined using the bit-wise logical or operation
-- to indicate support for more than one version, e.g. the value 0000 0011
-- means that both 1996 and 2000 versions are supported
IntegerApplicationContext ::= [PRIVATE 27] IMPLICIT INTEGER
ObjectIDApplicationContext ::= [PRIVATE 28] IMPLICIT OBJECT IDENTIFIER
UserInformation ::= [PRIVATE 29] IMPLICIT SEQUENCE OF EXTERNAL
Confidentiality ::= SEQUENCE {
confidentialityId CHOICE {
integerConfidentialityId [0] IMPLICIT INTEGER,
objectConfidentialityId [1] IMPLICIT OBJECT IDENTIFIER
} OPTIONAL,
...
-- The extension marker indicates the possible presence of items
-- in the confidentiality set that are used by the confidentiality
-- algorithm.
}
UserAbortInformation ::= [PRIVATE 24] EXTERNAL
-- leave this portion undecoded
ComponentSequence ::= TYPE-IDENTIFIER.&Type
END

View File

@ -0,0 +1,75 @@
DialoguePDUs {itu-t recommendation q 773 modules(2) dialoguePDUs(2) version1(1)
} DEFINITIONS ::=
BEGIN
EXPORTS dialogue-as-id, DialoguePDU;
-- abstract syntax name for structured dialogue APDUs
dialogue-as-id OBJECT IDENTIFIER ::=
{itu-t recommendation q 773 as(1) dialogue-as(1) version1(1)}
DialoguePDU ::= CHOICE {
dialogueRequest AARQ-apdu,
dialogueResponse AARE-apdu,
dialogueAbort ABRT-apdu
}
AARQ-apdu ::= [APPLICATION 0] IMPLICIT SEQUENCE {
protocol-version
[0] IMPLICIT BIT STRING {version1(0)} DEFAULT {version1},
application-context-name [1] OBJECT IDENTIFIER,
user-information [30] IMPLICIT SEQUENCE OF EXTERNAL OPTIONAL
}
AARE-apdu ::= [APPLICATION 1] IMPLICIT SEQUENCE {
protocol-version
[0] IMPLICIT BIT STRING {version1(0)} DEFAULT {version1},
application-context-name [1] OBJECT IDENTIFIER,
result [2] Associate-result,
result-source-diagnostic [3] Associate-source-diagnostic,
user-information [30] IMPLICIT SEQUENCE OF EXTERNAL OPTIONAL
}
-- RLRQ PDU is currently not used.
-- It is included for completeness only.
RLRQ-apdu ::= [APPLICATION 2] IMPLICIT SEQUENCE {
reason [0] IMPLICIT Release-request-reason OPTIONAL,
user-information [30] IMPLICIT SEQUENCE OF EXTERNAL OPTIONAL
}
-- RLRE PDU is currently not used.
-- It is included for completeness only
RLRE-apdu ::= [APPLICATION 3] IMPLICIT SEQUENCE {
reason [0] IMPLICIT Release-response-reason OPTIONAL,
user-information [30] IMPLICIT SEQUENCE OF EXTERNAL OPTIONAL
}
ABRT-apdu ::= [APPLICATION 4] IMPLICIT SEQUENCE {
abort-source [0] IMPLICIT ABRT-source,
user-information [30] IMPLICIT SEQUENCE OF EXTERNAL OPTIONAL
}
ABRT-source ::= INTEGER {dialogue-service-user(0), dialogue-service-provider(1)
}
Associate-result ::= INTEGER {accepted(0), reject-permanent(1)}
Associate-source-diagnostic ::= CHOICE {
dialogue-service-user
[1] INTEGER {null(0), no-reason-given(1),
application-context-name-not-supported(2)},
dialogue-service-provider
[2] INTEGER {null(0), no-reason-given(1), no-common-dialogue-portion(2)}
}
-- Release-request-reason is currently not used.
-- It is included for completeness only.
Release-request-reason ::= INTEGER {normal(0), urgent(1), user-defined(30)
}
-- Release-response-reason is currently not used.
-- It is included for completeness only.
Release-response-reason ::= INTEGER {
normal(0), not-finished(1), user-defined(30)}
END -- DialoguePDUs

77
TCAP/asn_src/ITU/Makefile Normal file
View File

@ -0,0 +1,77 @@
EBIN = ../../ebin/itu
ERLC = erlc
ERLCFLAGS = -b beam -W -v +warn_unused_vars -o $(EBIN)
ASNC = $(ERLC)
ASNCFLAGS = -W -b ber_bin +optimize +driver
$(EBIN)/%.beam:%.erl
$(ERLC) $(ERLCFLAGS) $<
.SECONDARY: %.erl
%.erl:%.asn
$(ASNC) $(ASNCFLAGS) $<
.PHONY: default
default: all
.PHONY: all
all: q773 q755 q775
.PHONY: q773
q773: $(EBIN)/TR.beam $(EBIN)/TCAPMessages.beam \
$(EBIN)/DialoguePDUs.beam $(EBIN)/UnidialoguePDUs.beam
TR.erl: TCAPMessages.erl
TCAPMessages.erl: Remote-Operations-Useful-Definitions.erl
.PHONY: q755
q755: $(EBIN)/TC-Testing-User.beam
TC-Testing-User.erl: TC-TMP.erl Remote-Operations-Information-Objects.erl
.PHONY: q775
q775: $(EBIN)/TCAP-Examples.beam $(EBIN)/TCAP-Tools.beam
TCAP-Examples.erl: Remote-Operations-Information-Objects.erl
TCAP-Tools.erl: Remote-Operations-Information-Objects.erl
TC-Notation-Extensions.erl: TCAPMessages.erl \
Remote-Operations-Useful-Definitions.erl \
Remote-Operations-Information-Objects.erl \
Remote-Operations-Generic-ROS-PDUs.erl \
UnidialoguePDUs.erl DialoguePDUs.erl
Remote-Operations-Useful-Definitions.erl: \
Remote-Operations-Information-Objects.asn \
Remote-Operations-Generic-ROS-PDUs.asn \
Remote-Operations-Useful-Definitions.asn
$(ASNC) $(ASNCFLAGS) $^
Remote-Operations-Information-Objects.erl: \
Remote-Operations-Information-Objects.asn \
Remote-Operations-Generic-ROS-PDUs.asn \
Remote-Operations-Useful-Definitions.asn
$(ASNC) $(ASNCFLAGS) $^
.PHONY: clean
clean:
- rm -f *.asn1db
- rm -f TR.erl TCAPMessages.erl \
DialoguePDUs.erl UnidialoguePDUs.erl \
Remote-Operations-Useful-Definitions.erl \
Remote-Operations-Information-Objects.erl \
Remote-Operations-Generic-ROS-PDUs.erl \
TC-Testing-User.erl TC-TMP.erl \
TCAP-Examples.erl TCAP-Tools.erl \
TC-Notation-Extensions.erl
- rm -f Remote-Operations-Generic-ROS-PDUs.hrl \
DialoguePDUs.hrl UnidialoguePDUs.hrl \
TCAPMessages.hrl TR.hrl \
TC-Testing-User.hrl TC-TMP.hrl \
TCAP-Examples.hrl
- rm -f $(EBIN)/TR.beam $(EBIN)/TCAPMessages.beam \
$(EBIN)/DialoguePDUs.beam $(EBIN)/UnidialoguePDUs.beam \
$(EBIN)/TC-Testing-User.beam \
$(EBIN)/TCAP-Examples.beam $(EBIN)/TCAP-Tools.beam

View File

@ -0,0 +1,161 @@
-- Module Remote-Operations-Generic-ROS-PDUs (Rec. X.880:07/1994)
Remote-Operations-Generic-ROS-PDUs {joint-iso-itu-t remote-operations(4)
generic-ROS-PDUs(6) version1(0)} DEFINITIONS IMPLICIT TAGS ::=
BEGIN
-- exports everything
IMPORTS
OPERATION, ERROR
FROM Remote-Operations-Information-Objects {joint-iso-itu-t
remote-operations(4) informationObjects(5) version1(0)};
ROS{InvokeId:InvokeIdSet, OPERATION:Invokable, OPERATION:Returnable} ::=
CHOICE {
invoke [1] Invoke{{InvokeIdSet}, {Invokable}},
returnResult [2] ReturnResult{{Returnable}},
returnError [3] ReturnError{{Errors {{Returnable}}}},
reject [4] Reject
}
(CONSTRAINED BY { -- must conform to the above definition --} !
RejectProblem:general-unrecognizedPDU)
Invoke{InvokeId:InvokeIdSet, OPERATION:Operations} ::= SEQUENCE {
invokeId
InvokeId(InvokeIdSet)
(CONSTRAINED BY { -- must be unambiguous --} !
RejectProblem:invoke-duplicateInvocation),
linkedId
CHOICE {present [0] IMPLICIT present < InvokeId,
absent [1] IMPLICIT NULL
}
(CONSTRAINED BY { -- must identify an outstanding operation --} !
RejectProblem:invoke-unrecognizedLinkedId)
(CONSTRAINED BY { -- which has one or more linked operations--} !
RejectProblem:invoke-linkedResponseUnexpected) OPTIONAL,
opcode
OPERATION.&operationCode
({Operations} !RejectProblem:invoke-unrecognizedOperation),
argument
OPERATION.&ArgumentType
({Operations}{@opcode} !RejectProblem:invoke-mistypedArgument) OPTIONAL
}
(CONSTRAINED BY { -- must conform to the above definition --} !
RejectProblem:general-mistypedPDU)
(WITH COMPONENTS {
...,
linkedId ABSENT
} |
WITH COMPONENTS {
...,
linkedId PRESENT,
opcode (CONSTRAINED BY {
-- must be in the &Linked field of the associated operation --}
!RejectProblem:invoke-unexpectedLinkedOperation)
})
-- continued on the next page
ReturnResult{OPERATION:Operations} ::= SEQUENCE {
invokeId
InvokeId
(CONSTRAINED BY { -- must be that for an outstanding operation --} !
RejectProblem:returnResult-unrecognizedInvocation)
(CONSTRAINED BY { -- which returns a result --} !
RejectProblem:returnResult-resultResponseUnexpected),
result
SEQUENCE {opcode
OPERATION.&operationCode({Operations})
(CONSTRAINED BY { -- identified by invokeId --} !
RejectProblem:returnResult-unrecognizedInvocation),
result
OPERATION.&ResultType
({Operations}{@.opcode} !
RejectProblem:returnResult-mistypedResult)} OPTIONAL
}
(CONSTRAINED BY { -- must conform to the above definition --} !
RejectProblem:general-mistypedPDU)
ReturnError{ERROR:Errors} ::= SEQUENCE {
invokeId
InvokeId
(CONSTRAINED BY { -- must be that for an outstanding operation --} !
RejectProblem:returnError-unrecognizedInvocation)
(CONSTRAINED BY { -- which returns an error --} !
RejectProblem:returnError-errorResponseUnexpected),
errcode
ERROR.&errorCode({Errors} !RejectProblem:returnError-unrecognizedError)
(CONSTRAINED BY {
-- must be in the &Errors field of the associated operation --} !
RejectProblem:returnError-unexpectedError),
parameter
ERROR.&ParameterType
({Errors}{@errcode} !RejectProblem:returnError-mistypedParameter)
OPTIONAL
}
(CONSTRAINED BY { -- must conform to the above definition --} !
RejectProblem:general-mistypedPDU)
Reject ::= SEQUENCE {
invokeId InvokeId,
problem
CHOICE {general [0] GeneralProblem,
invoke [1] InvokeProblem,
returnResult [2] ReturnResultProblem,
returnError [3] ReturnErrorProblem}
}
(CONSTRAINED BY { -- must conform to the above definition --} !
RejectProblem:general-mistypedPDU)
GeneralProblem ::= INTEGER {
unrecognizedPDU(0), mistypedPDU(1), badlyStructuredPDU(2)}
-- continued on the next page
InvokeProblem ::= INTEGER {
duplicateInvocation(0), unrecognizedOperation(1), mistypedArgument(2),
resourceLimitation(3), releaseInProgress(4), unrecognizedLinkedId(5),
linkedResponseUnexpected(6), unexpectedLinkedOperation(7)}
ReturnResultProblem ::= INTEGER {
unrecognizedInvocation(0), resultResponseUnexpected(1), mistypedResult(2)
}
ReturnErrorProblem ::= INTEGER {
unrecognizedInvocation(0), errorResponseUnexpected(1), unrecognizedError(2),
unexpectedError(3), mistypedParameter(4)}
RejectProblem ::= INTEGER {
general-unrecognizedPDU(0), general-mistypedPDU(1),
general-badlyStructuredPDU(2), invoke-duplicateInvocation(10),
invoke-unrecognizedOperation(11), invoke-mistypedArgument(12),
invoke-resourceLimitation(13), invoke-releaseInProgress(14),
invoke-unrecognizedLinkedId(15), invoke-linkedResponseUnexpected(16),
invoke-unexpectedLinkedOperation(17),
returnResult-unrecognizedInvocation(20),
returnResult-resultResponseUnexpected(21), returnResult-mistypedResult(22),
returnError-unrecognizedInvocation(30),
returnError-errorResponseUnexpected(31), returnError-unrecognizedError(32),
returnError-unexpectedError(33), returnError-mistypedParameter(34)}
InvokeId ::= CHOICE {present INTEGER,
absent NULL
}
noInvokeId InvokeId ::= absent:NULL
NoInvokeId InvokeId ::= {noInvokeId}
Errors{OPERATION:Operations} ERROR ::= {Operations.&Errors}
-- continued on the next page
Bind{OPERATION:operation} ::= CHOICE {
bind-invoke [16] OPERATION.&ArgumentType({operation}),
bind-result [17] OPERATION.&ResultType({operation}),
bind-error [18] OPERATION.&Errors.&ParameterType({operation})
}
Unbind{OPERATION:operation} ::= CHOICE {
unbind-invoke [19] OPERATION.&ArgumentType({operation}),
unbind-result [20] OPERATION.&ResultType({operation}),
unbind-error [21] OPERATION.&Errors.&ParameterType({operation})
}
END -- end of generic ROS PDU definitions

View File

@ -0,0 +1,113 @@
-- Module Remote-Operations-Information-Objects (Rec. X.880:07/1994)
Remote-Operations-Information-Objects {joint-iso-itu-t remote-operations(4)
informationObjects(5) version1(0)} DEFINITIONS ::=
BEGIN
-- exports everything
IMPORTS
emptyBind, emptyUnbind
FROM Remote-Operations-Useful-Definitions {joint-iso-itu-t
remote-operations(4) useful-definitions(7) version1(0)};
OPERATION ::= CLASS {
&ArgumentType OPTIONAL,
&argumentTypeOptional BOOLEAN OPTIONAL,
&returnResult BOOLEAN DEFAULT TRUE,
&ResultType OPTIONAL,
&resultTypeOptional BOOLEAN OPTIONAL,
&Errors ERROR OPTIONAL,
&Linked OPERATION OPTIONAL,
&synchronous BOOLEAN DEFAULT FALSE,
&alwaysReturns BOOLEAN DEFAULT TRUE,
&InvokePriority Priority OPTIONAL,
&ResultPriority Priority OPTIONAL,
&operationCode Code UNIQUE OPTIONAL
}
WITH SYNTAX {
[ARGUMENT &ArgumentType [OPTIONAL &argumentTypeOptional]]
[RESULT &ResultType [OPTIONAL &resultTypeOptional]]
[RETURN RESULT &returnResult]
[ERRORS &Errors]
[LINKED &Linked]
[SYNCHRONOUS &synchronous]
[ALWAYS RESPONDS &alwaysReturns]
[INVOKE PRIORITY &InvokePriority]
[RESULT-PRIORITY &ResultPriority]
[CODE &operationCode]
}
ERROR ::= CLASS {
&ParameterType OPTIONAL,
&parameterTypeOptional BOOLEAN OPTIONAL,
&ErrorPriority Priority OPTIONAL,
&errorCode Code UNIQUE OPTIONAL
}
WITH SYNTAX {
[PARAMETER &ParameterType [OPTIONAL &parameterTypeOptional]]
[PRIORITY &ErrorPriority]
[CODE &errorCode]
}
OPERATION-PACKAGE ::= CLASS {
&Both OPERATION OPTIONAL,
&Consumer OPERATION OPTIONAL,
&Supplier OPERATION OPTIONAL,
&id OBJECT IDENTIFIER UNIQUE OPTIONAL
}
WITH SYNTAX {
[OPERATIONS &Both]
[CONSUMER INVOKES &Supplier]
[SUPPLIER INVOKES &Consumer]
[ID &id]
}
CONNECTION-PACKAGE ::= CLASS {
&bind OPERATION DEFAULT emptyBind,
&unbind OPERATION DEFAULT emptyUnbind,
&responderCanUnbind BOOLEAN DEFAULT FALSE,
&unbindCanFail BOOLEAN DEFAULT FALSE,
&id OBJECT IDENTIFIER UNIQUE OPTIONAL
}
WITH SYNTAX {
[BIND &bind]
[UNBIND &unbind]
[RESPONDER UNBIND &responderCanUnbind]
[FAILURE TO UNBIND &unbindCanFail]
[ID &id]
}
CONTRACT ::= CLASS {
&connection CONNECTION-PACKAGE OPTIONAL,
&OperationsOf OPERATION-PACKAGE OPTIONAL,
&InitiatorConsumerOf OPERATION-PACKAGE OPTIONAL,
&InitiatorSupplierOf OPERATION-PACKAGE OPTIONAL,
&id OBJECT IDENTIFIER UNIQUE OPTIONAL
}
WITH SYNTAX {
[CONNECTION &connection]
[OPERATIONS OF &OperationsOf]
[INITIATOR CONSUMER OF &InitiatorConsumerOf]
[RESPONDER CONSUMER OF &InitiatorSupplierOf]
[ID &id]
}
ROS-OBJECT-CLASS ::= CLASS {
&Is ROS-OBJECT-CLASS OPTIONAL,
&Initiates CONTRACT OPTIONAL,
&Responds CONTRACT OPTIONAL,
&InitiatesAndResponds CONTRACT OPTIONAL,
&id OBJECT IDENTIFIER UNIQUE
}
WITH SYNTAX {
[IS &Is]
[BOTH &InitiatesAndResponds]
[INITIATES &Initiates]
[RESPONDS &Responds]
ID &id
}
Code ::= CHOICE {local INTEGER, global OBJECT IDENTIFIER}
Priority ::= INTEGER(0..MAX)
END -- end of Information Object specifications

View File

@ -0,0 +1,91 @@
-- Module Remote-Operations-Useful-Definitions (Rec. X.880:07/1994)
Remote-Operations-Useful-Definitions {joint-iso-itu-t remote-operations(4)
useful-definitions(7) version1(0)} DEFINITIONS IMPLICIT TAGS ::=
BEGIN
-- exports everything
IMPORTS
OPERATION, ERROR, OPERATION-PACKAGE, Code
FROM Remote-Operations-Information-Objects {joint-iso-itu-t
remote-operations(4) informationObjects(5) version1(0)}
InvokeId, ROS{}
FROM Remote-Operations-Generic-ROS-PDUs {joint-iso-itu-t
remote-operations(4) generic-ROS-PDUs(6) version1(0)};
emptyBind OPERATION ::= {ERRORS {refuse}
SYNCHRONOUS TRUE
}
emptyUnbind OPERATION ::= {SYNCHRONOUS TRUE
}
refuse ERROR ::= {CODE local:-1
}
no-op OPERATION ::= {ALWAYS RESPONDS FALSE
CODE local:-1
}
Forward{OPERATION:OperationSet} OPERATION ::=
{OperationSet | OperationSet.&Linked.&Linked |
OperationSet.&Linked.&Linked.&Linked.&Linked}
Reverse{OPERATION:OperationSet} OPERATION ::= {Forward{{OperationSet.&Linked}}}
ConsumerPerforms{OPERATION-PACKAGE:package} OPERATION ::=
{Forward{{package.&Consumer}} | Forward{{package.&Both}} |
Reverse{{package.&Supplier}} | Reverse{{package.&Both}}}
SupplierPerforms{OPERATION-PACKAGE:package} OPERATION ::=
{Forward{{package.&Supplier}} | Forward{{package.&Both}} |
Reverse{{package.&Consumer}} | Reverse{{package.&Both}}}
AllOperations{OPERATION-PACKAGE:package} OPERATION ::=
{ConsumerPerforms{package} | SupplierPerforms{package}}
-- continued on the next page
recode{OPERATION:operation, Code:code} OPERATION ::= {
ARGUMENT operation.&ArgumentType
OPTIONAL operation.&argumentTypeOptional
RESULT operation.&ResultType
OPTIONAL operation.&resultTypeOptional
RETURN RESULT operation.&returnResult
ERRORS {operation.&Errors}
LINKED {operation.&Linked}
SYNCHRONOUS operation.&synchronous
ALWAYS RESPONDS operation.&alwaysReturns
INVOKE PRIORITY {operation.&InvokePriority}
RESULT-PRIORITY {operation.&ResultPriority}
CODE code
}
switch{OPERATION-PACKAGE:package, OBJECT IDENTIFIER:id} OPERATION-PACKAGE ::=
{
OPERATIONS {package.&Both}
CONSUMER INVOKES {package.&Consumer}
SUPPLIER INVOKES {package.&Supplier}
ID id
}
combine{OPERATION-PACKAGE:ConsumerConsumes, OPERATION-PACKAGE:ConsumerSupplies,
OPERATION-PACKAGE:base} OPERATION-PACKAGE ::= {
OPERATIONS {ConsumerConsumes.&Both | ConsumerSupplies.&Both}
CONSUMER INVOKES {ConsumerConsumes.&Consumer | ConsumerSupplies.&Supplier}
SUPPLIER INVOKES {ConsumerConsumes.&Supplier | ConsumerSupplies.&Consumer}
ID base.&id
}
ROS-SingleAS{InvokeId:InvokeIdSet, OPERATION-PACKAGE:package} ::=
ROS{{InvokeIdSet}, {AllOperations {package}}, {AllOperations {package}}}
ROS-ConsumerAS{InvokeId:InvokeIdSet, OPERATION-PACKAGE:package} ::=
ROS
{{InvokeIdSet}, {ConsumerPerforms {package}},
{SupplierPerforms {package}}}
ROS-SupplierAS{InvokeId:InvokeIdSet, OPERATION-PACKAGE:package} ::=
ROS
{{InvokeIdSet}, {SupplierPerforms {package}},
{ConsumerPerforms {package}}}
END -- end of useful definitions.

View File

@ -0,0 +1,84 @@
-- Module TC-Notation-Extensions (Q.775:06/1997)
TC-Notation-Extensions {itu-t recommendation q 775 modules(2)
notation-extension(4) version1(1)} DEFINITIONS ::=
BEGIN
IMPORTS
TCMessage{}
FROM TCAPMessages {itu-t recommendation q 773 modules(2) messages(1)
version3(3)}
Bind{}, Unbind{}
FROM Remote-Operations-Generic-ROS-PDUs {joint-iso-itu-t
remote-operations(4) generic-ROS-PDUs(6) version1(0)}
AllOperations{}, ConsumerPerforms{}, SupplierPerforms{}, combine{}
FROM Remote-Operations-Useful-Definitions {joint-iso-itu-t
remote-operations(4) useful-definitions(7) version1(0)}
CONTRACT, OPERATION-PACKAGE
FROM Remote-Operations-Information-Objects {joint-iso-itu-t
remote-operations(4) informationObjects(5) version1(0)}
UniDialoguePDU, uniDialogue-as-id
FROM UnidialoguePDUs {itu-t recommendation q 773 modules(2)
unidialoguePDUs(3) version1(1)}
DialoguePDU, dialogue-as-id
FROM DialoguePDUs {itu-t recommendation q 773 modules(2) dialoguePDUs(2)
version1(1)};
APPLICATION-CONTEXT ::= CLASS {
&associationContract CONTRACT,
&dialogueMode DialogueMode,
&termination Termination OPTIONAL,
&componentGrouping BOOLEAN DEFAULT TRUE,
&dialogueAndComponentGrouping BOOLEAN DEFAULT TRUE,
&AdditionalASEs OBJECT IDENTIFIER OPTIONAL,
&AbstractSyntaxes ABSTRACT-SYNTAX,
&applicationContextName OBJECT IDENTIFIER UNIQUE
}
WITH SYNTAX {
CONTRACT &associationContract
DIALOGUE MODE &dialogueMode
[TERMINATION &termination]
[COMPONENT GROUPING ALLOWED &componentGrouping]
[DIALOGUE WITH COMPONENTS ALLOWED &dialogueAndComponentGrouping]
[ADDITIONAL ASES &AdditionalASEs]
ABSTRACT SYNTAXES &AbstractSyntaxes
APPLICATION CONTEXT NAME &applicationContextName
}
DialogueMode ::= ENUMERATED {structured(1), unstructured(2)}
Termination ::= ENUMERATED {basic(1), prearranged(2)}
dialogue-abstract-syntax ABSTRACT-SYNTAX ::= {
DialoguePDU
IDENTIFIED BY dialogue-as-id
}
uniDialogue-abstract-syntax ABSTRACT-SYNTAX ::= {
UniDialoguePDU
IDENTIFIED BY uniDialogue-as-id
}
TCSingleAS{OPERATION-PACKAGE:package} ::=
TCMessage{{AllOperations {package}}, {AllOperations {package}}}
TCConsumerAS{OPERATION-PACKAGE:package} ::=
TCMessage{{ConsumerPerforms {package}}, {ConsumerPerforms {package}}}
TCSupplierAS{OPERATION-PACKAGE:package} ::=
TCMessage{{SupplierPerforms {package}}, {SupplierPerforms {package}}}
AllPackagesAS{APPLICATION-CONTEXT:ac} ::=
TCSingleAS
{combine{{ac.&associationContract.&OperationsOf |
ac.&associationContract.&InitiatorConsumerOf |
ac.&associationContract.&InitiatorSupplierOf},
{}, --was illegaly empty, needs to be changed
{-- Information Object of class OPERATION-PACKAGE to be defined --}}}
ConnectionAS{APPLICATION-CONTEXT:ac} ::= CHOICE {
bind Bind{ac.&associationContract.&connection.&bind},
unbind Unbind{ac.&associationContract.&connection.&unbind}
}
END

View File

@ -0,0 +1,56 @@
-- Module TC-TMP (Q.755.2:09/1997)
TC-TMP {itu-t recommendation q 755 modules(0) tmp(2) version1(1)} DEFINITIONS
IMPLICIT TAGS ::=
BEGIN
TMP-PDU ::= CHOICE {
testInit [0] TestInit,
testContinue [1] CommandSequence,
testDataEcho [2] UserData
}
CommandSequence ::= SEQUENCE SIZE (0..maxNbOfCommands) OF TestCommand
maxNbOfCommands INTEGER ::= 30
TestInit ::= SEQUENCE {
timeout INTEGER(1..127) OPTIONAL, -- T-Test (unit is 30 sec)
commands CommandSequence,
...
}
UserData ::= CHOICE {
simple OCTET STRING(SIZE (0..maxUserDataLength)),
complex [0] ABSTRACT-SYNTAX.&Type
}
maxUserDataLength INTEGER ::= 2048
TestCommand ::= CHOICE {wait [0] DialogueReference,
action [1] ActionInfo
}
DialogueReference ::= CHOICE {unspecified NULL,
dialogue INTEGER(0..255)
}
ActionInfo ::= SEQUENCE {
service ServiceType,
dialogueReference DialogueReference DEFAULT unspecified:NULL,
to-be-echoed UserData OPTIONAL,
...
}
ServiceType ::= ENUMERATED {
v1988uniReq(10), v1993uniReq(11), v1988beginReq(12), v1993beginReq(13),
continueReq(14), basicEndReq(15), localEndReq(16), uAbortReq(17),
class1invokeReq(21), class2invokeReq(22), class3invokeReq(23),
class4invokeReq(24), linkedInvokeReq(25), resultNlReq(26), resultLReq(27),
uErrorReq(28), uCancelReq(29), uRejectReq(30), ...
}
-- abstract syntax name for TMP-PDUs
tmp-pdus-as OBJECT IDENTIFIER ::=
{itu-t recommendation q 755 as(4) tmp-pdus(1) version1(1)}
END

View File

@ -0,0 +1,89 @@
-- Module TC-Testing-User (Q.755.2:09/1997)
TC-Testing-User {itu-t recommendation q 755 modules(0) testing-user(1)
version1(1)} DEFINITIONS ::=
BEGIN
IMPORTS
-- OPERATION,
-- ERROR
--FROM TCAPMessages {itu-t recommendation q 773 modules(2) messages(1) version2(2)}
-- APPLICATION-SERVICE-ELEMENT
--FROM Notation-Extensions {joint-iso-itu-t remote-operations(4) notation-extension(2)}
TMP-PDU
FROM TC-TMP {itu-t recommendation q 755 modules(0) tmp(2) version1(1)}
OPERATION-PACKAGE, Code, OPERATION, ERROR
FROM Remote-Operations-Information-Objects {joint-iso-itu-t
remote-operations(4) informationObjects(5) version1(0)};
-- application-context-names
ac-id OBJECT IDENTIFIER ::=
{itu-t recommendation q 755 ac(5)}
testing-ac-id OBJECT IDENTIFIER ::= {ac-id testing-ac(1) version1(1)}
-- ase
testing-User-ASE OPERATION-PACKAGE ::= {
CONSUMER INVOKES {localConsumerOperation | globalConsumerOperation}
-- consumer is the test system
SUPPLIER INVOKES
{class1SupplierOperation | class2SupplierOperation |
class3SupplierOperation | class4SupplierOperation |
globalSupplierOperation}
-- supplier is the test responder
ID testing-ac-id
}
localConsumerOperation OPERATION ::= {
ARGUMENT TMP-PDU RESULT TMP-PDU ERRORS {localSupplierError}
CODE local:0
}
globalConsumerOperation OPERATION ::= {
ARGUMENT TMP-PDU RESULT TMP-PDU ERRORS {globalSupplierError}
CODE
global:{itu-t recommendation q 755 operations(1) consumer(1)}
}
class1SupplierOperation OPERATION ::= {
ARGUMENT TMP-PDU RESULT TMP-PDU ERRORS {localConsumerError}
LINKED {localConsumerOperation}
CODE local:1
}
class2SupplierOperation OPERATION ::= {
ARGUMENT TMP-PDU ERRORS {localConsumerError}
LINKED {localConsumerOperation}
CODE local:2
}
class3SupplierOperation OPERATION ::= {
ARGUMENT TMP-PDU RESULT TMP-PDU CODE local:3
}
class4SupplierOperation OPERATION ::= {ARGUMENT TMP-PDU CODE local:4
}
globalSupplierOperation OPERATION ::= {
ARGUMENT TMP-PDU RESULT TMP-PDU ERRORS {globalConsumerError}
LINKED {globalConsumerOperation}
CODE
global:{itu-t recommendation q 755 operations(1) supplier(2)}
}
localConsumerError ERROR ::= {PARAMETER TMP-PDU CODE local:1
}
globalConsumerError ERROR ::= {
PARAMETER TMP-PDU CODE
global:{itu-t recommendation q 755 errors(2) consumer(1)}
}
localSupplierError ERROR ::= {PARAMETER TMP-PDU CODE local:2
}
globalSupplierError ERROR ::= {
PARAMETER TMP-PDU CODE
global:{itu-t recommendation q 755 errors(2) supplier(2)}
}
END

View File

@ -0,0 +1,71 @@
-- Module TCAP-Examples (Q.775:06/1997)
TCAP-Examples {itu-t recommendation q 775 modules(2) examples(2) version1(1)}
DEFINITIONS ::=
BEGIN
IMPORTS
OPERATION, ERROR
FROM Remote-Operations-Information-Objects {joint-iso-itu-t
remote-operations(4) informationObjects(5) version1(0)};
provideRoutingInformation OPERATION ::= {
ARGUMENT RequestArgument
RESULT RoutingInformation
ERRORS
{invalidCalledNumber | subscriberNotReachable | calledBarred |
processingFailure}
LINKED {getCallingPartyAddress}
}
-- timer T-pi = 10 s
getCallingPartyAddress OPERATION ::= {
RESULT CallingPartyAddress
ERRORS {callingPartyAddressNotAvailable | processingFailure}
CODE local:0
}
-- timer T-gp = 5 s
invalidCalledNumber ERROR ::= {CODE local:1
}
subscriberNotReachable ERROR ::= {CODE local:2
}
calledBarred ERROR ::= {CODE local:3
}
callingPartyAddressNotAvailable ERROR ::= {CODE local:4
}
processingFailure ERROR ::= {CODE local:5
}
-- data types
RequestArgument ::= SEQUENCE {
calledNumber IsdnNumber,
basicService BasicServiceIndicator OPTIONAL
}
RoutingInformation ::= CHOICE {
reroutingNumber [0] IMPLICIT IsdnNumber,
forwardedToNumber [1] IMPLICIT IsdnNumber
}
BasicServiceIndicator ::= ENUMERATED {speech(0), unrestrictedDigital(1)}
CallingPartyAddress ::= IsdnNumber
IsdnNumber ::= SEQUENCE {
typeOfAddress TypeOfAddress,
digits TelephonyString
}
TypeOfAddress ::= ENUMERATED {national(0), international(1), private(2)}
TelephonyString ::=
IA5String
(FROM ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "*" |
"#"))(SIZE (1..15))
END

View File

@ -0,0 +1,43 @@
-- Module TCAP-Tools (Q.775:06/1997)
TCAP-Tools {itu-t recommendation q 775 modules(2) tools(1) version1(1)}
DEFINITIONS ::=
BEGIN
EXPORTS cancel, cancelFailed, cancelled;
IMPORTS
OPERATION, ERROR
FROM Remote-Operations-Information-Objects {joint-iso-itu-t
remote-operations(4) informationObjects(5) version1(0)};
-- TCInvokeIdSet
-- FROM TCAPMessages {itu-t recommendation q 773 modules(2) messages(1)
-- version3(3)};
cancel OPERATION ::= {
-- ARGUMENT present < TCInvokeIdSet
ARGUMENT INTEGER (-128..127)
-- a TC-user may redefine this type to include
-- an empty result so that it becomes a Class 1 operation
ERRORS {cancelFailed}
}
-- timer = 15 s
cancelFailed ERROR ::= {
PARAMETER SET {
problem [0] CancelProblem,
-- invokeId [1] present < TCInvokeIdSet
invokeId [1] INTEGER (-128..127)
}
CODE local:0
}
CancelProblem ::= ENUMERATED {unknownInvocation(0), tooLate(1), notCancellable(2)}
-- a TC-user may redefine this type to include application-specific problems
cancelled ERROR ::= {
CODE local:0
}
-- an error of this type should be included in the error list of cancellable operations
END

View File

@ -0,0 +1,89 @@
TCAPMessages {itu-t recommendation q 773 modules(2) messages(1) version3(3)}
DEFINITIONS IMPLICIT TAGS ::=
BEGIN
-- EXPORTS everything
-- Transaction Portion fields.
IMPORTS
ROS{}, InvokeId
FROM Remote-Operations-Generic-ROS-PDUs {joint-iso-itu-t
remote-operations(4) generic-ROS-PDUs(6) version1(0)}
OPERATION
FROM Remote-Operations-Information-Objects {joint-iso-itu-t
remote-operations(4) informationObjects(5) version1(0)};
TCMessage{OPERATION:Invokable, OPERATION:Returnable} ::= CHOICE {
unidirectional [APPLICATION 1] Unidirectional{{Invokable}, {Returnable}},
begin [APPLICATION 2] Begin{{Invokable}, {Returnable}},
end [APPLICATION 4] End{{Invokable}, {Returnable}},
continue [APPLICATION 5] Continue{{Invokable}, {Returnable}},
abort [APPLICATION 7] Abort
}
Unidirectional{OPERATION:Invokable, OPERATION:Returnable} ::= SEQUENCE {
dialoguePortion DialoguePortion OPTIONAL,
components ComponentPortion{{Invokable}, {Returnable}}
}
Begin{OPERATION:Invokable, OPERATION:Returnable} ::= SEQUENCE {
otid OrigTransactionID,
dialoguePortion DialoguePortion OPTIONAL,
components ComponentPortion{{Invokable}, {Returnable}} OPTIONAL
}
End{OPERATION:Invokable, OPERATION:Returnable} ::= SEQUENCE {
dtid DestTransactionID,
dialoguePortion DialoguePortion OPTIONAL,
components ComponentPortion{{Invokable}, {Returnable}} OPTIONAL
}
Continue{OPERATION:Invokable, OPERATION:Returnable} ::= SEQUENCE {
otid OrigTransactionID,
dtid DestTransactionID,
dialoguePortion DialoguePortion OPTIONAL,
components ComponentPortion{{Invokable}, {Returnable}} OPTIONAL
}
Abort ::= SEQUENCE {
dtid DestTransactionID,
reason CHOICE {p-abortCause P-AbortCause,
u-abortCause DialoguePortion} OPTIONAL
}
-- 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
-- The dialogue portion carries the dialogue control PDUs as value of the external data type. The direct
-- reference should be set to {itu-t recommendation q 773 as(1) dialogue-as(1) version1(1)} if structured
-- dialogue is used and to {itu-t recommendation q 773 as(1) unidialogue-as(2) version1(1)} if unstructured
-- dialogue is used.
OrigTransactionID ::= [APPLICATION 8] OCTET STRING(SIZE (1..4))
DestTransactionID ::= [APPLICATION 9] OCTET STRING(SIZE (1..4))
P-AbortCause ::= [APPLICATION 10] 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{OPERATION:Invokable, OPERATION:Returnable} ::=
[APPLICATION 12] SEQUENCE SIZE (1..MAX) OF Component{{Invokable}, {Returnable}}
-- 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{OPERATION:Invokable, OPERATION:Returnable} ::= CHOICE {
basicROS ROS{{TCInvokeIdSet}, {Invokable}, {Returnable}},
returnResultNotLast [7] returnResult < ROS{{}, {}, {Returnable}}
}
TCInvokeIdSet ::= InvokeId(WITH COMPONENTS { present (-128..127) })
END -- TCAPMessages

58
TCAP/asn_src/ITU/TR.asn Normal file
View File

@ -0,0 +1,58 @@
TR {joint-iso-itu-t(2) country(16) ca(124) mti(113594) tcap(10) modules(0) itu-t(0) tr(0) version1(1)}
DEFINITIONS IMPLICIT TAGS ::=
BEGIN
IMPORTS
Abort, DialoguePortion, OrigTransactionID, DestTransactionID
FROM TCAPMessages {itu-t recommendation q 773 modules(2) messages(1) version3(3)};
-- The Transaction sub-layer ignores the content of the ComponentPortion
-- so we have redefined these Types without parameterization and defined
-- ComponentPortion as an OCTET STRING so that it can be passed to the
-- Component sub-layer for decoding there
TCMessage ::= CHOICE {
unidirectional [APPLICATION 1] Unidirectional,
begin [APPLICATION 2] Begin,
end [APPLICATION 4] End,
continue [APPLICATION 5] Continue,
abort [APPLICATION 7] Abort,
...
}
Unidirectional ::= SEQUENCE {
dialoguePortion DialoguePortion OPTIONAL,
components ComponentPortion
}
Begin ::= SEQUENCE {
otid OrigTransactionID,
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
}
-- used to derive otid/dtid from unknown message type
Unknown ::= SEQUENCE {
otid OrigTransactionID OPTIONAL,
dtid DestTransactionID OPTIONAL,
dialoguePortion DialoguePortion OPTIONAL,
components ComponentPortion OPTIONAL
}
-- leave this portion undecoded
ComponentPortion ::= TYPE-IDENTIFIER.&Type
END

View File

@ -0,0 +1,20 @@
UnidialoguePDUs {itu-t 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 ::=
{itu-t recommendation q 773 as(1) unidialogue-as(2) version1(1)}
UniDialoguePDU ::= CHOICE {unidialoguePDU AUDT-apdu}
AUDT-apdu ::= [APPLICATION 0] IMPLICIT SEQUENCE {
protocol-version
[0] IMPLICIT BIT STRING {version1(0)} DEFAULT {version1},
application-context-name [1] OBJECT IDENTIFIER,
user-information [30] IMPLICIT SEQUENCE OF EXTERNAL OPTIONAL
}
END -- UNIDialoguePDU

11
TCAP/asn_src/Makefile Normal file
View File

@ -0,0 +1,11 @@
.PHONY: all
all:
cd itu && $(MAKE)
cd ansi && $(MAKE)
.PHONY: clean
clean:
cd itu && $(MAKE) $@
cd ansi && $(MAKE) $@

12
TCAP/doc/Makefile Normal file
View File

@ -0,0 +1,12 @@
.PHONY: all
all: doc
.PHONY: doc
doc:
cd html && $(MAKE) $@
.PHONY: clean
clean:
cd html && $(MAKE) $@

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

24
TCAP/doc/html/Makefile Normal file
View File

@ -0,0 +1,24 @@
## $Id: Makefile,v 1.3 2005/02/10 06:39:56 vances Exp $
ERL = erl
SRC = ../../src
%.html:${SRC}/%.erl
${ERL} -noshell -run edoc_run file '"$<"' '[{dir,"."}]' -s init stop
%.html:${SRC}/itu/%.erl
${ERL} -noshell -run edoc_run file '"$<"' '[{dir,"."}]' -s init stop
DOCS = tcap.html tcap_tco_server.html
.PHONY: default
default: doc
.PHONY: doc
doc: $(DOCS)
.PHONY: clean
clean:
- rm -f $(DOCS)

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

BIN
TCAP/doc/html/inap_aei.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

359
TCAP/doc/html/index.html Normal file
View File

@ -0,0 +1,359 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>TCAP User's Guide</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body bgcolor="white">
<h1>TCAP User's Guide</h1>
<p>Copyright &#169; 2003-2005 <a href=http://www.motivity.ca>Motivity Telecom Inc.</a></p>
<p><b>Version:</b> 1.1</p>
<p><b>Authors:</b> Vance Shipley (<a href="mailto:vances@motivity.ca"><tt>vances@motivity.ca</tt></a>).</p>
<p>The <a href="tcap.html"><tt>tcap</tt></a> application is a protocol stack
implementation of the Transaction Capabilities Application Part (TCAP) of
the Signaling System No. 7 (SS7) specifications <cite>ITU-T Q.771-Q.774</cite> and
<cite>ANSI T1.114-2000</cite>. Transaction Capabilities (TC) users include
the Intelligent Network Application Protocol (INAP) ITU-T Q.1208 and the Mobile
Application Part (MAP) 3GPP 29.002.</p>
<h3>Requirements</h3>
<p>This application includes only the TCAP procedures and must be used
with a seperate application providing the SCCP service.
The <a href="http://www.motivity.ca/nms"><tt>nms</tt></a>
application provides a binding to the embedded SCCP layer on the
TX3220/TX4000 boards. An native Erlang SCCP User Adaptation (SUA)
for SIGTRAN SCTP is planned.</p>
<h3>Transaction Capabilities</h3>
<p>Transaction Capabilities (TC) provides support for interactive
applications in a distributed environment through a generic remote procedure
call service. TC provides the framework for invoking remote procedures
and returning the results of these procedures.</p>
<a href="transaction_capabilities.png">Figure 1-1</a>
shows the structure of TC using SS7 network services. TC is composed of two
sublayers; the Component Sublayer (CSL) and the Transaction Sublayer (TSL).
The CSL deals with components which are the Application Protocol Data Units (APDU)
that convey remote operations and their responses. The CSL optionally may
utilize the dialogue portion protocol for conveying information related to
application context or user information. The TSL deals with the exchange of
messages containing components and optionally, a dialogue portion, between TC-Users.</p>
<p>Figure 1-1: TC in SS7
<img alt="diagram of transaction capabilities" name="figure1-1" src="transaction_capabilities.png"></p>
<h3>Open Systems Interconnection (OSI)</h3>
<p>TC is based on the Remote Operations concept defined in Recommendation X.880 (ROS).
TC allows communication between TC-Users across an SS7 network.
This communication can be modelled with the OSI seven layer stack as shown in
<a href="osi_model.png">Figure-2.1</a>. SS7 does not define an Intermediate Services Part
(ISP) so the Presentation, Session and Transport layers are formally missing however
some aspects of the these are present in TC. CSL lies entirely within the application layer.</p>
<p>Figure 2-1: TC in OSI
<img alt="diagram of osi layers" name="figure2-1" src="osi_model.png"></p>
<a href="application_process.png">Figure-2.2</a> shows the structure of the OSI Application Layer.
An Application Process (AP) consists of application code within and outside the OSI
framework. The part of an application which resides in the OSI framework is called
an Application Entity (AE). The AE may contain a number of cooperating components,
each with it's own protocol elements. These components are called Application
Service Elements (ASE). An ASE is a separately defined (standardized) part of an
Application Entity. ASEs provide a service to higher level ASEs not a higher level
layer. The distinction being that unlike layer services an ASE service may consider
only part of the communication between Application Entities.</p>
<p>Figure 2-2: OSI Application Process
<img alt="diagram of application process" name="figure2-2" src="application_process.png"></p>
<p>The Component sublayer is in partial alignment with the capabilities of the
Remote Operation Service Element (ROSE) X.219 and X.229. The X.229 protocol is
contained within the TC component protocol. CSL includes some extensions to ROSE.
The dialogue control facilities are in partial alignment with the capabilities
of the Association Control Service Element (ACSE) X.217 and X.227. The abstract
syntax for the dialogue control APDUs are a subset of the OSI ACSE abstract syntax.</p>
<a href="tcap_application_process.png">Figure-2.3</a> shows an Application Process
with an Application Entity which includes the Transaction Capabilities ASE and the
Mobile Application Part ASE.</p>
<p>Figure 2-3: SS7 Application Process
<img alt="diagram of SS7 application process" name="figure2-3" src="tcap_application_process.png"></p>
<p>An Application Entity (AE) is the part of your Application Process (AP) which
uses the services of a combined set of ASEs. An AE-Type defines a set of functions
used for communications. For example one AE-Type may combine a TC ASE with a MAP ASE
while another combines a TC ASE with an INAP ASE. An AE Invocation (AEI) is an instance
of an AE and it's ASEs.</p>
<p>An AEI may perform a subset of the communication functions defined by the AE-Type.
The actual procedures that may need to be performed for an instance of communication
are determined by the Application Context (AC). The Application Context states which
functions are needed. Based on this information the AEI is instantiated from the
AE-Type which fits these criteria.</p>
<p>Using the <a href="tcap.html"><tt>tcap</tt></a> application you will implement
your Application Process (AP) and Application Entity (AE) in Erlang. The set of
processes which make up an instance of the Component Sublayer (CSL) form the TC ASE.