table of contents
other versions
- jessie 1.4.21-2+b1
IPQ_SET_MODE(3) | Linux Programmer's Manual | IPQ_SET_MODE(3) |
NAME¶
ipq_set_mode — set the ip_queue queuing modeSYNOPSIS¶
#include <linux/netfilter.h>DESCRIPTION¶
The ipq_set_mode function sends a message to the kernel ip_queue module, specifying whether packet metadata only, or packet payloads as well as metadata should be copied to userspace. The h parameter is a context handle which must previously have been returned successfully from a call to ipq_create_handle. The mode parameter must be one of:- IPQ_COPY_META
- Copy only packet metadata to userspace.
- IPQ_COPY_PACKET
- Copy packet metadata and packet payloads to userspace.
RETURN VALUE¶
On failure, -1 is returned.ERRORS¶
On failure, a descriptive error message will be available via the ipq_errstr function.DIAGNOSTICS¶
A relatively common failure may occur if the ip_queue module is not loaded. In this case, the following code excerpt:status = ipq_set_mode(h, IPQ_COPY_META, 0); if (status < 0) { ipq_perror("myapp"); ipq_destroy_handle(h); exit(1); }
would generate the following output: myapp: Failed to send netlink message: Connection refused
BUGS¶
None known.AUTHOR¶
James Morris <jmorris@intercode.com.au>COPYRIGHT¶
Copyright (c) 2000-2001 Netfilter Core Team. Distributed under the GNU General Public License.SEE ALSO¶
libipq(3), iptables(8).16 October 2001 | Linux iptables 1.2 |