#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <ctype.h>
#include <errno.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <linux/types.h>
#include <linux/netfilter.h>
#include <nftables.h>
#include <datatype.h>
#include <expression.h>
#include <gmputil.h>
#include <erec.h>
#include <netinet/ip_icmp.h>
#include <netinet/icmp6.h>
Macros | |
#define | RT_SYM_TAB_INITIAL_SIZE 16 |
Enumerations | |
enum | { DAY = (1 << 0), HOUR = (1 << 1), MIN = (1 << 2), SECS = (1 << 3) } |
Functions | |
void | datatype_register (const struct datatype *dtype) |
const struct datatype * | datatype_lookup (enum datatypes type) |
const struct datatype * | datatype_lookup_byname (const char *name) |
void | datatype_print (const struct expr *expr) |
struct error_record * | symbol_parse (const struct expr *sym, struct expr **res) |
struct error_record * | symbolic_constant_parse (const struct expr *sym, const struct symbol_table *tbl, struct expr **res) |
void | symbolic_constant_print (const struct symbol_table *tbl, const struct expr *expr) |
void | symbol_table_print (const struct symbol_table *tbl, const struct datatype *dtype) |
struct symbol_table * | rt_symbol_table_init (const char *filename) |
void | rt_symbol_table_free (struct symbol_table *tbl) |
const struct datatype * | concat_type_alloc (uint32_t type) |
void | concat_type_destroy (const struct datatype *dtype) |
Variables | |
const struct datatype | invalid_type |
const struct datatype | verdict_type |
const struct datatype | nfproto_type |
const struct datatype | bitmask_type |
const struct datatype | integer_type |
const struct datatype | string_type |
const struct datatype | lladdr_type |
const struct datatype | ipaddr_type |
const struct datatype | ip6addr_type |
const struct datatype | inet_protocol_type |
const struct datatype | inet_service_type |
const struct datatype | mark_type |
const struct datatype | icmp_code_type |
const struct datatype | icmpv6_code_type |
const struct datatype | icmpx_code_type |
const struct datatype | time_type |
#define RT_SYM_TAB_INITIAL_SIZE 16 |
Referenced by rt_symbol_table_init().
References datatype::desc, div_round_up, datatype::name, name, NULL, datatype::parse, datatype::size, size, datatype::subtypes, datatype::type, type, TYPE_BITS, and xstrdup().
References datatype::desc, DTYPE_F_ALLOC, datatype::flags, datatype::name, and xfree.
References datatype::name, NULL, type, TYPE_INVALID, and TYPE_MAX.
References datatype::basetype, BUG, expr::dtype, datatype::name, NULL, datatype::print, datatype::sym_tbl, and symbolic_constant_print().
References BUILD_BUG_ON, datatype::type, TYPE_MASK, and TYPE_MAX.
void rt_symbol_table_free | ( | struct symbol_table * | tbl | ) |
References symbolic_constant::identifier, NULL, s, symbol_table::symbols, and xfree.
struct symbol_table* rt_symbol_table_init | ( | const char * | filename | ) |
References buf, symbolic_constant::identifier, NULL, RT_SYM_TAB_INITIAL_SIZE, size, SYMBOL_LIST_END, symbol_table::symbols, symbolic_constant::value, xmalloc(), xrealloc(), and xstrdup().
References datatype::basetype, datatype::desc, expr::dtype, error, EXPR_SYMBOL, expr::location, NULL, expr::ops, datatype::parse, datatype::sym_tbl, symbolic_constant_parse(), and expr_ops::type.
void symbol_table_print | ( | const struct symbol_table * | tbl, |
const struct datatype * | dtype | ||
) |
References BITS_PER_BYTE, symbolic_constant::identifier, NULL, s, datatype::size, size, symbol_table::symbols, and symbolic_constant::value.
Referenced by expr_describe().
struct error_record* symbolic_constant_parse | ( | const struct expr * | sym, |
const struct symbol_table * | tbl, | ||
struct expr ** | res | ||
) |
References datatype::basetype, datatype::byteorder, constant_expr_alloc(), datatype::desc, expr::dtype, error, symbolic_constant::identifier, expr::identifier, expr::location, NULL, datatype::parse, s, datatype::size, symbol_table::symbols, and symbolic_constant::value.
Referenced by symbol_parse().
void symbolic_constant_print | ( | const struct symbol_table * | tbl, |
const struct expr * | expr | ||
) |
References BITS_PER_BYTE, expr::byteorder, expr_basetype(), symbolic_constant::identifier, expr::len, mpz_export_data(), NULL, datatype::print, s, symbol_table::symbols, symbolic_constant::value, and expr::value.
Referenced by datatype_print().
Referenced by ct_expr_update_type().
Referenced by constant_expr_join(), constant_expr_splice(), map_expr_alloc(), netlink_alloc_value(), prefix_expr_alloc(), range_expr_alloc(), symbol_expr_alloc(), and unary_expr_alloc().
Referenced by ct_expr_update_type().
const struct datatype ipaddr_type |
Referenced by relational_expr_alloc(), and verdict_expr_alloc().