Subject: RE: [Megaco] Megaco Text Encoding Question

From: "Kevin Boyle" <[email-masked]>
Date: Thu, 2 Mar 2006 12:56:13 -0500

Comments inline. [KJBII]

Kevin 

-----Original Message-----
From: Kamitses, Jerry [mailto:[email-masked]] 
Sent: Thursday, March 02, 2006 7:44 AM
To: [email-masked]
Subject: [Megaco] Megaco Text Encoding Question

A question has arisen during interop testing regarding the valid options
for representing an integer using the text encoding defined by H.248.  

Briefly put, for those productions which include a terminal symbol
representing an integer, such as UINT32 or UINT16, the ABNF seems to
pretty clearly indicate the integer must be coded using radix 10:
   UINT16               = 1*5(DIGIT)  ; %x0-FFFF
   UINT32               = 1*10(DIGIT) ; %x0-FFFFFFFF
   DIGIT                = %x30-39         ; 0-9

So, is it correct to assume that in all packages, any parameter value
that is defined to be an "integer" must be coded radix 10 unless clearly
specified as otherwise?

[KJBII] Yes.

For example, in the Shared Risk Package, the specification for the
Shared risk group Identity Request (shrisk/srgi), states 
	Type:	Sub-list of type Integer

Is it correct to conclude that the integers in the list be coded radix
10, or could radix 16 be used (if the value is preceded by "0x")?

[KJBII] These should be coded base 10, as is required in the package.

Secondly, regarding the rules for coding integers using radix 16, 
the ABNF in H.248 says the following: 

B.2   ABNF specification
...
   ; Integer, Double, and Unsigned Integer:  Decimal values can be
   ; encoded using characters 0-9.  Hexadecimal values must be prefixed
   ; with '0x' and can use characters 0-9,a-f,A-F.  An octal format is
   ; not supported.  Negative integers start with '-' and MUST be
   ; Decimal.  The SafeChar form of VALUE MUST be used.

Some productions clearly require that radix 16 is required with 
leading "0x", e.g. 
   SecurityParmIndex    = "0x" 8(HEXDIG)
   SequenceNum          = "0x" 8(HEXDIG)
   AuthData             = "0x" 24*64(HEXDIG)

other places the use of the "0x" appears to be implied (?)
   hex4                 = 1*4HEXDIG
   mtpAddress           = MTPToken LBRKT 4*8 (HEXDIG) RBRKT
   HEXDIG               = ( DIGIT / "A" / "B" / "C" / "D" / "E" / "F" )

or maybe not?  When hex4 is encoded as a text string should (must;may)
it 
start with "0x"?; does this production intend to allow a naked radix 16 
value to be coded?

[KJBII] Specifically defined productions must be coded as specified.  In
this instance, hex4 does NOT use "0x". In usage for integer encoding,
however, if the package defines that the property or parameter takes
values in hex format those must be encoded using "0x".

Cherry Cheers,
Gerald

_______________________________________________
Megaco mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/megaco

_______________________________________________
Megaco mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/megaco