|
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: 4612 (0x1204) Types: TextFile Names: »if-enc.py«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« └─⟦d3ac74d73⟧ └─⟦this⟧ »isode-5.0/dsap/x500as/if-enc.py«
-- if-enc.py - manually-augmented InformationFramework module -- $Header: /f/osi/dsap/x500as/RCS/if-enc.py,v 6.0 89/03/18 23:29:51 mrose Rel $ -- -- -- $Log: if-enc.py,v $ -- Revision 6.0 89/03/18 23:29:51 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; ENCODER encode AttributeType [[P AttributeType]] %{ OID new_oid = grab_oid(parm); %} ::= %{ DLOG(log_dsap, LLOG_TRACE, ("About to encode AttributeType (IF)")); %} OBJECT IDENTIFIER [[O new_oid]] %{ DLOG(log_dsap, LLOG_TRACE, ("Done encode AttributeType (IF)")); %} AttributeValue [[P AttributeValue]] %{ PE new_pe = grab_pe(parm); %} ::= %{ DLOG(log_dsap, LLOG_TRACE, ("About to encode AttributeValue (IF)")); %} ANY [[a new_pe]] %{ pe_free (new_pe); DLOG(log_dsap, LLOG_TRACE, ("Done encode AttributeValue (IF)")); %} AttributeValueAssertion [[P AVA *]] %{ %} ::= %{ DLOG(log_dsap, LLOG_TRACE, ("About to encode AttributeValueAssertion (IF)")); %} SEQUENCE { AttributeType [[p parm->ava_type]] %{ %} , AttributeValue [[p parm->ava_value]] %{ %} } %{ DLOG(log_dsap, LLOG_TRACE, ("Done encode AttributeValueAssertion (IF)")); %} Attribute [[P Attr_Sequence]] %{ AV_Sequence avs_temp; %} ::= %{ DLOG(log_dsap, LLOG_TRACE, ("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_TRACE, ("Done encode Attribute (IF)")); %} RelativeDistinguishedName [[P RDN]] %{ AVA ava_temp_s; AVA * ava_temp = &(ava_temp_s); RDN rdn_temp; %} ::= %{ DLOG(log_dsap, LLOG_TRACE, ("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_TRACE, ("Done encode RelativeDistinguishedName (IF)")); %} RDNSequence [[P DN]] %{ DN dn_temp; %} ::= %{ DLOG(log_dsap, LLOG_TRACE, ("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_TRACE, ("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_TRACE, ("About to encode Name (IF)")); %} CHOICE <<1>> { RDNSequence [[p parm]] %{ %} } %{ DLOG(log_dsap, LLOG_TRACE, ("Done encode Name (IF)")); %} END