netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
api.c File Reference
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <assert.h>
#include "internal/internal.h"
Include dependency graph for api.c:

Functions

struct nf_expectnfexp_new (void)
 nfexp_new - allocate a new expectation More...
 
void nfexp_destroy (struct nf_expect *exp)
 nfexp_destroy - release an expectation object More...
 
size_t nfexp_sizeof (const struct nf_expect *exp)
 nfexp_sizeof - return the size in bytes of a certain expect object More...
 
size_t nfexp_maxsize (void)
 nfexp_maxsize - return the maximum size in bytes of a expect object More...
 
struct nf_expectnfexp_clone (const struct nf_expect *exp)
 nfexp_clone - clone a expectation object More...
 
int nfexp_cmp (const struct nf_expect *exp1, const struct nf_expect *exp2, unsigned int flags)
 nfexp_cmp - compare two expectation objects More...
 
int nfexp_callback_register (struct nfct_handle *h, enum nf_conntrack_msg_type type, int(*cb)(enum nf_conntrack_msg_type type, struct nf_expect *exp, void *data), void *data)
 nfexp_callback_register - register a callback More...
 
void nfexp_callback_unregister (struct nfct_handle *h)
 nfexp_callback_unregister - unregister a callback More...
 
int nfexp_callback_register2 (struct nfct_handle *h, enum nf_conntrack_msg_type type, int(*cb)(const struct nlmsghdr *nlh, enum nf_conntrack_msg_type type, struct nf_expect *exp, void *data), void *data)
 nfexp_callback_register2 - register a callback More...
 
void nfexp_callback_unregister2 (struct nfct_handle *h)
 nfexp_callback_unregister2 - unregister a callback More...
 
void nfexp_set_attr (struct nf_expect *exp, const enum nf_expect_attr type, const void *value)
 nfexp_set_attr - set the value of a certain expect attribute More...
 
void nfexp_set_attr_u8 (struct nf_expect *exp, const enum nf_expect_attr type, u_int8_t value)
 nfexp_set_attr_u8 - set the value of a certain expect attribute More...
 
void nfexp_set_attr_u16 (struct nf_expect *exp, const enum nf_expect_attr type, u_int16_t value)
 nfexp_set_attr_u16 - set the value of a certain expect attribute More...
 
void nfexp_set_attr_u32 (struct nf_expect *exp, const enum nf_expect_attr type, u_int32_t value)
 nfexp_set_attr_u32 - set the value of a certain expect attribute More...
 
const void * nfexp_get_attr (const struct nf_expect *exp, const enum nf_expect_attr type)
 nfexp_get_attr - get an expect attribute More...
 
u_int8_t nfexp_get_attr_u8 (const struct nf_expect *exp, const enum nf_expect_attr type)
 nfexp_get_attr_u8 - get attribute of unsigned 8-bits long More...
 
u_int16_t nfexp_get_attr_u16 (const struct nf_expect *exp, const enum nf_expect_attr type)
 nfexp_get_attr_u16 - get attribute of unsigned 16-bits long More...
 
u_int32_t nfexp_get_attr_u32 (const struct nf_expect *exp, const enum nf_expect_attr type)
 nfexp_get_attr_u32 - get attribute of unsigned 32-bits long More...
 
int nfexp_attr_is_set (const struct nf_expect *exp, const enum nf_expect_attr type)
 nfexp_attr_is_set - check if a certain attribute is set More...
 
int nfexp_attr_unset (struct nf_expect *exp, const enum nf_expect_attr type)
 nfexp_attr_unset - unset a certain attribute More...
 
int nfexp_build_expect (struct nfnl_subsys_handle *ssh, void *req, size_t size, u_int16_t type, u_int16_t flags, const struct nf_expect *exp)
 nfexp_build_expect - build a netlink message from a conntrack object More...
 
int nfexp_build_query (struct nfnl_subsys_handle *ssh, const enum nf_conntrack_query qt, const void *data, void *buffer, unsigned int size)
 nfexp_build_query - build a query in netlink message format for ctnetlink More...
 
int nfexp_parse_expect (enum nf_conntrack_msg_type type, const struct nlmsghdr *nlh, struct nf_expect *exp)
 nfexp_parse_expect - translate a netlink message to a conntrack object More...
 
int nfexp_query (struct nfct_handle *h, const enum nf_conntrack_query qt, const void *data)
 nfexp_query - send a query to ctnetlink More...
 
int nfexp_send (struct nfct_handle *h, const enum nf_conntrack_query qt, const void *data)
 nfexp_send - send a query to ctnetlink More...
 
int nfexp_catch (struct nfct_handle *h)
 nfexp_catch - catch events More...
 
int nfexp_snprintf (char *buf, unsigned int size, const struct nf_expect *exp, unsigned int msg_type, unsigned int out_type, unsigned int flags)
 nfexp_snprintf - print a conntrack object to a buffer More...