|
|
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: 4606 (0x11fe)
Types: TextFile
Names: »if-enc.py«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
└─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z«
└─⟦de7628f85⟧
└─⟦this⟧ »isode-6.0/dsap/x500as/if-enc.py«
-- if-enc.py - manually-augmented InformationFramework module
-- $Header: /f/osi/dsap/x500as/RCS/if-enc.py,v 7.0 89/11/23 21:50:41 mrose Rel $
--
--
-- $Log: if-enc.py,v $
-- Revision 7.0 89/11/23 21:50:41 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;
ENCODER encode
AttributeType [[P AttributeType]]
%{
OID new_oid = grab_oid(parm);
%}
::=
%{
DLOG(log_dsap, LLOG_PDUS, ("About to encode AttributeType (IF)"));
%}
OBJECT IDENTIFIER [[O new_oid]]
%{
DLOG(log_dsap, LLOG_PDUS, ("Done encode AttributeType (IF)"));
%}
AttributeValue [[P AttributeValue]]
%{
PE new_pe = grab_pe(parm);
%}
::=
%{
DLOG(log_dsap, LLOG_PDUS, ("About to encode AttributeValue (IF)"));
%}
ANY [[a new_pe]]
%{
pe_free (new_pe);
DLOG(log_dsap, LLOG_PDUS, ("Done encode AttributeValue (IF)"));
%}
AttributeValueAssertion [[P AVA *]]
%{
%}
::=
%{
DLOG(log_dsap, LLOG_PDUS, ("About to encode AttributeValueAssertion (IF)"));
%}
SEQUENCE
{
AttributeType [[p parm->ava_type]]
%{
%} ,
AttributeValue [[p parm->ava_value]]
%{
%}
}
%{
DLOG(log_dsap, LLOG_PDUS, ("Done encode AttributeValueAssertion (IF)"));
%}
Attribute [[P Attr_Sequence]]
%{
AV_Sequence avs_temp;
%}
::=
%{
DLOG(log_dsap, LLOG_PDUS, ("About to encode Attribute (IF)"));
%}
SEQUENCE
{
type
AttributeType [[p &(parm->attr_type)]]
%{
%} ,
values
SET OF
%{
%}
<<avs_temp=parm->attr_value;avs_temp!=NULLAV;avs_temp=avs_temp->avseq_next>>
AttributeValue [[p &(avs_temp->avseq_av)]]
%{
%}
%{
%}
}
%{
DLOG(log_dsap, LLOG_PDUS, ("Done encode Attribute (IF)"));
%}
RelativeDistinguishedName [[P RDN]]
%{
AVA ava_temp_s;
AVA * ava_temp = &(ava_temp_s);
RDN rdn_temp;
%}
::=
%{
DLOG(log_dsap, LLOG_PDUS, ("About to encode RelativeDistinguishedName (IF)"));
%}
SET OF
%{
ava_temp->ava_type = &rdn_temp->rdn_at;
ava_temp->ava_value = &rdn_temp->rdn_av;
%}
<<rdn_temp=parm;rdn_temp!=NULLRDN;rdn_temp=rdn_temp->rdn_next>>
AttributeValueAssertion [[p ava_temp]]
%{
%}
%{
DLOG(log_dsap, LLOG_PDUS, ("Done encode RelativeDistinguishedName (IF)"));
%}
RDNSequence [[P DN]]
%{
DN dn_temp;
%}
::=
%{
DLOG(log_dsap, LLOG_PDUS, ("About to encode RDNSequence (IF)"));
%}
SEQUENCE OF
%{
%}
<<dn_temp=parm;dn_temp!=NULLDN;dn_temp=dn_temp->dn_parent>>
RelativeDistinguishedName [[p dn_temp->dn_rdn]]
%{
%}
%{
DLOG(log_dsap, LLOG_PDUS, ("Done encode RDNSequence (IF)"));
%}
DistinguishedName [[P DN]]
%{
%}
::=
%{
DLOG(log_dsap, LLOG_TRACE, ("About to encode DistinguishedName (IF)"));
%}
RDNSequence [[p parm]]
%{
DLOG(log_dsap, LLOG_TRACE, ("Done encode DistinguishedName (IF)"));
%}
Name [[P DN]]
%{
%}
::=
%{
DLOG(log_dsap, LLOG_PDUS, ("About to encode Name (IF)"));
%}
CHOICE
<<1>>
{
RDNSequence [[p parm]]
%{
%}
}
%{
DLOG(log_dsap, LLOG_PDUS, ("Done encode Name (IF)"));
%}
END