FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
gre.api
Go to the documentation of this file.
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
3  * Copyright (c) 2015-2020 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 = "2.1.1";
18 
19 import "vnet/interface_types.api";
20 import "vnet/tunnel/tunnel_types.api";
21 import "vnet/ip/ip_types.api";
22 
23 /** \brief A GRE tunnel type
24 */
26 {
28  /* L2 Transparent Ethernet Bridge */
30  /* Encapsulated Remote Switched Port ANalyzer */
32 };
33 
34 /** \brief A composite type uniquely defining a GRE tunnel.
35  @param type - tunnel type (see enum definition), 0: L3, 1: TEB, 2: ERSPAN
36  @param mode - P2P or P2MP
37  @param flags - to control encap/decap behaviour
38  @param session_id - session for ERSPAN tunnel, range 0-1023
39  @param instance - optional unique custom device instance, else ~0.
40  @param outer_table_id - Encap FIB table ID
41  @param sw_if_index - ignored on create/delete, present in details.
42  @param src - Source IP address
43  @param dst - Destination IP address, can be multicast
44 */
45 typedef gre_tunnel
46 {
47  vl_api_gre_tunnel_type_t type;
48  vl_api_tunnel_mode_t mode;
49  vl_api_tunnel_encap_decap_flags_t flags;
53  vl_api_interface_index_t sw_if_index;
54  vl_api_address_t src;
55  vl_api_address_t dst;
56 };
57 
58 /** \brief Add or delete a single GRE tunnel.
59  @param client_index - opaque cookie to identify the sender.
60  @param context - sender context, to match reply w/ request.
61  @param is_add - add if true, delete if false.
62  @param tunnel - tunnel definition to add or delete.
63 */
64 define gre_tunnel_add_del
65 {
68  bool is_add;
69  vl_api_gre_tunnel_t tunnel;
70 };
71 
72 /** \brief Add or delete a single GRE tunnel.
73  @param context - sender context, to match reply w/ request.
74  @param retval - return code for the request.
75  @param sw_if_index - the interface corresponding to the affected tunnel.
76 */
77 define gre_tunnel_add_del_reply
78 {
81  vl_api_interface_index_t sw_if_index;
82 };
83 
84 /** \brief Dump details of all or just a single GRE tunnel.
85  @param client_index - opaque cookie to identify the sender.
86  @param context - sender context, to match reply w/ request.
87  @param sw_if_index - filter for tunnel of this interface index, ~0 for all.
88 */
89 define gre_tunnel_dump
90 {
93  vl_api_interface_index_t sw_if_index;
94 };
95 
96 /** \brief Details response for one of the requested GRE tunnels.
97  @param context - sender context, to match reply w/ request.
98  @param tunnel - definition of the dumped tunnel.
99 */
100 define gre_tunnel_details
101 {
103  vl_api_gre_tunnel_t tunnel;
104 };
105 
106 /*
107  * Local Variables:
108  * eval: (c-set-style "gnu")
109  * End:
110  */
vl_api_gre_tunnel_dump_t::sw_if_index
vl_api_interface_index_t sw_if_index
Definition: gre.api:93
session_id
u16 session_id
Definition: gre.api:50
version
option version
Definition: gre.api:17
GRE_API_TUNNEL_TYPE_TEB
@ GRE_API_TUNNEL_TYPE_TEB
Definition: gre.api:29
u16
unsigned short u16
Definition: types.h:57
mode
vl_api_tunnel_mode_t mode
Definition: gre.api:48
sw_if_index
vl_api_interface_index_t sw_if_index
Definition: gre.api:53
vl_api_gre_tunnel_dump_t::client_index
u32 client_index
Definition: gre.api:91
i32
signed int i32
Definition: types.h:77
vl_api_gre_tunnel_add_del_reply_t::sw_if_index
vl_api_interface_index_t sw_if_index
Definition: gre.api:81
vl_api_gre_tunnel_details_t
Details response for one of the requested GRE tunnels.
Definition: gre.api:100
vl_api_gre_tunnel_add_del_reply_t
Add or delete a single GRE tunnel.
Definition: gre.api:77
vl_api_gre_tunnel_add_del_reply_t::retval
i32 retval
Definition: gre.api:80
vl_api_gre_tunnel_add_del_t::context
u32 context
Definition: gre.api:67
vl_api_gre_tunnel_details_t::context
u32 context
Definition: gre.api:102
GRE_API_TUNNEL_TYPE_L3
@ GRE_API_TUNNEL_TYPE_L3
Definition: gre.api:27
vl_api_gre_tunnel_dump_t::context
u32 context
Definition: gre.api:92
src
vl_api_address_t src
Definition: gre.api:54
GRE_API_TUNNEL_TYPE_ERSPAN
@ GRE_API_TUNNEL_TYPE_ERSPAN
Definition: gre.api:31
vl_api_gre_tunnel_add_del_t
Add or delete a single GRE tunnel.
Definition: gre.api:64
vl_api_gre_tunnel_details_t::tunnel
vl_api_gre_tunnel_t tunnel
Definition: gre.api:103
vl_api_gre_tunnel_add_del_t::is_add
bool is_add
Definition: gre.api:68
u32
unsigned int u32
Definition: types.h:88
instance
u32 instance
Definition: gre.api:51
outer_table_id
u32 outer_table_id
Definition: gre.api:52
vl_api_gre_tunnel_dump_t
Dump details of all or just a single GRE tunnel.
Definition: gre.api:89
gre_tunnel
typedef gre_tunnel
A composite type uniquely defining a GRE tunnel.
Definition: gre.api:46
u8
unsigned char u8
Definition: types.h:56
dst
vl_api_address_t dst
Definition: gre.api:55
vl_api_gre_tunnel_add_del_reply_t::context
u32 context
Definition: gre.api:79
flags
vl_api_tunnel_encap_decap_flags_t flags
Definition: gre.api:49
vl_api_gre_tunnel_add_del_t::tunnel
vl_api_gre_tunnel_t tunnel
Definition: gre.api:69
type
vl_api_fib_path_type_t type
Definition: fib_types.api:123
gre_tunnel_type
gre_tunnel_type
A GRE tunnel type.
Definition: gre.api:25
vl_api_gre_tunnel_add_del_t::client_index
u32 client_index
Definition: gre.api:66