|
|
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: 5050 (0x13ba)
Types: TextFile
Names: »if-dec.py«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape
└─⟦eba4602b1⟧ »./isode-5.0.tar.Z«
└─⟦d3ac74d73⟧
└─⟦this⟧ »isode-5.0/dsap/x500as/if-dec.py«
-- if-dec.py - manually-augmented InformationFramework module
-- $Header: /f/osi/dsap/x500as/RCS/if-dec.py,v 6.0 89/03/18 23:29:50 mrose Rel $
--
--
-- $Log: if-dec.py,v $
-- Revision 6.0 89/03/18 23:29:50 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.
--
--
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_TRACE, ("About to decode AttributeType (IF)"));
(*parm) = AttrT_alloc();
(*parm)->at_oid = NULLOID;
(*parm)->at_table = NULL;
%}
OBJECT IDENTIFIER [[O (*parm)->at_oid]]
%{
DLOG(log_dsap, LLOG_TRACE, ("Done decode AttributeType (IF)"));
%}
AttributeValue [[P AttributeValue*]]
%{
%}
::=
%{
DLOG(log_dsap, LLOG_TRACE, ("About to decode AttributeValue (IF)"));
(*parm) = AttrV_alloc();
(*parm)->av_pe = NULLPE;
(*parm)->av_syntax = AV_UNKNOWN;
%}
ANY [[a (*parm)->av_pe]]
%{
DLOG(log_dsap, LLOG_TRACE, ("Done decode AttributeValue (IF)"));
%}
AttributeValueAssertion [[P AVA *]]
%{
%}
::=
%{
DLOG(log_dsap, LLOG_TRACE, ("About to decode AttributeValueAssertion (IF)"));
%}
SEQUENCE
{
AttributeType [[p &(parm->ava_type)]]
%{
%} ,
AttributeValue [[p &(parm->ava_value)]]
%{
%}
}
%{
DLOG(log_dsap, LLOG_TRACE, ("Done decode AttributeValueAssertion (IF)"));
%}
Attribute [[P Attr_Sequence]]
%{
AV_Sequence *avs_next;
%}
::=
%{
DLOG(log_dsap, LLOG_TRACE, ("About to decode Attribute (IF)"));
parm->attr_value = NULLAV;
parm->attr_acl = NULLACL_INFO;
parm->attr_link = NULLATTR;
avs_next = &(parm->attr_value);
%}
SEQUENCE
{
type
AttributeType [[p &(parm->attr_type)]]
%{
%} ,
values
SET OF
%{
(*avs_next) = avs_comp_alloc();
%}
AttributeValue [[p &((*avs_next)->avseq_av)]]
%{
avs_next = &((*avs_next)->avseq_next);
%}
%{
(*avs_next) = NULLAV;
%}
}
%{
DLOG(log_dsap, LLOG_TRACE, ("Done decode Attribute (IF)"));
%}
RelativeDistinguishedName [[P RDN*]]
%{
AVA ava_next_s;
AVA * ava_next = &(ava_next_s);
RDN * rdn_next;
%}
::=
%{
DLOG(log_dsap, LLOG_TRACE, ("About to decode RelativeDistinguishedName (IF)"));
(*parm) = NULLRDN;
rdn_next = parm;
%}
SET OF
%{
%}
AttributeValueAssertion [[p ava_next]]
%{
(*rdn_next) = rdn_comp_new(ava_next->ava_type,ava_next->ava_value);
rdn_next = &((*rdn_next)->rdn_next);
%}
%{
(*rdn_next) = NULLRDN;
DLOG(log_dsap, LLOG_TRACE, ("Done decode RelativeDistinguishedName (IF)"));
%}
RDNSequence [[P DN*]]
%{
DN * dn_next;
%}
::=
%{
DLOG(log_dsap, LLOG_TRACE, ("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_TRACE, ("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_TRACE, ("About to decode Name (IF)"));
%}
CHOICE
{
RDNSequence [[p parm]]
%{
%}
}
%{
DLOG(log_dsap, LLOG_TRACE, ("Done decode Name (IF)"));
%}
END