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

Functions

struct nfnl_ctnfnl_ct_alloc (void)
 
int nfnl_ct_alloc_cache (struct nl_sock *, struct nl_cache **)
 Build a conntrack cache holding all conntrack currently in the kernel. More...
 
int nfnlmsg_ct_group (struct nlmsghdr *)
 
int nfnlmsg_ct_parse (struct nlmsghdr *, struct nfnl_ct **)
 
void nfnl_ct_get (struct nfnl_ct *)
 
void nfnl_ct_put (struct nfnl_ct *)
 
int nfnl_ct_dump_request (struct nl_sock *)
 
int nfnl_ct_build_add_request (const struct nfnl_ct *, int, struct nl_msg **)
 
int nfnl_ct_add (struct nl_sock *, const struct nfnl_ct *, int)
 
int nfnl_ct_build_delete_request (const struct nfnl_ct *, int, struct nl_msg **)
 
int nfnl_ct_delete (struct nl_sock *, const struct nfnl_ct *, int)
 
int nfnl_ct_build_query_request (const struct nfnl_ct *, int, struct nl_msg **)
 
int nfnl_ct_query (struct nl_sock *, const struct nfnl_ct *, int)
 
void nfnl_ct_set_family (struct nfnl_ct *, uint8_t)
 
uint8_t nfnl_ct_get_family (const struct nfnl_ct *)
 
void nfnl_ct_set_proto (struct nfnl_ct *, uint8_t)
 
int nfnl_ct_test_proto (const struct nfnl_ct *)
 
uint8_t nfnl_ct_get_proto (const struct nfnl_ct *)
 
void nfnl_ct_set_tcp_state (struct nfnl_ct *, uint8_t)
 
int nfnl_ct_test_tcp_state (const struct nfnl_ct *)
 
uint8_t nfnl_ct_get_tcp_state (const struct nfnl_ct *)
 
char * nfnl_ct_tcp_state2str (uint8_t, char *, size_t)
 
int nfnl_ct_str2tcp_state (const char *name)
 
void nfnl_ct_set_status (struct nfnl_ct *, uint32_t)
 
void nfnl_ct_unset_status (struct nfnl_ct *, uint32_t)
 
uint32_t nfnl_ct_get_status (const struct nfnl_ct *)
 
char * nfnl_ct_status2str (int, char *, size_t)
 
int nfnl_ct_str2status (const char *)
 
void nfnl_ct_set_timeout (struct nfnl_ct *, uint32_t)
 
int nfnl_ct_test_timeout (const struct nfnl_ct *)
 
uint32_t nfnl_ct_get_timeout (const struct nfnl_ct *)
 
void nfnl_ct_set_mark (struct nfnl_ct *, uint32_t)
 
int nfnl_ct_test_mark (const struct nfnl_ct *)
 
uint32_t nfnl_ct_get_mark (const struct nfnl_ct *)
 
void nfnl_ct_set_use (struct nfnl_ct *, uint32_t)
 
int nfnl_ct_test_use (const struct nfnl_ct *)
 
uint32_t nfnl_ct_get_use (const struct nfnl_ct *)
 
void nfnl_ct_set_id (struct nfnl_ct *, uint32_t)
 
int nfnl_ct_test_id (const struct nfnl_ct *)
 
uint32_t nfnl_ct_get_id (const struct nfnl_ct *)
 
int nfnl_ct_set_src (struct nfnl_ct *, int, struct nl_addr *)
 
struct nl_addrnfnl_ct_get_src (const struct nfnl_ct *, int)
 
int nfnl_ct_set_dst (struct nfnl_ct *, int, struct nl_addr *)
 
struct nl_addrnfnl_ct_get_dst (const struct nfnl_ct *, int)
 
void nfnl_ct_set_src_port (struct nfnl_ct *, int, uint16_t)
 
int nfnl_ct_test_src_port (const struct nfnl_ct *, int)
 
uint16_t nfnl_ct_get_src_port (const struct nfnl_ct *, int)
 
void nfnl_ct_set_dst_port (struct nfnl_ct *, int, uint16_t)
 
int nfnl_ct_test_dst_port (const struct nfnl_ct *, int)
 
uint16_t nfnl_ct_get_dst_port (const struct nfnl_ct *, int)
 
void nfnl_ct_set_icmp_id (struct nfnl_ct *, int, uint16_t)
 
int nfnl_ct_test_icmp_id (const struct nfnl_ct *, int)
 
uint16_t nfnl_ct_get_icmp_id (const struct nfnl_ct *, int)
 
void nfnl_ct_set_icmp_type (struct nfnl_ct *, int, uint8_t)
 
int nfnl_ct_test_icmp_type (const struct nfnl_ct *, int)
 
uint8_t nfnl_ct_get_icmp_type (const struct nfnl_ct *, int)
 
void nfnl_ct_set_icmp_code (struct nfnl_ct *, int, uint8_t)
 
int nfnl_ct_test_icmp_code (const struct nfnl_ct *, int)
 
uint8_t nfnl_ct_get_icmp_code (const struct nfnl_ct *, int)
 
void nfnl_ct_set_packets (struct nfnl_ct *, int, uint64_t)
 
int nfnl_ct_test_packets (const struct nfnl_ct *, int)
 
uint64_t nfnl_ct_get_packets (const struct nfnl_ct *, int)
 
void nfnl_ct_set_bytes (struct nfnl_ct *, int, uint64_t)
 
int nfnl_ct_test_bytes (const struct nfnl_ct *, int)
 
uint64_t nfnl_ct_get_bytes (const struct nfnl_ct *, int)
 

Variables

struct nl_object_ops ct_obj_ops
 

Function Documentation

struct nfnl_ct* nfnl_ct_alloc ( void  )

References ct_obj_ops, and nl_object_alloc().

Referenced by nfnlmsg_ct_parse(), and nl_cli_ct_alloc().

Here is the call graph for this function:

Here is the caller graph for this function:

int nfnl_ct_delete ( struct nl_sock ,
const struct nfnl_ct ,
int   
)
void nfnl_ct_get ( struct nfnl_ct )

References nl_object_get().

Here is the call graph for this function:

uint64_t nfnl_ct_get_bytes ( const struct nfnl_ct ,
int   
)
struct nl_addr* nfnl_ct_get_dst ( const struct nfnl_ct ,
int   
)
uint16_t nfnl_ct_get_dst_port ( const struct nfnl_ct ,
int   
)
uint8_t nfnl_ct_get_family ( const struct nfnl_ct )

References nfnl_ct::ct_family.

Referenced by nl_cli_ct_parse_dst(), and nl_cli_ct_parse_src().

Here is the caller graph for this function:

uint8_t nfnl_ct_get_icmp_code ( const struct nfnl_ct ,
int   
)
uint16_t nfnl_ct_get_icmp_id ( const struct nfnl_ct ,
int   
)
uint8_t nfnl_ct_get_icmp_type ( const struct nfnl_ct ,
int   
)
uint32_t nfnl_ct_get_id ( const struct nfnl_ct )

References nfnl_ct::ct_id.

uint32_t nfnl_ct_get_mark ( const struct nfnl_ct )

References nfnl_ct::ct_mark.

uint64_t nfnl_ct_get_packets ( const struct nfnl_ct ,
int   
)
uint8_t nfnl_ct_get_proto ( const struct nfnl_ct )

References nfnl_ct::ct_proto.

struct nl_addr* nfnl_ct_get_src ( const struct nfnl_ct ,
int   
)
uint16_t nfnl_ct_get_src_port ( const struct nfnl_ct ,
int   
)
uint32_t nfnl_ct_get_status ( const struct nfnl_ct )

References nfnl_ct::ct_status.

uint8_t nfnl_ct_get_tcp_state ( const struct nfnl_ct )
uint32_t nfnl_ct_get_timeout ( const struct nfnl_ct )

References nfnl_ct::ct_timeout.

uint32_t nfnl_ct_get_use ( const struct nfnl_ct )

References nfnl_ct::ct_use.

void nfnl_ct_put ( struct nfnl_ct )

References nl_object_put().

Referenced by nfnlmsg_ct_parse().

Here is the call graph for this function:

Here is the caller graph for this function:

void nfnl_ct_set_bytes ( struct nfnl_ct ,
int  ,
uint64_t   
)
int nfnl_ct_set_dst ( struct nfnl_ct ,
int  ,
struct nl_addr  
)

References nfnl_ct::ct_orig, nfnl_ct::ct_repl, and nfnl_ct_dir::dst.

Referenced by nl_cli_ct_parse_dst().

Here is the caller graph for this function:

void nfnl_ct_set_dst_port ( struct nfnl_ct ,
int  ,
uint16_t   
)

References nfnl_ct::ct_orig, nfnl_ct::ct_repl, nfnl_ct_proto::dst, nfnl_ct_proto::port, and nfnl_ct_dir::proto.

Referenced by nl_cli_ct_parse_dst_port().

Here is the caller graph for this function:

void nfnl_ct_set_family ( struct nfnl_ct ,
uint8_t   
)

References nfnl_ct::ct_family.

Referenced by main(), nfnlmsg_ct_parse(), and nl_cli_ct_parse_family().

Here is the caller graph for this function:

void nfnl_ct_set_icmp_code ( struct nfnl_ct ,
int  ,
uint8_t   
)
void nfnl_ct_set_icmp_id ( struct nfnl_ct ,
int  ,
uint16_t   
)
void nfnl_ct_set_icmp_type ( struct nfnl_ct ,
int  ,
uint8_t   
)
void nfnl_ct_set_id ( struct nfnl_ct ,
uint32_t   
)

References nfnl_ct::ct_id, and id.

Referenced by nfnlmsg_ct_parse(), and nl_cli_ct_parse_id().

Here is the caller graph for this function:

void nfnl_ct_set_mark ( struct nfnl_ct ,
uint32_t   
)

References nfnl_ct::ct_mark, and mark.

Referenced by nfnlmsg_ct_parse(), and nl_cli_ct_parse_mark().

Here is the caller graph for this function:

void nfnl_ct_set_packets ( struct nfnl_ct ,
int  ,
uint64_t   
)
void nfnl_ct_set_proto ( struct nfnl_ct ,
uint8_t   
)

References nfnl_ct::ct_proto.

Referenced by nl_cli_ct_parse_protocol().

Here is the caller graph for this function:

int nfnl_ct_set_src ( struct nfnl_ct ,
int  ,
struct nl_addr  
)

References nfnl_ct::ct_orig, nfnl_ct::ct_repl, and nfnl_ct_dir::src.

Referenced by nl_cli_ct_parse_src().

Here is the caller graph for this function:

void nfnl_ct_set_src_port ( struct nfnl_ct ,
int  ,
uint16_t   
)

References nfnl_ct::ct_orig, nfnl_ct::ct_repl, nfnl_ct_proto::port, nfnl_ct_dir::proto, and nfnl_ct_proto::src.

Referenced by nl_cli_ct_parse_src_port().

Here is the caller graph for this function:

void nfnl_ct_set_status ( struct nfnl_ct ,
uint32_t   
)

References nfnl_ct::ct_status, and nfnl_ct::ct_status_mask.

Referenced by nfnlmsg_ct_parse(), and nl_cli_ct_parse_status().

Here is the caller graph for this function:

void nfnl_ct_set_tcp_state ( struct nfnl_ct ,
uint8_t   
)

References nfnl_ct::ct_protoinfo, state, nfnl_ct_protoinfo::state, and nfnl_ct_protoinfo::tcp.

Referenced by nl_cli_ct_parse_tcp_state().

Here is the caller graph for this function:

void nfnl_ct_set_timeout ( struct nfnl_ct ,
uint32_t   
)

References nfnl_ct::ct_timeout, and timeout.

Referenced by nfnlmsg_ct_parse(), and nl_cli_ct_parse_timeout().

Here is the caller graph for this function:

void nfnl_ct_set_use ( struct nfnl_ct ,
uint32_t   
)

References nfnl_ct::ct_use.

Referenced by nfnlmsg_ct_parse(), and nl_cli_ct_parse_use().

Here is the caller graph for this function:

char* nfnl_ct_status2str ( int  ,
char *  ,
size_t   
)

References __flags2str(), and ARRAY_SIZE.

Here is the call graph for this function:

int nfnl_ct_str2status ( const char *  )

References __str2flags(), and ARRAY_SIZE.

Referenced by nl_cli_ct_parse_status().

Here is the call graph for this function:

Here is the caller graph for this function:

int nfnl_ct_str2tcp_state ( const char *  name)

References __str2type(), and ARRAY_SIZE.

Referenced by nl_cli_ct_parse_tcp_state().

Here is the call graph for this function:

Here is the caller graph for this function:

char* nfnl_ct_tcp_state2str ( uint8_t  ,
char *  ,
size_t   
)

References __type2str(), and ARRAY_SIZE.

Here is the call graph for this function:

int nfnl_ct_test_bytes ( const struct nfnl_ct ,
int   
)
int nfnl_ct_test_dst_port ( const struct nfnl_ct ,
int   
)
int nfnl_ct_test_icmp_code ( const struct nfnl_ct ,
int   
)
int nfnl_ct_test_icmp_id ( const struct nfnl_ct ,
int   
)
int nfnl_ct_test_icmp_type ( const struct nfnl_ct ,
int   
)
int nfnl_ct_test_id ( const struct nfnl_ct )
int nfnl_ct_test_mark ( const struct nfnl_ct )
int nfnl_ct_test_packets ( const struct nfnl_ct ,
int   
)
int nfnl_ct_test_proto ( const struct nfnl_ct )
int nfnl_ct_test_src_port ( const struct nfnl_ct ,
int   
)
int nfnl_ct_test_tcp_state ( const struct nfnl_ct )
int nfnl_ct_test_timeout ( const struct nfnl_ct )
int nfnl_ct_test_use ( const struct nfnl_ct )
void nfnl_ct_unset_status ( struct nfnl_ct ,
uint32_t   
)

Variable Documentation

struct nl_object_ops ct_obj_ops

Referenced by nfnl_ct_alloc().