netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
common.c File Reference
#include <stdlib.h>
#include <sys/socket.h>
#include <time.h>
#include <linux/netlink.h>
#include <linux/netfilter/nfnetlink.h>
#include <libmnl/libmnl.h>
#include <libnftnl/common.h>
#include <libnftnl/set.h>
#include <errno.h>
#include "internal.h"
Include dependency graph for common.c:

Functions

struct nlmsghdrnft_nlmsg_build_hdr (char *buf, uint16_t cmd, uint16_t family, uint16_t type, uint32_t seq)
 
 EXPORT_SYMBOL (nft_nlmsg_build_hdr)
 
struct nft_parse_errnft_parse_err_alloc (void)
 
 EXPORT_SYMBOL (nft_parse_err_alloc)
 
void nft_parse_err_free (struct nft_parse_err *err)
 
 EXPORT_SYMBOL (nft_parse_err_free)
 
int nft_parse_perror (const char *msg, struct nft_parse_err *err)
 
 EXPORT_SYMBOL (nft_parse_perror)
 
int nft_event_header_snprintf (char *buf, size_t size, uint32_t type, uint32_t flags)
 
int nft_event_header_fprintf (FILE *fp, uint32_t type, uint32_t flags)
 
int nft_event_footer_snprintf (char *buf, size_t size, uint32_t type, uint32_t flags)
 
int nft_event_footer_fprintf (FILE *fp, uint32_t type, uint32_t flags)
 
void nft_batch_begin (char *buf, uint32_t seq)
 
 EXPORT_SYMBOL (nft_batch_begin)
 
void nft_batch_end (char *buf, uint32_t seq)
 
 EXPORT_SYMBOL (nft_batch_end)
 
int nft_batch_is_supported (void)
 
 EXPORT_SYMBOL (nft_batch_is_supported)
 

Function Documentation

EXPORT_SYMBOL ( nft_nlmsg_build_hdr  )
EXPORT_SYMBOL ( nft_parse_err_alloc  )
EXPORT_SYMBOL ( nft_parse_err_free  )
EXPORT_SYMBOL ( nft_parse_perror  )
EXPORT_SYMBOL ( nft_batch_begin  )
EXPORT_SYMBOL ( nft_batch_end  )
EXPORT_SYMBOL ( nft_batch_is_supported  )
void nft_batch_begin ( char *  buf,
uint32_t  seq 
)

References NFNL_MSG_BATCH_BEGIN.

Referenced by mnl_batch_begin(), and nft_batch_is_supported().

Here is the caller graph for this function:

void nft_batch_end ( char *  buf,
uint32_t  seq 
)

References NFNL_MSG_BATCH_END.

Referenced by mnl_batch_end(), and nft_batch_is_supported().

Here is the caller graph for this function:

int nft_event_footer_fprintf ( FILE *  fp,
uint32_t  type,
uint32_t  flags 
)

References nft_fprintf(), and NULL.

Referenced by nft_ruleset_fprintf().

Here is the call graph for this function:

Here is the caller graph for this function:

int nft_event_footer_snprintf ( char *  buf,
size_t  size,
uint32_t  type,
uint32_t  flags 
)
int nft_event_header_fprintf ( FILE *  fp,
uint32_t  type,
uint32_t  flags 
)

References nft_fprintf(), and NULL.

Referenced by nft_ruleset_fprintf().

Here is the call graph for this function:

Here is the caller graph for this function:

int nft_event_header_snprintf ( char *  buf,
size_t  size,
uint32_t  type,
uint32_t  flags 
)
struct nlmsghdr* nft_nlmsg_build_hdr ( char *  buf,
uint16_t  cmd,
uint16_t  family,
uint16_t  type,
uint32_t  seq 
)
struct nft_parse_err* nft_parse_err_alloc ( void  )
void nft_parse_err_free ( struct nft_parse_err err)

References xfree.