From patchwork Mon Apr 28 11:54:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ken-ichirou MATSUZAWA X-Patchwork-Id: 343368 X-Patchwork-Delegate: regit@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E8471140094 for ; Mon, 28 Apr 2014 21:55:05 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755552AbaD1Ly5 (ORCPT ); Mon, 28 Apr 2014 07:54:57 -0400 Received: from mail-pd0-f182.google.com ([209.85.192.182]:53805 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752830AbaD1Lyz (ORCPT ); Mon, 28 Apr 2014 07:54:55 -0400 Received: by mail-pd0-f182.google.com with SMTP id v10so1362307pde.13 for ; Mon, 28 Apr 2014 04:54:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=nHTWNEDDTobzS5YMK25R1hqJzM82ih53uKt1dbjt+xo=; b=NO158IufQyw7eLMQumFt+cfdqdFx42S9l+PyZLWzQVpj7c6TCo4ri8Vq58M675Ewrg YvWDKRjQChs/ZfmZmk6QJsZ26VlrW6ibTkFkOEyNEs+el8AR4YyeoY4yR9ftKBNGJMWI 4KuUlSaMTabqkcFrFq9uXh9IWQ674yoWucnq/w4CeL1A1A13SfV9NIHRbDD2d8P4ZqJ5 K7u5whuAf5HElohqAks3uTduQGY2x9EsGKnLCVJ2S7AhecQwIorKg76YzUABGN5nnXYk WYMiA5a3+7yYCv+m8mrgDtwPsJMcaR0oXmg0WZIzsCDTOSaDqAGTF4UNszjtrtNb0Ney ICzw== X-Received: by 10.66.177.168 with SMTP id cr8mr8068601pac.128.1398686095006; Mon, 28 Apr 2014 04:54:55 -0700 (PDT) Received: from gmail.com (softbank220009032006.bbtec.net. [220.9.32.6]) by mx.google.com with ESMTPSA id op3sm34565372pbc.40.2014.04.28.04.54.52 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 28 Apr 2014 04:54:53 -0700 (PDT) Date: Mon, 28 Apr 2014 20:54:49 +0900 From: Ken-ichirou MATSUZAWA To: The netfilter developer mailinglist Subject: [ulogd PATCH 11/13] nfct/ipfix: introduce new vendor id Message-ID: <20140428115449.GL12523@gmail.com> References: <20140308010344.GA4415@gmail.com> <20140428113936.GA12523@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140428113936.GA12523@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org IPFIX_VENDOR_REVERSE, defined in RFC 5103 6.1 Reverse Information Element Private Enterprise Number. And use it at counter in nfct. Signed-off-by Ken-ichirou MATSUZAWA --- include/ulogd/ipfix_protocol.h | 3 +++ input/flow/ulogd_inpflow_NFCT.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/ulogd/ipfix_protocol.h b/include/ulogd/ipfix_protocol.h index 266897e..86a0e84 100644 --- a/include/ulogd/ipfix_protocol.h +++ b/include/ulogd/ipfix_protocol.h @@ -9,6 +9,9 @@ /* defined in http://www.iana.org/assignments/enterprise-numbers */ #define IPFIX_VENDOR_NETFILTER 21373 /* FIXME: htonl? */ +/* defined in RFC 5103 IPFIX Biflow Export */ +#define IPFIX_VENDOR_REVERSE 29305 + /* Section 3.1 */ struct ipfix_msg_hdr { u_int16_t version; diff --git a/input/flow/ulogd_inpflow_NFCT.c b/input/flow/ulogd_inpflow_NFCT.c index 0b64a45..4f4301e 100644 --- a/input/flow/ulogd_inpflow_NFCT.c +++ b/input/flow/ulogd_inpflow_NFCT.c @@ -309,7 +309,7 @@ static struct ulogd_key nfct_okeys[] = { .flags = ULOGD_RETF_NONE, .name = "reply.raw.pktlen", .ipfix = { - .vendor = IPFIX_VENDOR_IETF, + .vendor = IPFIX_VENDOR_REVERSE, .field_id = IPFIX_octetTotalCount, /* FIXME: this could also be octetDeltaCount */ }, @@ -319,7 +319,7 @@ static struct ulogd_key nfct_okeys[] = { .flags = ULOGD_RETF_NONE, .name = "reply.raw.pktcount", .ipfix = { - .vendor = IPFIX_VENDOR_IETF, + .vendor = IPFIX_VENDOR_REVERSE, .field_id = IPFIX_packetTotalCount, /* FIXME: this could also be packetDeltaCount */ },