netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ruleset.h File Reference
#include <stdio.h>
#include <stdbool.h>
#include <stdint.h>
#include <sys/types.h>
#include <libnftnl/common.h>
Include dependency graph for ruleset.h:
This graph shows which files directly or indirectly include this file:

Enumerations

enum  {
  NFT_RULESET_ATTR_TABLELIST = 0,
  NFT_RULESET_ATTR_CHAINLIST,
  NFT_RULESET_ATTR_SETLIST,
  NFT_RULESET_ATTR_RULELIST
}
 

Functions

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

Enumeration Type Documentation

anonymous enum
Enumerator
NFT_RULESET_ATTR_TABLELIST 
NFT_RULESET_ATTR_CHAINLIST 
NFT_RULESET_ATTR_SETLIST 
NFT_RULESET_ATTR_RULELIST 

Function Documentation

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 rs,
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 rs,
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: