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

Data Structures

struct  counter_stmt
 
struct  meta_stmt
 
struct  log_stmt
 
struct  limit_stmt
 
struct  reject_stmt
 
struct  nat_stmt
 
struct  masq_stmt
 
struct  redir_stmt
 
struct  queue_stmt
 
struct  ct_stmt
 
struct  stmt_ops
 
struct  stmt
 

Enumerations

enum  {
  STMT_LOG_PREFIX = (1 << 0),
  STMT_LOG_SNAPLEN = (1 << 1),
  STMT_LOG_GROUP = (1 << 2),
  STMT_LOG_QTHRESHOLD = (1 << 3),
  STMT_LOG_LEVEL = (1 << 4)
}
 
enum  stmt_types {
  STMT_INVALID,
  STMT_EXPRESSION,
  STMT_VERDICT,
  STMT_COUNTER,
  STMT_META,
  STMT_LIMIT,
  STMT_LOG,
  STMT_REJECT,
  STMT_NAT,
  STMT_MASQ,
  STMT_REDIR,
  STMT_QUEUE,
  STMT_CT
}
 enum stmt_types - statement types More...
 

Functions

struct stmtexpr_stmt_alloc (const struct location *loc, struct expr *expr)
 
struct stmtverdict_stmt_alloc (const struct location *loc, struct expr *expr)
 
struct stmtcounter_stmt_alloc (const struct location *loc)
 
struct stmtmeta_stmt_alloc (const struct location *loc, enum nft_meta_keys key, struct expr *expr)
 
struct stmtlog_stmt_alloc (const struct location *loc)
 
struct stmtlimit_stmt_alloc (const struct location *loc)
 
struct stmtreject_stmt_alloc (const struct location *loc)
 
struct stmtnat_stmt_alloc (const struct location *loc)
 
struct stmtmasq_stmt_alloc (const struct location *loc)
 
struct stmtredir_stmt_alloc (const struct location *loc)
 
struct stmtqueue_stmt_alloc (const struct location *loc)
 
struct stmtct_stmt_alloc (const struct location *loc, enum nft_ct_keys key, struct expr *expr)
 

: name

struct stmt_ops

: statement type

: destructor : function to print statement

enum  stmt_flags { STMT_F_TERMINAL = 0x1 }
 
struct stmtstmt_alloc (const struct location *loc, const struct stmt_ops *ops)
 
int stmt_evaluate (struct eval_ctx *ctx, struct stmt *stmt)
 
void stmt_free (struct stmt *stmt)
 
void stmt_list_free (struct list_head *list)
 
void stmt_print (const struct stmt *stmt)
 

Enumeration Type Documentation

anonymous enum
Enumerator
STMT_LOG_PREFIX 
STMT_LOG_SNAPLEN 
STMT_LOG_GROUP 
STMT_LOG_QTHRESHOLD 
STMT_LOG_LEVEL 
enum stmt_flags
Enumerator
STMT_F_TERMINAL 
enum stmt_types

enum stmt_types - statement types

: uninitialised : expression statement (relational) : verdict statement : counters : meta statement : limit statement : log statement : REJECT statement : NAT statement : masquerade statement : redirect statement : QUEUE statement : conntrack statement

Enumerator
STMT_INVALID 
STMT_EXPRESSION 
STMT_VERDICT 
STMT_COUNTER 
STMT_META 
STMT_LIMIT 
STMT_LOG 
STMT_REJECT 
STMT_NAT 
STMT_MASQ 
STMT_REDIR 
STMT_QUEUE 
STMT_CT 

Function Documentation

struct stmt* counter_stmt_alloc ( const struct location loc)

References stmt_alloc().

Here is the call graph for this function:

struct stmt* ct_stmt_alloc ( const struct location loc,
enum nft_ct_keys  key,
struct expr expr 
)

References stmt::ct, ct_stmt::expr, stmt::expr, ct_stmt::key, stmt_alloc(), and ct_stmt::tmpl.

Here is the call graph for this function:

struct stmt* expr_stmt_alloc ( const struct location loc,
struct expr expr 
)

References stmt::expr, and stmt_alloc().

Referenced by payload_gen_dependency().

Here is the call graph for this function:

Here is the caller graph for this function:

struct stmt* limit_stmt_alloc ( const struct location loc)

References stmt_alloc().

Here is the call graph for this function:

struct stmt* log_stmt_alloc ( const struct location loc)

References stmt_alloc().

Here is the call graph for this function:

struct stmt* masq_stmt_alloc ( const struct location loc)

References stmt_alloc().

Here is the call graph for this function:

struct stmt* meta_stmt_alloc ( const struct location loc,
enum nft_meta_keys  key,
struct expr expr 
)

References meta_stmt::expr, stmt::expr, meta_stmt::key, stmt::meta, stmt_alloc(), and meta_stmt::tmpl.

Here is the call graph for this function:

struct stmt* nat_stmt_alloc ( const struct location loc)

References stmt_alloc().

Here is the call graph for this function:

struct stmt* queue_stmt_alloc ( const struct location loc)

References stmt_alloc().

Here is the call graph for this function:

struct stmt* redir_stmt_alloc ( const struct location loc)

References stmt_alloc().

Here is the call graph for this function:

struct stmt* reject_stmt_alloc ( const struct location loc)

References stmt_alloc().

Here is the call graph for this function:

struct stmt* stmt_alloc ( const struct location loc,
const struct stmt_ops ops 
)
int stmt_evaluate ( struct eval_ctx ctx,
struct stmt stmt 
)
void stmt_free ( struct stmt stmt)

References stmt_ops::destroy, stmt::ops, and xfree.

Referenced by stmt_list_free().

Here is the caller graph for this function:

void stmt_list_free ( struct list_head list)

References stmt::list, list_for_each_entry_safe, and stmt_free().

Referenced by rule_free().

Here is the call graph for this function:

Here is the caller graph for this function:

void stmt_print ( const struct stmt stmt)

References stmt::ops, and stmt_ops::print.

Referenced by stmt_evaluate().

Here is the caller graph for this function:

struct stmt* verdict_stmt_alloc ( const struct location loc,
struct expr expr 
)

References stmt::expr, and stmt_alloc().

Here is the call graph for this function: