Re: [Dime] clarification of message length

"David Lehmann" <dlehmann@ulticom.com> Fri, 16 July 2010 15:14 UTC

Return-Path: <dlehmann@ulticom.com>
X-Original-To: dime@core3.amsl.com
Delivered-To: dime@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 51C5D3A6A66 for <dime@core3.amsl.com>; Fri, 16 Jul 2010 08:14:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.669
X-Spam-Level:
X-Spam-Status: No, score=-1.669 tagged_above=-999 required=5 tests=[AWL=0.930, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id opE1Nt16V7Ip for <dime@core3.amsl.com>; Fri, 16 Jul 2010 08:14:21 -0700 (PDT)
Received: from bw.ulticom.com (bw.ulticom.com [208.255.120.43]) by core3.amsl.com (Postfix) with ESMTP id 845713A69FF for <dime@ietf.org>; Fri, 16 Jul 2010 08:14:20 -0700 (PDT)
Received: from colby.ulticom.com (colby.ulticom.com [192.73.206.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by bw.ulticom.com (BorderWare Security Platform) with ESMTP id F0DE906E85E009DD for <dime@ietf.org>; Fri, 16 Jul 2010 11:14:30 -0400 (EDT)
Received: from MTLEXVS01.ulticom.com (mtlex01.ulticom.com [172.16.40.5]) by colby.ulticom.com (8.13.4/8.12.10) with ESMTP id o6GFESL4015897 for <dime@ietf.org>; Fri, 16 Jul 2010 11:14:30 -0400 (EDT)
X-MimeOLE: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Date: Fri, 16 Jul 2010 11:13:37 -0400
Message-ID: <A51D8ACD861B7E41BFC7FE5C64BE96481167AFBE@MTLEXVS01.ulticom.com>
In-Reply-To: <C484931F-4718-4A21-BB79-5D775051D771@gmail.com>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: [Dime] clarification of message length
Thread-Index: Acsk9QApZb7p6xWrTLygkhqkEW92pwAApVmQ
References: <A51D8ACD861B7E41BFC7FE5C64BE96481167AFB0@MTLEXVS01.ulticom.com> <C484931F-4718-4A21-BB79-5D775051D771@gmail.com>
From: David Lehmann <dlehmann@ulticom.com>
To: dime@ietf.org
Received-SPF: none
Subject: Re: [Dime] clarification of message length
X-BeenThere: dime@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Diameter Maintanence and Extentions Working Group <dime.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/dime>, <mailto:dime-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/dime>
List-Post: <mailto:dime@ietf.org>
List-Help: <mailto:dime-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dime>, <mailto:dime-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 16 Jul 2010 15:14:23 -0000

Jouni,

Thanks for the response.

I also worked on an implementation of SCTP.  In SCTP, when DATA chunks
are bundled into one SCTP packet, the SCTP packet length includes the
padding for all of the data chunks, except for the last data chunk.

Since another IETF protocol (namely SCTP) uses a different methodology
in calculating the length of a message based on padded components, I
think explicit wording is prudent.  It certainly won't hurt, especially
since there is a bis I-D already in the works.

--
David Lehmann
Ulticom, Inc.
856-787-2952


> -----Original Message-----
> From: jouni korhonen [mailto:jouni.nospam@gmail.com]
> Sent: Friday, July 16, 2010 10:42 AM
> To: David Lehmann
> Cc: dime@ietf.org
> Subject: Re: [Dime] clarification of message length
> 
> Hi David,
> 
> Yes, the message length is always a multiple of 4, just like it is the
case
> with grouped AVPs. I am not sure whether that needs to be explicitly
stated,
> because all AVPs the message "sees" are already multiple of 4. I can
> understand why that was stated for grouped AVPs as their length field
*does*
> take the padding of the last sub-AVP into account, which might not be
> immediately obvious based on the Section 4 text.
> 
> - Jouni
> 
> On Jul 14, 2010, at 6:29 PM, David Lehmann wrote:
> 
> > The RFC states the following for AVPs in section 4.
> > "The length of the padding is not reflected in the AVP Length
field."
> >
> > In section 4.2, it states:
> > "Thus the AVP length field of an AVP of type Grouped is always a
multiple
> of 4."
> >
> > These statements are clear for the AVP lengths.  However, the length
of
> the message is not so clear.  Section 3 states:
> > "The Message Length field is three octets and indicates the length
of the
> Diameter message including the header fields."
> >
> > My question is:  Is the message length always a multiple of 4, as is
the
> case for grouped AVPs?  If so, should section 3 provide a clear
statement to
> that fact?
> > e.g. "The Message Length field is three octets and indicates the
length of
> the Diameter message including the header fields and the padded AVPs.
Thus
> the message length field is always a multiple of 4."
> >
> > -David
> >
> > _______________________________________________
> > DiME mailing list
> > DiME@ietf.org
> > https://www.ietf.org/mailman/listinfo/dime