From 325b7d44124f57674dcaa4088e67238996a5a03b Mon Sep 17 00:00:00 2001 From: "/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org" Date: Tue, 23 May 2006 09:00:01 +0000 Subject: Add a printflow plugin is similar to the PRINTPKT plugin, but for flows. It's output is compatible with the SYSLOG and LOGEMU plugins. (Philip Craig) --- input/flow/ulogd_inpflow_NFCT.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'input/flow') diff --git a/input/flow/ulogd_inpflow_NFCT.c b/input/flow/ulogd_inpflow_NFCT.c index c97c7bc..34b49be 100644 --- a/input/flow/ulogd_inpflow_NFCT.c +++ b/input/flow/ulogd_inpflow_NFCT.c @@ -244,6 +244,11 @@ static struct ulogd_key nfct_okeys[] = { .field_id = IPFIX_flowEndSeconds, }, }, + { + .type = ULOGD_RET_BOOL, + .flags = ULOGD_RETF_NONE, + .name = "dir", + }, }; static struct ct_htable *htable_alloc(int htable_size, int prealloc) @@ -424,6 +429,9 @@ static int propagate_ct_flow(struct ulogd_pluginstance *upi, ret[14].flags |= ULOGD_RETF_VALID; } + ret[15].u.value.b = (dir == NFCT_DIR_ORIGINAL) ? 0 : 1; + ret[15].flags |= ULOGD_RETF_VALID; + ulogd_propagate_results(upi); return 0; -- cgit v1.2.3