Subject: OCTET STRINGs in H.248

From: Troy Cauble <[email-masked]>
Date: Sat, 4 Nov 2000 00:28:30 -0500

Hi all,

Maybe I've missed some subtle beauty in the OCTET STRING,
but it seems like an OPAQUE structure that's overused in
the ASN.1 H.248 encoding.

For example, these seem to represent integers:

           SecurityParmIndex ::= OCTET STRING(SIZE(4))

           SequenceNum       ::= OCTET STRING(SIZE(4))

But how do I extract an integer value?  ntohl()?  Feed the
octet string to an ASN.1 function for decoding integers?
Why wasn't an ASN.1 Integer used?

What can I conclude about the internal structure of the
following?
           AuthData          ::= OCTET STRING (SIZE (12..32))

The "quotedString" element in the ABNF isn't much better.
The worst cases are

        In the ASN.1    Value ::= OCTET STRING
        In the ABNF     VALUE  =  quotedString / 1*(SafeChar)

Many protocol elements use the above definitions.

The value component of a SigParameter (or EventParameter or
StatisticsParameter, etc) is OCTET STRING.  How do I decode
this opaque data representation?

        From decoding the SignalName and the sigParameterName
        I'll know the implied type (if I support that package).

        Section 12.2 lists all the allowable types.  But it
        doesn't specify the ASN.1 or text *encoding* of those
        types.

        What is the text representation for an "Integer"?
                sprintf("%d") ?  %x ?  0x%x ? %o ? 0%o ?
        What about a "Double" ?

        How do I get the integer value of an OCTET STRING
        that's known to be "Integer: 4 octet signed integer"?
        An ASN.1 function for integers or ntohl()?

        "List" is specified in the ABNF, but they're lists
        of (OPAQUE) VALUEs.

        Lists are handled in the ASN.1 *PropertyParm* as
        "SEQUENCE OF OCTET STRING".  But can't lists be
        used in the parameters to Events and Signals too?
        Those elements just have a "Value" "OCTET STRING".

        If I know the type is "String", how do I get from
        the ASN.1 "OCTET STRING" to a char*?  Just cast it?
        Or call an ASN.1 decode routine specific to "UTF-8
        octet strings"?

-troy

---

From: Troy Cauble <[email-masked]>
Date: Tue, 7 Nov 2000 16:41:11 -0500

Brian, Tom, John, et. al.,

Anyone want to take a shot at these?

-troy

-------- Original Message --------
Subject: OCTET STRINGs in H.248
Date: Sat, 4 Nov 2000 00:28:30 -0500
From: Troy Cauble <[email-masked]>
Reply-To: Troy Cauble <[email-masked]>
To: [email-masked]

Hi all,

-troy