16 #ifndef included_vnet_flow_flow_h 17 #define included_vnet_flow_flow_h 25 #define foreach_flow_type \ 26 _(IP4_N_TUPLE, ip4_n_tuple, "ipv4-n-tuple") \ 27 _(IP6_N_TUPLE, ip6_n_tuple, "ipv6-n-tuple") \ 28 _(IP4_VXLAN, ip4_vxlan, "ipv4-vxlan") \ 29 _(IP6_VXLAN, ip6_vxlan, "ipv6-vxlan") 31 #define foreach_flow_entry_ip4_n_tuple \ 32 _fe(ip4_address_and_mask_t, src_addr) \ 33 _fe(ip4_address_and_mask_t, dst_addr) \ 34 _fe(ip_port_and_mask_t, src_port) \ 35 _fe(ip_port_and_mask_t, dst_port) \ 36 _fe(ip_protocol_t, protocol) 38 #define foreach_flow_entry_ip6_n_tuple \ 39 _fe(ip6_address_and_mask_t, src_addr) \ 40 _fe(ip6_address_and_mask_t, dst_addr) \ 41 _fe(ip_port_and_mask_t, src_port) \ 42 _fe(ip_port_and_mask_t, dst_port) \ 43 _fe(ip_protocol_t, protocol) 45 #define foreach_flow_entry_ip4_vxlan \ 46 _fe(ip4_address_t, src_addr) \ 47 _fe(ip4_address_t, dst_addr) \ 51 #define foreach_flow_entry_ip6_vxlan \ 52 _fe(ip6_address_t, src_addr) \ 53 _fe(ip6_address_t, dst_addr) \ 57 #define foreach_flow_action \ 58 _(0, COUNT, "count") \ 60 _(2, BUFFER_ADVANCE, "buffer-advance") \ 61 _(3, REDIRECT_TO_NODE, "redirect-to-node") \ 62 _(4, REDIRECT_TO_QUEUE, "redirect-to-queue") \ 67 #define _(v,n,s) VNET_FLOW_ACTION_##n = (1 << v), 73 #define foreach_flow_error \ 74 _( -1, NOT_SUPPORTED, "not supported") \ 75 _( -2, ALREADY_DONE, "already done") \ 76 _( -3, ALREADY_EXISTS, "already exists") \ 77 _( -4, NO_SUCH_ENTRY, "no such entry") \ 78 _( -5, NO_SUCH_INTERFACE, "no such interface") \ 79 _( -6, INTERNAL, "internal error") 84 #define _(v,n,s) VNET_FLOW_ERROR_##n = v, 97 #define _(a,b,c) VNET_FLOW_TYPE_##a, 107 #define _fe(a, b) a b; 111 foreach_flow_entry_##b \ 144 #define _(a,b,c) vnet_flow_##b##_t b;
int vnet_flow_get_range(vnet_main_t *vnm, char *owner, u32 count, u32 *start)
PCAP utility definitions.
#define foreach_flow_type
vnet_flow_t * global_flow_pool
int vnet_flow_enable(vnet_main_t *vnm, u32 flow_index, u32 hw_if_index)
vnet_flow_range_t * ranges
vnet_flow_main_t flow_main
format_function_t format_flow_actions
vnet_flow_t * vnet_get_flow(u32 flow_index)
int vnet_flow_del(vnet_main_t *vnm, u32 flow_index)
int vnet_flow_add(vnet_main_t *vnm, vnet_flow_t *flow, u32 *flow_index)
format_function_t format_flow_enabled_hw
#define foreach_flow_error
int vnet_flow_disable(vnet_main_t *vnm, u32 flow_index, u32 hw_if_index)
#define foreach_flow_action
u32 redirect_device_input_next_index