From: Eric Leblond <eric@inl.fr>
To: netfilter-devel@vger.kernel.org
Cc: Eric Leblond <eric@inl.fr>
Subject: [ULOGD PATCH 5/5] Add UID display to PRINTPKT filter.
Date: Sat, 9 Feb 2008 13:36:35 +0100 [thread overview]
Message-ID: <12025605963558-git-send-email-eric@inl.fr> (raw)
In-Reply-To: <12025605952271-git-send-email-eric@inl.fr>
Signed-off-by: Eric Leblond <eric@inl.fr>
---
:100644 100644 ae56946... b524fc2... M include/ulogd/printpkt.h
:100644 100644 35d8080... 93d506a... M util/printpkt.c
include/ulogd/printpkt.h | 1 +
util/printpkt.c | 7 +++++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/include/ulogd/printpkt.h b/include/ulogd/printpkt.h
index ae56946..b524fc2 100644
--- a/include/ulogd/printpkt.h
+++ b/include/ulogd/printpkt.h
@@ -7,6 +7,7 @@ enum pkt_keys {
KEY_OOB_PREFIX,
KEY_OOB_IN,
KEY_OOB_OUT,
+ KEY_OOB_UID,
KEY_RAW_MAC,
KEY_RAW_MACLEN,
KEY_IP_SADDR,
diff --git a/util/printpkt.c b/util/printpkt.c
index 35d8080..93d506a 100644
--- a/util/printpkt.c
+++ b/util/printpkt.c
@@ -43,6 +43,9 @@ struct ulogd_key printpkt_keys[] = {
[KEY_OOB_PREFIX] = { .name = "oob.prefix", },
[KEY_OOB_IN] = { .name = "oob.in", },
[KEY_OOB_OUT] = { .name = "oob.out", },
+ [KEY_OOB_UID] = { .name = "oob.uid",
+ .flags = ULOGD_KEYF_OPTIONAL
+ },
[KEY_RAW_MAC] = { .name = "raw.mac", },
[KEY_RAW_MACLEN] = { .name = "raw.mac_len", },
[KEY_IP_SADDR] = { .name = "ip.saddr.str", },
@@ -365,6 +368,10 @@ int printpkt_print(struct ulogd_key *res, char *buf)
break;
}
+ if (pp_is_valid(res, KEY_OOB_UID))
+ buf_cur += sprintf(buf_cur, "UID=%d",
+ GET_VALUE(res, KEY_OOB_UID).ui32);
+
strcat(buf_cur, "\n");
return 0;
--
1.5.2.5
next prev parent reply other threads:[~2008-02-09 12:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-09 12:36 [ULOGD PATCH 0/5] UID dump support in NFLOG, IPCMPv6 support in SQL Eric Leblond
2008-02-09 12:36 ` [ULOGD PATCH 1/5] Fix treatment of return from function Eric Leblond
2008-02-09 17:28 ` Pablo Neira Ayuso
2008-02-09 17:31 ` Pablo Neira Ayuso
2008-02-09 12:36 ` [ULOGD PATCH 2/5] Factorize definition of some macros Eric Leblond
2008-02-09 17:33 ` Pablo Neira Ayuso
2008-02-09 12:36 ` [PATCH 3/5] Add Icmpv6 support to SQL schema Eric Leblond
2008-02-09 17:39 ` Pablo Neira Ayuso
2008-02-09 12:36 ` [ULOGD PATCH 4/5] Add support for UID dumping to NFLOG input plugin Eric Leblond
2008-02-09 17:40 ` Pablo Neira Ayuso
2008-02-09 12:36 ` Eric Leblond [this message]
2008-02-09 17:43 ` [ULOGD PATCH 5/5] Add UID display to PRINTPKT filter Pablo Neira Ayuso
2008-02-09 17:44 ` [ULOGD PATCH 0/5] UID dump support in NFLOG, IPCMPv6 support in SQL Pablo Neira Ayuso
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=12025605963558-git-send-email-eric@inl.fr \
--to=eric@inl.fr \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox