|
|
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: 11788 (0x2e0c)
Types: TextFile
Names: »qu-dec.py«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape
└─⟦eba4602b1⟧ »./isode-5.0.tar.Z«
└─⟦d3ac74d73⟧
└─⟦this⟧ »isode-5.0/dsap/x500as/qu-dec.py«
-- quipu-dec.py - additional QUIPU directory type definitions module
-- $Header: /f/osi/dsap/x500as/RCS/qu-dec.py,v 6.1 89/03/23 22:27:25 mrose Exp $
--
--
-- $Log: qu-dec.py,v $
-- Revision 6.1 89/03/23 22:27:25 mrose
-- out-the-door
--
-- Revision 6.0 89/03/18 23:29:55 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 decode_UNIV_PrintableString parse_UNIV_PrintableString
#define decode_UNIV_UTCTime parse_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
-- }
DECODER decode
AccessSelector [[P struct acl_info *]]
::=
%{
DLOG(log_dsap, LLOG_TRACE, ("About to decode AccessSelector"));
parm->acl_name = NULLDNSEQ;
%}
CHOICE
{
entry
[0] NULL
%{
parm->acl_selector_type = ACL_ENTRY;
%} ,
other
[2] NULL
%{
parm->acl_selector_type = ACL_OTHER;
%} ,
prefix
[3] NameList [[p &(parm->acl_name)]]
%{
parm->acl_selector_type = ACL_PREFIX;
%} ,
group
[4] NameList [[p &(parm->acl_name)]]
%{
parm->acl_selector_type = ACL_GROUP;
%}
}
%{
DLOG(log_dsap, LLOG_TRACE, ("Done decode AccessSelector"));
%}
AccessCategories [[P int *]]
::=
%{
DLOG(log_dsap, LLOG_TRACE, ("About to decode AccessCategories"));
%}
ENUMERATED [[i (*parm)]]
{
none (0) ,
detect (1) ,
compare (2) ,
read (3) ,
add (4) ,
write (5)
}
%{
DLOG(log_dsap, LLOG_TRACE, ("Done decode AccessCategories"));
%}
ACLInfo [[P struct acl_info * *]]
%{
%}
::=
%{
DLOG(log_dsap, LLOG_TRACE, ("About to decode ACLInfo"));
%}
SET OF
%{
(*parm) = (struct acl_info *) malloc(sizeof(struct acl_info));
%}
SEQUENCE
{
AccessSelector [[p (*parm)]] ,
AccessCategories [[p &((*parm)->acl_categories)]]
}
%{
parm = &((*parm)->acl_next);
%}
%{
(*parm) = NULLACL_INFO;
DLOG(log_dsap, LLOG_TRACE, ("Done decode ACLInfo"));
%}
AttributeACL [[P struct acl_attr *]]
%{
struct oid_seq **osp;
%}
::=
%{
DLOG(log_dsap, LLOG_TRACE, ("About to decode AttributeACL"));
parm->aa_types = NULLOIDSEQ;
osp = &(parm->aa_types);
parm->aa_acl = acl_default();
parm->aa_next = NULLACL_ATTR;
%}
SEQUENCE
{
SET OF
%{
(*osp) = (struct oid_seq *) malloc(sizeof(struct oid_seq));
%}
-- AttributeType
OBJECT IDENTIFIER [[O (*osp)->oid_oid]]
%{
osp = &((*osp)->oid_next);
%}
%{
(*osp) = NULLOIDSEQ;
%} ,
ACLInfo [[p &(parm->aa_acl)]]
-- DEFAULT {{other , read}, {entry, write}}
OPTIONAL
}
%{
DLOG(log_dsap, LLOG_TRACE, ("Done decode AttributeACL"));
%}
ACLSyntax [[P struct acl *]]
%{
struct acl_attr **aap;
%}
::=
%{
DLOG(log_dsap, LLOG_TRACE, ("About to decode ACLSyntax"));
parm->ac_child = acl_default();
parm->ac_entry = acl_default();
parm->ac_default = acl_default();
parm->ac_attributes = NULLACL_ATTR;
aap = &(parm->ac_attributes);
%}
SEQUENCE
{
childACL
[0] ACLInfo [[p &(parm->ac_child)]]
-- DEFAULT {{other , read}, {entry, write}} ,
OPTIONAL ,
entryACL
[1] ACLInfo [[p &(parm->ac_entry)]]
-- DEFAULT {{other , read}, {entry, write}} ,
OPTIONAL ,
defaultAttributeACL
[2] ACLInfo [[p &(parm->ac_default)]]
-- DEFAULT {{other , read}, {entry, write}} ,
OPTIONAL ,
[3] SET OF
%{
(*aap) = (struct acl_attr *) malloc(sizeof(struct acl_attr));
%}
AttributeACL [[p (*aap)]]
%{
aap = &((*aap)->aa_next);
%}
%{
(*aap) = NULLACL_ATTR;
%}
}
%{
DLOG(log_dsap, LLOG_TRACE, ("Done decode ACLSyntax"));
%}
NameList [[P struct dn_seq **]]
::=
%{
DLOG(log_dsap, LLOG_TRACE, ("About to decode NameList"));
*parm = NULLDNSEQ;
%}
SET OF
%{
*parm = (struct dn_seq *) malloc(sizeof(struct dn_seq));
%}
DistinguishedName [[p &((*parm)->dns_dn)]]
%{
parm = &((*parm)->dns_next);
%}
%{
(*parm) = NULLDNSEQ;
DLOG(log_dsap, LLOG_TRACE, ("Done decode NameList"));
%}
EDBInfoSyntax [[P struct edb_info *]]
::=
%{
DLOG(log_dsap, LLOG_TRACE, ("About to decode EDBInfoSyntax"));
parm->edb_name = NULLDN;
parm->edb_getfrom = NULLDN;
parm->edb_sendto = NULLDNSEQ;
parm->edb_allowed = NULLDNSEQ;
%}
SEQUENCE
{
edb
DistinguishedName [[p &(parm->edb_name)]] ,
getFromDSA
DistinguishedName [[p &(parm->edb_getfrom)]]
OPTIONAL ,
sendToDSAs
%{
DLOG(log_dsap, LLOG_TRACE, ("decode sendToDSAs"));
%}
NameList [[p &(parm->edb_sendto)]] ,
getEDBAllowed
%{
DLOG(log_dsap, LLOG_TRACE, ("decode getEDBAllowed"));
%}
NameList [[p &(parm->edb_allowed)]]
}
%{
DLOG(log_dsap, LLOG_TRACE, ("Done decode EDBInfoSyntax"));
%}
TreeStructureSyntax [[P struct tree_struct **]]
%{
AttributeType at_tmp;
OID oid_tmp;
int is_first;
%}
::=
%{
DLOG(log_dsap, LLOG_TRACE, ("About to decode TreeStructureSyntax"));
is_first = 1;
%}
SET
{
mandatoryObjectClasses
[1] SET OF
OBJECT IDENTIFIER [[O oid_tmp]]
%{
if(is_first != 0)
{
DLOG(log_dsap, LLOG_DEBUG, ("oc has oid %s", sprintoid(oid_tmp)));
(*parm) = tree_struct_alloc();
(*parm)->tree_object = oid2oc(oid_tmp);
is_first = 0;
}
else
{
LLOG(log_dsap, LLOG_EXCEPTIONS, ("Multiple mandatory object classes"));
}
%} ,
optionalObjectClasses
[2] SET OF
OBJECT IDENTIFIER
OPTIONAL ,
permittedRDNs
[3] SET OF
SET OF
AttributeType [[p &(at_tmp)]]
%{
if(at_tmp != NULLAttrT)
AttrT_free(at_tmp);
at_tmp = NULLAttrT;
%}
}
%{
DLOG(log_dsap, LLOG_TRACE, ("Done decode TreeStructureSyntax"));
%}
EntryDataBlock [[P struct entry **]]
%{
struct entry **ent_tmp;
%}
::=
%{
DLOG(log_dsap, LLOG_TRACE, ("About to decode EntryDataBlock"));
(*parm) = NULLENTRY;
ent_tmp = parm;
%}
SEQUENCE OF
%{
(*ent_tmp) = entry_alloc();
(*ent_tmp)->e_leaf = TRUE;
(*ent_tmp)->e_complete = TRUE;
(*ent_tmp)->e_data = E_TYPE_SLAVE;
(*ent_tmp)->e_acl = acl_alloc();
(*ent_tmp)->e_acl->ac_child = NULLACL_INFO;
(*ent_tmp)->e_acl->ac_entry = NULLACL_INFO;
(*ent_tmp)->e_acl->ac_default = NULLACL_INFO;
(*ent_tmp)->e_acl->ac_attributes = NULLACL_ATTR;
%}
RelativeEntry [[p (*ent_tmp)]]
%{
ent_tmp = &((*ent_tmp)->e_sibling);
%}
%{
(*ent_tmp) = NULLENTRY;
DLOG(log_dsap, LLOG_TRACE, ("Done decode EntryDataBlock"));
%}
RelativeEntry [[P struct entry *]]
%{
Attr_Sequence * as_tmp;
%}
::=
%{
DLOG(log_dsap, LLOG_TRACE, ("About to decode RelativeEntry"));
parm->e_name = NULLRDN;
parm->e_attributes = NULLATTR;
as_tmp = &(parm->e_attributes);
%}
SEQUENCE
{
RelativeDistinguishedName [[p &(parm->e_name)]] ,
SET OF
%{
(*as_tmp) = as_comp_alloc();
%}
Attribute [[p (*as_tmp)]]
%{
as_tmp = &((*as_tmp)->attr_link);
%}
%{
(*as_tmp) = NULLATTR;
%}
}
%{
DLOG(log_dsap, LLOG_TRACE, ("Done decode RelativeEntry"));
%}
EDBVersion [[P char **]]
%{
%}
::=
%{
DLOG(log_dsap, LLOG_TRACE, ("About to decode EDBVersion"));
(*parm) = NULLCP;
%}
UTCTime [[s (*parm)]]
%{
if((*parm) == NULLCP)
LLOG(log_dsap, LLOG_EXCEPTIONS, ("NULL CP Version!"));
DLOG(log_dsap, LLOG_TRACE, ("Done decode EDBVersion"));
%}
GetEntryDataBlockArgument [[P struct getedb_arg *]]
::=
%{
DLOG(log_dsap, LLOG_TRACE, ("About to decode GetEntryDataBlockArgument"));
parm->ga_entry = NULLDN;
parm->ga_version = NULL;
parm->get_next = NULL_GETARG;
%}
SET
{
entry
[0] DistinguishedName [[p &(parm->ga_entry)]] ,
sendIfMoreRecentThan
[1] EDBVersion [[p &(parm->ga_version)]]
OPTIONAL
-- if omitted, send in any case
}
%{
DLOG(log_dsap, LLOG_TRACE, ("Done decode GetEntryDataBlockArgument"));
%}
GetEntryDataBlockResult [[P struct getedb_result *]]
::=
%{
DLOG(log_dsap, LLOG_TRACE, ("About to decode GetEntryDataBlockResult"));
parm->gr_version = NULL;
parm->gr_edb = NULLENTRY;
parm->gr_next = NULL_GETRESULT;
%}
SEQUENCE
{
versionHeld
[0] EDBVersion [[p &(parm->gr_version)]] ,
[1] EntryDataBlock [[p &(parm->gr_edb)]]
OPTIONAL
}
%{
DLOG(log_dsap, LLOG_TRACE, ("Done decode GetEntryDataBlockResult"));
%}
END