blob: 841099c68cc2d494b063f5dcaa3f594c1f60ef26 [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
Neale Ranns5a8844b2019-04-16 07:15:35 +000019import "vnet/ip/ip_types.api";
20
21/** \brief A GRE tunnel type
22*/
23enum gre_tunnel_type
24{
Alexander Chernavind0aed2e2019-04-22 09:30:16 -040025 GRE_API_TUNNEL_TYPE_L3 = 0,
Neale Ranns5a8844b2019-04-16 07:15:35 +000026 GRE_API_TUNNEL_TYPE_TEB,
27 GRE_API_TUNNEL_TYPE_ERSPAN,
28};
29
30/** \brief A GRE tunnel
John Loa43ccae2018-02-13 17:15:23 -050031 @param client_index - opaque cookie to identify the sender
32 @param context - sender context, to match reply w/ request
John Loa43ccae2018-02-13 17:15:23 -050033 @param tunnel_type - 0: L3, 1: TEB, 2: ERSPAN
34 @param instance - optional unique custom device instance, else ~0.
Neale Ranns5a8844b2019-04-16 07:15:35 +000035 @param src - Source IP address
36 @param dst - Destination IP address, can be multicast
John Loa43ccae2018-02-13 17:15:23 -050037 @param outer_fib_id - Encap FIB table ID
38 @param session_id - session for ERSPAN tunnel, range 0-1023
Neale Ranns5a8844b2019-04-16 07:15:35 +000039 @param sw_if_index - ignored on create/delete, present in details.
John Loa43ccae2018-02-13 17:15:23 -050040*/
Neale Ranns5a8844b2019-04-16 07:15:35 +000041typedef gre_tunnel
Pavel Kotucek1099b0d2016-12-20 08:13:14 +010042{
43 u32 client_index;
44 u32 context;
45 u8 is_add;
46 u8 is_ipv6;
John Loa43ccae2018-02-13 17:15:23 -050047 u16 session_id;
Neale Ranns5a8844b2019-04-16 07:15:35 +000048 vl_api_gre_tunnel_type_t type;
49 u32 instance;
50 u32 outer_fib_id;
51 u32 sw_if_index;
52 vl_api_address_t src;
53 vl_api_address_t dst;
Pavel Kotucek1099b0d2016-12-20 08:13:14 +010054};
55
Neale Ranns5a8844b2019-04-16 07:15:35 +000056define gre_tunnel_add_del
57{
58 u32 client_index;
59 u32 context;
60 u8 is_add;
61 vl_api_gre_tunnel_t tunnel;
62};
63
64define gre_tunnel_add_del_reply
Pavel Kotucek1099b0d2016-12-20 08:13:14 +010065{
66 u32 context;
67 i32 retval;
68 u32 sw_if_index;
69};
70
71define gre_tunnel_dump
72{
73 u32 client_index;
74 u32 context;
75 u32 sw_if_index;
76};
77
78define gre_tunnel_details
79{
80 u32 context;
Neale Ranns5a8844b2019-04-16 07:15:35 +000081 vl_api_gre_tunnel_t tunnel;
Pavel Kotucek1099b0d2016-12-20 08:13:14 +010082};
83
84/*
85 * Local Variables:
86 * eval: (c-set-style "gnu")
87 * End:
88 */