Re: [Dime] clarification of message length

jouni korhonen <jouni.nospam@gmail.com> Fri, 16 July 2010 14:41 UTC

Return-Path: <jouni.nospam@gmail.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 F00083A6986 for <dime@core3.amsl.com>; Fri, 16 Jul 2010 07:41:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[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 uBtoZ7eYCq-t for <dime@core3.amsl.com>; Fri, 16 Jul 2010 07:41:26 -0700 (PDT)
Received: from mail-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by core3.amsl.com (Postfix) with ESMTP id 38E443A6908 for <dime@ietf.org>; Fri, 16 Jul 2010 07:41:26 -0700 (PDT)
Received: by fxm1 with SMTP id 1so1234918fxm.31 for <dime@ietf.org>; Fri, 16 Jul 2010 07:41:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=jS2QXHwoL9jArw7+lisGfqd/ElyMxDIRpQCY4a5rJyk=; b=tv3PTuT70UUnTMYDXEtFUrTtmoMce+ueNcAULCOYGy0khanfInQ4anmSikaDfdgINO +GsRs94KbkROjNO8TrMA0mS1rGEQIvo6zzZq7dYEGxQEemaYpXbOVb8pexWF0m/3sg0s OHZZG9d7oKaX6WzR34ETxsOLkdSBGGrlpjoYY=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=ofkvW1YNEbQ+XsF+arrvkj/GAIuOFwm9XrL6Kj7RXO2l9cUYfe8kQaV3kl2oFMs8mv niqi0mowtYiSMCf6CBLigmFXHIE+/meJGRjHIBbSkLgUumKaPRwKCtJfyAXLvjXZezd6 R1Gi0rJ1kU5UB98IO1XvSKxjeM596tpxiOznk=
Received: by 10.223.119.133 with SMTP id z5mr770502faq.62.1279291297192; Fri, 16 Jul 2010 07:41:37 -0700 (PDT)
Received: from a88-112-207-39.elisa-laajakaista.fi (a88-112-207-39.elisa-laajakaista.fi [88.112.207.39]) by mx.google.com with ESMTPS id b9sm786197faq.31.2010.07.16.07.41.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 16 Jul 2010 07:41:36 -0700 (PDT)
Mime-Version: 1.0 (Apple Message framework v1078)
Content-Type: text/plain; charset="windows-1252"
From: jouni korhonen <jouni.nospam@gmail.com>
In-Reply-To: <A51D8ACD861B7E41BFC7FE5C64BE96481167AFB0@MTLEXVS01.ulticom.com>
Date: Fri, 16 Jul 2010 17:41:33 +0300
Content-Transfer-Encoding: quoted-printable
Message-Id: <C484931F-4718-4A21-BB79-5D775051D771@gmail.com>
References: <A51D8ACD861B7E41BFC7FE5C64BE96481167AFB0@MTLEXVS01.ulticom.com>
To: David Lehmann <dlehmann@ulticom.com>
X-Mailer: Apple Mail (2.1078)
Cc: dime@ietf.org
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 14:41:29 -0000

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