FD.io VPP  v20.05.1-6-gf53edbc3b
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 manual_print autoreply define gbp_bridge_domain_add
43 {
46  vl_api_gbp_bridge_domain_t bd;
47 };
48 manual_print autoreply define gbp_bridge_domain_del
49 {
53 };
54 autoreply define gbp_bridge_domain_dump
55 {
58 };
59 define gbp_bridge_domain_details
60 {
62  vl_api_gbp_bridge_domain_t bd;
63 };
64 
65 typedef u16 gbp_scope;
66 
67 typedef gbp_route_domain
68 {
69  u32 rd_id;
72  vl_api_interface_index_t ip4_uu_sw_if_index;
73  vl_api_interface_index_t ip6_uu_sw_if_index;
74  vl_api_gbp_scope_t scope;
75 };
76 
77 manual_print autoreply define gbp_route_domain_add
78 {
81  vl_api_gbp_route_domain_t rd;
82 };
83 manual_print autoreply define gbp_route_domain_del
84 {
88 };
89 autoreply define gbp_route_domain_dump
90 {
93 };
94 define gbp_route_domain_details
95 {
97  vl_api_gbp_route_domain_t rd;
98 };
99 
100 /** \brief Endpoint
101  @param client_index - opaque cookie to identify the sender
102  @param context - sender context, to match reply w/ request
103 */
104 
106 {
112 };
113 
114 typedef gbp_endpoint_tun
115 {
116  vl_api_address_t src;
117  vl_api_address_t dst;
118 };
119 
120 typedef gbp_endpoint
121 {
122  vl_api_interface_index_t sw_if_index;
124  vl_api_gbp_endpoint_flags_t flags;
125  vl_api_mac_address_t mac;
126  vl_api_gbp_endpoint_tun_t tun;
128  vl_api_address_t ips[n_ips];
129 };
130 
131 manual_print define gbp_endpoint_add
132 {
135  vl_api_gbp_endpoint_t endpoint;
136 };
137 
138 define gbp_endpoint_add_reply
139 {
143 };
144 
145 manual_print autoreply define gbp_endpoint_del
146 {
150 };
151 
152 define gbp_endpoint_dump
153 {
156 };
157 
158 define gbp_endpoint_details
159 {
163  vl_api_gbp_endpoint_t endpoint;
164 };
165 
167 {
168  u32 remote_ep_timeout;
169 };
170 
171 typedef gbp_endpoint_group
172 {
173  u32 vnid;
174  u16 sclass;
176  u32 rd_id;
177  vl_api_interface_index_t uplink_sw_if_index;
178  vl_api_gbp_endpoint_retention_t retention;
179 };
180 
181 manual_print autoreply define gbp_endpoint_group_add
182 {
185  vl_api_gbp_endpoint_group_t epg;
186 };
187 manual_print autoreply define gbp_endpoint_group_del
188 {
192 };
193 
194 define gbp_endpoint_group_dump
195 {
198 };
199 
200 define gbp_endpoint_group_details
201 {
203  vl_api_gbp_endpoint_group_t epg;
204 };
205 
206 typedef gbp_recirc
207 {
208  vl_api_interface_index_t sw_if_index;
209  u16 sclass;
210  bool is_ext;
211 };
212 
213 manual_print autoreply define gbp_recirc_add_del
214 {
217  bool is_add;
218  vl_api_gbp_recirc_t recirc;
219 };
220 
221 define gbp_recirc_dump
222 {
225 };
226 
227 define gbp_recirc_details
228 {
230  vl_api_gbp_recirc_t recirc;
231 };
232 
234 {
240 };
241 
242 typedef gbp_subnet
243 {
244  u32 rd_id;
245  vl_api_interface_index_t sw_if_index;
246  u16 sclass;
247  vl_api_gbp_subnet_type_t type;
248  vl_api_prefix_t prefix;
249 };
250 
251 manual_print autoreply define gbp_subnet_add_del
252 {
255  bool is_add;
256  vl_api_gbp_subnet_t subnet;
257 };
258 
259 define gbp_subnet_dump
260 {
263 };
264 
265 define gbp_subnet_details
266 {
268  vl_api_gbp_subnet_t subnet;
269 };
270 
271 typedef gbp_next_hop
272 {
273  vl_api_address_t ip;
274  vl_api_mac_address_t mac;
275  u32 bd_id;
276  u32 rd_id;
277 };
278 
280 {
284 };
285 
286 typedef gbp_next_hop_set
287 {
288  vl_api_gbp_hash_mode_t hash_mode;
290  vl_api_gbp_next_hop_t nhs[8];
291 };
292 
294 {
298 };
299 
300 typedef gbp_rule
301 {
302  vl_api_gbp_rule_action_t action;
303  vl_api_gbp_next_hop_set_t nh_set;
304 };
305 
306 typedef gbp_contract
307 {
308  vl_api_gbp_scope_t scope;
309  u16 sclass;
315  vl_api_gbp_rule_t rules[n_rules];
316 };
317 
318 manual_print define gbp_contract_add_del
319 {
322  bool is_add;
323  vl_api_gbp_contract_t contract;
324 };
325 define gbp_contract_add_del_reply
326 {
330 };
331 
332 define gbp_contract_dump
333 {
336 };
337 
338 define gbp_contract_details
339 {
341  vl_api_gbp_contract_t contract;
342 };
343 
344 /**
345  * @brief Configure a 'base' tunnel from which learned tunnels
346  * are permitted to derive
347  * A base tunnel consists only of the VNI, any src,dst IP
348  * pair is thus allowed.
349  */
351 {
354 };
355 
356 typedef gbp_vxlan_tunnel
357 {
358  u32 vni;
359  vl_api_gbp_vxlan_tunnel_mode_t mode;
361  vl_api_ip4_address_t src;
362 };
363 
364 manual_print define gbp_vxlan_tunnel_add
365 {
368  vl_api_gbp_vxlan_tunnel_t tunnel;
369 };
370 
371 define gbp_vxlan_tunnel_add_reply
372 {
375  vl_api_interface_index_t sw_if_index;
376 };
377 
378 manual_print autoreply define gbp_vxlan_tunnel_del
379 {
383 };
384 
385 define gbp_vxlan_tunnel_dump
386 {
389 };
390 
391 define gbp_vxlan_tunnel_details
392 {
394  vl_api_gbp_vxlan_tunnel_t tunnel;
395 };
396 
398 {
401 };
402 
403 typedef gbp_ext_itf
404 {
405  vl_api_interface_index_t sw_if_index;
406  u32 bd_id;
407  u32 rd_id;
408  vl_api_gbp_ext_itf_flags_t flags;
409 };
410 
411 manual_print autoreply define gbp_ext_itf_add_del
412 {
415  bool is_add;
416  vl_api_gbp_ext_itf_t ext_itf;
417 };
418 
419 define gbp_ext_itf_dump
420 {
423 };
424 
425 define gbp_ext_itf_details
426 {
428  vl_api_gbp_ext_itf_t ext_itf;
429 };
430 
431 /*
432  * Local Variables:
433  * eval: (c-set-style "gnu")
434  * End:
435  */
u32 acl_index
Definition: gbp.api:311
bool is_ext
Definition: gbp.api:210
gbp_bridge_domain_flags
Definition: gbp.api:23
u32 ip6_table_id
Definition: gbp.api:71
vl_api_gbp_endpoint_group_t epg
Definition: gbp.api:185
typedef gbp_endpoint_group
Definition: gbp.api:172
vl_api_gbp_endpoint_t endpoint
Definition: gbp.api:135
typedef gbp_subnet
Definition: gbp.api:243
vl_api_gbp_subnet_t subnet
Definition: gbp.api:268
typedef gbp_next_hop
Definition: gbp.api:272
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:314
vl_api_gbp_vxlan_tunnel_t tunnel
Definition: gbp.api:394
typedef gbp_vxlan_tunnel
Definition: gbp.api:357
vl_api_gbp_vxlan_tunnel_t tunnel
Definition: gbp.api:368
u32 rd_id
Definition: gbp.api:35
vl_api_prefix_t prefix
Definition: gbp.api:248
vl_api_gbp_next_hop_set_t nh_set
Definition: gbp.api:303
vl_api_gbp_ext_itf_t ext_itf
Definition: gbp.api:428
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:72
vl_api_ip4_address_t src
Definition: gbp.api:361
vl_api_gbp_bridge_domain_t bd
Definition: gbp.api:62
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:301
typedef gbp_endpoint_retention
Definition: gbp.api:167
gbp_hash_mode
Definition: gbp.api:279
typedef gbp_ext_itf
Definition: gbp.api:404
vl_api_interface_index_t bvi_sw_if_index
Definition: gbp.api:37
u8 n_ips
Definition: gbp.api:127
unsigned int u32
Definition: types.h:88
vl_api_interface_index_t sw_if_index
Definition: gbp.api:245
typedef gbp_endpoint_tun
Definition: gbp.api:115
gbp_subnet_type
Definition: gbp.api:233
gbp_ext_itf_flags
Definition: gbp.api:397
u32 bd_id
Definition: gbp.api:175
unsigned short u16
Definition: types.h:57
u32 vni
Definition: lisp_gpe.api:119
vl_api_gbp_subnet_type_t type
Definition: gbp.api:247
u16 sclass
Definition: gbp.api:123
u8 n_nhs
Definition: gbp.api:289
u32 bd_rd_id
Definition: gbp.api:360
vl_api_gbp_next_hop_t nhs[8]
Definition: gbp.api:290
typedef gbp_next_hop_set
Definition: gbp.api:287
vl_api_gbp_bridge_domain_t bd
Definition: gbp.api:46
u16 gbp_scope
Definition: gbp.api:65
u32 ip4_table_id
Definition: gbp.api:70
vl_api_gbp_endpoint_retention_t retention
Definition: gbp.api:178
int gbp_vxlan_tunnel_del(u32 vni)
Definition: gbp_vxlan.c:550
vl_api_gbp_endpoint_group_t epg
Definition: gbp.api:203
vl_api_gbp_subnet_t subnet
Definition: gbp.api:256
option version
Definition: gbp.api:17
vl_api_gbp_rule_t rules[n_rules]
Definition: gbp.api:315
gbp_vxlan_tunnel_mode
Configure a 'base' tunnel from which learned tunnels are permitted to derive A base tunnel consists o...
Definition: gbp.api:350
signed int i32
Definition: types.h:77
vl_api_gbp_contract_t contract
Definition: gbp.api:323
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:73
typedef gbp_route_domain
Definition: gbp.api:68
vl_api_gbp_recirc_t recirc
Definition: gbp.api:218
typedef gbp_contract
Definition: gbp.api:307
gbp_rule_action
Definition: gbp.api:293
vl_api_gbp_contract_t contract
Definition: gbp.api:341
vl_api_interface_index_t sw_if_index
Definition: gbp.api:375
typedef gbp_endpoint
Definition: gbp.api:121
vl_api_address_t ip
Definition: l2.api:501
gbp_endpoint_flags
Endpoint.
Definition: gbp.api:105
vl_api_mac_event_action_t action
Definition: l2.api:181
vl_api_gbp_endpoint_t endpoint
Definition: gbp.api:163
vl_api_interface_index_t uplink_sw_if_index
Definition: gbp.api:177
u8 n_ether_types
Definition: gbp.api:312
vl_api_gbp_endpoint_tun_t tun
Definition: gbp.api:126
vl_api_address_t dst
Definition: gbp.api:117
vl_api_gbp_ext_itf_t ext_itf
Definition: gbp.api:416
vl_api_gbp_vxlan_tunnel_mode_t mode
Definition: gbp.api:359
vl_api_gbp_bridge_domain_flags_t flags
Definition: gbp.api:36
vl_api_gbp_route_domain_t rd
Definition: gbp.api:97
vl_api_address_t ips[n_ips]
Definition: gbp.api:128
u16 allowed_ethertypes[16]
Definition: gbp.api:313
typedef gbp_bridge_domain
Definition: gbp.api:33
typedef gbp_recirc
Definition: gbp.api:207
vl_api_gbp_route_domain_t rd
Definition: gbp.api:81
u16 dclass
Definition: gbp.api:310
vl_api_mac_address_t mac
Definition: gbp.api:125
vl_api_gbp_scope_t scope
Definition: gbp.api:74
vl_api_gbp_recirc_t recirc
Definition: gbp.api:230