Thread View: comp.protocols.iso.dev-environ
1 messages
1 total messages
Started by Peter Aarts
Thu, 28 Apr 1994 06:49
extension QUIPU
Author: Peter Aarts
Date: Thu, 28 Apr 1994 06:49
Date: Thu, 28 Apr 1994 06:49
67 lines
3645 bytes
3645 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads