PER ASN.1 encoding of Sequence Of Elements - Boundary Conditions
Hi All,
Is it a valid situation if a "Sequence Of" element is encoded with number of components as 0? PER rules dictate that the lower bound on the number of components is set to 0, if lower bound is not explicitly defined. Since the minimum is 0, one can encode the "Sequence Of" element with 0 components.
What would it mean to encode a Sequence Of with no components encoded? In this case, though, there may be a few bits added to the field list for the length determinant of Sequence Of with value 0.
Thanks Manoj.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ For help on this mail list, send "HELP ITU-SG16" in a message to listserv@mailbag.intel.com
Manoj,
It is legal, but one should not do this unless the protocol prescribes it. For example, in H.323 version 4, an empty list of alternate gatekeepers is used to signal to the endpoint that it should delete any list it may have previously received. Usage like this, which has a well-prescribed meaning, is useful. However, empty lists in places that make no sense will probably do nothing but create confusion. In any case, entities must be prepared to decode them.
Paul
----- Original Message ----- From: "Paul, Manoj" mpaul@TRILLIUM.COM To: ITU-SG16@mailbag.cps.INTEL.COM Sent: Friday, May 11, 2001 8:30 PM Subject: PER ASN.1 encoding of Sequence Of Elements - Boundary Conditions
Hi All,
Is it a valid situation if a "Sequence Of" element is encoded with
number
of components as 0? PER rules dictate that the lower bound on the number
of
components is set to 0, if lower bound is not explicitly defined. Since
the
minimum is 0, one can encode the "Sequence Of" element with 0 components.
What would it mean to encode a Sequence Of with no components encoded? In this case, though, there may be a few bits added to the field list for the
length
determinant of Sequence Of with value 0.
Thanks Manoj.
For help on this mail list, send "HELP ITU-SG16" in a message to listserv@mailbag.intel.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ For help on this mail list, send "HELP ITU-SG16" in a message to listserv@mailbag.intel.com
Paul,
If empty lists make no sense, they should have been constrained to _not_ be empty, e.g., X SEQUENCE SIZE(1..) OF Y! 8-| I'm not necessarilly picking the editors, but, IMO, it is real sloppy to go to the trouble of defining the ASN.1 syntax for something and then later on saying, "Oh, an empty list, why would you want to encode that? Let's go back and make it semantically illegal." Or, worse, the behavior is not defined and we have interop problems. IMO, every SEQUENCE OF and SET OF should be constrained for maximum and for minimum when it makes sense, e.g., X SET SIZE(1..256) OF Y.
Also, let's not have anymore optional empty lists (e.g., X SEQUENCE OF Y OPTIONAL) unless an absent list is semantically different from an empty one, which is extremely rare.
There, I feel better. :-)
Paul Long ipDialog, Inc.
-----Original Message----- From: Mailing list for parties associated with ITU-T Study Group 16 [mailto:ITU-SG16@mailbag.cps.INTEL.COM]On Behalf Of Paul E. Jones Sent: Saturday, May 12, 2001 12:01 PM To: ITU-SG16@mailbag.cps.INTEL.COM Subject: Re: PER ASN.1 encoding of Sequence Of Elements - Boundary Conditions
Manoj,
It is legal, but one should not do this unless the protocol prescribes it. For example, in H.323 version 4, an empty list of alternate gatekeepers is used to signal to the endpoint that it should delete any list it may have previously received. Usage like this, which has a well-prescribed meaning, is useful. However, empty lists in places that make no sense will probably do nothing but create confusion. In any case, entities must be prepared to decode them.
Paul
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ For help on this mail list, send "HELP ITU-SG16" in a message to listserv@mailbag.intel.com
participants (3)
-
Paul E. Jones
-
Paul Long
-
Paul, Manoj