Kerberos: add kerberos_inject_longterm_key() helper function
[wireshark-sm.git] / epan / dissectors / asn1 / z3950 / z3950.asn
blobe63f46d8402761d19f66468029e899d84d2633f0
1 ANSI-Z39-50-ObjectIdentifier DEFINITIONS ::=
2 BEGIN
3 z39-50 OBJECT IDENTIFIER ::=
4 { iso (1) member-body (2) us (840) ansi-standard-Z39-50 (10003)}
5 -- thus {Z39-50} is shorthand for {1 2 840 10003}
6 Z39-50-APDU OBJECT IDENTIFIER ::= {Z39-50 2} -- See OID.3
7 -- and {Z39-50 2} is shorthand for {1 2 840 10003 2} and so on.
8 Z39-50-attributeSet OBJECT IDENTIFIER ::= {Z39-50 3} -- See Appendix ATR
9 z39-50-diagnostic OBJECT IDENTIFIER ::= {z39-50 4} -- See Appendix DIAG
10 z39-50-recordSyntax OBJECT IDENTIFIER ::= {z39-50 5} --See Appendix REC
11 Z39-50-resourceReport OBJECT IDENTIFIER ::= {Z39-50 7} --See Appendix RSC
12 Z39-50-accessControl OBJECT IDENTIFIER ::= {Z39-50 8} --See Appendix ACC
13 Z39-50-extendedService OBJECT IDENTIFIER ::= {Z39-50 9} --See Appendix EXT
14 Z39-50-userInfoFormat OBJECT IDENTIFIER ::= {Z39-50 10} --See Appendix USR
15 Z39-50-elementSpec OBJECT IDENTIFIER ::= {Z39-50 11} --See Appendix ESP
16 Z39-50-variantSet OBJECT IDENTIFIER ::= {Z39-50 12} --See Appendix VAR
17 Z39-50-schema OBJECT IDENTIFIER ::= {Z39-50 13} --See Appendix TAG
18 Z39-50-tagSet OBJECT IDENTIFIER ::= {Z39-50 14} --See Appendix TAG
19 Z39-50-negotiation OBJECT IDENTIFIER ::= {Z39-50 15}
20 Z39-50-query OBJECT IDENTIFIER ::= {Z39-50 16}
21 END
23 Z39-50-APDU-1995 
24    -- OID for this definition, assigned in OID.3.1, is {Z39-50 2 1} 
26 DEFINITIONS ::=  
27 BEGIN   -- Z39.50-1995 Maintenance Agency Official Text for ANSI/NISO Z39.50-1995 - July 1995
29 EXPORTS OtherInformation, Term,
30 AttributeSetId, AttributeList,
31 AttributeElement, ElementSetName, SortElement, DatabaseName, CompSpec,
32 Specification, Permissions, InternationalString, IntUnit, Unit,
33 StringOrNumeric, Query, Records, ResultSetId, DefaultDiagFormat, DiagRec;
35 PDU ::= CHOICE{
36  initRequest                       [20] IMPLICIT InitializeRequest,
37  initResponse                      [21] IMPLICIT InitializeResponse,
38  searchRequest                     [22] IMPLICIT SearchRequest,
39  searchResponse                    [23] IMPLICIT SearchResponse,
40  presentRequest                    [24] IMPLICIT PresentRequest,
41  presentResponse                   [25] IMPLICIT PresentResponse,
42  deleteResultSetRequest            [26] IMPLICIT DeleteResultSetRequest,
43  deleteResultSetResponse           [27] IMPLICIT DeleteResultSetResponse,
44  accessControlRequest              [28] IMPLICIT AccessControlRequest,
45  accessControlResponse             [29] IMPLICIT AccessControlResponse,
46  resourceControlRequest            [30] IMPLICIT ResourceControlRequest,
47  resourceControlResponse           [31] IMPLICIT ResourceControlResponse,
48  triggerResourceControlRequest     [32] IMPLICIT TriggerResourceControlRequest,
49  resourceReportRequest             [33] IMPLICIT ResourceReportRequest,
50  resourceReportResponse            [34] IMPLICIT ResourceReportResponse,
51  scanRequest                       [35] IMPLICIT ScanRequest,
52  scanResponse                      [36] IMPLICIT ScanResponse,
53                                        -- [37] through [42] reserved
54  sortRequest                       [43] IMPLICIT SortRequest,
55  sortResponse                      [44] IMPLICIT SortResponse,
56  segmentRequest                    [45] IMPLICIT Segment,
57  extendedServicesRequest           [46] IMPLICIT ExtendedServicesRequest,
58  extendedServicesResponse          [47] IMPLICIT ExtendedServicesResponse,
59  close                             [48] IMPLICIT Close}
61 -- Initialize APDUs
64   InitializeRequest ::= SEQUENCE{
65    referenceId                     ReferenceId OPTIONAL,
66    protocolVersion                 ProtocolVersion,
67    options                         Options,
68    preferredMessageSize      [5]   IMPLICIT INTEGER,
69    exceptionalRecordSize     [6]   IMPLICIT INTEGER,
70 -- idAuthentication          [7]   ANY OPTIONAL, see note below
71    idAuthentication [7] CHOICE{
72       open    VisibleString,
73       idPass  SEQUENCE {
74                  groupId   [0]   IMPLICIT InternationalString OPTIONAL,
75                  userId    [1]   IMPLICIT InternationalString OPTIONAL,
76                  password  [2]   IMPLICIT InternationalString OPTIONAL },
77       anonymous                  NULL,
78       other                      EXTERNAL} OPTIONAL,
79    implementationId          [110] IMPLICIT InternationalString OPTIONAL,
80    implementationName        [111] IMPLICIT InternationalString OPTIONAL,
81    implementationVersion     [112] IMPLICIT InternationalString OPTIONAL,        
82    userInformationField      [11]  EXTERNAL OPTIONAL,
83    otherInfo                       OtherInformation OPTIONAL}
84 --Note:
85 -- For idAuthentication, the type ANY is retained 
86 -- for compatibility with earlier versions. 
87 -- For interoperability, the following is recommended:
88 --   IdAuthentication [7] CHOICE{
89 --      open    VisibleString,
90 --      idPass  SEQUENCE {
91 --                 groupId   [0]   IMPLICIT InternationalString OPTIONAL,
92 --                 userId    [1]   IMPLICIT InternationalString OPTIONAL,
93 --                 password  [2]   IMPLICIT InternationalString OPTIONAL },
94 --      anonymous                  NULL,
95 --      other                      EXTERNAL    
96 -- May use access control formats for 'other'.  See Appendix 7 ACC.
98   InitializeResponse ::= SEQUENCE{
99    referenceId                     ReferenceId OPTIONAL,
100    protocolVersion                 ProtocolVersion,
101    options                         Options,
102    preferredMessageSize      [5]   IMPLICIT INTEGER,
103    exceptionalRecordSize     [6]   IMPLICIT INTEGER,
104    result                    [12]  IMPLICIT BOOLEAN, 
105                                     -- relect = FALSE; Accept = TRUE 
106    implementationId          [110] IMPLICIT InternationalString OPTIONAL,
107    implementationName        [111] IMPLICIT InternationalString OPTIONAL,
108    implementationVersion     [112] IMPLICIT InternationalString OPTIONAL,        
109    userInformationField      [11]  EXTERNAL OPTIONAL,
110    otherInfo                       OtherInformation OPTIONAL}
111 -- Begin auxiliary definitions for Init PDUs
112   ProtocolVersion  ::=       [3]   IMPLICIT BIT STRING{
113                                    version-1           (0),   
114                                 -- This bit should always be set, but does not
115                                 -- correspond to any Z39.50 version.
116       version-2              (1),  
117                                 -- "Version 2 supported."
118                                 -- This bit should always be set.
119       version-3              (2)   
120                                 -- "Version 3 supported."
121 -- Values higher than 'version-3' should be ignored. Both the Initialize
122 -- request and Initialize Response APDUs include a value string corresponding
123 -- to the supported versions. The highest common version is selected
124 -- for use. If there are no versions in common, "Result" in the Init Response
125 -- should indicate "reject."
126 -- Note: Versions 1 and 2 are identical. Systems supporting version 2 should
127 -- indicate support for version 1 as well, for interoperability with systems
128 -- that indicate support for version 1 only (e.g. ISO 10163-1991
129 -- implementations).  
130    }
131   Options  ::= [4] IMPLICIT BIT STRING{ 
132          search                 (0), 
133          present                (1), 
134          delSet                 (2),
135          resourceReport         (3),
136          triggerResourceCtrl    (4),
137          resourceCtrl           (5), 
138          accessCtrl             (6),
139          scan                   (7),
140          sort                   (8), 
141          --                     (9) (reserved)
142          extendedServices       (10),
143          level-1Segmentation    (11),
144          level-2Segmentation    (12),
145          concurrentOperations   (13),
146          namedResultSets        (14)}
147 -- end auxiliary definitions for Init PDUs
150 --Search APDUs
151   SearchRequest ::= SEQUENCE{
152    referenceId               ReferenceId OPTIONAL,
153    smallSetUpperBound           [13]   IMPLICIT INTEGER,
154    largeSetLowerBound           [14]   IMPLICIT INTEGER,
155    mediumSetPresentNumber       [15]   IMPLICIT INTEGER,
156    replaceIndicator             [16]   IMPLICIT BOOLEAN,
157    resultSetName                [17]   IMPLICIT InternationalString,
158    databaseNames                [18]   IMPLICIT SEQUENCE OF DatabaseName,
159    smallSetElementSetNames      [100]  ElementSetNames OPTIONAL,
160    mediumSetElementSetNames     [101]  ElementSetNames OPTIONAL,
161    preferredRecordSyntax        [104]  IMPLICIT OBJECT IDENTIFIER OPTIONAL,
162    query                        [21]   Query,
163       -- Following two parameters may be used only if version 3 is in force.
164    additionalSearchInfo         [203]  IMPLICIT OtherInformation OPTIONAL,
165    otherInfo                           OtherInformation OPTIONAL}
168 -- Query Definitions
169    Query  ::=   CHOICE{
170          type-0    [0]    ANY,  
171          type-1    [1]    IMPLICIT RPNQuery,
172          type-2    [2]    OCTET STRING,
173          type-100  [100]  OCTET STRING,
174          type-101  [101]  IMPLICIT RPNQuery,
175          type-102  [102]  OCTET STRING}
177 -- Definitions for RPN query
178       RPNQuery ::= SEQUENCE{
179          attributeSet        AttributeSetId,
180          rpn                 RPNStructure}
182   RPNStructure ::= CHOICE{
183       op        [0] Operand, 
184       rpnRpnOp  [1] IMPLICIT SEQUENCE{
185                       rpn1      RPNStructure,
186                       rpn2      RPNStructure,
187                       op        Operator }} 
188    Operand ::= CHOICE{
189       attrTerm  AttributesPlusTerm, 
190       resultSet    ResultSetId, 
191              -- If version 2 is in force: 
192              --   - If query type is 1, one of the above two must be chosen; 
193              --   - resultAttr (below) may be used only if query type is 101. 
194       resultAttr   ResultSetPlusAttributes}
196    AttributesPlusTerm ::= [102] IMPLICIT SEQUENCE{
197              attributes   AttributeList, 
198              term         Term}
200    ResultSetPlusAttributes ::= [214] IMPLICIT
201 SEQUENCE{
202              resultSet    ResultSetId,
203              attributes   AttributeList}
205    AttributeList ::=      [44]  IMPLICIT SEQUENCE OF AttributeElement
207    Term ::= CHOICE{
208       general      [45]   IMPLICIT OCTET STRING,
209                    -- values below may be used only if version 3 is in force
210       numeric             [215] IMPLICIT INTEGER,
211       characterString     [216] IMPLICIT InternationalString,
212       oid                 [217] IMPLICIT OBJECT IDENTIFIER,
213       dateTime            [218] IMPLICIT GeneralizedTime,
214       external            [219] IMPLICIT EXTERNAL,
215       integerAndUnit      [220] IMPLICIT IntUnit,
216       null                [221] IMPLICIT NULL}   
218    Operator ::= [46] CHOICE{
219               and     [0] IMPLICIT NULL,
220               or      [1] IMPLICIT NULL,
221               and-not [2] IMPLICIT NULL,
222                           -- If version 2 is in force: 
223                           --    -  For query type 1, one of the above three
224                           --       must be chosen;
225                           --  -    prox (below) may be used only if query type
226                           --       is 101. 
227              prox     [3] IMPLICIT ProximityOperator}
229    AttributeElement  ::=  SEQUENCE{
230       attributeSet    [1]       IMPLICIT AttributeSetId OPTIONAL,
231                           -- Must be omitted if version 2 is in force.
232                           -- If included, overrides value of attributeSet
233                           -- in RPNQuery above, but only for this attribute.
234       attributeType   [120]  IMPLICIT INTEGER,
235       attributeValue      CHOICE{
236                      numeric    [121]   IMPLICIT INTEGER,
237                              -- If version 2 is in force, 
238                              -- Must select 'numeric' for attributeValue.
240         complex    [224] IMPLICIT SEQUENCE{ 
241                           list     [1] IMPLICIT SEQUENCE OF StringOrNumeric,
242                    semanticAction  [2] IMPLICIT SEQUENCE OF INTEGER OPTIONAL}}}
243                                     
245    ProximityOperator ::= SEQUENCE{
246       exclusion           [1] IMPLICIT BOOLEAN OPTIONAL,
247       distance            [2] IMPLICIT INTEGER,
248       ordered             [3] IMPLICIT BOOLEAN,
249       relationType        [4] IMPLICIT INTEGER{
250                              lessThan               (1),
251                              lessThanOrEqual        (2),
252                              equal                  (3),
253                              greaterThanOrEqual     (4),
254                              greaterThan            (5),
255                              notEqual               (6)},
256       proximityUnitCode   [5] CHOICE{
257                                 known     [1] IMPLICIT KnownProximityUnit,
258                                 private   [2] IMPLICIT INTEGER}}
260     KnownProximityUnit ::= INTEGER{
261                 character    (1),
262                 word         (2),
263                 sentence     (3),
264                 paragraph    (4),
265                 section      (5),
266                 chapter      (6),
267                 document     (7),
268                 element      (8),
269                 subelement   (9),
270                 elementType  (10),
271                 byte         (11) -- Version 3 only
272                 }
273 -- End definitions for RPN Query
276 SearchResponse ::= SEQUENCE{
277    referenceId                     ReferenceId OPTIONAL,
278    resultCount               [23]  IMPLICIT INTEGER,
279    numberOfRecordsReturned   [24]  IMPLICIT INTEGER,
280    nextResultSetPosition     [25]  IMPLICIT INTEGER,
281    searchStatus              [22]  IMPLICIT BOOLEAN,
282    resultSetStatus           [26]  IMPLICIT INTEGER{
283                                        subset   (1),
284                                        interim  (2), 
285                                        none     (3)} OPTIONAL,
286    presentStatus                   PresentStatus  OPTIONAL,
287    records                         Records OPTIONAL,
288       -- Following two parameters may be used only if version 3 is in force.
289    additionalSearchInfo      [203] IMPLICIT OtherInformation OPTIONAL,
290    otherInfo                       OtherInformation OPTIONAL}
294 --Retrieval APDUs 
295   PresentRequest ::= SEQUENCE{
296    referenceId                         ReferenceId OPTIONAL,
297       resultSetId                      ResultSetId,
298    resultSetStartPoint          [30]   IMPLICIT INTEGER,
299    numberOfRecordsRequested     [29]   IMPLICIT INTEGER,
300    additionalRanges             [212]  IMPLICIT SEQUENCE OF Range OPTIONAL,
301          -- additionalRanges may be included only if version 3 is in force.
302    recordComposition            CHOICE{
303                                    simple    [19]   ElementSetNames,
304                                           -- must choose 'simple' if version 2
305                                           -- is in force
306                                    complex   [209]  IMPLICIT CompSpec}
307 OPTIONAL,
308    preferredRecordSyntax     [104] IMPLICIT OBJECT IDENTIFIER OPTIONAL,
309    maxSegmentCount           [204] IMPLICIT INTEGER OPTIONAL, -- level 1 or 2
310    maxRecordSize             [206] IMPLICIT INTEGER OPTIONAL, -- level 2 only
311    maxSegmentSize            [207] IMPLICIT INTEGER OPTIONAL, -- level 2 only
312    otherInfo                       OtherInformation OPTIONAL}
315   Segment ::= SEQUENCE{
316          -- Segment PDU may only be used when version 3 is in force, 
317          -- and only when segmentation is in effect.
318    referenceId                         ReferenceId OPTIONAL,
319    numberOfRecordsReturned      [24]   IMPLICIT INTEGER,
320    segmentRecords               [0]    IMPLICIT SEQUENCE OF NamePlusRecord,
321    otherInfo                           OtherInformation OPTIONAL}
323   PresentResponse ::= SEQUENCE{
324    referenceId                     ReferenceId OPTIONAL,
325    numberOfRecordsReturned   [24]  IMPLICIT INTEGER,
326    nextResultSetPosition     [25]  IMPLICIT INTEGER,
327    presentStatus                   PresentStatus,
328    records                         Records OPTIONAL,
329    otherInfo                       OtherInformation OPTIONAL} 
330 -- begin auxiliary definitions for Search and Present APDUs
332 -- begin definition of records
333   Records ::= CHOICE{
334    responseRecords              [28]   IMPLICIT SEQUENCE OF NamePlusRecord,
335    nonSurrogateDiagnostic       [130]  IMPLICIT DefaultDiagFormat,
336    multipleNonSurDiagnostics    [205]  IMPLICIT SEQUENCE OF DiagRec} 
338   NamePlusRecord  ::=  SEQUENCE{
339    name      [0] IMPLICIT DatabaseName OPTIONAL,
340    record    [1] CHOICE{
341              retrievalRecord           [1] EXTERNAL,
342              surrogateDiagnostic       [2] DiagRec, 
343                 -- Must select one of the above two, retrievalRecord or
344                 -- surrogateDiagnostic, unless 'level 2 segmentation' 
345                 -- is in effect.
346              startingFragment      [3] FragmentSyntax,
347              intermediateFragment  [4] FragmentSyntax,
348              finalFragment         [5] FragmentSyntax}}
350    FragmentSyntax ::= CHOICE{
351       externallyTagged       EXTERNAL,
352       notExternallyTagged    OCTET STRING}
354   DiagRec ::= CHOICE{
355          defaultFormat       DefaultDiagFormat,
356                       -- Must choose defaultFormat if version 2 is in effect.
357          externallyDefined      EXTERNAL}
359    DefaultDiagFormat::= SEQUENCE{ 
360       diagnosticSetId        OBJECT IDENTIFIER,
361       condition              INTEGER,
362       addinfo                CHOICE{
363                                 v2Addinfo    VisibleString,         -- version 2
364                                 v3Addinfo    InternationalString    -- version 3
365                      }}
366   -- end definition of records
368    Range  ::= SEQUENCE{
369       startingPosition       [1] IMPLICIT INTEGER,
370       numberOfRecords        [2] IMPLICIT INTEGER} 
372    ElementSetNames ::= CHOICE {
373       genericElementSetName     [0] IMPLICIT InternationalString,
374       databaseSpecific          [1] IMPLICIT SEQUENCE OF SEQUENCE{
375                                        dbName   DatabaseName,
376                                        esn      ElementSetName}}
379    PresentStatus   ::=    [27]  IMPLICIT INTEGER{
380                                    success      (0),
381                                    partial-1    (1),
382                                    partial-2    (2),
383                                    partial-3    (3),
384                                    partial-4    (4),
385                                    failure      (5)}
387 -- begin definition of composition specification
388   CompSpec ::= SEQUENCE{
389    selectAlternativeSyntax   [1] IMPLICIT BOOLEAN,
390                                    -- See comment for recordSyntax, below.
391    generic                   [2] IMPLICIT Specification OPTIONAL,
392    dbSpecific                [3] IMPLICIT SEQUENCE OF SEQUENCE{
393                                    db  [1] DatabaseName,
394                                    spec   [2] IMPLICIT Specification} OPTIONAL,
395                                 -- At least one of generic and dbSpecific must
396                                 -- occur, and both may occur. If both, then for
397                                 -- any record not in the list of databases
398                                 -- within dbSpecific, generic applies.
399    recordSyntax              [4] IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL
400                                 -- For each record, the target selects the
401                                 -- first record syntax in this list that it can
402                                 -- support.  If the list is exhausted, the
403                                 -- target may select an alternative syntax if
404                                 -- selectAlternativeSyntax is 'true'.
405              }
407   Specification ::= SEQUENCE{
408    schema          [1] IMPLICIT OBJECT IDENTIFIER OPTIONAL,
409    elementSpec     [2] CHOICE{
410                       elementSetName   [1] IMPLICIT InternationalString,
411                       externalEspec    [2] IMPLICIT EXTERNAL} OPTIONAL}
412 -- end definition of composition specification
413 -- end auxiliary definitions for search and response APDUs
415 -- Delete APDUs
416   DeleteResultSetRequest ::= SEQUENCE{
417    referenceId               ReferenceId OPTIONAL,
418    deleteFunction     [32]   IMPLICIT INTEGER{
419                                    list   (0),
420                                    all    (1)},
421    resultSetList             SEQUENCE OF ResultSetId OPTIONAL,
422    otherInfo                 OtherInformation OPTIONAL} 
424   DeleteResultSetResponse ::= SEQUENCE{
425    referenceId                     ReferenceId OPTIONAL,
426    deleteOperationStatus     [0]   IMPLICIT DeleteSetStatus,
427    deleteListStatuses        [1]   IMPLICIT ListStatuses OPTIONAL,
428    numberNotDeleted          [34]  IMPLICIT INTEGER OPTIONAL,
429       bulkStatuses           [35]  IMPLICIT ListStatuses OPTIONAL,
430    deleteMessage             [36]  IMPLICIT InternationalString OPTIONAL,
431    otherInfo                       OtherInformation OPTIONAL}
433    ListStatuses ::= SEQUENCE OF SEQUENCE{ 
434              id       ResultSetId, 
435              status   DeleteSetStatus}
437    DeleteSetStatus ::= [33] IMPLICIT INTEGER{
438                           success                             (0),
439                           resultSetDidNotExist                (1),
440                           previouslyDeletedByTarget           (2),
441                           systemProblemAtTarget               (3),
442                           accessNotAllowed                    (4),
443                           resourceControlAtOrigin             (5),
444                           resourceControlAtTarget             (6),
445                           bulkDeleteNotSupported              (7),
446                           notAllRsltSetsDeletedOnBulkDlte     (8),
447                           notAllRequestedResultSetsDeleted    (9),
448                           resultSetInUse                      (10)}
451 --Access- and Resource-control APDUs
453   AccessControlRequest ::= SEQUENCE{
454    referenceId            ReferenceId OPTIONAL,
455    securityChallenge      CHOICE{
456                              simpleForm         [37] IMPLICIT OCTET STRING,
457                              externallyDefined  [0]  EXTERNAL},
458    otherInfo              OtherInformation OPTIONAL}
460   AccessControlResponse ::= SEQUENCE{
461    referenceId                     ReferenceId OPTIONAL,
462    securityChallengeResponse           CHOICE{
463                                           simpleForm          [38]  IMPLICIT 
464                                                                     OCTET STRING,
465                                           externallyDefined   [0]   EXTERNAL}
466                                                                     OPTIONAL,
467                                    -- Optional only in version 3; mandatory in
468                                    -- version 2. If omitted (in version 3) then
469                                    -- diagnostic must occur.
470    diagnostic                [223] DiagRec OPTIONAL, -- Version 3 only.
471    otherInfo                       OtherInformation OPTIONAL}
475   ResourceControlRequest ::= SEQUENCE{
476    referenceId                     ReferenceId OPTIONAL,
477    suspendedFlag             [39]  IMPLICIT BOOLEAN OPTIONAL,
478    resourceReport            [40]  ResourceReport OPTIONAL,
479    partialResultsAvailable   [41]  IMPLICIT INTEGER{
480                                        subset   (1),
481                                        interim  (2),
482                                        none     (3)} OPTIONAL,
483    responseRequired          [42]  IMPLICIT BOOLEAN, 
484    triggeredRequestFlag      [43]  IMPLICIT BOOLEAN OPTIONAL,
485    otherInfo                       OtherInformation OPTIONAL}
488   ResourceControlResponse ::= SEQUENCE{
489    referenceId                     ReferenceId OPTIONAL,
490    continueFlag              [44]  IMPLICIT BOOLEAN, 
491    resultSetWanted           [45]  IMPLICIT BOOLEAN OPTIONAL,
492    otherInfo                       OtherInformation OPTIONAL}
496   TriggerResourceControlRequest ::=
497 SEQUENCE{
498    referenceId                         ReferenceId OPTIONAL,
499    requestedAction              [46]   IMPLICIT INTEGER{
500                                           resourceReport      (1),
501                                           resourceControl     (2),
502                                           cancel              (3)}, 
503    prefResourceReportFormat     [47]   IMPLICIT ResourceReportId OPTIONAL,
504    resultSetWanted              [48]   IMPLICIT BOOLEAN OPTIONAL,
505    otherInfo                           OtherInformation OPTIONAL}
509   ResourceReportRequest ::= SEQUENCE{
510    referenceId                         ReferenceId OPTIONAL,
511    opId                         [210]  IMPLICIT ReferenceId OPTIONAL,
512    prefResourceReportFormat     [49]   IMPLICIT ResourceReportId OPTIONAL,
513    otherInfo                           OtherInformation OPTIONAL}
515   ResourceReportResponse ::= SEQUENCE{
516    referenceId                  ReferenceId OPTIONAL,
517    resourceReportStatus   [50]  IMPLICIT INTEGER{
518                                    success          (0),
519                                    partial          (1),
520                                    failure-1        (2),
521                                    failure-2        (3),
522                                    failure-3        (4),
523                                    failure-4        (5),
524                                    failure-5        (6),
525                                    failure-6        (7)},
526    resourceReport         [51]  ResourceReport OPTIONAL,
527    otherInfo                    OtherInformation OPTIONAL}
529    ResourceReport         ::=   EXTERNAL
530    ResourceReportId       ::=   OBJECT IDENTIFIER
532 --Scan APDUs
533   ScanRequest ::= SEQUENCE{
534    referenceId                            ReferenceId OPTIONAL,
535    databaseNames                   [3]    IMPLICIT SEQUENCE OF DatabaseName,
536    attributeSet                           AttributeSetId OPTIONAL,
537    termListAndStartPoint                  AttributesPlusTerm,
538    stepSize                        [5]    IMPLICIT INTEGER OPTIONAL,
539    numberOfTermsRequested          [6]    IMPLICIT INTEGER,
540    preferredPositionInResponse     [7]    IMPLICIT INTEGER OPTIONAL,
541    otherInfo                              OtherInformation OPTIONAL}
543   ScanResponse ::= SEQUENCE{
544    referenceId                         ReferenceId OPTIONAL,
545    stepSize                     [3]    IMPLICIT INTEGER OPTIONAL,
546    scanStatus                   [4]    IMPLICIT INTEGER {
547                                        success  (0),
548                                        partial-1    (1),
549                                        partial-2    (2),
550                                        partial-3    (3),
551                                        partial-4    (4),
552                                        partial-5    (5),
553                                        failure  (6) },
554    numberOfEntriesReturned      [5]    IMPLICIT INTEGER,
555    positionOfTerm               [6]    IMPLICIT INTEGER OPTIONAL,
556    entries                      [7]    IMPLICIT ListEntries OPTIONAL,  
557    attributeSet                 [8]    IMPLICIT AttributeSetId OPTIONAL,
558    otherInfo                           OtherInformation OPTIONAL}
561 -- begin auxiliary definitions for Scan
562   ListEntries ::= SEQUENCE{
563    entries                   [1]   IMPLICIT SEQUENCE OF Entry OPTIONAL,
564    nonsurrogateDiagnostics   [2]   IMPLICIT SEQUENCE OF DiagRec OPTIONAL
565       -- At least one of entries and nonsurrogateDiagnostic must occur
566                 }
568   Entry  ::= CHOICE {
569    termInfo                  [1]   IMPLICIT TermInfo,
570    surrogateDiagnostic       [2]   DiagRec}
572   TermInfo ::= SEQUENCE {
573    term                            Term,
574    displayTerm        [0]    IMPLICIT InternationalString OPTIONAL,
575                                 -- Presence of displayTerm means that term is
576                                 -- not considered by the target to be suitable
577                                 -- for display, and displayTerm should instead
578                                 -- be displayed. 'term' is the actual term in
579                                 -- the term list; 'displayTerm' is for display
580                                 -- purposes only, and is not an actual term in
581                                 -- the term list.
582    suggestedAttributes          AttributeList OPTIONAL,
583    alternativeTerm        [4]   IMPLICIT SEQUENCE OF AttributesPlusTerm OPTIONAL,
584    globalOccurrences      [2]   IMPLICIT INTEGER OPTIONAL,
585    byAttributes           [3]   IMPLICIT OccurrenceByAttributes OPTIONAL,
586    otherTermInfo                OtherInformation OPTIONAL} 
588   OccurrenceByAttributes ::= SEQUENCE OF
589 SEQUENCE{
590       attributes      [1]    AttributeList, 
591       occurrences            CHOICE{
592                                 global       [2]    INTEGER,
593                                 byDatabase   [3]    IMPLICIT SEQUENCE OF
594                                                      SEQUENCE{ 
595                                                        db           DatabaseName,
596                                                        num    [1]   IMPLICIT INTEGER OPTIONAL,
597                                 otherDbInfo         OtherInformation OPTIONAL}}
598                                                                      OPTIONAL,
599                                 otherOccurInfo      OtherInformation OPTIONAL} 
600 -- end auxiliary definitions for Scan
602 -- Sort APDUs
603 SortRequest  ::= SEQUENCE{
604    referenceId                  ReferenceId OPTIONAL,
605    inputResultSetNames    [3]   IMPLICIT SEQUENCE OF InternationalString,
606    sortedResultSetName    [4]   IMPLICIT InternationalString,
607    sortSequence           [5]   IMPLICIT SEQUENCE OF SortKeySpec,
608                                    -- order of occurrence is 
609                                    -- from major to minor
610    otherInfo                    OtherInformation OPTIONAL}
612 SortResponse  ::= SEQUENCE{
613    referenceId                  ReferenceId OPTIONAL,
614    sortStatus             [3]   IMPLICIT INTEGER{
615                                    success   (0), 
616                                    partial-1    (1),
617                                    failure   (2)},
618    resultSetStatus        [4]   IMPLICIT INTEGER{
619                                    empty        (1), 
620                                    interim      (2), 
621                                    unchanged    (3),
622                                    none         (4)} OPTIONAL,
623    diagnostics            [5]   IMPLICIT SEQUENCE OF DiagRec OPTIONAL,
624    otherInfo                    OtherInformation OPTIONAL}
626 -- begin auxiliary definitions for Sort
627    SortKeySpec ::= SEQUENCE{
628      sortElement                   SortElement, 
629         sortRelation         [1]   IMPLICIT INTEGER{
630                                        ascending                 (0),
631                                        descending                (1),
632                                        ascendingByFrequency      (3),
633                                        descendingByfrequency     (4)},
634      caseSensitivity         [2]   IMPLICIT INTEGER{
635                                        caseSensitive          (0), 
636                                        caseInsensitive        (1)},
637       missingValueAction     [3]   CHOICE{
638                                        abort              [1] IMPLICIT NULL,
639                                        null               [2] IMPLICIT NULL,
640                                                           -- supply a null  value
641                                                           -- for missing value
642                                        missingValueData   [3] IMPLICIT OCTET
643                                                                STRING} OPTIONAL}
645    SortElement ::=    CHOICE{
646      generic                 [1] SortKey,
647         datbaseSpecific      [2] IMPLICIT SEQUENCE OF SEQUENCE{
648                                    databaseName     DatabaseName,
649                                    dbSort           SortKey}} 
651    SortKey ::= CHOICE{
652      sortfield        [0]    IMPLICIT InternationalString,
653                                 -- An element, element-group-tag, or alias
654                                 -- supported by the target and denoting a set
655                                 -- of elements associated with each record.
656      elementSpec      [1]    IMPLICIT Specification,
657      sortAttributes   [2]    IMPLICIT SEQUENCE{
658                                 id     AttributeSetId,
659                                 list   AttributeList}}
660 -- end auxiliary definitions for sort
664 -- Extended Service APDUs
665   ExtendedServicesRequest  ::= SEQUENCE{
666    referenceId                     ReferenceId OPTIONAL,
667    function                  [3]   IMPLICIT INTEGER {
668                                        create       (1),
669                                        delete       (2),
670                                        modify   (3)},
671    packageType               [4]   IMPLICIT OBJECT IDENTIFIER,
672    packageName               [5]   IMPLICIT InternationalString OPTIONAL,
673                                        -- PackageName mandatory for 'modify' or
674                                        -- 'delete'; optional for 'create'.
675                                        -- Following four parameters mandatory
676                                        -- for 'create'; should be included on
677                                        -- 'modify' if being modified; not needed
678                                        -- on 'delete'.
679    userId                    [6]   IMPLICIT InternationalString OPTIONAL,
680    retentionTime             [7]   IMPLICIT IntUnit OPTIONAL,
681    permissions               [8]   IMPLICIT Permissions OPTIONAL,
682    description               [9]   IMPLICIT InternationalString OPTIONAL,
683    taskSpecificParameters    [10]  IMPLICIT EXTERNAL OPTIONAL, 
684                                        -- Mandatory for 'create'; included on
685                                        -- 'modify' if specific parameters being
686                                        -- modified; not necessary on 'delete'.
687                                        -- For the 'EXTERNAL,' use OID of
688                                        -- specific ES definition and select
689                                        -- CHOICE [1]: 'esRequest'.
690    waitAction                [11]  IMPLICIT INTEGER{
691                                        wait               (1),
692                                        waitIfPossible     (2),
693                                        dontWait           (3),
694                                        dontReturnPackage  (4)},
695    elements                        ElementSetName OPTIONAL,
696    otherInfo                       OtherInformation OPTIONAL}
699 ExtendedServicesResponse ::= SEQUENCE{
700    referenceId                     ReferenceId OPTIONAL,
701    operationStatus           [3]   IMPLICIT INTEGER{
702                                        done         (1),
703                                        accepted     (2),  
704                                        failure      (3)},
705    diagnostics               [4]   IMPLICIT SEQUENCE OF DiagRec OPTIONAL,
706    taskPackage               [5]   IMPLICIT EXTERNAL OPTIONAL,
707                                        -- Use OID: {Z39-50-recordSyntax (106)}
708                                        -- and corresponding syntax. For the
709                                        -- EXTERNAL, 'taskSpecific,' within that
710                                        -- definition, use OID of the specific
711                                        -- es, and choose [2], 'taskPackage'.
712    otherInfo                       OtherInformation OPTIONAL}
714  Permissions ::= SEQUENCE OF SEQUENCE{
715    userId                 [1] IMPLICIT InternationalString,
716    allowableFunctions     [2] IMPLICIT SEQUENCE OF INTEGER{
717                                 delete              (1),
718                                 modifyContents      (2),
719                                 modifyPermissions   (3),
720                                 present             (4),
721                                    invoke           (5)}} 
723 Close ::= SEQUENCE{
724    referenceId                     ReferenceId OPTIONAL,  -- See 3.2.11.1.5.
725    closeReason                     CloseReason,
726    diagnosticInformation     [3]   IMPLICIT InternationalString OPTIONAL,
727    resourceReportFormat      [4]   IMPLICIT ResourceReportId OPTIONAL, 
728                                        -- For use by origin only, and only on
729                                        -- Close request; origin requests target
730                                        -- to include report in response.
731    resourceReport            [5]   ResourceReport OPTIONAL,
732                                        -- For use by target only, unilaterally
733                                        -- on Close request; on Close response
734                                        -- may be unilateral or in response to
735                                        -- origin request.
736    otherInfo                       OtherInformation OPTIONAL}
738    CloseReason ::=    [211]  IMPLICIT INTEGER{
739                                 finished            (0),
740                                 shutdown            (1),
741                                 systemProblem       (2),
742                                 costLimit           (3),
743                                 resources           (4),
744                                 securityViolation   (5),
745                                 protocolError       (6),
746                                 lackOfActivity      (7),
747                                 peerAbort           (8),
748                                 unspecified         (9)}
751 -- Global auxiliary definitions
752    ReferenceId            ::=      [2]       IMPLICIT OCTET STRING
753    ResultSetId            ::=      [31]      IMPLICIT InternationalString
754    ElementSetName         ::=      [103]     IMPLICIT InternationalString
755    DatabaseName           ::=      [105]     IMPLICIT InternationalString
756    AttributeSetId         ::=                OBJECT IDENTIFIER
759 -- OtherInformation
760    OtherInformation    ::= [201] IMPLICIT SEQUENCE OF
761 SEQUENCE{
762       category               [1]   IMPLICIT InfoCategory OPTIONAL, 
763       information     CHOICE{
764              characterInfo                [2]   IMPLICIT InternationalString,
765              binaryInfo                   [3]   IMPLICIT OCTET STRING,
766              externallyDefinedInfo        [4]   IMPLICIT EXTERNAL,
767              oid                          [5]   IMPLICIT OBJECT IDENTIFIER}}
769    InfoCategory ::= SEQUENCE{
770          categoryTypeId   [1]   IMPLICIT OBJECT IDENTIFIER OPTIONAL,
771          categoryValue    [2]   IMPLICIT INTEGER}
774 -- Units
775    -- IntUnit is used when value and unit are supplied together. Unit, alone,
776    -- is used when just  specifying a unit (without a value).  For example,
777    -- IntUnit is used in Term, in an RPNQuery, or it can be the datatype of
778    -- an element within a retrieval record. Unit (alone) would be used in an
779    -- element request, when requesting data be returned according to a
780    -- particular unit.
782    IntUnit ::= SEQUENCE{
783       value     [1] IMPLICIT INTEGER,
784       unitUsed  [2] IMPLICIT Unit}
786    Unit ::= SEQUENCE{
787       unitSystem   [1] InternationalString OPTIONAL,      -- e.g. 'SI'
788       unitType     [2] StringOrNumeric OPTIONAL,          -- e.g. 'mass'
789       unit         [3] StringOrNumeric OPTIONAL,          -- e.g.  'kilograms'
790       scaleFactor  [4] IMPLICIT INTEGER OPTIONAL          -- e.g. 9 means 10**9
791              }
793 --CharacterString
794    InternationalString ::= GeneralString
795       -- When version 2 is in force, this collapses to VisibleString. That
796       -- is, only characters in the visibleString repertoire may be used.
797       -- (Datatype compatibility with version 2 is not affected, because
798       -- references are IMPLICIT.)  When version 3 is in force, the semantics
799       -- of the GeneralString content may be altered by negotiation during
800       -- initialization. If no such  negotiation is in effect, then
801       -- GeneralString semantics are in force.
803 StringOrNumeric ::= CHOICE{
804    string       [1] IMPLICIT InternationalString,
805    numeric      [2] IMPLICIT INTEGER}
807 END --IR DEFINITIONS