Article View: comp.protocols.iso.dev-environ
Article #793extension QUIPU
From: Peter Aarts
Date: Mon, 02 May 1994 11:43
Date: Mon, 02 May 1994 11:43
67 lines
3704 bytes
3704 bytes
I am currently working on an extension for the QUIPU directory. This extension requires a modification of the operation arguments, among others the definition of CommonArguments.
To obtain the functions for encoding/decoding the arguments, the ASN.1 definition is needed. When I was searching for the ASN.1 definition for CommonArguments, I wasn't able to find it. However, I found the definitions of the arguments for read, modify, etc (at least I think it's them..). These can be found in the file '../dsap/x500as/das.py'. For instance the definition for ReadArguments is as follows:
ReadArgument [[P struct ds_read_arg *]]
::=
CHOICE <D<0>>
<E< parm->rda_common.ca_sig == (struct signature *) 0 ? 1 : 2>>
{
ReadArgumentData [[p * ]] ,
SEQUENCE [[ T struct ds_read_arg * $ * ]]
{
ReadArgumentData [[p * ]] ,
TAlgorithmIdentifier [[p parm->rda_common.ca_sig]],
TBitString [[p parm->rda_common.ca_sig]]
}
}
When this is run through PEPSY, the file '../h/quipu/.DAS-types.h' is obtained. This tile contains the definition for the C structure of ReadArguments, which is the following:
struct type_DAS_ReadArgument {
int offset;
#define type_DAS_ReadArgument_1 1
#define type_DAS_ReadArgument_2 2
union {
struct type_DAS_ReadArgumentData *choice_DAS_5;
struct element_DAS_5 {
struct type_DAS_ReadArgumentData *element_DAS_6;
struct type_DAS_TAlgorithmIdentifier *element_DAS_7;
struct type_DAS_TBitString *element_DAS_8;
} *choice_DAS_6;
} un;
};
Also, the functions encode_DAS_ReadArgument and decode_DAS_ReadArgument are created for encoding/decoding variables of type type_DAS_ReadArgument.
However, QUIPU does not use this file, but QUIPU uses the C structure 'ds_read_arg', defined in the file '../h/quipu/read.h'. This definition is as follows:
struct ds_read_arg {
CommonArgs rda_common;
DN rda_object;
EntryInfoSelection rda_eis;
};
QUIPU does not use the header file generated by PEPSY at all. The variables of type 'ds_read_arg' are encoded/decoded with the functions encode_DAS_ReadArgument/decode_DAS_ReadArgument.
This comes to my questions:
Why does PEPSY not use the directives given for naming the arguments? (e.g. in the 1st line: [[P struct ds_read_arg]])
How is it possible to use these encoding/decoding functions for variables of another type?
Are the type definitions in the file '../h/quipu/read.h' created manually?
What do I have to do to add extra fields to the CommonArguments, when I want to get the fields in the header file '../h/quipu/commonargs'?
How do I get the encoding/decoding functions for this new type?
Any help is appreciated!!
Responds either directly to aarts@pfa.philips.de, or to this newsgroup.
Peter
Technical Details
Message-ID:
<1994May2.114332.15896@pfa.philips.de>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!rtp.vnet.net!mary.iia.org!babbage.ece.uc.edu!news.kei.com!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!EU.net!Germany.EU.net!ascom.de!Aachen.Germany.EU.net!rmi.de!philfa!aartsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 108a53,85d610829471d748 X-Google-Attributes: gid108a53,public X-Google-Thread: f6980,85d610829471d748 X-Google-Attributes: gidf6980,public X-Google-ArrivalTime: 1994-05-02 16:07:41 PST Newsgroups: comp.protocols.iso.dev-environ,aus.net.directory.osi-ds Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!rtp.vnet.net!mary.iia.org!babbage.ece.uc.edu!news.kei.com!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!EU.net!Germany.EU.net!ascom.de!Aachen.Germany.EU.net!rmi.de!philfa!aarts From: aarts@pfa.philips.de (Peter Aarts) Subject: extension QUIPU Message-ID: <1994May2.114332.15896@pfa.philips.de> Originator: aarts@edison Sender: usenet@pfa.philips.de Nntp-Posting-Host: edison Organization: Philips GmbH Forschungslaboratorien Date: Mon, 2 May 1994 11:43:32 GMT Lines: 69