#include "internal.h"
#include "expr_ops.h"
#include <time.h>
#include <endian.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#include <libmnl/libmnl.h>
#include <linux/netfilter/nfnetlink.h>
#include <linux/netfilter/nf_tables.h>
#include <libnftnl/expr.h>
#include "linux_list.h"
EXPORT_SYMBOL | ( | nft_rule_expr_alloc | ) |
EXPORT_SYMBOL | ( | nft_rule_expr_free | ) |
EXPORT_SYMBOL | ( | nft_rule_expr_is_set | ) |
EXPORT_SYMBOL | ( | nft_rule_expr_set | ) |
EXPORT_SYMBOL | ( | nft_rule_expr_set_u8 | ) |
EXPORT_SYMBOL | ( | nft_rule_expr_set_u16 | ) |
EXPORT_SYMBOL | ( | nft_rule_expr_set_u32 | ) |
EXPORT_SYMBOL | ( | nft_rule_expr_set_u64 | ) |
EXPORT_SYMBOL | ( | nft_rule_expr_set_str | ) |
EXPORT_SYMBOL | ( | nft_rule_expr_get | ) |
EXPORT_SYMBOL | ( | nft_rule_expr_get_u8 | ) |
EXPORT_SYMBOL | ( | nft_rule_expr_get_u16 | ) |
EXPORT_SYMBOL | ( | nft_rule_expr_get_u32 | ) |
EXPORT_SYMBOL | ( | nft_rule_expr_get_u64 | ) |
EXPORT_SYMBOL | ( | nft_rule_expr_get_str | ) |
EXPORT_SYMBOL | ( | nft_rule_expr_build_payload | ) |
EXPORT_SYMBOL | ( | nft_rule_expr_snprintf | ) |
struct nft_rule_expr* nft_rule_expr_alloc | ( | const char * | name | ) |
References expr_ops::alloc_len, nft_rule_expr::flags, nft_expr_ops_lookup(), NFT_RULE_EXPR_ATTR_NAME, NULL, and nft_rule_expr::ops.
Referenced by add_bitwise_u16(), add_cmp_ptr(), add_counters(), add_jumpto(), add_match(), add_meta(), add_payload(), add_target(), add_verdict(), and alloc_nft_expr().
void nft_rule_expr_build_payload | ( | struct nlmsghdr * | nlh, |
struct nft_rule_expr * | expr | ||
) |
References expr_ops::build, mnl_attr_nest_end(), mnl_attr_nest_start(), mnl_attr_put_strz(), expr_ops::name, NFTA_EXPR_DATA, NFTA_EXPR_NAME, NFTA_LIST_ELEM, and nft_rule_expr::ops.
Referenced by nft_rule_nlmsg_build_payload().
void nft_rule_expr_free | ( | struct nft_rule_expr * | expr | ) |
References expr_ops::free, nft_rule_expr::ops, and xfree.
Referenced by nft_rule_free().
const void* nft_rule_expr_get | ( | const struct nft_rule_expr * | expr, |
uint16_t | type, | ||
uint32_t * | data_len | ||
) |
References nft_rule_expr::flags, expr_ops::get, expr_ops::name, NFT_RULE_EXPR_ATTR_NAME, NULL, and nft_rule_expr::ops.
Referenced by get_cmp_data(), nft_parse_bitwise(), nft_parse_target(), nft_rule_expr_get_str(), nft_rule_expr_get_u16(), nft_rule_expr_get_u32(), nft_rule_expr_get_u64(), nft_rule_expr_get_u8(), and parse_meta().
const char* nft_rule_expr_get_str | ( | const struct nft_rule_expr * | expr, |
uint16_t | type | ||
) |
References nft_rule_expr_get().
Referenced by nft_parse_immediate(), nft_parse_target(), nft_rule_to_arptables_command_state(), nft_rule_to_iptables_command_state(), and nft_set_lookup_id().
uint16_t nft_rule_expr_get_u16 | ( | const struct nft_rule_expr * | expr, |
uint16_t | type | ||
) |
uint32_t nft_rule_expr_get_u32 | ( | const struct nft_rule_expr * | expr, |
uint16_t | type | ||
) |
References data, nft_rule_expr_get(), and NULL.
Referenced by get_cmp_data(), nft_parse_bitwise(), nft_parse_cmp(), nft_parse_immediate(), nft_parse_meta(), nft_parse_payload(), nft_parse_target(), and parse_meta().
uint64_t nft_rule_expr_get_u64 | ( | const struct nft_rule_expr * | expr, |
uint16_t | type | ||
) |
References data, nft_rule_expr_get(), and NULL.
Referenced by nft_parse_counter().
uint8_t nft_rule_expr_get_u8 | ( | const struct nft_rule_expr * | expr, |
uint16_t | type | ||
) |
bool nft_rule_expr_is_set | ( | const struct nft_rule_expr * | expr, |
uint16_t | type | ||
) |
References nft_rule_expr::flags, and type.
void nft_rule_expr_set | ( | struct nft_rule_expr * | expr, |
uint16_t | type, | ||
const void * | data, | ||
uint32_t | data_len | ||
) |
References nft_rule_expr::flags, NFT_RULE_EXPR_ATTR_NAME, nft_rule_expr::ops, expr_ops::set, and type.
Referenced by add_bitwise_u16(), add_cmp_ptr(), nft_rule_expr_set_str(), nft_rule_expr_set_u16(), nft_rule_expr_set_u32(), nft_rule_expr_set_u64(), and nft_rule_expr_set_u8().
void nft_rule_expr_set_str | ( | struct nft_rule_expr * | expr, |
uint16_t | type, | ||
const char * | str | ||
) |
References nft_rule_expr_set().
Referenced by add_jumpto().
void nft_rule_expr_set_u16 | ( | struct nft_rule_expr * | expr, |
uint16_t | type, | ||
uint16_t | data | ||
) |
void nft_rule_expr_set_u32 | ( | struct nft_rule_expr * | expr, |
uint16_t | type, | ||
uint32_t | data | ||
) |
References nft_rule_expr_set().
Referenced by add_bitwise_u16(), add_cmp_ptr(), add_jumpto(), add_meta(), add_payload(), and add_verdict().
void nft_rule_expr_set_u64 | ( | struct nft_rule_expr * | expr, |
uint16_t | type, | ||
uint64_t | data | ||
) |
References nft_rule_expr_set().
Referenced by add_counters().
void nft_rule_expr_set_u8 | ( | struct nft_rule_expr * | expr, |
uint16_t | type, | ||
uint8_t | data | ||
) |
int nft_rule_expr_snprintf | ( | char * | buf, |
size_t | size, | ||
struct nft_rule_expr * | expr, | ||
uint32_t | type, | ||
uint32_t | flags | ||
) |
References len, nft_rule_expr::ops, size, expr_ops::snprintf, and SNPRINTF_BUFFER_SIZE.
Referenced by netlink_dump_expr().