Data Structures | |
struct | datatype |
struct | symbolic_constant |
struct symbolic_constant - symbol <-> constant mapping More... | |
struct | symbol_table |
struct symbol_table - type construction from symbolic values More... | |
Macros | |
#define | TYPE_MAX (__TYPE_MAX - 1) |
#define | TYPE_BITS 6 |
#define | TYPE_MASK ((1 << TYPE_BITS) - 1) |
Enumerations | |
enum | datatypes { TYPE_INVALID, TYPE_VERDICT, TYPE_NFPROTO, TYPE_BITMASK, TYPE_INTEGER, TYPE_STRING, TYPE_LLADDR, TYPE_IPADDR, TYPE_IP6ADDR, TYPE_ETHERADDR, TYPE_ETHERTYPE, TYPE_ARPOP, TYPE_INET_PROTOCOL, TYPE_INET_SERVICE, TYPE_ICMP_TYPE, TYPE_TCP_FLAG, TYPE_DCCP_PKTTYPE, TYPE_MH_TYPE, TYPE_TIME, TYPE_MARK, TYPE_IFINDEX, TYPE_ARPHRD, TYPE_REALM, TYPE_TC_HANDLE, TYPE_UID, TYPE_GID, TYPE_CT_STATE, TYPE_CT_DIR, TYPE_CT_STATUS, TYPE_ICMP6_TYPE, TYPE_CT_LABEL, TYPE_PKTTYPE, TYPE_ICMP_CODE, TYPE_ICMPV6_CODE, TYPE_ICMPX_CODE, TYPE_DEVGROUP, __TYPE_MAX } |
enum datatypes More... | |
enum | byteorder { BYTEORDER_INVALID, BYTEORDER_HOST_ENDIAN, BYTEORDER_BIG_ENDIAN } |
enum byteorder More... | |
enum | datatype_flags { DTYPE_F_ALLOC = (1 << 0), DTYPE_F_PREFIX = (1 << 1) } |
enum datatype_flags More... | |
#define SYMBOL_LIST_END (struct symbolic_constant) { } |
Referenced by rt_symbol_table_init().
#define TYPE_BITS 6 |
Referenced by concat_type_alloc().
#define TYPE_MASK ((1 << TYPE_BITS) - 1) |
Referenced by datatype_register().
#define TYPE_MAX (__TYPE_MAX - 1) |
Referenced by datatype_lookup(), datatype_lookup_byname(), and datatype_register().
enum byteorder |
enum datatype_flags |
enum datatypes |
enum datatypes
: uninitialized : nftables verdict : netfilter protocol (integer subtype) : bitmask : integer : string : link layer address (integer subtype) : IPv4 address (integer subtype) : IPv6 address (integer subtype) : Ethernet address (lladdr subtype) : EtherType (integer subtype) : ARP operation (integer subtype) : internet protocol (integer subtype) : internet service (integer subtype) : ICMP type codes (integer subtype) : TCP flag (bitmask subtype) : DCCP packet type (integer subtype) : Mobility Header type (integer subtype) : relative time : packet mark (integer subtype) : interface index (integer subtype) : interface type (integer subtype) : routing realm (integer subtype) : TC handle (integer subtype) : user ID (integer subtype) : group ID (integer subtype) : conntrack state (bitmask subtype) : conntrack direction : conntrack status (bitmask subtype) : ICMPv6 type codes (integer subtype) : Conntrack Label (bitmask subtype) : packet type (integer subtype) : icmp code (integer subtype) : icmpv6 code (integer subtype) : icmpx code (integer subtype) : devgroup code (integer subtype)
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 payload_gen_dependency().
Referenced by ct_expr_update_type().
Referenced by ct_expr_update_type().
const struct datatype ipaddr_type |
Referenced by relational_expr_alloc(), and verdict_expr_alloc().