25 #define MAX_NUM_PORTS 10 26 #define MAX_NUM_RULES 0x7FFFFFFF 27 #define MAX_NUM_USER_RULES (MAX_NUM_RULES-2) 29 #define DEFAULT_RULE_ID (MAX_NUM_RULES-2) 30 #define INIT_RULE_ID (MAX_NUM_RULES-1) 51 #define RRC_INIT_FLAG_PORTMASK (0 << 1) 65 #define EGRESS_TRAFFIC_FILTERING EGRESS_TRAFFIC 66 #define INGRESS_TRAFFIC_STEERING INGRESS_TRAFFIC 77 u_int8_t u6_addr8[16];
78 u_int16_t u6_addr16[8];
79 u_int32_t u6_addr32[4];
110 rrc_port_range_t sport;
111 rrc_port_range_t dport;
115 typedef struct rrc_port rrc_port_t;
139 int rrc_add_default_rule(rrc_port_t *port, rrc_filter_type_t type, rrc_policy_t action,
int redirectPortNumber);
152 int rrc_add_rule(rrc_port_t *port,
int ruleNumber, rrc_filter_type_t type, rrc_match_t *rule, rrc_policy_t action,
int redirectPortNumber);
165 int rrc_add_nbpf_rule(rrc_port_t *port,
int ruleNumber, rrc_filter_type_t type, nbpf_rule_core_fields_t *nBPFRule, rrc_policy_t action,
int redirectPortNumber);
175 int rrc_remove_rule(rrc_port_t *port,
int ruleNumber, rrc_filter_type_t type);
196 int rrc_read_rule_stats(rrc_port_t *port,
int ruleNumber, rrc_filter_type_t type, rrc_stats_t *stats);
227 int rrc_add_mirror(rrc_port_t *in_port, rrc_port_t *out_port, rrc_match_t *rule);
void rrc_dump_rules(rrc_port_t *port, rrc_filter_type_t type)
int rrc_read_rule_stats(rrc_port_t *port, int ruleNumber, rrc_filter_type_t type, rrc_stats_t *stats)
int rrc_ifname_to_phys_port(const char *ifname)
void rrc_set_log_file(FILE *f)
void rrc_set_log_level(u_int8_t l)
int rrc_port_apply(rrc_port_t *port, rrc_filter_type_t type)
Definition: pf_ring.h:259
int rrc_add_default_rule(rrc_port_t *port, rrc_filter_type_t type, rrc_policy_t action, int redirectPortNumber)
rrc_port_t * rrc_port_get(int portNumber)
int rrc_set_load_balancer(rrc_port_t *out_ports, int num_out_ports, rrc_match_t *r)
int rrc_remove_mirror(rrc_port_t *out_port)
int rrc_add_rule(rrc_port_t *port, int ruleNumber, rrc_filter_type_t type, rrc_match_t *rule, rrc_policy_t action, int redirectPortNumber)
int rrc_get_external_phys_port(int internal_phys_port)
int rrc_add_nbpf_rule(rrc_port_t *port, int ruleNumber, rrc_filter_type_t type, nbpf_rule_core_fields_t *nBPFRule, rrc_policy_t action, int redirectPortNumber)
int rrc_remove_rule(rrc_port_t *port, int ruleNumber, rrc_filter_type_t type)
int rrc_read_port_stats(rrc_port_t *port, rrc_stats_t *stats)
int rrc_get_internal_phys_port(int external_phys_port)
int rrc_add_mirror(rrc_port_t *in_port, rrc_port_t *out_port, rrc_match_t *rule)
int rrc_init(u_int32_t flags)
int rrc_remove_all_rules(rrc_port_t *port, rrc_filter_type_t type)