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

Anders Nygren <anders.nygren@gmail.com> Tue, 15 March 2011 18:01 UTC

Return-Path: <anders.nygren@gmail.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 542793A6DE3 for <sip-clf@core3.amsl.com>; Tue, 15 Mar 2011 11:01:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.27
X-Spam-Level:
X-Spam-Status: No, score=-3.27 tagged_above=-999 required=5 tests=[AWL=0.329, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 WhFQRyuvVKqt for <sip-clf@core3.amsl.com>; Tue, 15 Mar 2011 11:01:20 -0700 (PDT)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 5C3743A6971 for <sip-clf@ietf.org>; Tue, 15 Mar 2011 11:01:20 -0700 (PDT)
Received: by wyb42 with SMTP id 42so896213wyb.31 for <sip-clf@ietf.org>; Tue, 15 Mar 2011 11:02:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=ssMeXtAXVU+WY2/dxALFVjX464Tm6+PrzWH39ETLX10=; b=Y9FDg44sn2Mo6ByaA8HQRAk2iyekmJxnuPkIX6nNcSAlsGSMYsOa/UOfVHWie4T51K VHJ7F3GKetj+mDZLwezGesFkJagGjQhOacR7m/FKYrjpc5pFmZUAbyjqkAZNUl4HZSIO TW7/FUYSQSNH8NbQswvQnQ43Xhji7xjTYNbzc=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=UeLkzUg9faR+2mgIxU3VIY5TCp6kXC/lBih/JfLm76bnnjokGihMikT3JcopjLub3x SlS1jPtbQmq8lFLgk61VrPNw06X9bPV1t0mnYEUTYfeSDcsZ4z06ltdi27Y+NV15CKwE Y/gwrQv2XW7t5eBuK/gJo/JoKUOQyfMFhPstU=
MIME-Version: 1.0
Received: by 10.216.145.90 with SMTP id o68mr3818204wej.77.1300212161213; Tue, 15 Mar 2011 11:02:41 -0700 (PDT)
Received: by 10.216.25.17 with HTTP; Tue, 15 Mar 2011 11:02:41 -0700 (PDT)
Date: Tue, 15 Mar 2011 12:02:41 -0600
Message-ID: <AANLkTinS_FpcdNohB_rtGdJXqr=P3_3gWg4TgHCNY+1T@mail.gmail.com>
From: Anders Nygren <anders.nygren@gmail.com>
To: "sip-clf@ietf.org Mailing" <sip-clf@ietf.org>
Content-Type: text/plain; charset="ISO-8859-1"
Subject: [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 18:01:21 -0000

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