From c9415a65a0227a538ca3c9c8067be94716894f14 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net" Date: Mon, 21 Apr 2008 12:35:42 +0000 Subject: Add NFULA_GID support --- src/libnetfilter_log.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/libnetfilter_log.c') diff --git a/src/libnetfilter_log.c b/src/libnetfilter_log.c index 95537d8..a3bd435 100644 --- a/src/libnetfilter_log.c +++ b/src/libnetfilter_log.c @@ -442,6 +442,15 @@ int nflog_get_uid(struct nflog_data *nfad, u_int32_t *uid) return 0; } +int nflog_get_gid(struct nflog_data *nfad, u_int32_t *gid) +{ + if (!nfnl_attr_present(nfad->nfa, NFULA_GID)) + return -1; + + *gid = ntohl(nfnl_get_data(nfad->nfa, NFULA_GID, u_int32_t)); + return 0; +} + int nflog_get_seq(struct nflog_data *nfad, u_int32_t *seq) { if (!nfnl_attr_present(nfad->nfa, NFULA_SEQ)) -- cgit v1.2.3