33 #include <vnet/flow/flow.api_enum.h>
34 #include <vnet/flow/flow.api_types.h>
36 #define REPLY_MSG_ID_BASE flow_main.msg_id_base
43 clib_memcpy (vnet_addr, vl_api_addr,
sizeof (*vnet_addr));
50 clib_memcpy (vnet_addr, vl_api_addr,
sizeof (*vnet_addr));
58 vnet_protocol->
mask = vl_api_protocol->mask;
65 vnet_port->
port =
ntohs (vl_api_port->port);
66 vnet_port->
mask =
ntohs (vl_api_port->mask);
89 vnet_flow_ip4_n_tuple_t *
f)
101 vnet_flow_ip6_n_tuple_t *
f)
114 vnet_flow_ip4_n_tuple_tagged_t *
f)
117 (vnet_flow_ip4_n_tuple_t *)
f);
123 vnet_flow_ip6_n_tuple_tagged_t *
f)
126 (vnet_flow_ip6_n_tuple_t *)
f);
131 vnet_flow_ip4_l2tpv3oip_t *
f)
137 f->session_id = ntohl (vl_api_flow->session_id);
142 vnet_flow_ip4_ipsec_esp_t *
f)
148 f->spi = ntohl (vl_api_flow->spi);
153 vnet_flow_ip4_ipsec_ah_t *
f)
159 f->spi = ntohl (vl_api_flow->spi);
164 vnet_flow_ip4_vxlan_t *
f)
173 f->vni = ntohl (vl_api_flow->vni);
178 vnet_flow_ip6_vxlan_t *
f)
187 f->vni = ntohl (vl_api_flow->vni);
192 vnet_flow_ip4_gtpu_t *
f)
201 f->teid = ntohl (vl_api_flow->teid);
206 vnet_flow_ip4_gtpc_t *
f)
215 f->teid = ntohl (vl_api_flow->teid);
225 vl_api_flow_rule_t *
f = &mp->
flow;
229 flow.type = ntohl (
f->type);
230 flow.actions = ntohl (
f->actions);
231 flow.mark_flow_id = ntohl (
f->mark_flow_id);
232 flow.redirect_node_index = ntohl (
f->redirect_node_index);
233 flow.redirect_device_input_next_index =
234 ntohl (
f->redirect_device_input_next_index);
235 flow.redirect_queue = ntohl (
f->redirect_queue);
236 flow.buffer_advance = ntohl (
f->buffer_advance);
240 case VNET_FLOW_TYPE_IP4:
243 case VNET_FLOW_TYPE_IP6:
246 case VNET_FLOW_TYPE_IP4_N_TUPLE:
249 case VNET_FLOW_TYPE_IP6_N_TUPLE:
252 case VNET_FLOW_TYPE_IP4_N_TUPLE_TAGGED:
256 case VNET_FLOW_TYPE_IP6_N_TUPLE_TAGGED:
260 case VNET_FLOW_TYPE_IP4_L2TPV3OIP:
264 case VNET_FLOW_TYPE_IP4_IPSEC_ESP:
268 case VNET_FLOW_TYPE_IP4_IPSEC_AH:
271 case VNET_FLOW_TYPE_IP4_VXLAN:
274 case VNET_FLOW_TYPE_IP6_VXLAN:
277 case VNET_FLOW_TYPE_IP4_GTPU:
280 case VNET_FLOW_TYPE_IP4_GTPC:
284 rv = VNET_FLOW_ERROR_NOT_SUPPORTED;
338 #include <vnet/flow/flow.api.c>