netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
nft_rule.h File Reference
#include <netlink/netlink.h>
#include <netlink/addr.h>
#include <netlink/cache.h>
#include <netlink/msg.h>
Include dependency graph for nft_rule.h:
This graph shows which files directly or indirectly include this file:

Functions

struct nfnl_nft_rulenfnl_nft_rule_alloc (void)
 
int nfnl_nft_rule_alloc_cache (struct nl_sock *, struct nl_cache **)
 Build a rule cache holding all nf_tables rules currently in the kernel. More...
 
int nfnlmsg_nft_rule_group (struct nlmsghdr *)
 
int nfnlmsg_nft_rule_parse (struct nlmsghdr *, struct nfnl_nft_rule **)
 
void nfnl_nft_rule_get (struct nfnl_nft_rule *)
 
void nfnl_nft_rule_put (struct nfnl_nft_rule *)
 
int nfnl_nft_rule_dump_request (struct nl_sock *)
 
int nfnl_nft_rule_build_add_request (struct nfnl_nft_rule *, int, struct nl_msg **)
 
int nfnl_nft_rule_add (struct nl_sock *, struct nfnl_nft_rule *, int)
 
int nfnl_nft_rule_build_delete_request (struct nfnl_nft_rule *, int, struct nl_msg **)
 
int nfnl_nft_rule_delete (struct nl_sock *, struct nfnl_nft_rule *, int)
 
int nfnl_nft_rule_build_query_request (struct nfnl_nft_rule *, int, struct nl_msg **)
 
int nfnl_nft_rule_query (struct nl_sock *, struct nfnl_nft_rule *, int)
 
void nfnl_nft_rule_set_family (struct nfnl_nft_rule *, uint8_t)
 
int nfnl_nft_rule_test_family (const struct nfnl_nft_rule *)
 
uint8_t nfnl_nft_rule_get_family (const struct nfnl_nft_rule *)
 
int nfnl_nft_rule_set_table (struct nfnl_nft_rule *, const char *, int)
 
int nfnl_nft_rule_test_table (const struct nfnl_nft_rule *)
 
const char * nfnl_nft_rule_get_table (const struct nfnl_nft_rule *)
 
int nfnl_nft_rule_set_chain (struct nfnl_nft_rule *, const char *, int)
 
int nfnl_nft_rule_test_chain (const struct nfnl_nft_rule *)
 
const char * nfnl_nft_rule_get_chain (const struct nfnl_nft_rule *)
 
void nfnl_nft_rule_set_handle (struct nfnl_nft_rule *, uint64_t)
 
int nfnl_nft_rule_test_handle (const struct nfnl_nft_rule *)
 
uint64_t nfnl_nft_rule_get_handle (const struct nfnl_nft_rule *)
 
void nfnl_nft_rule_add_expr (struct nfnl_nft_rule *, struct nfnl_nft_expr *)
 
void nfnl_nft_rule_foreach_expr (const struct nfnl_nft_rule *, void(*)(struct nl_object *, void *), void *)
 

Variables

struct nl_object_ops nft_rule_obj_ops
 

Function Documentation

void nfnl_nft_rule_add_expr ( struct nfnl_nft_rule ,
struct nfnl_nft_expr  
)

References nfnl_nft_expr::expr_list, and nfnl_nft_rule::rule_expressions.

Referenced by main().

Here is the caller graph for this function:

struct nfnl_nft_rule* nfnl_nft_rule_alloc ( void  )

References nft_rule_obj_ops, and nl_object_alloc().

Referenced by main(), and nfnlmsg_nft_rule_parse().

Here is the call graph for this function:

Here is the caller graph for this function:

void nfnl_nft_rule_foreach_expr ( const struct nfnl_nft_rule ,
void(*)(struct nl_object *, void *)  ,
void *   
)
void nfnl_nft_rule_get ( struct nfnl_nft_rule )

References nl_object_get().

Here is the call graph for this function:

const char* nfnl_nft_rule_get_chain ( const struct nfnl_nft_rule )

References nl_data_get(), and nfnl_nft_rule::rule_chain.

Here is the call graph for this function:

uint8_t nfnl_nft_rule_get_family ( const struct nfnl_nft_rule )
uint64_t nfnl_nft_rule_get_handle ( const struct nfnl_nft_rule )
const char* nfnl_nft_rule_get_table ( const struct nfnl_nft_rule )

References nl_data_get(), and nfnl_nft_rule::rule_table.

Here is the call graph for this function:

void nfnl_nft_rule_put ( struct nfnl_nft_rule )

References nl_object_put().

Referenced by main(), and nfnlmsg_nft_rule_parse().

Here is the call graph for this function:

Here is the caller graph for this function:

int nfnl_nft_rule_set_chain ( struct nfnl_nft_rule ,
const char *  ,
int   
)

References data, nl_data_alloc(), nl_data_free(), NLE_NOMEM, NULL, and nfnl_nft_rule::rule_chain.

Referenced by main(), and nfnlmsg_nft_rule_parse().

Here is the call graph for this function:

Here is the caller graph for this function:

void nfnl_nft_rule_set_family ( struct nfnl_nft_rule ,
uint8_t   
)

References nfnl_nft_rule::rule_family.

Referenced by main(), and nfnlmsg_nft_rule_parse().

Here is the caller graph for this function:

void nfnl_nft_rule_set_handle ( struct nfnl_nft_rule ,
uint64_t   
)

References nfnl_nft_rule::rule_handle.

Referenced by main(), and nfnlmsg_nft_rule_parse().

Here is the caller graph for this function:

int nfnl_nft_rule_set_table ( struct nfnl_nft_rule ,
const char *  ,
int   
)

References data, nl_data_alloc(), nl_data_free(), NLE_NOMEM, NULL, and nfnl_nft_rule::rule_table.

Referenced by main(), and nfnlmsg_nft_rule_parse().

Here is the call graph for this function:

Here is the caller graph for this function:

int nfnl_nft_rule_test_chain ( const struct nfnl_nft_rule )
int nfnl_nft_rule_test_family ( const struct nfnl_nft_rule )
int nfnl_nft_rule_test_handle ( const struct nfnl_nft_rule )
int nfnl_nft_rule_test_table ( const struct nfnl_nft_rule )
int nfnlmsg_nft_rule_group ( struct nlmsghdr )

Variable Documentation

struct nl_object_ops nft_rule_obj_ops

Referenced by nfnl_nft_rule_alloc().