#include "filter.h"
#include "bitops.h"
#include "jhash.h"
#include "hash.h"
#include "vector.h"
#include "conntrackd.h"
#include "log.h"
#include <libnetfilter_conntrack/libnetfilter_conntrack.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <limits.h>
Data Structures | |
struct | ct_filter |
struct | exp_filter |
struct | exp_filter_item |
Macros | |
#define | FILTER_POOL_SIZE 128 |
#define | FILTER_POOL_LIMIT INT_MAX |
Functions | |
struct ct_filter * | ct_filter_create (void) |
void | ct_filter_destroy (struct ct_filter *filter) |
void | ct_filter_set_logic (struct ct_filter *filter, enum ct_filter_type type, enum ct_filter_logic logic) |
int | ct_filter_add_ip (struct ct_filter *filter, void *data, uint8_t family) |
int | ct_filter_add_netmask (struct ct_filter *filter, void *data, uint8_t family) |
void | ct_filter_add_proto (struct ct_filter *f, int protonum) |
void | ct_filter_add_state (struct ct_filter *f, int protonum, int val) |
int | ct_filter_conntrack (const struct nf_conntrack *ct, int userspace) |
int | ct_filter_master (const struct nf_conntrack *master) |
struct exp_filter * | exp_filter_create (void) |
int | exp_filter_add (struct exp_filter *f, const char *helper_name) |
int | exp_filter_find (struct exp_filter *f, const struct nf_expect *exp) |
#define FILTER_POOL_LIMIT INT_MAX |
Referenced by ct_filter_create().
#define FILTER_POOL_SIZE 128 |
Referenced by ct_filter_create().
References ct_filter::h, ct_filter::h6, hashtable_add(), hashtable_find(), hashtable_hash(), id, ct_filter_ipv4_hnode::ip, ct_filter_ipv6_hnode::ipv6, ct_filter_ipv6_hnode::node, ct_filter_ipv4_hnode::node, and NULL.
References ct_filter::v, ct_filter::v6, vector_add(), and vector_iterate().
References ct_filter::l4protomap.
References ct_filter::statemap.
int ct_filter_conntrack | ( | const struct nf_conntrack * | ct, |
int | userspace | ||
) |
References STATE.
References CT_FILTER_MAX, FILTER_POOL_LIMIT, FILTER_POOL_SIZE, ct_filter::h, ct_filter::h6, hashtable_create(), ct_filter::logic, NULL, ct_filter::v, ct_filter::v6, and vector_create().
References ct_filter::h, ct_filter::h6, hashtable_destroy(), ct_filter::v, ct_filter::v6, and vector_destroy().
Referenced by ctnl_kill().
int ct_filter_master | ( | const struct nf_conntrack * | master | ) |
References STATE.
void ct_filter_set_logic | ( | struct ct_filter * | filter, |
enum ct_filter_type | type, | ||
enum ct_filter_logic | logic | ||
) |
References ct_filter::logic, and type.
int exp_filter_add | ( | struct exp_filter * | f, |
const char * | helper_name | ||
) |
struct exp_filter* exp_filter_create | ( | void | ) |
References INIT_LIST_HEAD, exp_filter::list, and NULL.
int exp_filter_find | ( | struct exp_filter * | f, |
const struct nf_expect * | exp | ||
) |
References ATTR_EXP_HELPER_NAME, exp_filter_item::head, exp_filter_item::helper_name, exp_filter::list, list_for_each_entry, name, nfexp_attr_is_set(), nfexp_get_attr(), and NULL.