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

Data Structures

struct  nft_ruleset
 

Macros

#define NFT_FPRINTF_RETURN_OR_FIXLEN(ret, len)
 

Functions

struct nft_rulesetnft_ruleset_alloc (void)
 
 EXPORT_SYMBOL (nft_ruleset_alloc)
 
void nft_ruleset_free (struct nft_ruleset *r)
 
 EXPORT_SYMBOL (nft_ruleset_free)
 
bool nft_ruleset_attr_is_set (const struct nft_ruleset *r, uint16_t attr)
 
 EXPORT_SYMBOL (nft_ruleset_attr_is_set)
 
void nft_ruleset_attr_unset (struct nft_ruleset *r, uint16_t attr)
 
 EXPORT_SYMBOL (nft_ruleset_attr_unset)
 
void nft_ruleset_attr_set (struct nft_ruleset *r, uint16_t attr, void *data)
 
 EXPORT_SYMBOL (nft_ruleset_attr_set)
 
void * nft_ruleset_attr_get (const struct nft_ruleset *r, uint16_t attr)
 
 EXPORT_SYMBOL (nft_ruleset_attr_get)
 
int nft_ruleset_parse (struct nft_ruleset *r, enum nft_parse_type type, const char *data, struct nft_parse_err *err)
 
 EXPORT_SYMBOL (nft_ruleset_parse)
 
int nft_ruleset_parse_file (struct nft_ruleset *rs, enum nft_parse_type type, FILE *fp, struct nft_parse_err *err)
 
 EXPORT_SYMBOL (nft_ruleset_parse_file)
 
int nft_ruleset_snprintf (char *buf, size_t size, const struct nft_ruleset *r, uint32_t type, uint32_t flags)
 
 EXPORT_SYMBOL (nft_ruleset_snprintf)
 
int nft_ruleset_fprintf (FILE *fp, const struct nft_ruleset *rs, uint32_t type, uint32_t flags)
 
 EXPORT_SYMBOL (nft_ruleset_fprintf)
 

Macro Definition Documentation

#define NFT_FPRINTF_RETURN_OR_FIXLEN (   ret,
  len 
)
Value:
if (ret < 0) \
return -1; \
len += ret;
int len
Definition: utils.c:56

Referenced by nft_ruleset_fprintf().

Function Documentation

EXPORT_SYMBOL ( nft_ruleset_alloc  )
EXPORT_SYMBOL ( nft_ruleset_free  )
EXPORT_SYMBOL ( nft_ruleset_attr_is_set  )
EXPORT_SYMBOL ( nft_ruleset_attr_unset  )
EXPORT_SYMBOL ( nft_ruleset_attr_set  )
EXPORT_SYMBOL ( nft_ruleset_attr_get  )
EXPORT_SYMBOL ( nft_ruleset_parse  )
EXPORT_SYMBOL ( nft_ruleset_parse_file  )
EXPORT_SYMBOL ( nft_ruleset_snprintf  )
EXPORT_SYMBOL ( nft_ruleset_fprintf  )
struct nft_ruleset* nft_ruleset_alloc ( void  )

Referenced by mnl_nft_ruleset_dump(), and mnl_ruleset_dump().

Here is the caller graph for this function:

bool nft_ruleset_attr_is_set ( const struct nft_ruleset r,
uint16_t  attr 
)

References nft_ruleset::flags.

Referenced by nft_ruleset_fprintf().

Here is the caller graph for this function:

void nft_ruleset_attr_set ( struct nft_ruleset r,
uint16_t  attr,
void *  data 
)
int nft_ruleset_parse ( struct nft_ruleset r,
enum nft_parse_type  type,
const char *  data,
struct nft_parse_err err 
)

References NFT_PARSE_BUFFER.

int nft_ruleset_parse_file ( struct nft_ruleset rs,
enum nft_parse_type  type,
FILE *  fp,
struct nft_parse_err err 
)

References NFT_PARSE_FILE.

int nft_ruleset_snprintf ( char *  buf,
size_t  size,
const struct nft_ruleset r,
uint32_t  type,
uint32_t  flags 
)

References NFT_OUTPUT_DEFAULT, NFT_OUTPUT_JSON, and NFT_OUTPUT_XML.

Referenced by netlink_dump_ruleset().

Here is the caller graph for this function: