blob: 41b05165ac01d32cf13042293852ac32acd765b0 [file] [log] [blame]
Neale Ranns5a8844b2019-04-16 07:15:35 +00001/* Hey Emacs use -*- mode: C -*- */
Pavel Kotucek1099b0d2016-12-20 08:13:14 +01002/*
Vratko Polak8ab4e502020-01-31 19:21:25 +01003 * Copyright (c) 2015-2020 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
Vratko Polak8ab4e502020-01-31 19:21:25 +010017option version = "2.1.0";
Dave Barach0d056e52017-09-28 15:11:16 -040018
Ole Troan814f1592019-06-07 11:02:58 +020019import "vnet/interface_types.api";
Neale Ranns59ff9182019-12-29 23:55:18 +000020import "vnet/tunnel/tunnel_types.api";
Neale Ranns5a8844b2019-04-16 07:15:35 +000021import "vnet/ip/ip_types.api";
22
23/** \brief A GRE tunnel type
24*/
Neale Ranns5f8f6172019-04-18 10:23:56 +000025enum gre_tunnel_type : u8
Neale Ranns5a8844b2019-04-16 07:15:35 +000026{
Alexander Chernavind0aed2e2019-04-22 09:30:16 -040027 GRE_API_TUNNEL_TYPE_L3 = 0,
Neale Ranns5a8844b2019-04-16 07:15:35 +000028 GRE_API_TUNNEL_TYPE_TEB,
29 GRE_API_TUNNEL_TYPE_ERSPAN,
30};
31
32/** \brief A GRE tunnel
John Loa43ccae2018-02-13 17:15:23 -050033 @param client_index - opaque cookie to identify the sender
34 @param context - sender context, to match reply w/ request
John Loa43ccae2018-02-13 17:15:23 -050035 @param tunnel_type - 0: L3, 1: TEB, 2: ERSPAN
36 @param instance - optional unique custom device instance, else ~0.
Neale Rannse5b94dd2019-12-31 05:13:14 +000037 @param mode - P2P or P2MP
38 @param flags - to control encap/decap behaviour
Neale Ranns5a8844b2019-04-16 07:15:35 +000039 @param src - Source IP address
40 @param dst - Destination IP address, can be multicast
Neale Ranns5f8f6172019-04-18 10:23:56 +000041 @param outer_table_id - Encap FIB table ID
John Loa43ccae2018-02-13 17:15:23 -050042 @param session_id - session for ERSPAN tunnel, range 0-1023
Neale Ranns5a8844b2019-04-16 07:15:35 +000043 @param sw_if_index - ignored on create/delete, present in details.
John Loa43ccae2018-02-13 17:15:23 -050044*/
Neale Ranns5a8844b2019-04-16 07:15:35 +000045typedef gre_tunnel
Pavel Kotucek1099b0d2016-12-20 08:13:14 +010046{
Neale Ranns5a8844b2019-04-16 07:15:35 +000047 vl_api_gre_tunnel_type_t type;
Neale Ranns59ff9182019-12-29 23:55:18 +000048 vl_api_tunnel_mode_t mode;
Neale Rannse5b94dd2019-12-31 05:13:14 +000049 vl_api_tunnel_encap_decap_flags_t flags;
Neale Ranns5f8f6172019-04-18 10:23:56 +000050 u16 session_id;
Neale Ranns5a8844b2019-04-16 07:15:35 +000051 u32 instance;
Neale Ranns5f8f6172019-04-18 10:23:56 +000052 u32 outer_table_id;
Ole Troan814f1592019-06-07 11:02:58 +020053 vl_api_interface_index_t sw_if_index;
Neale Ranns5a8844b2019-04-16 07:15:35 +000054 vl_api_address_t src;
55 vl_api_address_t dst;
Pavel Kotucek1099b0d2016-12-20 08:13:14 +010056};
57
Neale Ranns5a8844b2019-04-16 07:15:35 +000058define gre_tunnel_add_del
59{
60 u32 client_index;
61 u32 context;
Ole Troan814f1592019-06-07 11:02:58 +020062 bool is_add;
Neale Ranns5a8844b2019-04-16 07:15:35 +000063 vl_api_gre_tunnel_t tunnel;
64};
65
66define gre_tunnel_add_del_reply
Pavel Kotucek1099b0d2016-12-20 08:13:14 +010067{
68 u32 context;
69 i32 retval;
Ole Troan814f1592019-06-07 11:02:58 +020070 vl_api_interface_index_t sw_if_index;
Pavel Kotucek1099b0d2016-12-20 08:13:14 +010071};
72
73define gre_tunnel_dump
74{
75 u32 client_index;
76 u32 context;
Ole Troan814f1592019-06-07 11:02:58 +020077 vl_api_interface_index_t sw_if_index;
Pavel Kotucek1099b0d2016-12-20 08:13:14 +010078};
79
80define gre_tunnel_details
81{
82 u32 context;
Neale Ranns5a8844b2019-04-16 07:15:35 +000083 vl_api_gre_tunnel_t tunnel;
Pavel Kotucek1099b0d2016-12-20 08:13:14 +010084};
85
86/*
87 * Local Variables:
88 * eval: (c-set-style "gnu")
89 * End:
90 */