1IPQ_CREATE_HANDLE(3)       Linux Programmer's Manual      IPQ_CREATE_HANDLE(3)
2
3
4

NAME

6       ipq_create_handle,  ipq_destroy_handle - create and destroy libipq han‐
7       dles.
8

SYNOPSIS

10       #include <linux/netfilter.h>
11       #include <libipq.h>
12
13       struct ipq_handle *ipq_create_handle(u_int32_t flags, u_int32_t  proto‐
14       col);
15       int ipq_destroy_handle(struct ipq_handle *h);
16

DESCRIPTION

18       The  ipq_create_handle  function initialises libipq for an application,
19       attempts to bind to the Netlink socket used by ip_queue, and returns an
20       opaque  context  handle.   It should be the first libipq function to be
21       called by an application.  The handle returned should be  used  in  all
22       subsequent library calls which require a handle parameter.
23
24       The  flags parameter is not currently used and should be set to zero by
25       the application for forward compatibility.
26
27       The protocol parameter is used to specify the protocol of  the  packets
28       to be queued.  Valid values are PF_INET for IPv4 and PF_INET6 for IPv6.
29       Currently, only one protocol may be queued at a time for a handle.
30
31       The  ipq_destroy_handle  function  frees  up  resources  allocated   by
32       ipq_create_handle,  and  should  be  used  when the handle is no longer
33       required by the application.
34

RETURN VALUES

36       On success, ipq_create_handle returns a pointer to a context handle.
37       On failure, NULL is returned.
38
39       On success, ipq_destroy_handle returns zero.
40       On failure, -1 is returned.
41

ERRORS

43       On failure, a descriptive error  message  will  be  available  via  the
44       ipq_errstr function.
45

BUGS

47       None known.
48

AUTHOR

50       James Morris <jmorris@intercode.com.au>
51
53       Copyright (c) 2000-2001 Netfilter Core Team.
54
55       Distributed under the GNU General Public License.
56

SEE ALSO

58       iptables(8), libipq(3).
59
60
61
62Linux iptables 1.2              16 October 2001           IPQ_CREATE_HANDLE(3)
Impressum