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
98 GBP_API_ENDPOINT_FLAG_NONE = 0,
99 GBP_API_ENDPOINT_FLAG_BOUNCE = 0x1,
100 GBP_API_ENDPOINT_FLAG_REMOTE = 0x2,
101 GBP_API_ENDPOINT_FLAG_LEARNT = 0x4,
103 GBP_API_ENDPOINT_FLAG_REMOTE_LEARNT = 0x6,
104 GBP_API_ENDPOINT_FLAG_EXTERNAL = 0x8,
107 typedef gbp_endpoint_tun
109 vl_api_address_t src;
110 vl_api_address_t dst;
117 vl_api_gbp_endpoint_flags_t flags;
118 vl_api_mac_address_t mac;
119 vl_api_gbp_endpoint_tun_t tun;
121 vl_api_address_t ips[n_ips];
124 define gbp_endpoint_add
128 vl_api_gbp_endpoint_t endpoint;
131 define gbp_endpoint_add_reply
138 autoreply define gbp_endpoint_del
145 define gbp_endpoint_dump
151 define gbp_endpoint_details
156 vl_api_gbp_endpoint_t endpoint;
159 typeonly define gbp_endpoint_group
164 u32 uplink_sw_if_index;
167 autoreply define gbp_endpoint_group_add
171 vl_api_gbp_endpoint_group_t epg;
173 autoreply define gbp_endpoint_group_del
180 define gbp_endpoint_group_dump
186 define gbp_endpoint_group_details
189 vl_api_gbp_endpoint_group_t epg;
192 typeonly define gbp_recirc
199 autoreply define gbp_recirc_add_del
204 vl_api_gbp_recirc_t recirc;
207 define gbp_recirc_dump
213 define gbp_recirc_details
216 vl_api_gbp_recirc_t recirc;
221 GBP_API_SUBNET_TRANSPORT,
222 GBP_API_SUBNET_STITCHED_INTERNAL,
223 GBP_API_SUBNET_STITCHED_EXTERNAL,
224 GBP_API_SUBNET_L3_OUT,
227 typeonly define gbp_subnet
232 vl_api_gbp_subnet_type_t type;
233 vl_api_prefix_t prefix;
236 autoreply define gbp_subnet_add_del
241 vl_api_gbp_subnet_t subnet;
244 define gbp_subnet_dump
250 define gbp_subnet_details
253 vl_api_gbp_subnet_t subnet;
259 vl_api_mac_address_t mac;
266 GBP_API_HASH_MODE_SRC_IP,
267 GBP_API_HASH_MODE_DST_IP,
268 GBP_API_HASH_MODE_SYMMETRIC,
271 typedef gbp_next_hop_set
273 vl_api_gbp_hash_mode_t hash_mode;
275 vl_api_gbp_next_hop_t nhs[8];
282 GBP_API_RULE_REDIRECT,
287 vl_api_gbp_rule_action_t action;
288 vl_api_gbp_next_hop_set_t nh_set;
297 vl_api_gbp_rule_t rules[n_rules];
299 u16 allowed_ethertypes[n_ether_types];
302 autoreply define gbp_contract_add_del
307 vl_api_gbp_contract_t contract;
310 define gbp_contract_dump
316 define gbp_contract_details
319 vl_api_gbp_contract_t contract;
323 * @brief Set the time throeshold after which an endpoint is
324 considered inative and is aged/reaped by the scanner
325 * @param threshold In seconds
327 autoreply define gbp_endpoint_learn_set_inactive_threshold
335 * @brief Configure a 'base' tunnel from which learned tunnels
336 * are permitted to derive
337 * A base tunnel consists only of the VNI, any src,dst IP
338 * pair is thus allowed.
340 enum gbp_vxlan_tunnel_mode
342 GBP_VXLAN_TUNNEL_MODE_L2,
343 GBP_VXLAN_TUNNEL_MODE_L3,
346 typedef gbp_vxlan_tunnel
349 vl_api_gbp_vxlan_tunnel_mode_t mode;
353 define gbp_vxlan_tunnel_add
357 vl_api_gbp_vxlan_tunnel_t tunnel;
360 define gbp_vxlan_tunnel_add_reply
367 autoreply define gbp_vxlan_tunnel_del
374 define gbp_vxlan_tunnel_dump
380 define gbp_vxlan_tunnel_details
383 vl_api_gbp_vxlan_tunnel_t tunnel;
386 typeonly define gbp_ext_itf
393 autoreply define gbp_ext_itf_add_del
398 vl_api_gbp_ext_itf_t ext_itf;
401 define gbp_ext_itf_dump
407 define gbp_ext_itf_details
410 vl_api_gbp_ext_itf_t ext_itf;
415 * eval: (c-set-style "gnu")