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";
22 enum gbp_bridge_domain_flags
24 GBP_BD_API_FLAG_NONE = 0,
25 GBP_BD_API_FLAG_DO_NOT_LEARN = 1,
28 typedef gbp_bridge_domain
31 vl_api_gbp_bridge_domain_flags_t flags;
33 u32 uu_fwd_sw_if_index;
34 u32 bm_flood_sw_if_index;
37 autoreply define gbp_bridge_domain_add
41 vl_api_gbp_bridge_domain_t bd;
43 autoreply define gbp_bridge_domain_del
49 autoreply define gbp_bridge_domain_dump
54 define gbp_bridge_domain_details
57 vl_api_gbp_bridge_domain_t bd;
60 typedef gbp_route_domain
65 u32 ip4_uu_sw_if_index;
66 u32 ip6_uu_sw_if_index;
69 autoreply define gbp_route_domain_add
73 vl_api_gbp_route_domain_t rd;
75 autoreply define gbp_route_domain_del
81 autoreply define gbp_route_domain_dump
86 define gbp_route_domain_details
89 vl_api_gbp_route_domain_t rd;
93 @param client_index - opaque cookie to identify the sender
94 @param context - sender context, to match reply w/ request
97 enum gbp_endpoint_flags
99 GBP_API_ENDPOINT_FLAG_NONE = 0,
100 GBP_API_ENDPOINT_FLAG_BOUNCE = 0x1,
101 GBP_API_ENDPOINT_FLAG_REMOTE = 0x2,
102 GBP_API_ENDPOINT_FLAG_LEARNT = 0x4,
104 GBP_API_ENDPOINT_FLAG_REMOTE_LEARNT = 0x6,
105 GBP_API_ENDPOINT_FLAG_EXTERNAL = 0x8,
108 typedef gbp_endpoint_tun
110 vl_api_address_t src;
111 vl_api_address_t dst;
118 vl_api_gbp_endpoint_flags_t flags;
119 vl_api_mac_address_t mac;
120 vl_api_gbp_endpoint_tun_t tun;
122 vl_api_address_t ips[n_ips];
125 define gbp_endpoint_add
129 vl_api_gbp_endpoint_t endpoint;
132 define gbp_endpoint_add_reply
139 autoreply define gbp_endpoint_del
146 define gbp_endpoint_dump
152 define gbp_endpoint_details
157 vl_api_gbp_endpoint_t endpoint;
160 typeonly define gbp_endpoint_group
166 u32 uplink_sw_if_index;
169 autoreply define gbp_endpoint_group_add
173 vl_api_gbp_endpoint_group_t epg;
175 autoreply define gbp_endpoint_group_del
182 define gbp_endpoint_group_dump
188 define gbp_endpoint_group_details
191 vl_api_gbp_endpoint_group_t epg;
194 typeonly define gbp_recirc
201 autoreply define gbp_recirc_add_del
206 vl_api_gbp_recirc_t recirc;
209 define gbp_recirc_dump
215 define gbp_recirc_details
218 vl_api_gbp_recirc_t recirc;
223 GBP_API_SUBNET_TRANSPORT,
224 GBP_API_SUBNET_STITCHED_INTERNAL,
225 GBP_API_SUBNET_STITCHED_EXTERNAL,
226 GBP_API_SUBNET_L3_OUT,
229 typeonly define gbp_subnet
234 vl_api_gbp_subnet_type_t type;
235 vl_api_prefix_t prefix;
238 autoreply define gbp_subnet_add_del
243 vl_api_gbp_subnet_t subnet;
246 define gbp_subnet_dump
252 define gbp_subnet_details
255 vl_api_gbp_subnet_t subnet;
261 vl_api_mac_address_t mac;
268 GBP_API_HASH_MODE_SRC_IP,
269 GBP_API_HASH_MODE_DST_IP,
270 GBP_API_HASH_MODE_SYMMETRIC,
273 typedef gbp_next_hop_set
275 vl_api_gbp_hash_mode_t hash_mode;
277 vl_api_gbp_next_hop_t nhs[8];
284 GBP_API_RULE_REDIRECT,
289 vl_api_gbp_rule_action_t action;
290 vl_api_gbp_next_hop_set_t nh_set;
299 vl_api_gbp_rule_t rules[n_rules];
301 u16 allowed_ethertypes[n_ether_types];
304 autoreply define gbp_contract_add_del
309 vl_api_gbp_contract_t contract;
312 define gbp_contract_dump
318 define gbp_contract_details
321 vl_api_gbp_contract_t contract;
325 * @brief Set the time throeshold after which an endpoint is
326 considered inative and is aged/reaped by the scanner
327 * @param threshold In seconds
329 autoreply define gbp_endpoint_learn_set_inactive_threshold
337 * @brief Configure a 'base' tunnel from which learned tunnels
338 * are permitted to derive
339 * A base tunnel consists only of the VNI, any src,dst IP
340 * pair is thus allowed.
342 enum gbp_vxlan_tunnel_mode
344 GBP_VXLAN_TUNNEL_MODE_L2,
345 GBP_VXLAN_TUNNEL_MODE_L3,
348 typedef gbp_vxlan_tunnel
351 vl_api_gbp_vxlan_tunnel_mode_t mode;
355 define gbp_vxlan_tunnel_add
359 vl_api_gbp_vxlan_tunnel_t tunnel;
362 define gbp_vxlan_tunnel_add_reply
369 autoreply define gbp_vxlan_tunnel_del
376 define gbp_vxlan_tunnel_dump
382 define gbp_vxlan_tunnel_details
385 vl_api_gbp_vxlan_tunnel_t tunnel;
388 typeonly define gbp_ext_itf
395 autoreply define gbp_ext_itf_add_del
400 vl_api_gbp_ext_itf_t ext_itf;
403 define gbp_ext_itf_dump
409 define gbp_ext_itf_details
412 vl_api_gbp_ext_itf_t ext_itf;
417 * eval: (c-set-style "gnu")