|
|
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 i
Length: 5241 (0x1479)
Types: TextFile
Names: »if-dec.py«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
└─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z«
└─⟦de7628f85⟧
└─⟦this⟧ »isode-6.0/dsap/x500as/if-dec.py«
-- if-dec.py - manually-augmented InformationFramework module
-- $Header: /f/osi/dsap/x500as/RCS/if-dec.py,v 7.0 89/11/23 21:50:40 mrose Rel $
--
--
-- $Log: if-dec.py,v $
-- Revision 7.0 89/11/23 21:50:40 mrose
-- Release 6.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.
--
--
IF
{
joint-iso-ccitt
ds(5)
modules(1)
informationFramework(1)
}
DEFINITIONS ::=
%{
#include <stdio.h>
#include "quipu/util.h"
#include "quipu/attrvalue.h"
extern LLog * log_dsap;
OID grab_oid();
PE grab_pe();
%}
PREFIXES encode decode print
BEGIN
-- EXPORTS
-- AttributeType,
-- AttributeValue,
-- AttributeValueAssertion,
-- Attribute,
-- RelativeDistinguishedName,
-- DistinguishedName,
-- Name;
DECODER decode
AttributeType [[P AttributeType]]
%{
%}
::=
%{
DLOG(log_dsap, LLOG_PDUS, ("About to decode AttributeType (IF)"));
parm->at_oid = NULLOID;
parm->at_table = NULL;
%}
OBJECT IDENTIFIER [[O parm->at_oid]]
%{
DLOG(log_dsap, LLOG_PDUS, ("Done decode AttributeType (IF)"));
%}
AttributeValue [[P AttributeValue]]
%{
PE any = NULLPE;
%}
::=
%{
DLOG(log_dsap, LLOG_PDUS, ("About to decode AttributeValue (IF)"));
parm->av_syntax = 0;
parm->av_struct = NULL;
%}
ANY [[a any]]
%{
parm -> av_struct = (caddr_t) any;
DLOG(log_dsap, LLOG_PDUS, ("Done decode AttributeValue (IF)"));
%}
AttributeValueAssertion [[P AVA *]]
%{
%}
::=
%{
DLOG(log_dsap, LLOG_PDUS, ("About to decode AttributeValueAssertion (IF)"));
parm->ava_value = AttrV_alloc();
parm->ava_type = AttrT_alloc();
%}
SEQUENCE
{
AttributeType [[p parm->ava_type]]
%{
%} ,
AttributeValue [[p parm->ava_value]]
%{
%}
}
%{
DLOG(log_dsap, LLOG_PDUS, ("Done decode AttributeValueAssertion (IF)"));
%}
Attribute [[P Attr_Sequence]]
%{
AV_Sequence av_tmp;
%}
::=
%{
DLOG(log_dsap, LLOG_PDUS, ("About to decode Attribute (IF)"));
parm->attr_value = NULLAV;
parm->attr_acl = NULLACL_INFO;
parm->attr_link = NULLATTR;
%}
SEQUENCE
{
type
AttributeType [[p &(parm->attr_type)]]
%{
%} ,
values
SET OF
%{
av_tmp = avs_comp_alloc();
av_tmp->avseq_next = NULLAV;
%}
AttributeValue [[p &(av_tmp->avseq_av)]]
%{
parm->attr_value = avs_merge(parm->attr_value, av_tmp);
%}
}
%{
DLOG(log_dsap, LLOG_PDUS, ("Done decode Attribute (IF)"));
%}
RelativeDistinguishedName [[P RDN*]]
%{
AVA ava_next_s;
AVA * ava_next = &(ava_next_s);
RDN rdn_tmp;
%}
::=
%{
DLOG(log_dsap, LLOG_PDUS, ("About to decode RelativeDistinguishedName (IF)"));
(*parm) = NULLRDN;
%}
SET OF
%{
%}
AttributeValueAssertion [[p ava_next]]
%{
rdn_tmp = rdn_comp_alloc();
rdn_tmp->rdn_next = NULLRDN;
rdn_tmp->rdn_at.at_oid = ava_next->ava_type->at_oid;
rdn_tmp->rdn_at.at_table = ava_next->ava_type->at_table;
rdn_tmp->rdn_av.av_syntax = ava_next->ava_value->av_syntax;
rdn_tmp->rdn_av.av_struct = ava_next->ava_value->av_struct;
free ((char *)ava_next->ava_value);
free ((char *)ava_next->ava_type);
(*parm) = rdn_merge((*parm), rdn_tmp);
%}
%{
DLOG(log_dsap, LLOG_PDUS, ("Done decode RelativeDistinguishedName (IF)"));
%}
RDNSequence [[P DN*]]
%{
DN * dn_next;
%}
::=
%{
DLOG(log_dsap, LLOG_PDUS, ("About to decode RDNSequence (IF)"));
(*parm) = NULLDN;
dn_next = parm;
%}
SEQUENCE OF
%{
(*dn_next) = dn_comp_alloc();
%}
RelativeDistinguishedName [[p &((*dn_next)->dn_rdn)]]
%{
dn_next = &((*dn_next)->dn_parent);
%}
%{
(*dn_next) = NULLDN;
DLOG(log_dsap, LLOG_PDUS, ("Done decode RDNSequence (IF)"));
%}
DistinguishedName [[P DN*]]
%{
%}
::=
%{
DLOG(log_dsap, LLOG_TRACE, ("About to decode DistinguishedName (IF)"));
%}
RDNSequence [[p parm]]
%{
DLOG(log_dsap, LLOG_TRACE, ("Done decode DistinguishedName (IF)"));
%}
Name [[P DN*]]
%{
%}
::=
%{
DLOG(log_dsap, LLOG_PDUS, ("About to decode Name (IF)"));
%}
CHOICE
{
RDNSequence [[p parm]]
%{
%}
}
%{
DLOG(log_dsap, LLOG_PDUS, ("Done decode Name (IF)"));
%}
END