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

Gonzalo Salgueiro <gsalguei@cisco.com> Tue, 15 March 2011 19:13 UTC

Return-Path: <gsalguei@cisco.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 A33123A6B35 for <sip-clf@core3.amsl.com>; Tue, 15 Mar 2011 12:13:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.248
X-Spam-Level:
X-Spam-Status: No, score=-10.248 tagged_above=-999 required=5 tests=[AWL=0.350, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-8]
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 d0P38hJliJlh for <sip-clf@core3.amsl.com>; Tue, 15 Mar 2011 12:13:39 -0700 (PDT)
Received: from av-tac-rtp.cisco.com (hen.cisco.com [64.102.19.198]) by core3.amsl.com (Postfix) with ESMTP id AE9993A6A40 for <sip-clf@ietf.org>; Tue, 15 Mar 2011 12:13:39 -0700 (PDT)
X-TACSUNS: Virus Scanned
Received: from rooster.cisco.com (localhost.cisco.com [127.0.0.1]) by av-tac-rtp.cisco.com (8.13.8+Sun/8.13.8) with ESMTP id p2FJF3Bi017926; Tue, 15 Mar 2011 15:15:03 -0400 (EDT)
Received: from rtp-gsalguei-8714.cisco.com (rtp-gsalguei-8714.cisco.com [10.116.61.53]) by rooster.cisco.com (8.13.8+Sun/8.13.8) with ESMTP id p2FJF3bw005838; Tue, 15 Mar 2011 15:15:03 -0400 (EDT)
Mime-Version: 1.0 (Apple Message framework v1082)
Content-Type: multipart/alternative; boundary="Apple-Mail-16--213244198"
From: Gonzalo Salgueiro <gsalguei@cisco.com>
In-Reply-To: <AANLkTinS_FpcdNohB_rtGdJXqr=P3_3gWg4TgHCNY+1T@mail.gmail.com>
Date: Tue, 15 Mar 2011 15:15:02 -0400
Message-Id: <A7D4B0A0-B9FE-4A66-9440-88B40CC96D74@cisco.com>
References: <AANLkTinS_FpcdNohB_rtGdJXqr=P3_3gWg4TgHCNY+1T@mail.gmail.com>
To: Anders Nygren <anders.nygren@gmail.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 19:13:40 -0000

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