nat: nat44-ed add session timing out indicator in api
[vpp.git] / src / plugins / nat / nat66 / nat66.api
1 /*
2  * Copyright (c) 2020 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.0.0";
17 import "vnet/ip/ip_types.api";
18 import "vnet/interface_types.api";
19 import "plugins/nat/lib/nat_types.api";
20
21
22 /** \brief Enable/disable NAT66 plugin
23     @param client_index - opaque cookie to identify the sender
24     @param context - sender context, to match reply w/ request
25     @param outside_vrf - outside vrf id
26     @param enable - true if enable, false if disable
27 */
28 autoreply define nat66_plugin_enable_disable {
29   u32 client_index;
30   u32 context;
31   u32 outside_vrf;
32   bool enable;
33 };
34
35 /** \brief Enable/disable NAT66 feature on the interface
36     @param client_index - opaque cookie to identify the sender
37     @param context - sender context, to match reply w/ request
38     @param is_add - true if add, false if delete
39     @param flags - flag NAT_IS_INSIDE if interface is inside or
40                    interface is outside,
41     @param sw_if_index - software index of the interface
42 */
43 autoreply define nat66_add_del_interface {
44   u32 client_index;
45   u32 context;
46   bool is_add;
47   vl_api_nat_config_flags_t flags;
48   vl_api_interface_index_t sw_if_index;
49 };
50
51 /** \brief Dump interfaces with NAT66 feature
52     @param client_index - opaque cookie to identify the sender
53     @param context - sender context, to match reply w/ request
54 */
55 define nat66_interface_dump {
56   u32 client_index;
57   u32 context;
58 };
59
60 /** \brief NAT66 interface details response
61     @param context - sender context, to match reply w/ request
62     @param flags - flag NAT_IS_INSIDE if interface is inside or
63                    interface is outside,
64     @param sw_if_index - software index of the interface
65 */
66 define nat66_interface_details {
67   u32 context;
68   vl_api_nat_config_flags_t flags;
69   vl_api_interface_index_t sw_if_index;
70 };
71
72 /** \brief Add/delete 1:1 NAT66
73     @param client_index - opaque cookie to identify the sender
74     @param context - sender context, to match reply w/ request
75     @param is_add - true if add, false if delete
76     @param local_ip_address - local IPv6 address
77     @param external_ip_address - external IPv6 address
78     @param vrf_id - VRF id of tenant
79 */
80 autoreply define nat66_add_del_static_mapping {
81   u32 client_index;
82   u32 context;
83   bool is_add;
84   vl_api_ip6_address_t local_ip_address;
85   vl_api_ip6_address_t external_ip_address;
86   u32 vrf_id;
87 };
88
89 /** \brief Dump NAT66 static mappings
90     @param client_index - opaque cookie to identify the sender
91     @param context - sender context, to match reply w/ request
92 */
93 define nat66_static_mapping_dump {
94   u32 client_index;
95   u32 context;
96 };
97
98 /** \brief NAT66 static mapping details response
99     @param context - sender context, to match reply w/ request
100     @param local_ip_address - local IPv6 address
101     @param external_ip_address - external IPv6 address
102     @param vrf_id - VRF id of tenant
103     @param total_bytes - count of bytes sent through static mapping
104     @param total_pkts - count of pakets sent through static mapping
105 */
106 define nat66_static_mapping_details {
107   u32 context;
108   vl_api_ip6_address_t local_ip_address;
109   vl_api_ip6_address_t external_ip_address;
110   u32 vrf_id;
111   u64 total_bytes;
112   u64 total_pkts;
113 };