(* $Workfile:   bind.tpl  $ $Revision:   3.9  $ *)
(* BIND.TPL *)
(*****************************************************************************)
(* ASN.1 MTS-BIND/UNBIND DATA-TYPE TEMPLATE                                  *)
(*                                                                           *)
(* - Defines:                                                                *)
(*    - MTSBind and MTSUnbind Operation                                      *)
(*                                                                           *)
(* Known simplifications:                                                    *)
(*   - setting of 'S' for potential constructor octet primitives             *)
(*                                                                           *)
(* Note:                                                                     *)
(*   - security context and credentials now set up as ANY as the security    *)
(*     module handles encoding of these nodes                                *)
(*****************************************************************************)

(*****************************************************************************)
(* MTABind - see X.411 Version 6 Figure 4 Page 178                           *)
(* MTSBind - see X.411 Version 6 Figure 2 Page 106                           *)
(*****************************************************************************)

(* MTA/MTSBind Arguments, Results, Errors                                    *)
(* Note that Bind Error is just an explicitly tagged [18] integer            *)


MTABindArgumentsChoice     LABEL     = Bmtab
                           STRUCTURE = CHOICE
                           TAG       = (C 16 C)
                           CHILDREN  = { <Cnull, U  5 P,O,0>E,
                                         <Bbmta, C  1 C,O,0>E }

MTABindArgumentsChoice84   LABEL     = Bmta4
                           STRUCTURE = CHOICE
                           CHILDREN  = { <Cnull, U  5 P,O,0>E,
                                         <Bbmta, C  1 C,O,0>E }

MTABindArguments           LABEL     = Bbmta
                           STRUCTURE = SET
                           CHILDREN  = { <Binam, U 00 P,M,0> E,
                                         <Bcred, C  1 C,M,0>,
                                         <Bsctx, C  2 C,D,0>  }

MTSBindArguments : tagged  LABEL     = Bmtsb
                           STRUCTURE = CHOICE
                           TAG       = (C 16 C)
                           CHILDREN  = { <Bbind, U 17 C,O,0> }

MTSBindArguments           LABEL     = Bbind
                           STRUCTURE = SET
                           CHILDREN  = { <Binam, U 00 P,M,0> E,
                                         <Bwait, C  1 C,O,0> E,
                                         <Bcred, C  2 C,M,0>,
                                         <Bsctx, C  3 C,D,0>  }

MTABindResultChoice        LABEL     = Bmtar
                           STRUCTURE = CHOICE
                           TAG       = (C 17 C)
                           CHILDREN  = { <Cnull, U  5 P,O,0> ,
                                         <Brmta, C  1 C,O,0> E }

MTABindResultChoice84      LABEL     = Bmta5
                           STRUCTURE = CHOICE
                           CHILDREN  = { <Cnull, U  5 P,O,0> ,
                                         <Brmta, C  1 C,O,0> E }

MTABindResult              LABEL     = Brmta
                           STRUCTURE = SET
                           CHILDREN  = { <Brsnm, U 00 P,M,0> E,
                                         <Bcred, C  1 C,M,0>  }

MTSBindResult : tagged     LABEL     = Brmts
                           STRUCTURE = CHOICE
                           TAG       = (C 17 C)
                           CHILDREN  = { <Bbrst, U 17 C,O,0> }

MTSBindResult              LABEL     = Bbrst
                           STRUCTURE = SET
                           CHILDREN  = { <Brsnm, U 00 P,M,0> E,
                                         <Bwait, C  1 C,O,0> E,
                                         <Bcred, C  2 C,M,0>  }

InitiatorName              LABEL     = Binam
                           STRUCTURE = CHOICE
                           CHILDREN  = { <Dornm, A  0 C,O,0> E,
                                         <Bmtan, C  0 P,O,0> ,
                                         <Bmsnm, P  1 C,O,0> E }

ResponderName              LABEL     = Brsnm
                           STRUCTURE = CHOICE
                           CHILDREN  = { <Dornm, A  0 C,O,0> E,
                                         <Bmtan, C  0 P,O,0> ,
                                         <Bmsnm, P  1 C,O,0> E }

MTAName                    LABEL     = Bmtan
                           STRUCTURE = IA5 STRING

MessageStoreName           LABEL     = Bmsnm
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <Dornm, A  0 C,M,0>DE,
                                         <Cbool, U  1 P,M,0>DE }

MessagesWaitingChoice      LABEL     = Bwait
                           STRUCTURE = CHOICE
                           TAG       = (C 1 C)
                           CHILDREN  = { <Bmsgw, U 17 C,O,0>DE }

MessagesWaiting            LABEL     = Bmsgw
                           STRUCTURE = SET
                           CHILDREN  = { <Burgt, C  0 C,O,0>DE,
                                         <Bnorm, C  1 C,O,0>DE,
                                         <Bnurg, C  2 C,O,0>DE }

UrgentDeliveryQueue        LABEL     = Burgt
                           STRUCTURE = SET
                           CHILDREN  = { <Bmsgs, C  0 P,M,0>DE,
                                         <Bocts, C  1 P,O,0>DE }

NormalDeliveryQueue        LABEL     = Bnorm
                           STRUCTURE = SET
                           CHILDREN  = { <Bmsgs, C  0 P,M,0>DE,
                                         <Bocts, C  1 P,O,0>DE }

NonUrgentDeliveryQueue     LABEL     = Bnurg
                           STRUCTURE = SET
                           CHILDREN  = { <Bmsgs, C  0 P,M,0>DE,
                                         <Bocts, C  1 P,O,0>DE }

Messages                   LABEL     = Bmsgs
                           STRUCTURE = INTEGER

Octets                     LABEL     = Bocts
                           STRUCTURE = INTEGER

InitiatorCredentials       LABEL     = Bcred
                           STRUCTURE = CHOICE
                           TAG       = (C 2 C)
                           CHILDREN  = { <Bia5p, U 22 P,O,62> E,
                                         <Boctp, U  4 P,O,62> E,
                                         <Bstgc, C  0 C,O,0> E }

SimpleCredentials(IA5)     LABEL     = Bia5p
                           STRUCTURE = IA5 STRING

SimpleCredentials(Octets)  LABEL     = Boctp
                           STRUCTURE = OCTETSTRING

StrongCredentials          LABEL     = Bstgc
                           STRUCTURE = ANY
                           TAG       = (C 0 C)
                           CHILDREN  = {}

Bind Error                 LABEL     = Bderr
                           STRUCTURE = CHOICE
                           TAG       = (C 18 C)
                           CHILDREN  = { <Cintg, U  2 P,O,0>D }

Security Context           LABEL     = Bsctx
                           STRUCTURE = SET OF
                           LIMIT     = 256
                           CHILDREN  = { <Xmslb, U 17 C,O,0> }
!

