Re: [sip-clf] draft-ietf-sipclf-format-01, TLV Start Pointer

Peter Musgrave <peter.musgrave@magorcorp.com> Tue, 15 March 2011 20:57 UTC

Return-Path: <peter.musgrave@magorcorp.com>
X-Original-To: sip-clf@core3.amsl.com
Delivered-To: sip-clf@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id A22B03A6EBA for <sip-clf@core3.amsl.com>; Tue, 15 Mar 2011 13:57:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.098
X-Spam-Level:
X-Spam-Status: No, score=-104.098 tagged_above=-999 required=5 tests=[AWL=-0.500, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, USER_IN_WHITELIST=-100]
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 JXexC5K8ASOd for <sip-clf@core3.amsl.com>; Tue, 15 Mar 2011 13:57:03 -0700 (PDT)
Received: from mail-yw0-f44.google.com (mail-yw0-f44.google.com [209.85.213.44]) by core3.amsl.com (Postfix) with ESMTP id 6F0AD3A6EB5 for <sip-clf@ietf.org>; Tue, 15 Mar 2011 13:57:03 -0700 (PDT)
Received: by ywi6 with SMTP id 6so487023ywi.31 for <sip-clf@ietf.org>; Tue, 15 Mar 2011 13:58:28 -0700 (PDT)
Received: by 10.90.16.37 with SMTP id 37mr500727agp.203.1300222708122; Tue, 15 Mar 2011 13:58:28 -0700 (PDT)
Received: from [192.168.1.119] (cpe-173-170-70-85.tampabay.res.rr.com [173.170.70.85]) by mx.google.com with ESMTPS id r8sm220938ane.19.2011.03.15.13.58.26 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Mar 2011 13:58:27 -0700 (PDT)
Mime-Version: 1.0 (Apple Message framework v1082)
Content-Type: multipart/alternative; boundary="Apple-Mail-12--207040684"
From: Peter Musgrave <peter.musgrave@magorcorp.com>
In-Reply-To: <A7D4B0A0-B9FE-4A66-9440-88B40CC96D74@cisco.com>
Date: Tue, 15 Mar 2011 16:58:26 -0400
Message-Id: <D8C64806-F7C4-4992-8D8B-1756AB10EE0B@magorcorp.com>
References: <AANLkTinS_FpcdNohB_rtGdJXqr=P3_3gWg4TgHCNY+1T@mail.gmail.com> <A7D4B0A0-B9FE-4A66-9440-88B40CC96D74@cisco.com>
To: Gonzalo Salgueiro <gsalguei@cisco.com>
X-Mailer: Apple Mail (2.1082)
Cc: "sip-clf@ietf.org Mailing" <sip-clf@ietf.org>
Subject: Re: [sip-clf] draft-ietf-sipclf-format-01, TLV Start Pointer
X-BeenThere: sip-clf@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: SIP Common Log File format discussion list <sip-clf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/sip-clf>, <mailto:sip-clf-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/sip-clf>
List-Post: <mailto:sip-clf@ietf.org>
List-Help: <mailto:sip-clf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/sip-clf>, <mailto:sip-clf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 15 Mar 2011 20:57:04 -0000

Works for me

Peter Musgrave
(as individual)

On 2011-03-15, at 3:15 PM, Gonzalo Salgueiro wrote:

> 
> If this simplifies getting the length of the final mandatory field (i.e Client-Txn), then I'm not opposed to having "TLV Start Pointer" point to the terminating line feed, rather than being set to all zeroes in the case of no optional fields.
> 
> Are others OK with this logic?
> 
> Gonzalo
> 
> 
> 
> On Mar 15, 2011, at 2:02 PM, Anders Nygren wrote:
> 
>> Hi
>> When extracting the mandatory fields the length of one parameter can normally be
>> calculated by
>> Length = <Pointer To Next Parameter> - <Pointer To This Parameter> -1
>> 
>> However if there are no optional fields
>> "If the OPTIONAL TLV groups are not implemented, then the "TLV Start Pointer"
>> field MUST be set to zero (0x0000)."
>> 
>> But to calculate the length of <Client-Txn> You first have to check if
>> <TLV Start Pointer> = 0x0000 in which case the <Client-Txn> length
>> is
>> Length = <Record Length> - <Pointer To Client-Txn> -1
>> 
>> Similarly when extracting the TLVs it is necessary to do an extra test if
>> the <TLV Start Pointer> = 0x0000.
>> 
>> I would like to propose that in the case when there are no optional fields that
>> the <TLV Start Pointer> points to the 0x0A at the end of the record.
>> 
>> It is not a big complication but it will remove a couple of tests in a parser.
>> 
>> /Anders
>> _______________________________________________
>> sip-clf mailing list
>> sip-clf@ietf.org
>> https://www.ietf.org/mailman/listinfo/sip-clf
> 
> _______________________________________________
> sip-clf mailing list
> sip-clf@ietf.org
> https://www.ietf.org/mailman/listinfo/sip-clf