IPSEC-GRE: fixes and API update to common types.
[vpp.git] / src / vnet / ipsec-gre / ipsec_gre.api
1 /*
2  * Copyright (c) 2015-2016 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15
16 option version = "1.1.0";
17
18 import "vnet/ip/ip_types.api";
19
20 /** \brief Add / del ipsec gre tunnel request
21     @param client_index - opaque cookie to identify the sender
22     @param context - sender context, to match reply w/ request
23     @param local_sa_id - local/output SA id
24     @param remote_sa_id - remote/input SA id
25     @param is_add - 1 if adding the tunnel, 0 if deleting
26     @param sw_if_index - software index of the ipsec gre tunnel
27                          ignored on create. set in dump/details
28     @param src - tunnel source address
29     @param dst - tunnel destination address
30 */
31 typedef ipsec_gre_tunnel {
32     u32 client_index;
33     u32 context;
34     u32 local_sa_id;
35     u32 remote_sa_id;
36     u8 is_add;
37     u32 sw_if_index;
38     vl_api_ip4_address_t src;
39     vl_api_ip4_address_t dst;
40 };
41
42 define ipsec_gre_tunnel_add_del {
43     u32 client_index;
44     u32 context;
45     u8 is_add;
46     vl_api_ipsec_gre_tunnel_t tunnel;
47 };
48
49 /** \brief Reply for add / del ipsec gre tunnel request
50     @param context - returned sender context, to match reply w/ request
51     @param retval - return code
52     @param sw_if_index - software index of the new ipsec gre tunnel
53 */
54 define ipsec_gre_tunnel_add_del_reply {
55     u32 context;
56     i32 retval;
57     u32 sw_if_index;
58 };
59
60 /** \brief Dump ipsec gre tunnel table
61     @param client_index - opaque cookie to identify the sender
62     @param context - sender context, to match reply w/ request
63     @param tunnel_index - gre tunnel identifier or -1 in case of all tunnels
64 */
65 define ipsec_gre_tunnel_dump {
66     u32 client_index;
67     u32 context;
68     u32 sw_if_index;
69 };
70
71 /** \brief ipsec gre tunnel operational state response
72     @param context - returned sender context, to match reply w/ request
73     @param local_sa_id - local SA id
74     @param remote_sa_id - remote SA id
75     @param src_address - tunnel source address
76     @param dst_address - tunnel destination address
77 */
78 define ipsec_gre_tunnel_details {
79     u32 context;
80     vl_api_ipsec_gre_tunnel_t tunnel;
81 };
82
83 /*
84  * Local Variables:
85  * eval: (c-set-style "gnu")
86  * End:
87  */
88