2 * Copyright (c) 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:
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 * @brief VPP control-plane API messages.
19 * This file defines VPP control-plane API messages which are generally
20 * called through a shared memory interface.
23 /** \brief Add S-NAT address range
24 @param client_index - opaque cookie to identify the sender
25 @param context - sender context, to match reply w/ request
26 @param is_ip4 - 1 if address type is IPv4
27 @first_ip_address - first IP address
28 @last_ip_address - last IP address
30 define snat_add_address_range {
34 u8 first_ip_address[16];
35 u8 last_ip_address[16];
38 /** \brief Add S-NAT address range reply
39 @param client_index - opaque cookie to identify the sender
40 @param context - sender context, to match reply w/ request
41 @param retval - return code
43 define snat_add_address_range_reply {
48 /** \brief Enable/disable S-NAT feature on the interface
49 @param client_index - opaque cookie to identify the sender
50 @param context - sender context, to match reply w/ request
51 @param is_add - 1 if add, 0 if delete
52 @param is_inside - 1 if inside, 0 if outside
53 @param sw_if_index - software index of the interface
55 define snat_interface_add_del_feature {
63 /** \brief Enable/disable S-NAT feature on the interface reply
64 @param client_index - opaque cookie to identify the sender
65 @param context - sender context, to match reply w/ request
66 @param retval - return code
68 define snat_interface_add_del_feature_reply {
73 /** \brief Add/delete S-NAT static mapping
74 @param client_index - opaque cookie to identify the sender
75 @param context - sender context, to match reply w/ request
76 @param is_add - 1 if add, 0 if delete
77 @param is_ip4 - 1 if address type is IPv4
78 @param addr_only - 1 if address only mapping
79 @param local_ip_address - local IP address
80 @param external_ip_address - external IP address
81 @param local_port - local port number
82 @param external_port - external port number
83 @param vfr_id - VRF ID
85 define snat_add_static_mapping {
91 u8 local_ip_address[16];
92 u8 external_ip_address[16];
98 /** \brief Add/delete S-NAT static mapping reply
99 @param client_index - opaque cookie to identify the sender
100 @param context - sender context, to match reply w/ request
101 @param retval - return code
103 define snat_add_static_mapping_reply {
108 /** \brief Dump S-NAT static mappings
109 @param client_index - opaque cookie to identify the sender
110 @param context - sender context, to match reply w/ request
112 define snat_static_mapping_dump {
117 /** \brief S-NAT static mapping details response
118 @param context - sender context, to match reply w/ request
119 @param is_ip4 - 1 if address type is IPv4
120 @param addr_only - 1 if address only mapping
121 @param local_ip_address - local IP address
122 @param external_ip_address - external IP address
123 @param local_port - local port number
124 @param external_port - external port number
125 @param vfr_id - VRF ID
127 define snat_static_mapping_details {
131 u8 local_ip_address[16];
132 u8 external_ip_address[16];
138 /** \brief Control ping from client to api server request
139 @param client_index - opaque cookie to identify the sender
140 @param context - sender context, to match reply w/ request
142 define snat_control_ping
148 /** \brief Control ping from the client to the server response
149 @param client_index - opaque cookie to identify the sender
150 @param context - sender context, to match reply w/ request
151 @param retval - return code for the request
152 @param vpe_pid - the pid of the vpe, returned by the server
154 define snat_control_ping_reply
162 /** \brief Show S-NAT plugin startup config
163 @param client_index - opaque cookie to identify the sender
164 @param context - sender context, to match reply w/ request
166 define snat_show_config
172 /** \brief Show S-NAT plugin startup config reply
173 @param context - sender context, to match reply w/ request
174 @param retval - return code for the request
175 @param static_mapping_only - if 1 dynamic translations disabled
176 @param static_mapping_connection_tracking - if 1 create session data
177 @param translation_buckets - number of translation hash buckets
178 @param translation_memory_size - translation hash memory size
179 @param user_buckets - number of user hash buckets
180 @param user_memory_size - user hash memory size
181 @param max_translations_per_user - maximum number of translations per user
182 @param outside_vrf_id - outside VRF id
183 @param inside_vrf_id - default inside VRF id
185 define snat_show_config_reply
189 u8 static_mapping_only;
190 u8 static_mapping_connection_tracking;
191 u32 translation_buckets;
192 u32 translation_memory_size;
194 u32 user_memory_size;
195 u32 max_translations_per_user;