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 NFPROTO_IPV4 for IPv4 and NFPROTO_IPV6
29       for IPv6. Currently, only one protocol may be queued at a  time  for  a
30       handle.
31
32       The   ipq_destroy_handle  function  frees  up  resources  allocated  by
33       ipq_create_handle, and should be used when  the  handle  is  no  longer
34       required by the application.
35

RETURN VALUES

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

ERRORS

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

BUGS

48       None known.
49

AUTHOR

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

SEE ALSO

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