Article View: comp.protocols.iso.dev-environ
Article #527OPTIONAL SEQUENCES and pepy
From: John Tebbutt
Date: Tue, 19 Mar 1991 21:54
Date: Tue, 19 Mar 1991 21:54
41 lines
1737 bytes
1737 bytes
I have a problem relating to how an application can discern between an
OPTIONAL SEQUENCE which is present but empty, and one which is absent,
based on the pepy decoder generated local C structure.
For example, if I have an ASN.1 definition:
DistributedOperationsArgument ::=
SET {
originator[0]
DistinguishedName
OPTIONAL,
targetObject[1]
DistinguishedName
OPTIONAL,
...
}
...where DistinguishedName ::= SEQUENCE OF SomethingOrOther,
the corresponding pepy generated struct looks like this:
struct DistributedOperationsArgument {
int optionals;
#define opt_DistributedOperationsArgument_aliasedRDNs (000000001)
struct DistinguishedName *originator;
struct DistinguishedName *targetObject;
...
};
Now, if originator == (struct DistinguishedName *)NULL, does that mean
(a) that originator was not present in the encoding, (b) that
originator was present but empty, or (c) either/both? In the case of
(a) or (b), what value of originator would indicate the converse?
Many thanks in advance for any insights.
JT
Technical Details
Message-ID:
<9103192154.AA06810@rhino.ncsl.nist.gov>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!RHINO.NCSL.NIST.GOV!tebbuttShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!RHINO.NCSL.NIST.GOV!tebbutt From: tebbutt@RHINO.NCSL.NIST.GOV (John Tebbutt) Newsgroups: comp.protocols.iso.dev-environ Subject: OPTIONAL SEQUENCES and pepy Message-ID: <9103192154.AA06810@rhino.ncsl.nist.gov> Date: 19 Mar 91 21:54:43 GMT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: National Institute of Standards and Technology (NIST) Lines: 41