Harald Welte | 6cc4152 | 2011-12-09 09:50:26 +0100 | [diff] [blame] | 1 | -- This is a manually-crafted simplified TCAP ASN.1 syntax, created |
| 2 | -- for the signerl project by Harald Welte <laforge@gnumonks.org> |
| 3 | -- |
| 4 | -- The "problem" with the real TCAP spec is its use of templates, |
| 5 | -- which is nice if you want to create a fully integrated TCAP + MAP |
| 6 | -- decoder, but in this case we simply want to parse all the common |
| 7 | -- parts and ignore the application-specific parameters/rsults of the |
| 8 | -- respective operation. |
| 9 | |
| 10 | TC |
| 11 | |
| 12 | DEFINITIONS IMPLICIT TAGS |
| 13 | |
| 14 | ::= |
| 15 | |
| 16 | BEGIN |
| 17 | |
| 18 | Components ::= [APPLICATION 12] SEQUENCE SIZE (1..MAX) OF Component |
| 19 | |
| 20 | Component ::= CHOICE { |
| 21 | invoke [1] Invoke, |
| 22 | returnResult [2] ReturnResult, |
| 23 | returnError [3] ReturnError, |
| 24 | reject [4] Reject, |
| 25 | returnResultNotLast [7] ReturnResult |
| 26 | } |
| 27 | |
| 28 | Invoke ::= SEQUENCE { |
| 29 | invokeId InvokeId, |
| 30 | linkedId CHOICE { |
| 31 | present [0] IMPLICIT present < InvokeId, |
| 32 | absent [1] IMPLICIT NULL |
| 33 | } OPTIONAL, |
| 34 | opcode Code, |
| 35 | argument Param |
| 36 | } |
| 37 | |
| 38 | ReturnResult ::= SEQUENCE { |
| 39 | invokeId InvokeId, |
| 40 | result SEQUENCE { |
| 41 | opcode Code, |
| 42 | result Param OPTIONAL |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | ReturnError ::= SEQUENCE { |
| 47 | invokeId InvokeId, |
| 48 | errcode Code, |
| 49 | parameter Param OPTIONAL |
| 50 | } |
| 51 | |
| 52 | Reject ::= SEQUENCE { |
| 53 | invokeId InvokeId, |
| 54 | problem CHOICE { |
| 55 | general [0] GeneralProblem, |
| 56 | invoke [1] InvokeProblem, |
| 57 | returnResult [2] ReturnResultProblem, |
| 58 | returnError [3] ReturnErrorProblem |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | GeneralProblem ::= INTEGER { |
| 63 | unrecognizedPDU(0), mistypedPDU(1), badlyStructuredPDU(2)} |
| 64 | |
| 65 | InvokeProblem ::= INTEGER { |
| 66 | duplicateInvocation(0), unrecognizedOperation(1), mistypedArgument(2), |
| 67 | resourceLimitation(3), releaseInProgress(4), unrecognizedLinkedId(5), |
| 68 | linkedResponseUnexpected(6), unexpectedLinkedOperation(7)} |
| 69 | |
| 70 | ReturnResultProblem ::= INTEGER { |
| 71 | unrecognizedInvocation(0), resultResponseUnexpected(1), mistypedResult(2) |
| 72 | } |
| 73 | |
| 74 | ReturnErrorProblem ::= INTEGER { |
| 75 | unrecognizedInvocation(0), errorResponseUnexpected(1), unrecognizedError(2), |
| 76 | unexpectedError(3), mistypedParameter(4)} |
| 77 | |
| 78 | RejectProblem ::= INTEGER { |
| 79 | general-unrecognizedPDU(0), general-mistypedPDU(1), |
| 80 | general-badlyStructuredPDU(2), invoke-duplicateInvocation(10), |
| 81 | invoke-unrecognizedOperation(11), invoke-mistypedArgument(12), |
| 82 | invoke-resourceLimitation(13), invoke-releaseInProgress(14), |
| 83 | invoke-unrecognizedLinkedId(15), invoke-linkedResponseUnexpected(16), |
| 84 | invoke-unexpectedLinkedOperation(17), |
| 85 | returnResult-unrecognizedInvocation(20), |
| 86 | returnResult-resultResponseUnexpected(21), returnResult-mistypedResult(22), |
| 87 | returnError-unrecognizedInvocation(30), |
| 88 | returnError-errorResponseUnexpected(31), returnError-unrecognizedError(32), |
| 89 | returnError-unexpectedError(33), returnError-mistypedParameter(34)} |
| 90 | |
| 91 | InvokeId ::= CHOICE {present INTEGER, |
| 92 | absent NULL |
| 93 | } |
| 94 | |
| 95 | Code ::= CHOICE {local INTEGER, |
| 96 | global OBJECT IDENTIFIER |
| 97 | } |
| 98 | |
| 99 | Param ::= ANY |
| 100 | |
| 101 | END |