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 manual_print autoreply define gbp_bridge_domain_add
46 vl_api_gbp_bridge_domain_t bd;
48 manual_print autoreply define gbp_bridge_domain_del
54 autoreply define gbp_bridge_domain_dump
59 define gbp_bridge_domain_details
62 vl_api_gbp_bridge_domain_t bd;
65 typedef u16 gbp_scope;
67 typedef gbp_route_domain
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;
77 manual_print autoreply define gbp_route_domain_add
81 vl_api_gbp_route_domain_t rd;
83 manual_print autoreply define gbp_route_domain_del
89 autoreply define gbp_route_domain_dump
94 define gbp_route_domain_details
97 vl_api_gbp_route_domain_t rd;
101 @param client_index - opaque cookie to identify the sender
102 @param context - sender context, to match reply w/ request
105 enum gbp_endpoint_flags
107 GBP_API_ENDPOINT_FLAG_NONE = 0,
108 GBP_API_ENDPOINT_FLAG_BOUNCE = 0x1,
109 GBP_API_ENDPOINT_FLAG_REMOTE = 0x2,
110 GBP_API_ENDPOINT_FLAG_LEARNT = 0x4,
111 GBP_API_ENDPOINT_FLAG_EXTERNAL = 0x8,
114 typedef gbp_endpoint_tun
116 vl_api_address_t src;
117 vl_api_address_t dst;
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];
131 manual_print define gbp_endpoint_add
135 vl_api_gbp_endpoint_t endpoint;
138 define gbp_endpoint_add_reply
145 manual_print autoreply define gbp_endpoint_del
152 define gbp_endpoint_dump
158 define gbp_endpoint_details
163 vl_api_gbp_endpoint_t endpoint;
166 typedef gbp_endpoint_retention
168 u32 remote_ep_timeout;
171 typedef gbp_endpoint_group
177 vl_api_interface_index_t uplink_sw_if_index;
178 vl_api_gbp_endpoint_retention_t retention;
181 manual_print autoreply define gbp_endpoint_group_add
185 vl_api_gbp_endpoint_group_t epg;
187 manual_print autoreply define gbp_endpoint_group_del
194 define gbp_endpoint_group_dump
200 define gbp_endpoint_group_details
203 vl_api_gbp_endpoint_group_t epg;
208 vl_api_interface_index_t sw_if_index;
213 manual_print autoreply define gbp_recirc_add_del
218 vl_api_gbp_recirc_t recirc;
221 define gbp_recirc_dump
227 define gbp_recirc_details
230 vl_api_gbp_recirc_t recirc;
235 GBP_API_SUBNET_TRANSPORT,
236 GBP_API_SUBNET_STITCHED_INTERNAL,
237 GBP_API_SUBNET_STITCHED_EXTERNAL,
238 GBP_API_SUBNET_L3_OUT,
239 GBP_API_SUBNET_ANON_L3_OUT,
245 vl_api_interface_index_t sw_if_index;
247 vl_api_gbp_subnet_type_t type;
248 vl_api_prefix_t prefix;
251 manual_print autoreply define gbp_subnet_add_del
256 vl_api_gbp_subnet_t subnet;
259 define gbp_subnet_dump
265 define gbp_subnet_details
268 vl_api_gbp_subnet_t subnet;
274 vl_api_mac_address_t mac;
281 GBP_API_HASH_MODE_SRC_IP,
282 GBP_API_HASH_MODE_DST_IP,
283 GBP_API_HASH_MODE_SYMMETRIC,
286 typedef gbp_next_hop_set
288 vl_api_gbp_hash_mode_t hash_mode;
290 vl_api_gbp_next_hop_t nhs[8];
297 GBP_API_RULE_REDIRECT,
302 vl_api_gbp_rule_action_t action;
303 vl_api_gbp_next_hop_set_t nh_set;
308 vl_api_gbp_scope_t scope;
313 u16 allowed_ethertypes[16];
315 vl_api_gbp_rule_t rules[n_rules];
318 manual_print define gbp_contract_add_del
323 vl_api_gbp_contract_t contract;
325 define gbp_contract_add_del_reply
332 define gbp_contract_dump
338 define gbp_contract_details
341 vl_api_gbp_contract_t contract;
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.
350 enum gbp_vxlan_tunnel_mode
352 GBP_VXLAN_TUNNEL_MODE_L2,
353 GBP_VXLAN_TUNNEL_MODE_L3,
356 typedef gbp_vxlan_tunnel
359 vl_api_gbp_vxlan_tunnel_mode_t mode;
361 vl_api_ip4_address_t src;
364 manual_print define gbp_vxlan_tunnel_add
368 vl_api_gbp_vxlan_tunnel_t tunnel;
371 define gbp_vxlan_tunnel_add_reply
375 vl_api_interface_index_t sw_if_index;
378 manual_print autoreply define gbp_vxlan_tunnel_del
385 define gbp_vxlan_tunnel_dump
391 define gbp_vxlan_tunnel_details
394 vl_api_gbp_vxlan_tunnel_t tunnel;
397 enum gbp_ext_itf_flags
399 GBP_API_EXT_ITF_F_NONE = 0,
400 GBP_API_EXT_ITF_F_ANON = 1,
405 vl_api_interface_index_t sw_if_index;
408 vl_api_gbp_ext_itf_flags_t flags;
411 manual_print autoreply define gbp_ext_itf_add_del
416 vl_api_gbp_ext_itf_t ext_itf;
419 define gbp_ext_itf_dump
425 define gbp_ext_itf_details
428 vl_api_gbp_ext_itf_t ext_itf;
433 * eval: (c-set-style "gnu")