Subject: [Dime] Some questions about RFC3588

From: z49940 <[email-masked]>
Date: Wed, 22 Feb 2006 17:25:20 +0800

Hello everyone:
    During this time , I'm reading Diameter Base Protocol , and I want
to ask some questions because I can't understand what means.
In Section 4 (Page 39) , the text is
" Each AVP of type OctetString MUST be padded to align on a 32-bit
   boundary, while other AVP types align naturally.  A number of zero-
   valued bytes are added to the end of the AVP Data field till a word
   boundary is reached.  The length of the padding is not reflected in
   the AVP Length field. "
1.My question is whether the zero-valued bytes are padded on a 32-bit
boundary or not , the text "till a word boundary is reached" , what
means "a word" here , 32-bit or 16-bit ?
2." The length of the padding is not reflected in the AVP Length
field.", I understand this means the length of the padding is not
included in AVP Length , I want to know why ,and how could the receiver
handle in this case ? Because when receiver received the AVP , it would
take the AVP Data according to AVP Length , How could the receiver
identify the following data is the padding data or the next AVP header ,
and how long is the padding data , where is the next AVP Code?

Thanks
Selina

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

---

From: Anders Kristensen <[email-masked]>
Date: Wed, 22 Feb 2006 10:58:17 -0500

> means "a word" here , 32-bit or 16-bit ?

32-bit.

> handle in this case ?

If the padding was included in the length field the receiver would have 
no way of knowing whether the AVP value contained 1, 2 or 3 padding 
octets at the end.

  Because when receiver received the AVP , it would
> and how long is the padding data , where is the next AVP Code?

It knows that the AVP aligns on a 32-bit boundary so if the AVP length 
is 27 it knows there's one octet of padding. The receiver must drop the 
padding and read the next AVP (or the next message if the end of the 
current message has been reached) from there.

Anders