summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* src: expose nfq_nlmsg_putDuncan Roe2020-02-241-18/+3
| | | | | | | | Move static nfq_hdr_put from examples/nf-queue.c into the library since everyone is going to want it. Also rename nfq_hdr_put to nfq_nlmsg_put. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* examples: Delete code not needed since Linux 3.8Duncan Roe2019-11-261-17/+0
| | | | | | | | The removed code sent configuration commands NFQNL_CFG_CMD_PF_UNBIND & NFQNL_CFG_CMD_PF_BIND which the kernel required prior to 3.8. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: doc: Fix spelling of CTA_LABELS in examples/nf-queue.cDuncan Roe2019-11-041-1/+1
| | | | | Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* examples: set dummy connmark value to show use of NFQA_CT nested attributeFlorian Westphal2017-06-211-0/+14
| | | | | | | We can now get/set conntrack attributes via nfqueue, show a minimal example that sets the connmark from userspace. Signed-off-by: Florian Westphal <fw@strlen.de>
* src: PF_BIND/UNBIND is ignored in 3.8 and laterFlorian Westphal2014-04-241-0/+1
| | | | | | | | | | There is confusion on what this command actually does and why examples commonly PF_UNBIND at startup. Since these are obsolete document that its not needed starting with Linux 3.8. Signed-off-by: Florian Westphal <fw@strlen.de>
* examples/nf-queue: receive large gso packetsFlorian Westphal2013-04-301-2/+27
| | | | Signed-off-by: Florian Westphal <fw@strlen.de>
* examples/nf-queue: handle recv error, use larger bufferFlorian Westphal2013-04-301-13/+24
| | | | | | | | | We ask for 0xffff copy size, so we need a buffer that can hold 0xffff, plus a few more bytes to allow for netlink attributes. Also, turn off/handle ENOBUFS. Signed-off-by: Florian Westphal <fw@strlen.de>
* examples: nf-queue: fix api usageFlorian Westphal2012-11-251-12/+12
| | | | | | | | | | | 1. struct nlattr *attr[NFQA_MAX+1] must be initialized. Otherwise, attr[FOO] might be non-null after parsing even if that attribute isn't present in the message. 2. mnl_attr_get_payload will never return NULL (if the attribute is NULL, it returns MNL_ATTR_HDRLEN.) Signed-off-by: Florian Westphal <fw@strlen.de>
* examples: nf-queue: fix compilation warning with gcc-4.7Pablo Neira Ayuso2012-08-201-2/+0
| | | | | | | nf-queue.c: In function ‘main’: nf-queue.c:146:12: warning: unused variable ‘id’ [-Wunused-variable] Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* add new libnetfilter_queue API for libmnlPablo Neira Ayuso2012-08-062-0/+171
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>