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;
36 autoreply define gbp_bridge_domain_add
40 vl_api_gbp_bridge_domain_t bd;
42 autoreply define gbp_bridge_domain_del
48 autoreply define gbp_bridge_domain_dump
53 define gbp_bridge_domain_details
56 vl_api_gbp_bridge_domain_t bd;
59 typedef gbp_route_domain
64 u32 ip4_uu_sw_if_index;
65 u32 ip6_uu_sw_if_index;
68 autoreply define gbp_route_domain_add
72 vl_api_gbp_route_domain_t rd;
74 autoreply define gbp_route_domain_del
80 autoreply define gbp_route_domain_dump
85 define gbp_route_domain_details
88 vl_api_gbp_route_domain_t rd;
92 @param client_index - opaque cookie to identify the sender
93 @param context - sender context, to match reply w/ request
96 enum gbp_endpoint_flags
106 typedef gbp_endpoint_tun
108 vl_api_address_t src;
109 vl_api_address_t dst;
116 vl_api_gbp_endpoint_flags_t flags;
117 vl_api_mac_address_t mac;
118 vl_api_gbp_endpoint_tun_t tun;
120 vl_api_address_t ips[n_ips];
123 define gbp_endpoint_add
127 vl_api_gbp_endpoint_t endpoint;
130 define gbp_endpoint_add_reply
137 autoreply define gbp_endpoint_del
144 define gbp_endpoint_dump
150 define gbp_endpoint_details
155 vl_api_gbp_endpoint_t endpoint;
158 typeonly define gbp_endpoint_group
163 u32 uplink_sw_if_index;
166 autoreply define gbp_endpoint_group_add
170 vl_api_gbp_endpoint_group_t epg;
172 autoreply define gbp_endpoint_group_del
179 define gbp_endpoint_group_dump
185 define gbp_endpoint_group_details
188 vl_api_gbp_endpoint_group_t epg;
191 typeonly define gbp_recirc
198 autoreply define gbp_recirc_add_del
203 vl_api_gbp_recirc_t recirc;
206 define gbp_recirc_dump
212 define gbp_recirc_details
215 vl_api_gbp_recirc_t recirc;
220 GBP_API_SUBNET_TRANSPORT,
221 GBP_API_SUBNET_STITCHED_INTERNAL,
222 GBP_API_SUBNET_STITCHED_EXTERNAL,
225 typeonly define gbp_subnet
230 vl_api_gbp_subnet_type_t type;
231 vl_api_prefix_t prefix;
234 autoreply define gbp_subnet_add_del
239 vl_api_gbp_subnet_t subnet;
242 define gbp_subnet_dump
248 define gbp_subnet_details
251 vl_api_gbp_subnet_t subnet;
257 vl_api_mac_address_t mac;
264 GBP_API_HASH_MODE_SRC_IP,
265 GBP_API_HASH_MODE_DST_IP,
266 GBP_API_HASH_MODE_SYMMETRIC,
269 typedef gbp_next_hop_set
271 vl_api_gbp_hash_mode_t hash_mode;
273 vl_api_gbp_next_hop_t nhs[8];
280 GBP_API_RULE_REDIRECT,
285 vl_api_gbp_rule_action_t action;
286 vl_api_gbp_next_hop_set_t nh_set;
295 vl_api_gbp_rule_t rules[n_rules];
298 autoreply define gbp_contract_add_del
303 vl_api_gbp_contract_t contract;
306 define gbp_contract_dump
312 define gbp_contract_details
315 vl_api_gbp_contract_t contract;
319 * @brief Set the time throeshold after which an endpoint is
320 considered inative and is aged/reaped by the scanner
321 * @param threshold In seconds
323 autoreply define gbp_endpoint_learn_set_inactive_threshold
331 * @brief Configure a 'base' tunnel from which learned tunnels
332 * are permitted to derive
333 * A base tunnel consists only of the VNI, any src,dst IP
334 * pair is thus allowed.
336 enum gbp_vxlan_tunnel_mode
338 GBP_VXLAN_TUNNEL_MODE_L2,
339 GBP_VXLAN_TUNNEL_MODE_L3,
342 typedef gbp_vxlan_tunnel
345 vl_api_gbp_vxlan_tunnel_mode_t mode;
349 define gbp_vxlan_tunnel_add
353 vl_api_gbp_vxlan_tunnel_t tunnel;
356 define gbp_vxlan_tunnel_add_reply
363 autoreply define gbp_vxlan_tunnel_del
370 define gbp_vxlan_tunnel_dump
376 define gbp_vxlan_tunnel_details
379 vl_api_gbp_vxlan_tunnel_t tunnel;
384 * eval: (c-set-style "gnu")