netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
netlink.c File Reference
#include "netlink.h"
#include "conntrackd.h"
#include "filter.h"
#include "log.h"
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/fcntl.h>
#include <libnetfilter_conntrack/libnetfilter_conntrack_tcp.h>
Include dependency graph for netlink.c:

Functions

struct nfct_handlenl_init_event_handler (void)
 
struct nlif_handlenl_init_interface_handler (void)
 
void nl_resize_socket_buffer (struct nfct_handle *h)
 
int nl_dump_conntrack_table (struct nfct_handle *h)
 
int nl_flush_conntrack_table_selective (void)
 
int nl_send_resync (struct nfct_handle *h)
 
int nl_get_conntrack (struct nfct_handle *h, const struct nf_conntrack *ct)
 
int nl_create_conntrack (struct nfct_handle *h, const struct nf_conntrack *orig, int timeout)
 
int nl_update_conntrack (struct nfct_handle *h, const struct nf_conntrack *orig, int timeout)
 
int nl_destroy_conntrack (struct nfct_handle *h, const struct nf_conntrack *ct)
 
int nl_create_expect (struct nfct_handle *h, const struct nf_expect *orig, int timeout)
 
int nl_destroy_expect (struct nfct_handle *h, const struct nf_expect *exp)
 
int nl_get_expect (struct nfct_handle *h, const struct nf_expect *exp)
 
int nl_dump_expect_table (struct nfct_handle *h)
 
int nl_flush_expect_table (struct nfct_handle *h)
 
int nl_send_expect_resync (struct nfct_handle *h)
 

Function Documentation

int nl_create_expect ( struct nfct_handle h,
const struct nf_expect orig,
int  timeout 
)

References ATTR_EXP_TIMEOUT, exp, NFCT_Q_CREATE, nfexp_clone(), nfexp_destroy(), nfexp_query(), nfexp_set_attr_u32(), and NULL.

Here is the call graph for this function:

int nl_destroy_conntrack ( struct nfct_handle h,
const struct nf_conntrack ct 
)

References NFCT_Q_DESTROY, and nfct_query().

Here is the call graph for this function:

int nl_destroy_expect ( struct nfct_handle h,
const struct nf_expect exp 
)

References NFCT_Q_DESTROY, and nfexp_query().

Here is the call graph for this function:

int nl_dump_conntrack_table ( struct nfct_handle h)

References NFCT_Q_DUMP, and nfct_query().

Referenced by ctnl_init().

Here is the call graph for this function:

Here is the caller graph for this function:

int nl_dump_expect_table ( struct nfct_handle h)

References NFCT_Q_DUMP, and nfexp_query().

Referenced by ctnl_init().

Here is the call graph for this function:

Here is the caller graph for this function:

int nl_flush_conntrack_table_selective ( void  )

References CONNTRACK, dlog(), LOG_ERR, nfct_callback_register(), nfct_close(), nfct_open(), NFCT_Q_DUMP, nfct_query(), NFCT_T_ALL, and NULL.

Here is the call graph for this function:

int nl_flush_expect_table ( struct nfct_handle h)

References NFCT_Q_FLUSH, and nfexp_query().

Here is the call graph for this function:

int nl_get_conntrack ( struct nfct_handle h,
const struct nf_conntrack ct 
)

References nfct_copy(), NFCT_CP_ORIG, nfct_destroy(), nfct_new(), NFCT_Q_GET, nfct_query(), and NULL.

Here is the call graph for this function:

int nl_get_expect ( struct nfct_handle h,
const struct nf_expect exp 
)

References NFCT_Q_GET, nfexp_clone(), nfexp_destroy(), nfexp_query(), and NULL.

Here is the call graph for this function:

struct nfct_handle* nl_init_event_handler ( void  )

References CONFIG, dlog(), LOG_ERR, LOG_NOTICE, NETLINK_BROADCAST_SEND_ERROR, NETLINK_NO_ENOBUFS, nfct_fd(), nfct_filter_attach(), nfct_filter_destroy(), nfct_nfnlh(), nfct_open(), nfnl_rcvbufsiz(), NULL, SOL_NETLINK, and STATE.

Referenced by ctnl_init().

Here is the call graph for this function:

Here is the caller graph for this function:

struct nlif_handle* nl_init_interface_handler ( void  )

References nlif_fd(), nlif_open(), nlif_query(), and NULL.

Here is the call graph for this function:

void nl_resize_socket_buffer ( struct nfct_handle h)

References CONFIG, dlog(), LOG_NOTICE, LOG_WARNING, nfct_nfnlh(), nfnl_rcvbufsiz(), and s.

Here is the call graph for this function:

int nl_send_expect_resync ( struct nfct_handle h)

References NFCT_Q_DUMP, and nfexp_send().

Here is the call graph for this function:

int nl_send_resync ( struct nfct_handle h)

References NFCT_Q_DUMP, and nfct_send().

Here is the call graph for this function: