From: Yechiel Levi <gmistick@gmail.com>
To: "Igor 'Lo' (И.L.)" <bombsiteunrested@gmail.com>,
netfilter-devel@vger.kernel.org
Subject: Re: libnetfilter_queue: extracting TCP options.
Date: Sun, 14 Nov 2010 07:05:07 +0200 [thread overview]
Message-ID: <AANLkTik_MQCmDSJCRSoj-oCT5VnEE_Q9jWB7ypZZV6J3@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimJdQAjc_-r1R8ELN_Y+EVaN5Q30Y=Rzxg-Bg_j@mail.gmail.com>
Hi,
You should use the nfq_handle_packet method, and in the callback it
activates use a casting of tcp struct on the payload (nfq_get_payload
method)
timestamp can be achieved from netfilter using the :
nfq_get_timestamp (struct nfq_data *nfad, struct timeval *tv)
2010/11/14 Igor 'Lo' (И.L.) <bombsiteunrested@gmail.com>:
> Hi all,
>
> How one can get TCP packet's options (especially timestamp and MD5)
> using only libnetfilter_queue in userspace?
> Having a callback routine(struct nfq_q_handle *qh, struct nfgenmsg
> *nfmsg, struct nfq_data *nfa, void *data) - which structure may
> contain the desired options set?
>
> Most adequate Netfilter-based code to solve this problem was found in
> linux/net/netfilter/nf_conntrack_proto_tcp.c - not a best kind of
> documentation, but provided a nice method of reading a structure. Now
> just need to get a bytes to read.
>
> cheers,
> Igor
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Kind Regards,
Yechiel Levi
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-11-14 5:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-14 4:13 libnetfilter_queue: extracting TCP options Igor 'Lo' (И.L.)
2010-11-14 5:05 ` Yechiel Levi [this message]
2010-11-14 15:45 ` Igor 'Lo' (И.L.)
2010-11-14 18:11 ` Yechiel Levi
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=AANLkTik_MQCmDSJCRSoj-oCT5VnEE_Q9jWB7ypZZV6J3@mail.gmail.com \
--to=gmistick@gmail.com \
--cc=bombsiteunrested@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).