Subject: [AAA-WG]: msg length and avp length

From: Liu Qiong Bo <[email-masked]>
Date: Fri, 07 Jun 2002 09:48:54 +0800

Hi.

On page 45 of base 10, there is a figure to demonstration the grouped AVP 
example-avp. but I think example-avp's length (468) is wrong. 
468!=19+50+51+223+137.

in section 4.3, for Grouped AVP:
"The AVP Length field is set to 8 (12 if the 'V' bit is enabled) plus the 
total length of all included AVPs, including their headers and padding. 
Thus the AVP length field of an AVP of type Grouped is always a multiple of 
4. "

Hence can I believe:
1. the common avp's length doesn't include the padding's length, so it may 
be not a multiple of 4.

2. the grouped avp's length includes all the padding 's length, so it must 
be a multiple of 4.

3. how about a diameter message length? Does it include all the avp's 
length including the padding's length?

Regards.

Coral

---

From: David Frascone <[email-masked]>
Date: Fri, 7 Jun 2002 07:49:58 -0500

Let me try to explain this.  A grouped avp's length is the sum of all
of the padded AVP's length + the size of it's (The grouped AVP) header.

The padding of the grouped avp is not taken into account.

So, in the example, the sum should be:

8	HeaderLength (Would  be 12 if vendor specific)
20	Origin-Host AVP (1 byte of padding)
52	Session-Id (2 bytes of padding)
52	Session-Id (1 bytes of padding)
224	Recovery-Policy (1 byte of padding)
140	Futuristic-Acct-Record (3 bytes of padding)
496	Total - Discrepency 28 bytes

The second session id is 4 bytes too large,  in the diagram.   You can
count 8 bytes of header, 15 bytes of data, and there are 32 bytes of 
data in omitted rows, giving a length of 55, not 51.

The Futuristic Acct Record Header is also wrong.  There are 8 bytes
of header, and 9 bytes of data in the diagram, with 128 bytes of data
in omitted rows, giving a length of 145, not 37.

These errors are causing some of the confusion.

I apologize in advance if I have messed up the math.  It's awfly early :)

-Dave

-- 
David Frascone

          Should I weed the lawn or say it's a garden?