#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <limits.h>
#include <expression.h>
#include <datatype.h>
#include <rule.h>
#include <gmputil.h>
#include <utils.h>
#include <list.h>
#include <erec.h>
Variables | |
const char * | expr_op_symbols [] |
int __fmtstring | ( | 4 | , |
5 | |||
) |
References erec_add_location(), EREC_ERROR, erec_vcreate(), and NULL.
struct expr* binop_expr_alloc | ( | const struct location * | loc, |
enum ops | op, | ||
struct expr * | left, | ||
struct expr * | right | ||
) |
References expr::byteorder, expr::dtype, expr_alloc(), expr::left, expr::op, and expr::right.
Referenced by bitmask_expr_to_binops().
References datatype::basetype, binop_expr_alloc(), expr::byteorder, expr::dtype, expr_free(), EXPR_VALUE, flag_expr_alloc(), expr::len, expr::location, mpz_popcount(), mpz_scan1(), NULL, OP_OR, expr::ops, expr_ops::type, datatype::type, TYPE_BITMASK, and expr::value.
References expr::expressions, expr::list, and expr::size.
Referenced by interval_map_decompose().
References expr::list, and expr::size.
Referenced by interval_map_decompose().
struct expr* constant_expr_alloc | ( | const struct location * | loc, |
const struct datatype * | dtype, | ||
enum byteorder byteorder | , | ||
unsigned int | len, | ||
const void * | data | ||
) |
References BITS_PER_BYTE, div_round_up, expr_alloc(), EXPR_F_CONSTANT, EXPR_F_SINGLETON, expr::flags, mpz_import_data(), mpz_init2(), NULL, and expr::value.
Referenced by constant_expr_join(), constant_expr_splice(), flag_expr_alloc(), interval_map_decompose(), netlink_alloc_value(), payload_gen_dependency(), and symbolic_constant_parse().
References BITS_PER_BYTE, expr::byteorder, BYTEORDER_INVALID, constant_expr_alloc(), data, EXPR_VALUE, invalid_type, len, expr::len, expr::location, mpz_export_data(), expr::ops, expr_ops::type, and expr::value.
References BYTEORDER_INVALID, constant_expr_alloc(), EXPR_VALUE, invalid_type, len, expr::len, expr::location, mask, mpz_and(), mpz_bitmask(), mpz_clear(), mpz_init2(), mpz_lshift_ui(), mpz_rshift_ui(), mpz_set(), NULL, expr::ops, expr_ops::type, and expr::value.
struct expr* expr_alloc | ( | const struct location * | loc, |
const struct expr_ops * | ops, | ||
const struct datatype * | dtype, | ||
enum byteorder byteorder | , | ||
unsigned int | len | ||
) |
References expr::byteorder, expr::dtype, len, expr::len, expr::list, expr::location, expr::ops, expr::refcnt, and xzalloc().
Referenced by binop_expr_alloc(), constant_expr_alloc(), ct_expr_alloc(), expr_clone(), exthdr_expr_alloc(), map_expr_alloc(), mapping_expr_alloc(), meta_expr_alloc(), payload_expr_alloc(), prefix_expr_alloc(), range_expr_alloc(), relational_expr_alloc(), set_ref_expr_alloc(), symbol_expr_alloc(), unary_expr_alloc(), and verdict_expr_alloc().
References datatype::basetype, expr::dtype, NULL, and type.
Referenced by expr_describe(), and symbolic_constant_print().
References expr::byteorder, expr_ops::clone, expr::dtype, expr_alloc(), expr::flags, expr::len, expr::location, expr::op, and expr::ops.
Referenced by interval_map_decompose().
References expr_ops::cmp, EXPR_F_SINGLETON, expr::flags, expr::ops, and expr_ops::type.
References datatype::basetype, BITS_PER_BYTE, datatype::desc, expr::dtype, expr_basetype(), expr::len, expr_ops::name, datatype::name, NULL, expr::ops, datatype::sym_tbl, symbol_table_print(), and TYPE_STRING.
References expr_ops::destroy, NULL, expr::ops, expr::refcnt, and xfree.
Referenced by bitmask_expr_to_binops(), cmd_free(), interval_map_decompose(), scope_release(), and set_free().
References expr::refcnt.
Referenced by interval_map_decompose().
References expr::ops, and expr_ops::print.
Referenced by set_to_intervals().
References expr::byteorder, expr::dtype, expr::ops, and expr_ops::set_type.
struct expr* flag_expr_alloc | ( | const struct location * | loc, |
const struct datatype * | dtype, | ||
enum byteorder byteorder | , | ||
unsigned int | len, | ||
unsigned long | n | ||
) |
References constant_expr_alloc(), mpz_lshift_ui(), mpz_set_ui(), NULL, and expr::value.
Referenced by bitmask_expr_to_binops().
struct expr* map_expr_alloc | ( | const struct location * | loc, |
struct expr * | arg, | ||
struct expr * | mappings | ||
) |
References expr::arg, BYTEORDER_INVALID, expr_alloc(), invalid_type, expr::map, and expr::mappings.
struct expr* mapping_expr_alloc | ( | const struct location * | loc, |
struct expr * | from, | ||
struct expr * | to | ||
) |
References expr::byteorder, expr::dtype, expr_alloc(), expr::left, and expr::right.
Referenced by interval_map_decompose().
struct expr* prefix_expr_alloc | ( | const struct location * | loc, |
struct expr * | expr, | ||
unsigned int | prefix_len | ||
) |
References BYTEORDER_INVALID, expr_alloc(), invalid_type, expr::prefix, and expr::prefix_len.
Referenced by interval_map_decompose().
struct expr* range_expr_alloc | ( | const struct location * | loc, |
struct expr * | left, | ||
struct expr * | right | ||
) |
References BYTEORDER_INVALID, expr_alloc(), invalid_type, expr::left, and expr::right.
Referenced by interval_map_decompose().
References BUG, EXPR_MAPPING, EXPR_PREFIX, EXPR_RANGE, EXPR_VALUE, expr::left, expr::len, mpz_add(), mpz_clear(), mpz_init_bitmask(), mpz_set(), expr_ops::name, expr::ops, expr::prefix, expr::prefix_len, range_expr_value_low(), expr::right, expr_ops::type, and expr::value.
References BUG, EXPR_MAPPING, EXPR_PREFIX, EXPR_RANGE, EXPR_VALUE, expr::left, mpz_set(), expr_ops::name, expr::ops, expr::prefix, expr_ops::type, and expr::value.
Referenced by range_expr_value_high().
struct expr* relational_expr_alloc | ( | const struct location * | loc, |
enum ops | op, | ||
struct expr * | left, | ||
struct expr * | right | ||
) |
References BYTEORDER_INVALID, expr_alloc(), expr::left, expr::op, expr::right, and verdict_type.
Referenced by payload_gen_dependency().
References expr_alloc(), EXPR_F_CONSTANT, expr::flags, set::keytype, expr::set, and set_get().
struct expr* symbol_expr_alloc | ( | const struct location * | loc, |
enum symbol_types | type, | ||
struct scope * | scope, | ||
const char * | identifier | ||
) |
References BYTEORDER_INVALID, expr_alloc(), expr::identifier, invalid_type, expr::scope, expr::symtype, type, and xstrdup().
References expr::arg, BYTEORDER_INVALID, expr_alloc(), invalid_type, and expr::op.
References BYTEORDER_INVALID, expr::chain, expr_alloc(), EXPR_F_CONSTANT, EXPR_F_SINGLETON, expr::flags, NULL, verdict, expr::verdict, and verdict_type.
const char* expr_op_symbols[] |