LibrarySetup

Functions

struct nflog_handlenflog_open (void)
int nflog_close (struct nflog_handle *h)
int nflog_bind_pf (struct nflog_handle *h, u_int16_t pf)
int nflog_unbind_pf (struct nflog_handle *h, u_int16_t pf)

Detailed Description

When the program has finished with libnetfilter_log, it has to call the nflog_close() function to release all associated resources.


Function Documentation

int nflog_bind_pf ( struct nflog_handle h,
u_int16_t  pf 
)

nflog_bind_pf - bind a nflog handler to a given protocol family

Parameters:
h Netfilter log handle obtained via call to nflog_open()
pf protocol family to bind to nflog handler obtained from nflog_open()

Binds the given log connection handle to process packets belonging to the given protocol family (ie. PF_INET, PF_INET6, etc).

Returns:
integer inferior to 0 in case of failure

Definition at line 362 of file libnetfilter_log.c.

int nflog_close ( struct nflog_handle h  ) 

nflog_close - close a nflog handler

Parameters:
h Netfilter log handle obtained via call to nflog_open()

This function closes the nflog handler and free associated resources.

Returns:
0 on success, non-zero on failure.

Definition at line 345 of file libnetfilter_log.c.

struct nflog_handle* nflog_open ( void   )  [read]

nflog_open - open a nflog handler

This function obtains a netfilter log connection handle. When you are finished with the handle returned by this function, you should destroy it by calling nflog_close(). A new netlink connection is obtained internally and associated with the log connection handle returned.

Returns:
a pointer to a new log handle or NULL on failure.

Definition at line 289 of file libnetfilter_log.c.

int nflog_unbind_pf ( struct nflog_handle h,
u_int16_t  pf 
)

nflog_unbind_pf - unbind nflog handler from a protocol family

Parameters:
h Netfilter log handle obtained via call to nflog_open()
pf protocol family to unbind family from

Unbinds the given nflog handle from processing packets belonging to the given protocol family.

Definition at line 376 of file libnetfilter_log.c.

Generated on Thu Jul 15 14:18:24 2010 for libnetfilter_log by  doxygen 1.6.3