GRE: set gre_tunnel_type init value to zero in API
[vpp.git] / src / vnet / gre / gre.api
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
3  * Copyright (c) 2015-2019 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.0.0";
18
19 import "vnet/ip/ip_types.api";
20
21 /** \brief A GRE tunnel type
22 */
23 enum gre_tunnel_type
24 {
25   GRE_API_TUNNEL_TYPE_L3 = 0,
26   GRE_API_TUNNEL_TYPE_TEB,
27   GRE_API_TUNNEL_TYPE_ERSPAN,
28 };
29
30 /** \brief A GRE tunnel
31     @param client_index - opaque cookie to identify the sender
32     @param context - sender context, to match reply w/ request
33     @param tunnel_type - 0: L3, 1: TEB, 2: ERSPAN
34     @param instance - optional unique custom device instance, else ~0.
35     @param src - Source IP address
36     @param dst - Destination IP address, can be multicast
37     @param outer_fib_id - Encap FIB table ID
38     @param session_id - session for ERSPAN tunnel, range 0-1023
39     @param sw_if_index - ignored on create/delete, present in details.
40 */
41 typedef gre_tunnel
42 {
43   u32 client_index;
44   u32 context;
45   u8 is_add;
46   u8 is_ipv6;
47   u16 session_id;
48   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;
54 };
55
56 define 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
64 define gre_tunnel_add_del_reply
65 {
66   u32 context;
67   i32 retval;
68   u32 sw_if_index;
69 };
70
71 define gre_tunnel_dump
72 {
73   u32 client_index;
74   u32 context;
75   u32 sw_if_index;
76 };
77
78 define gre_tunnel_details
79 {
80   u32 context;
81   vl_api_gre_tunnel_t tunnel;
82 };
83
84 /*
85  * Local Variables:
86  * eval: (c-set-style "gnu")
87  * End:
88  */