I want to describe a SNDCP PDU using ASN.1. In my PDU, if element Type
identifier in accept is 1 or 2, the element IP Address IPv4 is present,
anything else IPv4 element is absent. How to describe this PDU?
You should consider an inner subtype. It would look like this
SNDCP ::= SEQUENCE {
accept INTEGER,
ipV4 OCTET STRING OPTIONAL
} (WITH COMPONENTS { accept(1|2), ipV4 PRESENT } |
WITH COMPONENTS { accept(ALL EXCEPT (1|2)), ipV4 ABSENT } )
It specifies that ipV4 is OPTIONAL but there is a rule which governs its
presence, namely,
- when accept is 1 or 2, ipV4 must be PRESENT, or
- when accept is anything except 1 or 2, ipV4 must be ABSENT.
=====================================================================
Conrad Sigona Voice Mail : 1-732-302-9669 x400
OSS Nokalva Fax : 1-614-388-4156
[EMAIL PROTECTED] My direct line : 1-315-845-1773
_______________________________________________
Asn1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1