FD.io VPP  v21.01.1
Vector Packet Processing
gbp.api
Go to the documentation of this file.
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
3  * Copyright (c) 2018 Cisco 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 = "2.0.0";
18 
19 import "vnet/ip/ip_types.api";
20 import "vnet/ethernet/ethernet_types.api";
21 import "vnet/interface_types.api";
22 
24 {
30 };
31 
32 typedef gbp_bridge_domain
33 {
34  u32 bd_id;
36  vl_api_gbp_bridge_domain_flags_t flags;
37  vl_api_interface_index_t bvi_sw_if_index;
38  vl_api_interface_index_t uu_fwd_sw_if_index;
39  vl_api_interface_index_t bm_flood_sw_if_index;
40 };
41 
42  autoreply define gbp_bridge_domain_add
43 {
44  option status="in_progress";
47  vl_api_gbp_bridge_domain_t bd;
48 };
49  autoreply define gbp_bridge_domain_del
50 {
51  option status="in_progress";
55 };
56 autoreply define gbp_bridge_domain_dump
57 {
58  option status="in_progress";
61 };
62 define gbp_bridge_domain_details
63 {
64  option status="in_progress";
66  vl_api_gbp_bridge_domain_t bd;
67 };
68 
69 typedef u16 gbp_scope;
70 
71 typedef gbp_route_domain
72 {
73  u32 rd_id;
76  vl_api_interface_index_t ip4_uu_sw_if_index;
77  vl_api_interface_index_t ip6_uu_sw_if_index;
78  vl_api_gbp_scope_t scope;
79 };
80 
81  autoreply define gbp_route_domain_add
82 {
83  option status="in_progress";
86  vl_api_gbp_route_domain_t rd;
87 };
88  autoreply define gbp_route_domain_del
89 {
90  option status="in_progress";
94 };
95 autoreply define gbp_route_domain_dump
96 {
97  option status="in_progress";
100 };
101 define gbp_route_domain_details
102 {
103  option status="in_progress";
105  vl_api_gbp_route_domain_t rd;
106 };
107 
108 /** \brief Endpoint
109  @param client_index - opaque cookie to identify the sender
110  @param context - sender context, to match reply w/ request
111 */
112 
114 {
120 };
121 
122 typedef gbp_endpoint_tun
123 {
124  vl_api_address_t src;
125  vl_api_address_t dst;
126 };
127 
128 typedef gbp_endpoint
129 {
130  vl_api_interface_index_t sw_if_index;
132  vl_api_gbp_endpoint_flags_t flags;
133  vl_api_mac_address_t mac;
134  vl_api_gbp_endpoint_tun_t tun;
136  vl_api_address_t ips[n_ips];
137 };
138 
139  define gbp_endpoint_add
140 {
141  option status="in_progress";
144  vl_api_gbp_endpoint_t endpoint;
145 };
146 
147 define gbp_endpoint_add_reply
148 {
149  option status="in_progress";
153 };
154 
155  autoreply define gbp_endpoint_del
156 {
157  option status="in_progress";
161 };
162 
163 define gbp_endpoint_dump
164 {
165  option status="in_progress";
168 };
169 
170 define gbp_endpoint_details
171 {
172  option status="in_progress";
176  vl_api_gbp_endpoint_t endpoint;
177 };
178 
180 {
181  u32 remote_ep_timeout;
182 };
183 
184 typedef gbp_endpoint_group
185 {
186  u32 vnid;
187  u16 sclass;
189  u32 rd_id;
190  vl_api_interface_index_t uplink_sw_if_index;
191  vl_api_gbp_endpoint_retention_t retention;
192 };
193 
194  autoreply define gbp_endpoint_group_add
195 {
196  option status="in_progress";
199  vl_api_gbp_endpoint_group_t epg;
200 };
201  autoreply define gbp_endpoint_group_del
202 {
203  option status="in_progress";
207 };
208 
209 define gbp_endpoint_group_dump
210 {
211  option status="in_progress";
214 };
215 
216 define gbp_endpoint_group_details
217 {
218  option status="in_progress";
220  vl_api_gbp_endpoint_group_t epg;
221 };
222 
223 typedef gbp_recirc
224 {
225  vl_api_interface_index_t sw_if_index;
226  u16 sclass;
227  bool is_ext;
228 };
229 
230  autoreply define gbp_recirc_add_del
231 {
232  option status="in_progress";
235  bool is_add;
236  vl_api_gbp_recirc_t recirc;
237 };
238 
239 define gbp_recirc_dump
240 {
241  option status="in_progress";
244 };
245 
246 define gbp_recirc_details
247 {
248  option status="in_progress";
250  vl_api_gbp_recirc_t recirc;
251 };
252 
254 {
260 };
261 
262 typedef gbp_subnet
263 {
264  u32 rd_id;
265  vl_api_interface_index_t sw_if_index;
266  u16 sclass;
267  vl_api_gbp_subnet_type_t type;
268  vl_api_prefix_t prefix;
269 };
270 
271  autoreply define gbp_subnet_add_del
272 {
273  option status="in_progress";
276  bool is_add;
277  vl_api_gbp_subnet_t subnet;
278 };
279 
280 define gbp_subnet_dump
281 {
282  option status="in_progress";
285 };
286 
287 define gbp_subnet_details
288 {
289  option status="in_progress";
291  vl_api_gbp_subnet_t subnet;
292 };
293 
294 typedef gbp_next_hop
295 {
296  vl_api_address_t ip;
297  vl_api_mac_address_t mac;
298  u32 bd_id;
299  u32 rd_id;
300 };
301 
303 {
307 };
308 
309 typedef gbp_next_hop_set
310 {
311  vl_api_gbp_hash_mode_t hash_mode;
313  vl_api_gbp_next_hop_t nhs[8];
314 };
315 
317 {
321 };
322 
323 typedef gbp_rule
324 {
325  vl_api_gbp_rule_action_t action;
326  vl_api_gbp_next_hop_set_t nh_set;
327 };
328 
329 typedef gbp_contract
330 {
331  vl_api_gbp_scope_t scope;
332  u16 sclass;
338  vl_api_gbp_rule_t rules[n_rules];
339 };
340 
341  define gbp_contract_add_del
342 {
343  option status="in_progress";
346  bool is_add;
347  vl_api_gbp_contract_t contract;
348 };
349 define gbp_contract_add_del_reply
350 {
351  option status="in_progress";
355 };
356 
357 define gbp_contract_dump
358 {
359  option status="in_progress";
362 };
363 
364 define gbp_contract_details
365 {
366  option status="in_progress";
368  vl_api_gbp_contract_t contract;
369 };
370 
371 /**
372  * @brief Configure a 'base' tunnel from which learned tunnels
373  * are permitted to derive
374  * A base tunnel consists only of the VNI, any src,dst IP
375  * pair is thus allowed.
376  */
378 {
381 };
382 
383 typedef gbp_vxlan_tunnel
384 {
385  u32 vni;
386  vl_api_gbp_vxlan_tunnel_mode_t mode;
388  vl_api_ip4_address_t src;
389 };
390 
392 {
393  option status="in_progress";
396  vl_api_gbp_vxlan_tunnel_t tunnel;
397 };
398 
399 define gbp_vxlan_tunnel_add_reply
400 {
401  option status="in_progress";
404  vl_api_interface_index_t sw_if_index;
405 };
406 
407  autoreply define gbp_vxlan_tunnel_del
408 {
409  option status="in_progress";
413 };
414 
415 define gbp_vxlan_tunnel_dump
416 {
417  option status="in_progress";
420 };
421 
422 define gbp_vxlan_tunnel_details
423 {
424  option status="in_progress";
426  vl_api_gbp_vxlan_tunnel_t tunnel;
427 };
428 
430 {
433 };
434 
435 typedef gbp_ext_itf
436 {
437  vl_api_interface_index_t sw_if_index;
438  u32 bd_id;
439  u32 rd_id;
440  vl_api_gbp_ext_itf_flags_t flags;
441 };
442 
443  autoreply define gbp_ext_itf_add_del
444 {
445  option status="in_progress";
448  bool is_add;
449  vl_api_gbp_ext_itf_t ext_itf;
450 };
451 
452 define gbp_ext_itf_dump
453 {
454  option status="in_progress";
457 };
458 
459 define gbp_ext_itf_details
460 {
461  option status="in_progress";
463  vl_api_gbp_ext_itf_t ext_itf;
464 };
465 
466 /*
467  * Local Variables:
468  * eval: (c-set-style "gnu")
469  * End:
470  */
u32 acl_index
Definition: gbp.api:334
bool is_ext
Definition: gbp.api:227
gbp_bridge_domain_flags
Definition: gbp.api:23
u16 vni
Definition: flow_types.api:160
u32 ip6_table_id
Definition: gbp.api:75
vl_api_gbp_endpoint_group_t epg
Definition: gbp.api:199
typedef gbp_endpoint_group
Definition: gbp.api:185
vl_api_gbp_endpoint_t endpoint
Definition: gbp.api:144
typedef gbp_subnet
Definition: gbp.api:263
vl_api_gbp_subnet_t subnet
Definition: gbp.api:291
typedef gbp_next_hop
Definition: gbp.api:295
int gbp_vxlan_tunnel_add(u32 vni, gbp_vxlan_tunnel_layer_t layer, u32 bd_rd_id, const ip4_address_t *src, u32 *sw_if_indexp)
Definition: gbp_vxlan.c:439
u8 n_rules
Definition: gbp.api:337
vl_api_gbp_vxlan_tunnel_t tunnel
Definition: gbp.api:426
typedef gbp_vxlan_tunnel
Definition: gbp.api:384
vl_api_gbp_vxlan_tunnel_t tunnel
Definition: gbp.api:396
u32 rd_id
Definition: gbp.api:35
vl_api_prefix_t prefix
Definition: gbp.api:268
vl_api_gbp_next_hop_set_t nh_set
Definition: gbp.api:326
vl_api_gbp_ext_itf_t ext_itf
Definition: gbp.api:463
unsigned char u8
Definition: types.h:56
vl_api_interface_index_t uu_fwd_sw_if_index
Definition: gbp.api:38
double f64
Definition: types.h:142
vl_api_interface_index_t ip4_uu_sw_if_index
Definition: gbp.api:76
vl_api_ip4_address_t src
Definition: gbp.api:388
vl_api_gbp_bridge_domain_t bd
Definition: gbp.api:66
static vlib_cli_command_t gbp_subnet_add_del
(constructor) VLIB_CLI_COMMAND (gbp_subnet_add_del)
Definition: gbp_subnet.c:406
typedef gbp_rule
Definition: gbp.api:324
typedef gbp_endpoint_retention
Definition: gbp.api:180
gbp_hash_mode
Definition: gbp.api:302
typedef gbp_ext_itf
Definition: gbp.api:436
vl_api_interface_index_t bvi_sw_if_index
Definition: gbp.api:37
u8 n_ips
Definition: gbp.api:135
unsigned int u32
Definition: types.h:88
vl_api_interface_index_t sw_if_index
Definition: gbp.api:265
typedef gbp_endpoint_tun
Definition: gbp.api:123
gbp_subnet_type
Definition: gbp.api:253
gbp_ext_itf_flags
Definition: gbp.api:429
u32 bd_id
Definition: gbp.api:188
unsigned short u16
Definition: types.h:57
vl_api_gbp_subnet_type_t type
Definition: gbp.api:267
u16 sclass
Definition: gbp.api:131
u8 n_nhs
Definition: gbp.api:312
u32 bd_rd_id
Definition: gbp.api:387
vl_api_gbp_next_hop_t nhs[8]
Definition: gbp.api:313
typedef gbp_next_hop_set
Definition: gbp.api:310
vl_api_gbp_bridge_domain_t bd
Definition: gbp.api:47
u16 gbp_scope
Definition: gbp.api:69
u32 ip4_table_id
Definition: gbp.api:74
vl_api_gbp_endpoint_retention_t retention
Definition: gbp.api:191
int gbp_vxlan_tunnel_del(u32 vni)
Definition: gbp_vxlan.c:550
vl_api_gbp_endpoint_group_t epg
Definition: gbp.api:220
vl_api_gbp_subnet_t subnet
Definition: gbp.api:277
option version
Definition: gbp.api:17
vl_api_gbp_rule_t rules[n_rules]
Definition: gbp.api:338
gbp_vxlan_tunnel_mode
Configure a 'base' tunnel from which learned tunnels are permitted to derive A base tunnel consists o...
Definition: gbp.api:377
signed int i32
Definition: types.h:77
vl_api_gbp_contract_t contract
Definition: gbp.api:347
vl_api_interface_index_t bm_flood_sw_if_index
Definition: gbp.api:39
vl_api_interface_index_t ip6_uu_sw_if_index
Definition: gbp.api:77
typedef gbp_route_domain
Definition: gbp.api:72
vl_api_gbp_recirc_t recirc
Definition: gbp.api:236
typedef gbp_contract
Definition: gbp.api:330
gbp_rule_action
Definition: gbp.api:316
vl_api_gbp_contract_t contract
Definition: gbp.api:368
vl_api_interface_index_t sw_if_index
Definition: gbp.api:404
typedef gbp_endpoint
Definition: gbp.api:129
vl_api_address_t ip
Definition: l2.api:501
gbp_endpoint_flags
Endpoint.
Definition: gbp.api:113
vl_api_mac_event_action_t action
Definition: l2.api:181
vl_api_gbp_endpoint_t endpoint
Definition: gbp.api:176
vl_api_interface_index_t uplink_sw_if_index
Definition: gbp.api:190
u8 n_ether_types
Definition: gbp.api:335
vl_api_gbp_endpoint_tun_t tun
Definition: gbp.api:134
vl_api_address_t dst
Definition: gbp.api:125
vl_api_gbp_ext_itf_t ext_itf
Definition: gbp.api:449
vl_api_gbp_vxlan_tunnel_mode_t mode
Definition: gbp.api:386
vl_api_gbp_bridge_domain_flags_t flags
Definition: gbp.api:36
vl_api_gbp_route_domain_t rd
Definition: gbp.api:105
vl_api_address_t ips[n_ips]
Definition: gbp.api:136
u16 allowed_ethertypes[16]
Definition: gbp.api:336
typedef gbp_bridge_domain
Definition: gbp.api:33
typedef gbp_recirc
Definition: gbp.api:224
vl_api_gbp_route_domain_t rd
Definition: gbp.api:86
u16 dclass
Definition: gbp.api:333
vl_api_mac_address_t mac
Definition: gbp.api:133
vl_api_gbp_scope_t scope
Definition: gbp.api:78
vl_api_gbp_recirc_t recirc
Definition: gbp.api:250