From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Richard Peeters <richardpeeters45@gmail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: Question about NFLOG and conntrack glue
Date: Thu, 27 Oct 2016 21:40:30 +0200 [thread overview]
Message-ID: <20161027194030.GA1257@salvia> (raw)
In-Reply-To: <CABfb+p379t9n_iMK1mwMUA76fkhhr-76Fp=C-QCdmNN9iqFwkA@mail.gmail.com>
On Wed, Oct 26, 2016 at 08:27:46AM -0700, Richard Peeters wrote:
> Hi,
>
> I am referring to commit :
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=a29a9a585b2840a205f085a34dfd65c75e86f7c3
> which was pulled in with 4.4, I am running kernel 4.8, and wondering
> how I would be able to access the attached conntrack info in user
> space.
>
> My application runs in user space and retrieves packets that match a
> specific criteria from iptables using NFLOG, I would like to get
> conntrack information for said packet.
>
> I use libnetfilter_log but I do not see any API exposed that will give
> me this information, even if I was able to extract information using
> libnfnnetlink apis,
> ( nfnl_get_pointer_to_data(nfad->nfa, NFULA_CT, struct nf_conn);)
> the best I could get in this app would be a struct nf_conn pointer.
>
> My question is : since struct nf_conn is not exposed to userspace, how
> is one supposed to use the attached information in userspace? It would
> be great to see some example code.
You can apply this patch on top of libnetfilter_log:
https://patchwork.ozlabs.org/patch/530498/
I requested one small change (see thread for details), it would be
great if you could take it, revamp it and resubmit it so I can apply
this. Thanks.
prev parent reply other threads:[~2016-10-27 19:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-26 15:27 Question about NFLOG and conntrack glue Richard Peeters
2016-10-27 19:40 ` Pablo Neira Ayuso [this message]
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=20161027194030.GA1257@salvia \
--to=pablo@netfilter.org \
--cc=netfilter@vger.kernel.org \
--cc=richardpeeters45@gmail.com \
/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.