GBP: fixes for l3-out routing
[vpp.git] / src / vnet / vxlan-gbp / vxlan_gbp.api
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
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:
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 option version = "1.1.0";
18 import "vnet/ip/ip_types.api";
19
20 enum vxlan_gbp_api_tunnel_mode
21 {
22   VXLAN_GBP_API_TUNNEL_MODE_L2,
23   VXLAN_GBP_API_TUNNEL_MODE_L3,
24 };
25
26 /** \brief Definition of a VXLAN GBP tunnel
27     @param instance - optional unique custom device instance, else ~0.
28     @param src - Source IP address
29     @param dst - Destination IP address, can be multicast
30     @param mcast_sw_if_index - Interface for multicast destination
31     @param encap_table_id - Encap route table 
32     @param vni - The VXLAN Network Identifier, uint24
33     @param sw_ifindex - Ignored in add message, set in details
34 */
35 typedef vxlan_gbp_tunnel
36 {
37   u32 instance;
38   vl_api_address_t src;
39   vl_api_address_t dst;
40   u32 mcast_sw_if_index;
41   u32 encap_table_id;
42   u32 vni;
43   u32 sw_if_index;
44   vl_api_vxlan_gbp_api_tunnel_mode_t mode;
45 };
46
47 /** \brief Create or delete a VXLAN-GBP tunnel
48     @param client_index - opaque cookie to identify the sender
49     @param context - sender context, to match reply w/ request
50     @param is_add - Use 1 to create the tunnel, 0 to remove it
51 */
52 define vxlan_gbp_tunnel_add_del
53 {
54   u32 client_index;
55   u32 context;
56   u8 is_add;
57   vl_api_vxlan_gbp_tunnel_t tunnel;
58 };
59
60 define vxlan_gbp_tunnel_add_del_reply
61 {
62   u32 context;
63   i32 retval;
64   u32 sw_if_index;
65 };
66
67 define vxlan_gbp_tunnel_dump
68 {
69   u32 client_index;
70   u32 context;
71   u32 sw_if_index;
72 };
73
74 define vxlan_gbp_tunnel_details
75 {
76   u32 context;
77   vl_api_vxlan_gbp_tunnel_t tunnel;
78 };
79
80 /** \brief Interface set vxlan-bypass request
81     @param client_index - opaque cookie to identify the sender
82     @param context - sender context, to match reply w/ request
83     @param sw_if_index - interface used to reach neighbor
84     @param is_ipv6 - if non-zero, enable ipv6-vxlan-bypass, else ipv4-vxlan-bypass
85     @param enable - if non-zero enable, else disable
86 */
87 autoreply define sw_interface_set_vxlan_gbp_bypass
88 {
89   u32 client_index;
90   u32 context;
91   u32 sw_if_index;
92   u8 is_ipv6;
93   u8 enable;
94 };
95