FD.io VPP  v20.09-64-g4f7b92f0a
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.2";
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  u16 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 
typedef flow_ip4_gtpc
Definition: flow_types.api:175
vl_api_flow_ip4_gtpc_t ip4_gtpc
Definition: flow_types.api:210
u16 vni
Definition: flow_types.api:160
typedef flow_ip6_n_tuple
Definition: flow_types.api:96
typedef flow_ip4_ipsec_esp
Definition: flow_types.api:135
vl_api_flow_ip6_vxlan_t ip6_vxlan
Definition: flow_types.api:209
vl_api_ip_port_and_mask_t dst_port
Definition: flow_types.api:92
u32 mark_flow_id
Definition: flow_types.api:227
vl_api_flow_ethernet_t ethernet
Definition: flow_types.api:198
vl_api_flow_ip4_t ip4
Definition: flow_types.api:199
vl_api_flow_ip4_ipsec_ah_t ip4_ipsec_ah
Definition: flow_types.api:203
typedef ip_port_and_mask
Definition: flow_types.api:50
u16 mask
Definition: flow_types.api:52
vl_api_flow_ip4_gtpu_t ip4_gtpu
Definition: flow_types.api:211
unsigned char u8
Definition: types.h:56
u32 redirect_node_index
Definition: flow_types.api:230
typedef ip_prot_and_mask
Definition: flow_types.api:56
typedef flow_ip4_ipsec_ah
Definition: flow_types.api:144
i32 buffer_advance
Definition: flow_types.api:237
typedef flow_ip6_vxlan
Definition: flow_types.api:164
unsigned int u32
Definition: types.h:88
vl_api_ip_prot_and_mask_t protocol
Definition: flow_types.api:74
vl_api_flow_ip4_n_tuple_tagged_t ip4_n_tuple_tagged
Definition: flow_types.api:206
typedef flow_ip4_l2tpv3oip
Definition: flow_types.api:126
vl_api_flow_ip4_n_tuple_t ip4_n_tuple
Definition: flow_types.api:204
option version
Definition: flow_types.api:17
u32 redirect_device_input_next_index
Definition: flow_types.api:231
vl_api_flow_ip6_t ip6
Definition: flow_types.api:200
typedef flow_ip4_n_tuple
Definition: flow_types.api:86
typedef flow_ip4
Definition: flow_types.api:70
vl_api_flow_ip4_vxlan_t ip4_vxlan
Definition: flow_types.api:208
unsigned short u16
Definition: types.h:57
u32 session_id
Definition: flow_types.api:131
flow_type
Definition: flow_types.api:21
vl_api_mac_address_t src_addr
Definition: flow_types.api:64
vl_api_flow_ip6_n_tuple_t ip6_n_tuple
Definition: flow_types.api:205
vl_api_flow_ip6_n_tuple_tagged_t ip6_n_tuple_tagged
Definition: flow_types.api:207
vl_api_ip_port_and_mask_t src_port
Definition: flow_types.api:91
vl_api_mac_address_t dst_addr
Definition: flow_types.api:65
vl_api_flow_ip4_ipsec_esp_t ip4_ipsec_esp
Definition: flow_types.api:202
typedef flow_ip4_n_tuple_tagged
Definition: flow_types.api:106
u32 spi
Definition: flow_types.api:140
signed int i32
Definition: types.h:77
typedef flow_ethernet
Definition: flow_types.api:62
vl_api_flow_t flow
Definition: flow_types.api:240
typedef flow_rule
Definition: flow_types.api:216
typedef flow_ip6
Definition: flow_types.api:78
vl_api_flow_action_t actions
Definition: flow_types.api:224
vl_api_flow_ip4_l2tpv3oip_t ip4_l2tpv3oip
Definition: flow_types.api:201
u32 index
Definition: flow_types.api:221
u16 port
Definition: lb_types.api:72
typedef flow_ip4_gtpu
Definition: flow_types.api:186
u32 teid
Definition: flow_types.api:182
typedef flow_ip6_n_tuple_tagged
Definition: flow_types.api:116
u32 redirect_queue
Definition: flow_types.api:234
u16 type
Definition: flow_types.api:66
flow_action
Definition: flow_types.api:39
typedef flow_ip4_vxlan
Definition: flow_types.api:153