|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T q
Length: 9222 (0x2406) Types: TextFile Names: »qu-enc.py«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« └─⟦d3ac74d73⟧ └─⟦this⟧ »isode-5.0/dsap/x500as/qu-enc.py«
-- quipu-enc.py - additional QUIPU directory type definitions module -- $Header: /f/osi/dsap/x500as/RCS/qu-enc.py,v 6.1 89/03/23 22:27:27 mrose Exp $ -- -- -- $Log: qu-enc.py,v $ -- Revision 6.1 89/03/23 22:27:27 mrose -- out-the-door -- -- Revision 6.0 89/03/18 23:29:56 mrose -- Release 5.0 -- -- -- NOTICE -- -- Acquisition, use, and distribution of this module and related -- materials are subject to the restrictions of a license agreement. -- Consult the Preface in the User's Manual for the full terms of -- this agreement. -- -- Quipu { ccitt data(9) pss(2342) ucl(19200300) quipu(99) directoryDefinitions(1) } DEFINITIONS ::= %{ #include <stdio.h> #include "quipu/util.h" #include "quipu/entry.h" extern LLog * log_dsap; #define encode_UNIV_PrintableString build_UNIV_PrintableString #define encode_UNIV_UTCTime build_UNIV_UTCTime %} PREFIXES encode decode print BEGIN IMPORTS NameError , ServiceError , SecurityError FROM DAS { joint-iso-ccitt ds(5) modules(1) directoryAbstractService(2) } DistinguishedName , RelativeDistinguishedName , Attribute , AttributeType FROM IF { joint-iso-ccitt ds(5) modules(1) informationFramework(1) }; -- ReliableROSData -- ::= -- SEQUENCE -- { -- rosOperation -- INTEGER , -- the operation being applied -- data -- ANY , -- the Operation Argument -- oldVersion -- ANY , -- data version to which operation should be applied -- newVersion -- ANY -- version number which results from operation -- } ENCODER encode AccessSelector [[P struct acl_info *]] ::= %{ DLOG(log_dsap, LLOG_TRACE, ("About to encode AccessSelector")); %} CHOICE <<parm->acl_selector_type + 1>> { entry [0] NULL , other [2] NULL , prefix [3] NameList [[p parm->acl_name]] , group [4] NameList [[p parm->acl_name]] } %{ DLOG(log_dsap, LLOG_TRACE, ("Done encode AccessSelector")); %} AccessCategories [[P int]] ::= %{ DLOG(log_dsap, LLOG_TRACE, ("About to encode AccessCategories")); %} ENUMERATED [[i parm]] { none (0) , detect (1) , compare (2) , read (3) , add (4) , write (5) } %{ DLOG(log_dsap, LLOG_TRACE, ("Done encode AccessCategories")); %} ACLInfo [[P struct acl_info *]] %{ struct acl_info * ai_tmp; %} ::= %{ DLOG(log_dsap, LLOG_TRACE, ("About to encode ACLInfo")); %} SET OF <<ai_tmp=parm; ai_tmp != NULLACL_INFO; ai_tmp=ai_tmp->acl_next>> SEQUENCE { AccessSelector [[p ai_tmp]] , AccessCategories [[p ai_tmp->acl_categories]] } %{ DLOG(log_dsap, LLOG_TRACE, ("Done encode ACLInfo")); %} AttributeACL [[P struct acl_attr *]] %{ struct oid_seq * os_tmp; %} ::= %{ DLOG(log_dsap, LLOG_TRACE, ("About to encode AttributeACL")); %} SEQUENCE { SET OF <<os_tmp=parm->aa_types; os_tmp != NULLOIDSEQ; os_tmp=os_tmp->oid_next>> -- AttributeType OBJECT IDENTIFIER [[O os_tmp->oid_oid]] , ACLInfo [[p parm->aa_acl]] -- DEFAULT {{other , read}, {entry, write}} OPTIONAL <<test_acl_default(parm->aa_acl) != OK>> } %{ DLOG(log_dsap, LLOG_TRACE, ("Done encode AttributeACL")); %} ACLSyntax [[P struct acl *]] %{ struct acl_attr * aa_tmp; %} ::= %{ DLOG(log_dsap, LLOG_TRACE, ("About to encode ACLSyntax")); %} SEQUENCE { childACL [0] ACLInfo [[p parm->ac_child]] -- DEFAULT {{other , read}, {entry, write}} , OPTIONAL <<test_acl_default(parm->ac_child) != OK>> , entryACL [1] ACLInfo [[p parm->ac_entry]] -- DEFAULT {{other , read}, {entry, write}} , OPTIONAL <<test_acl_default(parm->ac_entry) != OK>> , defaultAttributeACL [2] ACLInfo [[p parm->ac_default]] -- DEFAULT {{other , read}, {entry, write}} , OPTIONAL <<test_acl_default(parm->ac_default) != OK>> , [3] SET OF <<aa_tmp=parm->ac_attributes; aa_tmp!=NULLACL_ATTR; aa_tmp=aa_tmp->aa_next>> AttributeACL [[p aa_tmp]] } %{ DLOG(log_dsap, LLOG_TRACE, ("Done encode ACLSyntax")); %} NameList [[P struct dn_seq *]] %{ struct dn_seq * dns_tmp; %} ::= %{ DLOG(log_dsap, LLOG_TRACE, ("About to encode NameList")); %} SET OF <<dns_tmp=parm; dns_tmp!=NULLDNSEQ; dns_tmp=dns_tmp->dns_next>> DistinguishedName [[p dns_tmp->dns_dn]] %{ DLOG(log_dsap, LLOG_TRACE, ("Done encode NameList")); %} EDBInfoSyntax [[P struct edb_info *]] ::= %{ DLOG(log_dsap, LLOG_TRACE, ("About to encode EDBInfoSyntax")); %} SEQUENCE { edb DistinguishedName [[p parm->edb_name]] , getFromDSA DistinguishedName [[p parm->edb_getfrom]] OPTIONAL <<parm->edb_getfrom != NULLDN>> , sendToDSAs NameList [[p parm->edb_sendto]] , getEDBAllowed NameList [[p parm->edb_allowed]] } %{ DLOG(log_dsap, LLOG_TRACE, ("Done encode EDBInfoSyntax")); %} TreeStructureSyntax [[P struct tree_struct *]] %{ OID oid_tmp; int do_once; %} ::= %{ DLOG(log_dsap, LLOG_TRACE, ("About to encode TreeStructureSyntax")); if (parm->tree_object == NULLOBJECTCLASS) { DLOG(log_dsap, LLOG_DEBUG, ("NULL OID in tree structure")); oid_tmp = NULLOID; } else { oid_tmp = oid_cpy(parm->tree_object->oc_ot.ot_oid); DLOG(log_dsap, LLOG_DEBUG, ("oc encodes as oid: %s", sprintoid(oid_tmp))); } %} SET { mandatoryObjectClasses [1] SET OF %{ DLOG(log_dsap, LLOG_DEBUG, ("Another mandatory oc")); %} <<do_once = 1; do_once != 0; do_once = 0>> OBJECT IDENTIFIER [[O oid_tmp]] , optionalObjectClasses [2] SET OF OBJECT IDENTIFIER OPTIONAL <<FALSE>> , permittedRDNs [3] SET OF SET OF AttributeType [[p NULLAttrT]] } %{ if(oid_tmp != NULLOID) oid_free (oid_tmp); DLOG(log_dsap, LLOG_TRACE, ("Done encode TreeStructureSyntax")); %} EntryDataBlock [[P struct entry *]] %{ struct entry * ent_tmp; %} ::= %{ DLOG(log_dsap, LLOG_TRACE, ("About to encode EntryDataBlock")); %} SEQUENCE OF <<ent_tmp = parm; ent_tmp != NULLENTRY; ent_tmp=ent_tmp->e_sibling>> RelativeEntry [[p ent_tmp]] %{ DLOG(log_dsap, LLOG_TRACE, ("Done encode EntryDataBlock")); %} RelativeEntry [[P struct entry *]] %{ Attr_Sequence as_tmp; %} ::= %{ DLOG(log_dsap, LLOG_TRACE, ("About to encode RelativeEntry")); %} SEQUENCE { RelativeDistinguishedName [[p parm->e_name]] , SET OF <<as_tmp = parm->e_attributes; as_tmp != NULLATTR; as_tmp=as_tmp->attr_link>> Attribute [[p as_tmp]] } %{ DLOG(log_dsap, LLOG_TRACE, ("Done encode RelativeEntry")); %} EDBVersion [[P char *]] %{ %} ::= %{ DLOG(log_dsap, LLOG_TRACE, ("About to encode EDBVersion")); if(parm == NULLCP) LLOG(log_dsap, LLOG_EXCEPTIONS, ("NULL CP Version encoded!")); %} UTCTime [[s parm]] %{ DLOG(log_dsap, LLOG_TRACE, ("Done encode EDBVersion")); %} GetEntryDataBlockArgument [[P struct getedb_arg *]] ::= %{ DLOG(log_dsap, LLOG_TRACE, ("About to encode GetEntryDataBlockArgument")); %} SET { entry [0] DistinguishedName [[p parm->ga_entry]] , sendIfMoreRecentThan [1] EDBVersion [[p parm->ga_version]] OPTIONAL <<parm->ga_version != NULL>> -- if omitted, send in any case } %{ DLOG(log_dsap, LLOG_TRACE, ("Done encode GetEntryDataBlockArgument")); %} GetEntryDataBlockResult [[P struct getedb_result *]] ::= %{ DLOG(log_dsap, LLOG_TRACE, ("About to encode GetEntryDataBlockResult")); %} SEQUENCE { versionHeld [0] EDBVersion [[p parm->gr_version]] , [1] EntryDataBlock [[p parm->gr_edb]] OPTIONAL <<parm->gr_edb != NULLENTRY>> } %{ DLOG(log_dsap, LLOG_TRACE, ("Done encode GetEntryDataBlockResult")); %} END