1 /* Hey Emacs use -*- mode: C -*- */
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:
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 option version = "2.0.0";
19 import "vnet/ip/ip_types.api";
20 import "vnet/ethernet/ethernet_types.api";
21 import "vnet/interface_types.api";
23 enum gbp_bridge_domain_flags
25 GBP_BD_API_FLAG_NONE = 0,
26 GBP_BD_API_FLAG_DO_NOT_LEARN = 1,
27 GBP_BD_API_FLAG_UU_FWD_DROP = 2,
28 GBP_BD_API_FLAG_MCAST_DROP = 4,
29 GBP_BD_API_FLAG_UCAST_ARP = 8,
32 typedef gbp_bridge_domain
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;
42 autoreply define gbp_bridge_domain_add
44 option status="in_progress";
47 vl_api_gbp_bridge_domain_t bd;
49 autoreply define gbp_bridge_domain_del
51 option status="in_progress";
56 autoreply define gbp_bridge_domain_dump
58 option status="in_progress";
62 define gbp_bridge_domain_details
64 option status="in_progress";
66 vl_api_gbp_bridge_domain_t bd;
69 typedef u16 gbp_scope;
71 typedef gbp_route_domain
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;
81 autoreply define gbp_route_domain_add
83 option status="in_progress";
86 vl_api_gbp_route_domain_t rd;
88 autoreply define gbp_route_domain_del
90 option status="in_progress";
95 autoreply define gbp_route_domain_dump
97 option status="in_progress";
101 define gbp_route_domain_details
103 option status="in_progress";
105 vl_api_gbp_route_domain_t rd;
109 @param client_index - opaque cookie to identify the sender
110 @param context - sender context, to match reply w/ request
113 enum gbp_endpoint_flags
115 GBP_API_ENDPOINT_FLAG_NONE = 0,
116 GBP_API_ENDPOINT_FLAG_BOUNCE = 0x1,
117 GBP_API_ENDPOINT_FLAG_REMOTE = 0x2,
118 GBP_API_ENDPOINT_FLAG_LEARNT = 0x4,
119 GBP_API_ENDPOINT_FLAG_EXTERNAL = 0x8,
122 typedef gbp_endpoint_tun
124 vl_api_address_t src;
125 vl_api_address_t dst;
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];
139 define gbp_endpoint_add
141 option status="in_progress";
144 vl_api_gbp_endpoint_t endpoint;
147 define gbp_endpoint_add_reply
149 option status="in_progress";
155 autoreply define gbp_endpoint_del
157 option status="in_progress";
163 define gbp_endpoint_dump
165 option status="in_progress";
170 define gbp_endpoint_details
172 option status="in_progress";
176 vl_api_gbp_endpoint_t endpoint;
179 typedef gbp_endpoint_retention
181 u32 remote_ep_timeout;
184 typedef gbp_endpoint_group
190 vl_api_interface_index_t uplink_sw_if_index;
191 vl_api_gbp_endpoint_retention_t retention;
194 autoreply define gbp_endpoint_group_add
196 option status="in_progress";
199 vl_api_gbp_endpoint_group_t epg;
201 autoreply define gbp_endpoint_group_del
203 option status="in_progress";
209 define gbp_endpoint_group_dump
211 option status="in_progress";
216 define gbp_endpoint_group_details
218 option status="in_progress";
220 vl_api_gbp_endpoint_group_t epg;
225 vl_api_interface_index_t sw_if_index;
230 autoreply define gbp_recirc_add_del
232 option status="in_progress";
236 vl_api_gbp_recirc_t recirc;
239 define gbp_recirc_dump
241 option status="in_progress";
246 define gbp_recirc_details
248 option status="in_progress";
250 vl_api_gbp_recirc_t recirc;
255 GBP_API_SUBNET_TRANSPORT,
256 GBP_API_SUBNET_STITCHED_INTERNAL,
257 GBP_API_SUBNET_STITCHED_EXTERNAL,
258 GBP_API_SUBNET_L3_OUT,
259 GBP_API_SUBNET_ANON_L3_OUT,
265 vl_api_interface_index_t sw_if_index;
267 vl_api_gbp_subnet_type_t type;
268 vl_api_prefix_t prefix;
271 autoreply define gbp_subnet_add_del
273 option status="in_progress";
277 vl_api_gbp_subnet_t subnet;
280 define gbp_subnet_dump
282 option status="in_progress";
287 define gbp_subnet_details
289 option status="in_progress";
291 vl_api_gbp_subnet_t subnet;
297 vl_api_mac_address_t mac;
304 GBP_API_HASH_MODE_SRC_IP,
305 GBP_API_HASH_MODE_DST_IP,
306 GBP_API_HASH_MODE_SYMMETRIC,
309 typedef gbp_next_hop_set
311 vl_api_gbp_hash_mode_t hash_mode;
313 vl_api_gbp_next_hop_t nhs[8];
320 GBP_API_RULE_REDIRECT,
325 vl_api_gbp_rule_action_t action;
326 vl_api_gbp_next_hop_set_t nh_set;
331 vl_api_gbp_scope_t scope;
336 u16 allowed_ethertypes[16];
338 vl_api_gbp_rule_t rules[n_rules];
341 define gbp_contract_add_del
343 option status="in_progress";
347 vl_api_gbp_contract_t contract;
349 define gbp_contract_add_del_reply
351 option status="in_progress";
357 define gbp_contract_dump
359 option status="in_progress";
364 define gbp_contract_details
366 option status="in_progress";
368 vl_api_gbp_contract_t contract;
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.
377 enum gbp_vxlan_tunnel_mode
379 GBP_VXLAN_TUNNEL_MODE_L2,
380 GBP_VXLAN_TUNNEL_MODE_L3,
383 typedef gbp_vxlan_tunnel
386 vl_api_gbp_vxlan_tunnel_mode_t mode;
388 vl_api_ip4_address_t src;
391 define gbp_vxlan_tunnel_add
393 option status="in_progress";
396 vl_api_gbp_vxlan_tunnel_t tunnel;
399 define gbp_vxlan_tunnel_add_reply
401 option status="in_progress";
404 vl_api_interface_index_t sw_if_index;
407 autoreply define gbp_vxlan_tunnel_del
409 option status="in_progress";
415 define gbp_vxlan_tunnel_dump
417 option status="in_progress";
422 define gbp_vxlan_tunnel_details
424 option status="in_progress";
426 vl_api_gbp_vxlan_tunnel_t tunnel;
429 enum gbp_ext_itf_flags
431 GBP_API_EXT_ITF_F_NONE = 0,
432 GBP_API_EXT_ITF_F_ANON = 1,
437 vl_api_interface_index_t sw_if_index;
440 vl_api_gbp_ext_itf_flags_t flags;
443 autoreply define gbp_ext_itf_add_del
445 option status="in_progress";
449 vl_api_gbp_ext_itf_t ext_itf;
452 define gbp_ext_itf_dump
454 option status="in_progress";
459 define gbp_ext_itf_details
461 option status="in_progress";
463 vl_api_gbp_ext_itf_t ext_itf;
468 * eval: (c-set-style "gnu")