From: Ken-ichirou MATSUZAWA <chamaken@gmail.com>
To: Eric Leblond <eric@regit.org>
Cc: Netfilter Devel <netfilter-devel@vger.kernel.org>
Subject: [PATCH ulogd 3/7] nfct/ipfix: introduce NAT entries
Date: Wed, 10 Feb 2016 11:00:57 +0900 [thread overview]
Message-ID: <20160210020057.GD17470@gmail.com> (raw)
In-Reply-To: <20160210015358.GA17470@gmail.com>
Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp>
---
include/ulogd/ipfix_protocol.h | 10 ++++++++++
input/flow/ulogd_inpflow_NFCT.c | 17 ++++++++---------
2 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/include/ulogd/ipfix_protocol.h b/include/ulogd/ipfix_protocol.h
index 330f0ea..23fa440 100644
--- a/include/ulogd/ipfix_protocol.h
+++ b/include/ulogd/ipfix_protocol.h
@@ -219,6 +219,16 @@ enum {
/* reserved */
IPFIX_headerLengthIPv4 = 213,
IPFIX_mplsPayloadLength = 214,
+
+ /* select usefuls from:
+ * http://www.iana.org/assignments/ipfix/ipfix.txt */
+ IPFIX_postNATSourceIPv4Address = 225,
+ IPFIX_postNATDestinationIPv4Address = 226,
+ IPFIX_postNAPTSourceTransportPort = 227,
+ IPFIX_postNAPTDestinationTransportPort = 228,
+ IPFIX_firewallEvent = 233,
+ IPFIX_postNATSourceIPv6Address = 281,
+ IPFIX_postNATDestinationIPv6Address = 282,
};
/* Information elements of the netfilter vendor id */
diff --git a/input/flow/ulogd_inpflow_NFCT.c b/input/flow/ulogd_inpflow_NFCT.c
index 0b3b339..8f9492a 100644
--- a/input/flow/ulogd_inpflow_NFCT.c
+++ b/input/flow/ulogd_inpflow_NFCT.c
@@ -265,7 +265,7 @@ static struct ulogd_key nfct_okeys[] = {
.name = "reply.ip.saddr",
.ipfix = {
.vendor = IPFIX_VENDOR_IETF,
- .field_id = IPFIX_sourceIPv4Address,
+ .field_id = IPFIX_postNATSourceIPv4Address,
},
},
{
@@ -274,7 +274,7 @@ static struct ulogd_key nfct_okeys[] = {
.name = "reply.ip.daddr",
.ipfix = {
.vendor = IPFIX_VENDOR_IETF,
- .field_id = IPFIX_destinationIPv4Address,
+ .field_id = IPFIX_postNATDestinationIPv4Address,
},
},
{
@@ -292,7 +292,7 @@ static struct ulogd_key nfct_okeys[] = {
.name = "reply.l4.sport",
.ipfix = {
.vendor = IPFIX_VENDOR_IETF,
- .field_id = IPFIX_sourceTransportPort,
+ .field_id = IPFIX_postNAPTSourceTransportPort,
},
},
{
@@ -301,7 +301,7 @@ static struct ulogd_key nfct_okeys[] = {
.name = "reply.l4.dport",
.ipfix = {
.vendor = IPFIX_VENDOR_IETF,
- .field_id = IPFIX_destinationTransportPort,
+ .field_id = IPFIX_postNAPTDestinationTransportPort,
},
},
{
--
2.1.4
next prev parent reply other threads:[~2016-02-10 2:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-06 10:42 [RFC] a software based on ulogd Ken-ichirou MATSUZAWA
2016-02-07 10:51 ` Eric Leblond
2016-02-10 1:53 ` Ken-ichirou MATSUZAWA
2016-02-10 1:56 ` [PATCH ulogd 1/7] ipfix: add flowDirection IE Ken-ichirou MATSUZAWA
2016-02-10 1:58 ` [PATCH ulogd 2/7] nfct/ipfix: introduce new vendor id Ken-ichirou MATSUZAWA
2016-02-10 2:00 ` Ken-ichirou MATSUZAWA [this message]
2016-02-10 2:01 ` [PATCH ulogd 4/7] filter: add new filter for Netflow ICMP_TYPE Ken-ichirou MATSUZAWA
2016-02-10 2:03 ` [PATCH ulogd 5/7] filter: add new filter for IPFIX time Ken-ichirou MATSUZAWA
2016-02-10 2:04 ` [PATCH ulogd 6/7] ulogd: update calling stop callback condition Ken-ichirou MATSUZAWA
2016-02-10 2:05 ` [PATCH ulogd 7/7] nflow9: introduce new NetFlow v9 output plugin Ken-ichirou MATSUZAWA
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160210020057.GD17470@gmail.com \
--to=chamaken@gmail.com \
--cc=eric@regit.org \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.