netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
nfct.h File Reference
#include "linux_list.h"
Include dependency graph for nfct.h:
This graph shows which files directly or indirectly include this file:

Data Structures

struct  nfct_extension
 

Macros

#define __init   __attribute__((constructor))
 

Enumerations

enum  {
  NFCT_SUBSYS_NONE = 0,
  NFCT_SUBSYS_TIMEOUT,
  NFCT_SUBSYS_HELPER,
  NFCT_SUBSYS_VERSION,
  NFCT_SUBSYS_HELP
}
 
enum  {
  NFCT_CMD_NONE = 0,
  NFCT_CMD_LIST,
  NFCT_CMD_ADD,
  NFCT_CMD_DELETE,
  NFCT_CMD_GET,
  NFCT_CMD_FLUSH,
  NFCT_CMD_DISABLE,
  NFCT_CMD_DEFAULT_SET,
  NFCT_CMD_DEFAULT_GET
}
 

Functions

void nfct_perror (const char *msg)
 
void nfct_extension_register (struct nfct_extension *ext)
 
struct mnl_socketnfct_mnl_open (void)
 
int nfct_mnl_talk (struct mnl_socket *nl, struct nlmsghdr *nlh, uint32_t seq, uint32_t portid, int(*cb)(const struct nlmsghdr *nlh, void *data), void *data)
 

Macro Definition Documentation

#define __init   __attribute__((constructor))

Enumeration Type Documentation

anonymous enum
Enumerator
NFCT_SUBSYS_NONE 
NFCT_SUBSYS_TIMEOUT 
NFCT_SUBSYS_HELPER 
NFCT_SUBSYS_VERSION 
NFCT_SUBSYS_HELP 
anonymous enum
Enumerator
NFCT_CMD_NONE 
NFCT_CMD_LIST 
NFCT_CMD_ADD 
NFCT_CMD_DELETE 
NFCT_CMD_GET 
NFCT_CMD_FLUSH 
NFCT_CMD_DISABLE 
NFCT_CMD_DEFAULT_SET 
NFCT_CMD_DEFAULT_GET 

Function Documentation

void nfct_extension_register ( struct nfct_extension ext)

References nfct_extension::head.

struct mnl_socket* nfct_mnl_open ( void  )

References MNL_SOCKET_AUTOPID, mnl_socket_bind(), mnl_socket_open(), NETLINK_NETFILTER, and NULL.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

int nfct_mnl_talk ( struct mnl_socket nl,
struct nlmsghdr nlh,
uint32_t  seq,
uint32_t  portid,
int(*)(const struct nlmsghdr *nlh, void *data cb,
void *  data 
)

References buf, mnl_cb_run(), MNL_SOCKET_BUFFER_SIZE, mnl_socket_recvfrom(), mnl_socket_sendto(), and nlmsghdr::nlmsg_len.

Here is the call graph for this function:

void nfct_perror ( const char *  msg)

Referenced by main().

Here is the caller graph for this function: