-- Module OSIProtocolSpecification (X.519:11/2008)
-- See also ITU-T X.519 (11/2008)
-- See also the index of all ASN.1 assignments needed in this document

OSIProtocolSpecification {joint-iso-itu-t ds(5) module(1)
  oSIProtocolSpecification(36) 6} DEFINITIONS ::=
BEGIN

-- EXPORTS All 
-- The types and values defined in this module are exported for use in the other ASN.1 modules contained 
-- within the Directory Specifications, and for the use of other applications which will use them to access Directory
-- services. Other applications may use them for their own purposes, but this will not constrain extensions 
-- and modifications needed to maintain or improve the Directory service.
IMPORTS
  -- from ITU-T Rec. X.501 | ISO/IEC 9594-2
  commonProtocolSpecification, directoryAbstractService, directoryOSIProtocols,
    enhancedSecurity, informationFramework
    FROM UsefulDefinitions {joint-iso-itu-t ds(5) module(1)
      usefulDefinitions(0) 6}
  Name, RelativeDistinguishedName
    FROM InformationFramework informationFramework
  OPTIONALLY-PROTECTED
    FROM EnhancedSecurity enhancedSecurity
  -- from ITU-T Rec. X.511 | ISO/IEC 9594-3
  SecurityProblem, ServiceProblem, Versions
    FROM DirectoryAbstractService directoryAbstractService
  -- from ITU-T Rec. X.519 | ISO/IEC 9594-5
  InvokeId, OPERATION
    FROM CommonProtocolSpecification commonProtocolSpecification
  APPLICATION-CONTEXT
    FROM DirectoryOSIProtocols directoryOSIProtocols;

-- OSI protocol 
OSI-PDU{APPLICATION-CONTEXT:protocol} ::=
  TYPE-IDENTIFIER.&Type
    (OsiBind{{protocol}} | OsiBindResult{{protocol}} | OsiBindError{{protocol}}
     | OsiOperation{{protocol.&Operations}} | PresentationAbort)

OsiBind{APPLICATION-CONTEXT:Protocols} ::= SET {
  mode-selector           [0] IMPLICIT SET {mode-value  [0] IMPLICIT INTEGER(1)
  },
  normal-mode-parameters
    [2] IMPLICIT SEQUENCE {protocol-version
                             [0] IMPLICIT BIT STRING {version-1(0)}
                               DEFAULT {version-1},
                           calling-presentation-selector
                             [1] IMPLICIT Presentation-selector OPTIONAL,
                           called-presentation-selector
                             [2] IMPLICIT Presentation-selector OPTIONAL,
                           presentation-context-definition-list
                             [4] IMPLICIT Context-list,
                           user-data
                             CHOICE {fully-encoded-data
                                       [APPLICATION 1] IMPLICIT SEQUENCE 
                                                                  SIZE (1) OF
                                                                  SEQUENCE {transfer-syntax-name
                                                                    
                                                                    Transfer-syntax-name
                                                                    OPTIONAL,
                                                                    presentation-context-identifier
                                                                    
                                                                    Presentation-context-identifier,
                                                                    presentation-data-values
                                                                    
                                                                    CHOICE {single-ASN1-type
                                                                    
                                                                    [0]  AARQ-apdu
                                                                    {
                                                                    {Protocols}}
                                                                    }
                                                                  }}}
}

Presentation-selector ::= OCTET STRING(SIZE (1..4, ..., 5..MAX))

Context-list ::=
  SEQUENCE SIZE (2) OF
    SEQUENCE {presentation-context-identifier  Presentation-context-identifier,
              abstract-syntax-name             Abstract-syntax-name,
              transfer-syntax-name-list        SEQUENCE OF Transfer-syntax-name
    }

Presentation-context-identifier ::= INTEGER(1..127, ..., 128..MAX)

Abstract-syntax-name ::= OBJECT IDENTIFIER

Transfer-syntax-name ::= OBJECT IDENTIFIER

AARQ-apdu{APPLICATION-CONTEXT:Protocols} ::=
  [APPLICATION 0] IMPLICIT SEQUENCE {
  protocol-version
    [0] IMPLICIT BIT STRING {version1(0)} DEFAULT {version1},
  application-context-name          [1]  Application-context-name,
  called-AP-title                   [2]  Name OPTIONAL,
  called-AE-qualifier               [3]  RelativeDistinguishedName OPTIONAL,
  called-AP-invocation-identifier   [4]  AP-invocation-identifier OPTIONAL,
  called-AE-invocation-identifier   [5]  AE-invocation-identifier OPTIONAL,
  calling-AP-title                  [6]  Name OPTIONAL,
  calling-AE-qualifier              [7]  RelativeDistinguishedName OPTIONAL,
  calling-AP-invocation-identifier  [8]  AP-invocation-identifier OPTIONAL,
  calling-AE-invocation-identifier  [9]  AE-invocation-identifier OPTIONAL,
  implementation-information        [29] IMPLICIT Implementation-data OPTIONAL,
  user-information
    [30] IMPLICIT Association-informationBind{{Protocols}}
}

Association-informationBind{APPLICATION-CONTEXT:Protocols} ::=
  SEQUENCE SIZE (1) OF
    EXTERNAL
      (WITH COMPONENTS {
         identification         (WITH COMPONENTS {
                                   ...,
                                   syntax  ABSENT
                                 }),
         data-value-descriptor  ABSENT,
         data-value             (CONTAINING TheOsiBind{{Protocols}})
       })

Application-context-name ::= OBJECT IDENTIFIER

AP-invocation-identifier ::= INTEGER

AE-invocation-identifier ::= INTEGER

Implementation-data ::= GraphicString

TheOsiBind{APPLICATION-CONTEXT:Protocols} ::=
  [16]  APPLICATION-CONTEXT.&bind-operation.&ArgumentType({Protocols})

OsiBindResult{APPLICATION-CONTEXT:Protocols} ::= SET {
  mode-selector          [0] IMPLICIT SET {mode-value  [0] IMPLICIT INTEGER(1)},
  normal-modeparameters
    [2] IMPLICIT SEQUENCE {protocol-version
                             [0] IMPLICIT BIT STRING {version-1(0)}
                               DEFAULT {version-1},
                           responding-presentation-selector
                             [3] IMPLICIT Presentation-selector OPTIONAL,
                           presentation-context-definition-result-list
                             [5] IMPLICIT SEQUENCE SIZE (2) OF
                                            SEQUENCE {result
                                                        [0] IMPLICIT Result
                                                                    (acceptance),
                                                      transfer-syntax-name
                                                        [1] IMPLICIT Transfer-syntax-name
                                            },
                           user-data
                             CHOICE {fully-encoded-data
                                       [APPLICATION 1] IMPLICIT SEQUENCE 
                                                                  SIZE (1) OF
                                                                  SEQUENCE {transfer-syntax-name
                                                                    
                                                                    Transfer-syntax-name
                                                                    OPTIONAL,
                                                                    presentation-context-identifier
                                                                    
                                                                    Presentation-context-identifier,
                                                                    presentation-data-values
                                                                    
                                                                    CHOICE {single-ASN1-type
                                                                    
                                                                    [0]  AARE-apdu
                                                                    {
                                                                    {Protocols}}
                                                                    }
                                                                  }}}
}

Result ::= INTEGER {acceptance(0), user-rejection(1), provider-rejection(2)}

AARE-apdu{APPLICATION-CONTEXT:Protocols} ::=
  [APPLICATION 1] IMPLICIT SEQUENCE {
  protocol-version
    [0] IMPLICIT BIT STRING {version1(0)} DEFAULT {version1},
  application-context-name             [1]  Application-context-name,
  result                               [2]  Associate-result(accepted),
  result-source-diagnostic             [3]  Associate-source-diagnostic,
  responding-AP-title                  [4]  Name OPTIONAL,
  responding-AE-qualifier              [5]  RelativeDistinguishedName OPTIONAL,
  responding-AP-invocation-identifier  [6]  AP-invocation-identifier OPTIONAL,
  responding-AE-invocation-identifier  [7]  AE-invocation-identifier OPTIONAL,
  implementation-information
    [29] IMPLICIT Implementation-data OPTIONAL,
  user-information
    [30] IMPLICIT Association-informationBindRes{{Protocols}}
}

Association-informationBindRes{APPLICATION-CONTEXT:Protocols} ::=
  SEQUENCE SIZE (1) OF
    EXTERNAL
      (WITH COMPONENTS {
         identification         (WITH COMPONENTS {
                                   ...,
                                   syntax  ABSENT
                                 }),
         data-value-descriptor  ABSENT,
         data-value             (CONTAINING TheOsiBindRes{{Protocols}})
       })

Associate-result ::= INTEGER {
  accepted(0), rejected-permanent(1), rejected-transient(2)}(0..2, ...)

Associate-source-diagnostic ::= CHOICE {
  acse-service-user
    [1]  INTEGER {null(0), no-reason-give(1),
                  application-context-name-not-supported(2),
                  calling-AP-title-not-recognized(3),
                  calling-AP-invocation-identifier-not-recognized(4),
                  calling-AE-qualifier-not-recognized(5),
                  calling-AE-invocation-identifier-not-recognized(6),
                  called-AP-title-not-recognized(7),
                  called-AP-invocation-identifier-not-recognized(8),
                  called-AE-qualifier-not-recognized(9),
                  called-AE-invocation-identifier-not-recognized(10)}
                                                                    (0..10, ...),
  acse-service-provider
    [2]  INTEGER {null(0), no-reason-given(1), no-common-acse-version(2)}
                                                                    (0..2, ...)
}

TheOsiBindRes{APPLICATION-CONTEXT:Protocols} ::=
  [17]  APPLICATION-CONTEXT.&bind-operation.&ResultType({Protocols})

OsiBindError{APPLICATION-CONTEXT:Protocols} ::= CHOICE {
  normal-mode-parameters
    SEQUENCE {protocol-version
                [0] IMPLICIT BIT STRING {version-1(0)} DEFAULT {version-1},
              responding-presentation-selector
                [3] IMPLICIT Presentation-selector OPTIONAL,
              presentation-context-definition-result-list
                [5] IMPLICIT Result-list OPTIONAL,
              provider-reason
                [10] IMPLICIT Provider-reason OPTIONAL,
              user-data
                CHOICE {fully-encoded-data
                          [APPLICATION 1] IMPLICIT SEQUENCE SIZE (1) OF
                                                     SEQUENCE {transfer-syntax-name
                                                               
                                                                 Transfer-syntax-name
                                                                   OPTIONAL,
                                                               presentation-context-identifier
                                                               
                                                                 Presentation-context-identifier,
                                                               presentation-data-values
                                                               
                                                                 CHOICE {single-ASN1-type
                                                                    
                                                                    [0]  AAREerr-apdu
                                                                    {
                                                                    {Protocols}}
                                                               }}} OPTIONAL
  }
}

Result-list ::=
  SEQUENCE SIZE (2) OF
    SEQUENCE {result                [0] IMPLICIT Result,
              transfer-syntax-name  [1] IMPLICIT Transfer-syntax-name OPTIONAL,
              provider-reason
                [2] IMPLICIT INTEGER {reason-not-specified(0),
                                      abstract-syntax-not-supported(1),
                                      proposed-transfer-syntaxes-not-supported(2)}
                  OPTIONAL}

Provider-reason ::= INTEGER {
  reason-not-specified(0), temporary-congestion(1), local-limit-exceeded(2),
  called-presentation-address-unknown(3), protocol-version-not-supported(4),
  default-context-not-supported(5), user-data-not-readable(6),
  no-PSAP-available(7)}

AAREerr-apdu{APPLICATION-CONTEXT:Protocols} ::=
  [APPLICATION 1] IMPLICIT SEQUENCE {
  protocol-version
    [0] IMPLICIT BIT STRING {version1(0)} DEFAULT {version1},
  application-context-name             [1]  Application-context-name,
  result
    [2]  Associate-result(rejected-permanent..rejected-transient),
  result-source-diagnostic             [3]  Associate-source-diagnostic,
  responding-AP-title                  [4]  Name OPTIONAL,
  responding-AE-qualifier              [5]  RelativeDistinguishedName OPTIONAL,
  responding-AP-invocation-identifier  [6]  AP-invocation-identifier OPTIONAL,
  responding-AE-invocation-identifier  [7]  AE-invocation-identifier OPTIONAL,
  implementation-information
    [29] IMPLICIT Implementation-data OPTIONAL,
  user-information
    [30] IMPLICIT Association-informationBindErr{{Protocols}} OPTIONAL
}

Association-informationBindErr{APPLICATION-CONTEXT:Protocols} ::=
  SEQUENCE SIZE (1) OF
    EXTERNAL
      (WITH COMPONENTS {
         identification         (WITH COMPONENTS {
                                   ...,
                                   syntax  ABSENT
                                 }),
         data-value-descriptor  ABSENT,
         data-value             (CONTAINING TheOsiBindErr{{Protocols}})
       })

TheOsiBindErr{APPLICATION-CONTEXT:Protocols} ::=
  [18]  APPLICATION-CONTEXT.&bind-operation.&Errors.&ParameterType
    ({Protocols})

OsiUnbind ::= CHOICE {
  fully-encoded-data
    [APPLICATION 1] IMPLICIT SEQUENCE SIZE (1) OF
                               SEQUENCE {presentation-context-identifier
                                           Presentation-context-identifier,
                                         presentation-data-values
                                           CHOICE {single-ASN1-type
                                                     [0]  TheOsiUnbind
                                         }}
}

TheOsiUnbind ::= [APPLICATION 2] IMPLICIT SEQUENCE {
  reason  [0] IMPLICIT Release-request-reason OPTIONAL
}

Release-request-reason ::= INTEGER {normal(0)}

OsiUnbindResult ::= CHOICE {
  fully-encoded-data
    [APPLICATION 1] IMPLICIT SEQUENCE SIZE (1) OF
                               SEQUENCE {presentation-context-identifier
                                           Presentation-context-identifier,
                                         presentation-data-values
                                           CHOICE {single-ASN1-type
                                                     [0]  TheOsiUnbindRes
                                         }}
}

TheOsiUnbindRes ::= [APPLICATION 3] IMPLICIT SEQUENCE {
  reason  [0] IMPLICIT Release-response-reason OPTIONAL
}

Release-response-reason ::= INTEGER {normal(0)}

OsiOperation{OPERATION:Operations} ::= CHOICE {
  fully-encoded-data
    [APPLICATION 1] IMPLICIT SEQUENCE SIZE (1) OF
                               SEQUENCE {presentation-context-identifier
                                           Presentation-context-identifier,
                                         presentation-data-values
                                           CHOICE {single-ASN1-type
                                                     [0]  CHOICE {request
                                                                    OsiReq
                                                                    {
                                                                    {Operations}},
                                                                  result
                                                                    OsiRes
                                                                    {
                                                                    {Operations}},
                                                                  error
                                                                    OsiErr
                                                                    {
                                                                    {Operations}},
                                                                  reject
                                                                    OsiRej
                                                   }}}
}

OsiReq{OPERATION:Operations} ::= [1] IMPLICIT SEQUENCE {
  invokeId  InvokeId,
  opcode    OPERATION.&operationCode({Operations}),
  argument  OPERATION.&ArgumentType({Operations}{@opcode})
}

OsiRes{OPERATION:Operations} ::= [2] IMPLICIT SEQUENCE {
  invokeId  InvokeId,
  result
    SEQUENCE {opcode  OPERATION.&operationCode({Operations}),
              result  OPERATION.&ResultType({Operations}{@.opcode})
  }
}

OsiErr{OPERATION:Operations} ::= [3] IMPLICIT SEQUENCE {
  invokeID  InvokeId,
  errcode   OPERATION.&Errors.&errorCode({Operations}),
  error     OPERATION.&Errors.&ParameterType({Operations}{@.errcode})
}

OsiRej ::= [4] IMPLICIT SEQUENCE {
  invokeId  InvokeId,
  problem
    CHOICE {general       [0] IMPLICIT GeneralProblem,
            invoke        [1] IMPLICIT InvokeProblem,
            returnResult  [2] IMPLICIT ReturnResultProblem,
            returnError   [3] IMPLICIT ReturnErrorProblem}
}

GeneralProblem ::= INTEGER {
  unrecognizedPDU(0), mistypedPDU(1), badlyStructuredPDU(2)}

InvokeProblem ::= INTEGER {
  duplicateInvocation(0), unrecognizedOperation(1), mistypedArgument(2),
  resourceLimitation(3), releaseInProgress(4)}

ReturnResultProblem ::= INTEGER {
  unrecognizedInvocation(0), resultResponseUnexpected(1), mistypedResult(2)
}

ReturnErrorProblem ::= INTEGER {
  unrecognizedInvocation(0), errorResponseUnexpected(1), unrecognizedError(2),
  unexpectedError(3), mistypedParameter(4)}

PresentationAbort ::= CHOICE {aru-ppdu  ARU-PPDU,
                              arp-ppdu  ARP-PPDU
}

ARU-PPDU ::= CHOICE {
  normal-mode-parameters
    [0] IMPLICIT SEQUENCE {presentation-context-identifier-list
                             [0] IMPLICIT Presentation-context-identifier-list,
                           user-data
                             CHOICE {fully-encoded-data
                                       [APPLICATION 1] IMPLICIT SEQUENCE 
                                                                  SIZE (1) OF
                                                                  SEQUENCE {presentation-context-identifier
                                                                    
                                                                    Presentation-context-identifier,
                                                                    presentation-data-values
                                                                    
                                                                    CHOICE {single-ASN1-type
                                                                    
                                                                    [0]  ABRT-apdu
                                                                    }
                                                                  }}}
}

Presentation-context-identifier-list ::=
  SEQUENCE SIZE (1) OF
    SEQUENCE {presentation-context-identifier  Presentation-context-identifier,
              transfer-syntax-name             Transfer-syntax-name}

ABRT-apdu ::= [APPLICATION 4] IMPLICIT SEQUENCE {
  abort-source  [0] IMPLICIT ABRT-source
}

ABRT-source ::= INTEGER {acse-service-user(0), acse-service-provider(1)}

ARP-PPDU ::= SEQUENCE {
  provider-reason   [0] IMPLICIT Abort-reason OPTIONAL,
  event-identifier  [1] IMPLICIT Event-identifier OPTIONAL
}

Abort-reason ::= INTEGER {
  reason-not-specified(0), unrecognized-ppdu(1), unexpected-ppdu(2),
  unexpected-session-service-primitive(3), unrecognized-ppdu-parameter(4),
  unexpected-ppdu-parameter(5), invalid-ppdu-parameter-value(6)}

Event-identifier ::= INTEGER {
  cp-PPDU(0), cpa-PPDU(1), cpr-PPDU(2), aru-PPDU(3), arp-PPDU(4), td-PPDU(7),
  s-release-indication(14), s-release-confirm(15)}

END --OSIProtocolSpecification
-- Generated by Asnp, the ASN.1 pretty-printer of France Telecom R&D