|
|
BSD 4.3reno
-- if-enc.py - manually-augmented InformationFramework module
-- $Header: /var/lib/cvsd/repos/CSRG/43BSDReno/contrib/isode-beta/dsap/x500as/if-enc.py,v 1.1.1.1 2018/04/24 16:12:56 root Exp $
--
--
-- $Log: if-enc.py,v $
-- Revision 1.1.1.1 2018/04/24 16:12:56 root
-- BSD 4.3reno
--
-- 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;
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
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.