FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
flow_types.api
Go to the documentation of this file.
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
3  * Copyright (c) 2020 Intel and/or its affiliates.
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 option version = "0.0.3";
18 import "vnet/ethernet/ethernet_types.api";
19 import "vnet/ip/ip_types.api";
20 
22 {
37 };
38 
40 {
47 };
48 
49 typedef ip_port_and_mask
50 {
51  u16 port;
53 };
54 
55 typedef ip_prot_and_mask
56 {
57  vl_api_ip_proto_t prot;
58  u8 mask;
59 };
60 
61 typedef flow_ethernet
62 {
63  i32 foo;
64  vl_api_mac_address_t src_addr;
65  vl_api_mac_address_t dst_addr;
67 };
68 
69 typedef flow_ip4
70 {
71  i32 foo;
72  vl_api_ip4_address_and_mask_t src_addr;
73  vl_api_ip4_address_and_mask_t dst_addr;
74  vl_api_ip_prot_and_mask_t protocol;
75 };
76 
77 typedef flow_ip6
78 {
79  i32 foo;
80  vl_api_ip6_address_and_mask_t src_addr;
81  vl_api_ip6_address_and_mask_t dst_addr;
82  vl_api_ip_prot_and_mask_t protocol;
83 };
84 
85 typedef flow_ip4_n_tuple
86 {
87  i32 foo;
88  vl_api_ip4_address_and_mask_t src_addr;
89  vl_api_ip4_address_and_mask_t dst_addr;
90  vl_api_ip_prot_and_mask_t protocol;
91  vl_api_ip_port_and_mask_t src_port;
92  vl_api_ip_port_and_mask_t dst_port;
93 };
94 
95 typedef flow_ip6_n_tuple
96 {
97  i32 foo;
98  vl_api_ip6_address_and_mask_t src_addr;
99  vl_api_ip6_address_and_mask_t dst_addr;
100  vl_api_ip_prot_and_mask_t protocol;
101  vl_api_ip_port_and_mask_t src_port;
102  vl_api_ip_port_and_mask_t dst_port;
103 };
104 
106 {
107  i32 foo;
108  vl_api_ip4_address_and_mask_t src_addr;
109  vl_api_ip4_address_and_mask_t dst_addr;
110  vl_api_ip_prot_and_mask_t protocol;
111  vl_api_ip_port_and_mask_t src_port;
112  vl_api_ip_port_and_mask_t dst_port;
113 };
114 
116 {
117  i32 foo;
118  vl_api_ip6_address_and_mask_t src_addr;
119  vl_api_ip6_address_and_mask_t dst_addr;
120  vl_api_ip_prot_and_mask_t protocol;
121  vl_api_ip_port_and_mask_t src_port;
122  vl_api_ip_port_and_mask_t dst_port;
123 };
124 
125 typedef flow_ip4_l2tpv3oip
126 {
127  i32 foo;
128  vl_api_ip4_address_and_mask_t src_addr;
129  vl_api_ip4_address_and_mask_t dst_addr;
130  vl_api_ip_prot_and_mask_t protocol;
132 };
133 
134 typedef flow_ip4_ipsec_esp
135 {
136  i32 foo;
137  vl_api_ip4_address_and_mask_t src_addr;
138  vl_api_ip4_address_and_mask_t dst_addr;
139  vl_api_ip_prot_and_mask_t protocol;
141 };
142 
143 typedef flow_ip4_ipsec_ah
144 {
145  i32 foo;
146  vl_api_ip4_address_and_mask_t src_addr;
147  vl_api_ip4_address_and_mask_t dst_addr;
148  vl_api_ip_prot_and_mask_t protocol;
149  u32 spi;
150 };
151 
152 typedef flow_ip4_vxlan
153 {
154  i32 foo;
155  vl_api_ip4_address_and_mask_t src_addr;
156  vl_api_ip4_address_and_mask_t dst_addr;
157  vl_api_ip_prot_and_mask_t protocol;
158  vl_api_ip_port_and_mask_t src_port;
159  vl_api_ip_port_and_mask_t dst_port;
161 };
162 
163 typedef flow_ip6_vxlan
164 {
165  i32 foo;
166  vl_api_ip6_address_and_mask_t src_addr;
167  vl_api_ip6_address_and_mask_t dst_addr;
168  vl_api_ip_prot_and_mask_t protocol;
169  vl_api_ip_port_and_mask_t src_port;
170  vl_api_ip_port_and_mask_t dst_port;
171  u32 vni;
172 };
173 
174 typedef flow_ip4_gtpc
175 {
176  i32 foo;
177  vl_api_ip4_address_and_mask_t src_addr;
178  vl_api_ip4_address_and_mask_t dst_addr;
179  vl_api_ip_prot_and_mask_t protocol;
180  vl_api_ip_port_and_mask_t src_port;
181  vl_api_ip_port_and_mask_t dst_port;
183 };
184 
185 typedef flow_ip4_gtpu
186 {
187  i32 foo;
188  vl_api_ip4_address_and_mask_t src_addr;
189  vl_api_ip4_address_and_mask_t dst_addr;
190  vl_api_ip_prot_and_mask_t protocol;
191  vl_api_ip_port_and_mask_t src_port;
192  vl_api_ip_port_and_mask_t dst_port;
193  u32 teid;
194 };
195 
196 union flow
197 {
198  vl_api_flow_ethernet_t ethernet;
199  vl_api_flow_ip4_t ip4;
200  vl_api_flow_ip6_t ip6;
201  vl_api_flow_ip4_l2tpv3oip_t ip4_l2tpv3oip;
202  vl_api_flow_ip4_ipsec_esp_t ip4_ipsec_esp;
203  vl_api_flow_ip4_ipsec_ah_t ip4_ipsec_ah;
204  vl_api_flow_ip4_n_tuple_t ip4_n_tuple;
205  vl_api_flow_ip6_n_tuple_t ip6_n_tuple;
206  vl_api_flow_ip4_n_tuple_tagged_t ip4_n_tuple_tagged;
207  vl_api_flow_ip6_n_tuple_tagged_t ip6_n_tuple_tagged;
208  vl_api_flow_ip4_vxlan_t ip4_vxlan;
209  vl_api_flow_ip6_vxlan_t ip6_vxlan;
210  vl_api_flow_ip4_gtpc_t ip4_gtpc;
211  vl_api_flow_ip4_gtpu_t ip4_gtpu;
212 };
213 
214 /* main flow struct */
215 typedef flow_rule
216 {
217  /* flow type */
218  vl_api_flow_type_t type;
219 
220  /* flow index */
222 
223  /* bitmap of flow actions (FLOW_ACTION_*) */
224  vl_api_flow_action_t actions;
225 
226  /* flow id for VNET_FLOW_ACTION_MARK */
228 
229  /* node index and next index for FLOW_ACTION_REDIRECT_TO_NODE */
232 
233  /* queue for FLOW_ACTION_REDIRECT_TO_QUEUE */
235 
236  /* buffer offset for FLOW_ACTION_BUFFER_ADVANCE */
238 
239  /* flow enum */
240  vl_api_flow_t flow;
241 };
242 
flow::ip4_n_tuple_tagged
vl_api_flow_ip4_n_tuple_tagged_t ip4_n_tuple_tagged
Definition: flow_types.api:206
flow::ip4_n_tuple
vl_api_flow_ip4_n_tuple_t ip4_n_tuple
Definition: flow_types.api:204
flow_ip4_vxlan
typedef flow_ip4_vxlan
Definition: flow_types.api:153
flow::ip6_n_tuple_tagged
vl_api_flow_ip6_n_tuple_tagged_t ip6_n_tuple_tagged
Definition: flow_types.api:207
flow_ip4_gtpc
typedef flow_ip4_gtpc
Definition: flow_types.api:175
dst_port
vl_api_ip_port_and_mask_t dst_port
Definition: flow_types.api:92
flow::ip4_l2tpv3oip
vl_api_flow_ip4_l2tpv3oip_t ip4_l2tpv3oip
Definition: flow_types.api:201
FLOW_TYPE_IP6
@ FLOW_TYPE_IP6
Definition: flow_types.api:25
FLOW_TYPE_IP4_N_TUPLE
@ FLOW_TYPE_IP4_N_TUPLE
Definition: flow_types.api:29
flow::ip4_ipsec_esp
vl_api_flow_ip4_ipsec_esp_t ip4_ipsec_esp
Definition: flow_types.api:202
flow_ip6_n_tuple
typedef flow_ip6_n_tuple
Definition: flow_types.api:96
flow_ip4_ipsec_esp
typedef flow_ip4_ipsec_esp
Definition: flow_types.api:135
vni
u32 vni
Definition: flow_types.api:160
FLOW_ACTION_BUFFER_ADVANCE
@ FLOW_ACTION_BUFFER_ADVANCE
Definition: flow_types.api:43
FLOW_TYPE_IP6_VXLAN
@ FLOW_TYPE_IP6_VXLAN
Definition: flow_types.api:34
redirect_node_index
u32 redirect_node_index
Definition: flow_types.api:230
mark_flow_id
u32 mark_flow_id
Definition: flow_types.api:227
u16
unsigned short u16
Definition: types.h:57
FLOW_ACTION_DROP
@ FLOW_ACTION_DROP
Definition: flow_types.api:46
flow
Definition: flow_types.api:196
port
u16 port
Definition: lb_types.api:73
ip_port_and_mask
typedef ip_port_and_mask
Definition: flow_types.api:50
flow_ip6_vxlan
typedef flow_ip6_vxlan
Definition: flow_types.api:164
ip_prot_and_mask
typedef ip_prot_and_mask
Definition: flow_types.api:56
protocol
vl_api_ip_prot_and_mask_t protocol
Definition: flow_types.api:74
i32
signed int i32
Definition: types.h:77
FLOW_TYPE_IP4_N_TUPLE_TAGGED
@ FLOW_TYPE_IP4_N_TUPLE_TAGGED
Definition: flow_types.api:31
FLOW_TYPE_IP4_GTPC
@ FLOW_TYPE_IP4_GTPC
Definition: flow_types.api:35
flow_ip4_ipsec_ah
typedef flow_ip4_ipsec_ah
Definition: flow_types.api:144
FLOW_TYPE_IP4
@ FLOW_TYPE_IP4
Definition: flow_types.api:24
buffer_advance
i32 buffer_advance
Definition: flow_types.api:237
src_addr
vl_api_mac_address_t src_addr
Definition: flow_types.api:64
flow_ip4_l2tpv3oip
typedef flow_ip4_l2tpv3oip
Definition: flow_types.api:126
FLOW_TYPE_IP6_N_TUPLE
@ FLOW_TYPE_IP6_N_TUPLE
Definition: flow_types.api:30
version
option version
Definition: flow_types.api:17
redirect_device_input_next_index
u32 redirect_device_input_next_index
Definition: flow_types.api:231
flow_ip4_n_tuple
typedef flow_ip4_n_tuple
Definition: flow_types.api:86
src_port
vl_api_ip_port_and_mask_t src_port
Definition: flow_types.api:91
dst_addr
vl_api_mac_address_t dst_addr
Definition: flow_types.api:65
flow_ip4
typedef flow_ip4
Definition: flow_types.api:70
session_id
u32 session_id
Definition: flow_types.api:131
flow_type
flow_type
Definition: flow_types.api:21
FLOW_TYPE_IP4_L2TPV3OIP
@ FLOW_TYPE_IP4_L2TPV3OIP
Definition: flow_types.api:26
FLOW_ACTION_COUNT
@ FLOW_ACTION_COUNT
Definition: flow_types.api:41
FLOW_ACTION_REDIRECT_TO_NODE
@ FLOW_ACTION_REDIRECT_TO_NODE
Definition: flow_types.api:44
FLOW_TYPE_IP4_VXLAN
@ FLOW_TYPE_IP4_VXLAN
Definition: flow_types.api:33
index
u32 index
Definition: flow_types.api:221
flow::ip6_vxlan
vl_api_flow_ip6_vxlan_t ip6_vxlan
Definition: flow_types.api:209
FLOW_ACTION_REDIRECT_TO_QUEUE
@ FLOW_ACTION_REDIRECT_TO_QUEUE
Definition: flow_types.api:45
flow::ip4_gtpc
vl_api_flow_ip4_gtpc_t ip4_gtpc
Definition: flow_types.api:210
flow_ip4_n_tuple_tagged
typedef flow_ip4_n_tuple_tagged
Definition: flow_types.api:106
spi
u32 spi
Definition: flow_types.api:140
FLOW_TYPE_IP4_GTPU
@ FLOW_TYPE_IP4_GTPU
Definition: flow_types.api:36
u32
unsigned int u32
Definition: types.h:88
flow_ethernet
typedef flow_ethernet
Definition: flow_types.api:62
flow::ip4_vxlan
vl_api_flow_ip4_vxlan_t ip4_vxlan
Definition: flow_types.api:208
FLOW_TYPE_IP6_N_TUPLE_TAGGED
@ FLOW_TYPE_IP6_N_TUPLE_TAGGED
Definition: flow_types.api:32
flow
vl_api_flow_t flow
Definition: flow_types.api:240
flow_rule
typedef flow_rule
Definition: flow_types.api:216
flow::ip6_n_tuple
vl_api_flow_ip6_n_tuple_t ip6_n_tuple
Definition: flow_types.api:205
flow::ip4_ipsec_ah
vl_api_flow_ip4_ipsec_ah_t ip4_ipsec_ah
Definition: flow_types.api:203
actions
vl_api_flow_action_t actions
Definition: flow_types.api:224
FLOW_ACTION_MARK
@ FLOW_ACTION_MARK
Definition: flow_types.api:42
mask
u16 mask
Definition: flow_types.api:52
FLOW_TYPE_IP4_IPSEC_AH
@ FLOW_TYPE_IP4_IPSEC_AH
Definition: flow_types.api:28
FLOW_TYPE_IP4_IPSEC_ESP
@ FLOW_TYPE_IP4_IPSEC_ESP
Definition: flow_types.api:27
u8
unsigned char u8
Definition: types.h:56
flow::ip4
vl_api_flow_ip4_t ip4
Definition: flow_types.api:199
FLOW_TYPE_ETHERNET
@ FLOW_TYPE_ETHERNET
Definition: flow_types.api:23
flow_ip6
typedef flow_ip6
Definition: flow_types.api:78
redirect_queue
u32 redirect_queue
Definition: flow_types.api:234
flow::ip6
vl_api_flow_ip6_t ip6
Definition: flow_types.api:200
flow::ethernet
vl_api_flow_ethernet_t ethernet
Definition: flow_types.api:198
flow_ip4_gtpu
typedef flow_ip4_gtpu
Definition: flow_types.api:186
teid
u32 teid
Definition: flow_types.api:182
flow_action
flow_action
Definition: flow_types.api:39
flow_ip6_n_tuple_tagged
typedef flow_ip6_n_tuple_tagged
Definition: flow_types.api:116
flow::ip4_gtpu
vl_api_flow_ip4_gtpu_t ip4_gtpu
Definition: flow_types.api:211
type
u16 type
Definition: flow_types.api:66