blob: cb0bb736c4f8b517c4ebb74aefed282d22c22a18 [file] [log] [blame]
Neale Ranns5a8844b2019-04-16 07:15:35 +00001/* Hey Emacs use -*- mode: C -*- */
Pavel Kotucek1099b0d2016-12-20 08:13:14 +01002/*
Neale Ranns5a8844b2019-04-16 07:15:35 +00003 * Copyright (c) 2015-2019 Cisco and/or its affiliates.
Pavel Kotucek1099b0d2016-12-20 08:13:14 +01004 * 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
Neale Ranns5a8844b2019-04-16 07:15:35 +000017option version = "2.0.0";
Dave Barach0d056e52017-09-28 15:11:16 -040018
Ole Troan814f1592019-06-07 11:02:58 +020019import "vnet/interface_types.api";
Neale Ranns5a8844b2019-04-16 07:15:35 +000020import "vnet/ip/ip_types.api";
21
22/** \brief A GRE tunnel type
23*/
24enum gre_tunnel_type
25{
Alexander Chernavind0aed2e2019-04-22 09:30:16 -040026 GRE_API_TUNNEL_TYPE_L3 = 0,
Neale Ranns5a8844b2019-04-16 07:15:35 +000027 GRE_API_TUNNEL_TYPE_TEB,
28 GRE_API_TUNNEL_TYPE_ERSPAN,
29};
30
31/** \brief A GRE tunnel
John Loa43ccae2018-02-13 17:15:23 -050032 @param client_index - opaque cookie to identify the sender
33 @param context - sender context, to match reply w/ request
John Loa43ccae2018-02-13 17:15:23 -050034 @param tunnel_type - 0: L3, 1: TEB, 2: ERSPAN
35 @param instance - optional unique custom device instance, else ~0.
Neale Ranns5a8844b2019-04-16 07:15:35 +000036 @param src - Source IP address
37 @param dst - Destination IP address, can be multicast
John Loa43ccae2018-02-13 17:15:23 -050038 @param outer_fib_id - Encap FIB table ID
39 @param session_id - session for ERSPAN tunnel, range 0-1023
Neale Ranns5a8844b2019-04-16 07:15:35 +000040 @param sw_if_index - ignored on create/delete, present in details.
John Loa43ccae2018-02-13 17:15:23 -050041*/
Neale Ranns5a8844b2019-04-16 07:15:35 +000042typedef gre_tunnel
Pavel Kotucek1099b0d2016-12-20 08:13:14 +010043{
44 u32 client_index;
45 u32 context;
John Loa43ccae2018-02-13 17:15:23 -050046 u16 session_id;
Neale Ranns5a8844b2019-04-16 07:15:35 +000047 vl_api_gre_tunnel_type_t type;
48 u32 instance;
49 u32 outer_fib_id;
Ole Troan814f1592019-06-07 11:02:58 +020050 vl_api_interface_index_t sw_if_index;
Neale Ranns5a8844b2019-04-16 07:15:35 +000051 vl_api_address_t src;
52 vl_api_address_t dst;
Pavel Kotucek1099b0d2016-12-20 08:13:14 +010053};
54
Neale Ranns5a8844b2019-04-16 07:15:35 +000055define gre_tunnel_add_del
56{
57 u32 client_index;
58 u32 context;
Ole Troan814f1592019-06-07 11:02:58 +020059 bool is_add;
Neale Ranns5a8844b2019-04-16 07:15:35 +000060 vl_api_gre_tunnel_t tunnel;
61};
62
63define gre_tunnel_add_del_reply
Pavel Kotucek1099b0d2016-12-20 08:13:14 +010064{
65 u32 context;
66 i32 retval;
Ole Troan814f1592019-06-07 11:02:58 +020067 vl_api_interface_index_t sw_if_index;
Pavel Kotucek1099b0d2016-12-20 08:13:14 +010068};
69
70define gre_tunnel_dump
71{
72 u32 client_index;
73 u32 context;
Ole Troan814f1592019-06-07 11:02:58 +020074 vl_api_interface_index_t sw_if_index;
Pavel Kotucek1099b0d2016-12-20 08:13:14 +010075};
76
77define gre_tunnel_details
78{
79 u32 context;
Neale Ranns5a8844b2019-04-16 07:15:35 +000080 vl_api_gre_tunnel_t tunnel;
Pavel Kotucek1099b0d2016-12-20 08:13:14 +010081};
82
83/*
84 * Local Variables:
85 * eval: (c-set-style "gnu")
86 * End:
87 */