ipq_destroy_handle (3) - Linux Manuals
ipq_destroy_handle: create and destroy libipq handles.
ipq_create_handle, ipq_destroy_handle --- create and destroy libipq handles.
DESCRIPTIONThe ipq_create_handle function initialises libipq for an application, attempts to bind to the Netlink socket used by ip_queue, and returns an opaque context handle. It should be the first libipq function to be called by an application. The handle returned should be used in all subsequent library calls which require a handle parameter.
The flags parameter is not currently used and should be set to zero by the application for forward compatibility.
The protocol parameter is used to specify the protocol of the packets to be queued. Valid values are NFPROTO_IPV4 for IPv4 and NFPROTO_IPV6 for IPv6. Currently, only one protocol may be queued at a time for a handle.
RETURN VALUESOn success, ipq_create_handle returns a pointer to a context handle.
On failure, NULL is returned.