(* $Workfile:   x500.xv2  $ $Revision:   1.3  $ *)
(* DIRECTORY.TPL *)
(*****************************************************************************)
(* ASN.1 DIRECTORY DATA-TYPE TEMPLATE                                        *)
(*                                                                           *)
(*   Initial template based on X.501 Directory Name definition               *)
(*     - update/rework as neccessary                                         *)
(*                                                                           *)
(* Known simplifications:                                                    *)
(*   - setting of 'E' for ENCODE calls to signify COLLECT calls to User      *)
(*   - setting of 'D' for DECODE calls to signify CONSULT calls to User      *)
(*   - setting of 'S' for potential constructor octet primitives             *)
(*****************************************************************************)

(*****************************************************************************)
(* Directory name - based on X.501                                           *)
(*****************************************************************************)

DirectoryName              LABEL     = ddirn               T=special case
                           STRUCTURE = CHOICE
                           TAG       = (C 0 C)
                           CHILDREN  = { <drdns, U 16 C,O,0> }

RDNSequence                LABEL     = drdns               T=MH_DIRECTORY_NAME
                           STRUCTURE = SEQUENCE OF         C=DS_C_DS_DN
                           LIMIT     = 0
                           CHILDREN  = { <drdnm, U 17 C,O,0> }

RelativeDistinguishedName  LABEL     = drdnm               T=DS_RDNS
                           STRUCTURE = SET OF              C=DS_C_DS_RDN
                           LIMIT     = 0
                           CHILDREN  = { <davas, U 16 C,O,0> }

AttributeValueAssertion    LABEL     = davas               T=DS_AVAS
                           STRUCTURE = SEQUENCE            C=DS_C_AVA
                           CHILDREN  = { <dobid, U  6 P,M,0>,
                                         <datrv, U 19 P,M,0> }

(*****************************************************************************)
(* strictly AttributeValue should be type ANY.  But ...                      *)
(*****************************************************************************)
AttributeValue             LABEL     = datrv               T=DS_ATTRIBUTE_VALUE
                           STRUCTURE = PRINTABLE STRING

ObjectIdentifier           LABEL     = dobid               T=DS_ATTRIBUTE_TYPE
                           STRUCTURE = OBJECT IDENTIFIER

(*****************************************************************************)
(* (N) ADDRESS                                                               *)
(*****************************************************************************)
N ADDRESS                  LABEL     = dnadd               T=MH_PRESENTATION_AD
                           STRUCTURE = SEQUENCE            C=DS_C_PRESENTATION_
                           CHILDREN  = { <dpsel, C 0 S,O,0>D,
                                         <dssel, C 1 S,O,0>D,
                                         <dtsel, C 2 S,O,0>D,
                                         <dneta, C 3 C,M,0>D }

P Selector                 LABEL     = dpsel               T=DS_P_SELECTOR
                           STRUCTURE = OCTETSTRING

S Selector                 LABEL     = dssel               T=DS_S_SELECTOR
                           STRUCTURE = OCTETSTRING

T Selector                 LABEL     = dtsel               T=DS_T_SELECTOR
                           STRUCTURE = OCTETSTRING

N Address                  LABEL     = dneta
                           STRUCTURE = SEQUENCE OF
                           CHILDREN  = { <dnsqo, U 4 S,O,0> }

N Address String           LABEL     = dnsqo               T=DS_N_ADDRESSES
                           STRUCTURE = OCTETSTRING

!
