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.
16 option version = "3.1.0";
18 import "vnet/ip/ip_types.api";
20 /** \brief Add MAP domains
21 @param client_index - opaque cookie to identify the sender
22 @param context - sender context, to match reply w/ request
23 @param ip6_prefix - Rule IPv6 prefix
24 @param ip4_prefix - Rule IPv4 prefix
25 @param ip6_src - MAP domain IPv6 BR address / Tunnel source
26 @param ea_bits_len - Embedded Address bits length
27 @param psid_offset - Port Set Identifider (PSID) offset
28 @param psid_length - PSID length
30 @param tag - A user field stored with the MAP
36 vl_api_ip6_prefix_t ip6_prefix;
37 vl_api_ip4_prefix_t ip4_prefix;
38 vl_api_ip6_prefix_t ip6_src;
46 /** \brief Reply for MAP domain add
47 @param context - returned sender context, to match reply w/ request
48 @param index - MAP domain index
49 @param retval - return code
51 define map_add_domain_reply
58 /** \brief Delete MAP domain
59 @param client_index - opaque cookie to identify the sender
60 @param context - sender context, to match reply w/ request
61 @param index - MAP Domain index
63 autoreply define map_del_domain
71 /** \brief Add or Delete MAP rule from a domain (Only used for shared IPv4 per subscriber)
72 @param client_index - opaque cookie to identify the sender
73 @param context - sender context, to match reply w/ request
74 @param index - MAP Domain index
75 @param is_add - If 1 add rule, if 0 delete rule
76 @param ip6_dst - MAP CE IPv6 address
77 @param psid - Rule PSID
79 autoreply define map_add_del_rule
85 vl_api_ip6_address_t ip6_dst;
90 /** \brief Get list of map domains
91 @param client_index - opaque cookie to identify the sender
93 define map_domain_dump
99 /** \brief Details about a single MAP domain
100 @param context - returned sender context, to match reply w/ request
101 @param domain_index - MAP domain index
102 @param ip6_prefix - Rule IPv6 prefix
103 @param ip4_prefix - Rule IPv4 prefix
104 @param ip6_src - MAP domain IPv6 BR address / Tunnel source
105 @param ea_bits_len - Embedded Address bits length
106 @param psid_offset - Port Set Identifider (PSID) offset
107 @param psid_length - PSID length
110 @param tag - The user field stored with the MAP at creation time
112 define map_domain_details
116 vl_api_ip6_prefix_t ip6_prefix;
117 vl_api_ip4_prefix_t ip4_prefix;
118 vl_api_ip6_prefix_t ip6_src;
134 define map_rule_details
137 vl_api_ip6_address_t ip6_dst;
141 /** \brief Enable or disable a MAP interface
142 @param client_index - opaque cookie to identify the sender
143 @param context - sender context, to match reply w/ request
145 @param is_enable - 0=disable, 1=enable interface
146 @param is_translation - 0=encapsulation, 1=translation
148 autoreply define map_if_enable_disable
154 bool is_translation; /* 0 - encapsulation, 1 - translation */
157 /** \brief Request for a single block of summary stats
158 @param client_index - opaque cookie to identify the sender
159 @param context - sender context, to match reply w/ request
161 define map_summary_stats
167 /** \brief Reply for map_summary_stats request
168 @param context - sender context, to match reply w/ request
169 @param retval - return code for request
170 @param total_bindings -
172 @param total_ip4_fragments -
173 @param total_security_check -
175 define map_summary_stats_reply
182 u64 total_ip4_fragments;
183 u64 total_security_check[2];
187 /** \brief Set MAP fragmentation parameters
188 @param client_index - opaque cookie to identify the sender
189 @param context - sender context, to match reply w/ request
190 @param inner - 1=frag inner packet, 0=frag tunnel packets
191 @param ignore_df - 1=IP4 fragment despite DF bit, 0=honor DF
193 autoreply define map_param_set_fragmentation
202 /** \brief Set MAP ICMP parameters
203 @param client_index - opaque cookie to identify the sender
204 @param context - sender context, to match reply w/ request
205 @param icmp4_err_relay_src - IPv4 ICMP err relay src address
207 autoreply define map_param_set_icmp
211 vl_api_ip4_address_t ip4_err_relay_src;
215 /** \brief Set MAP ICMP6 parameters
216 @param client_index - opaque cookie to identify the sender
217 @param context - sender context, to match reply w/ request
218 @param enable_unreachable - 1 = send ICMP unreachable err msgs
220 autoreply define map_param_set_icmp6
224 bool enable_unreachable;
228 /** \brief Add/delete MAP pre-resolve IP addresses parameters
229 @param client_index - opaque cookie to identify the sender
230 @param context - sender context, to match reply w/ request
231 @param is_add - 1 = Add non-zero IP addresses, 0 = delete
232 @param ip4_nh_address - direct IP4 next-hop address
233 @param ip6_nh_address - direct IP6 next-hop address
235 autoreply define map_param_add_del_pre_resolve
240 vl_api_ip4_address_t ip4_nh_address;
241 vl_api_ip6_address_t ip6_nh_address;
245 /** \brief Set MAP reassembly parameters
246 @param client_index - opaque cookie to identify the sender
247 @param context - sender context, to match reply w/ request
248 @param is_ip6 - 1 = params apply to IPv6, 0 = params apply to IPv4
249 @param lifetime_ms - reassembly valid lifetime, or ~0
250 @param pool_size - max number of reassemblies, or ~0
251 @param buffers - max number of reassembly buffers, or ~0
252 @param ht_ratio - hash-table size factor, or ~0
254 autoreply define map_param_set_reassembly
266 /** \brief Set MAP security-check parameters
267 @param client_index - opaque cookie to identify the sender
268 @param context - sender context, to match reply w/ request
269 @param enable - 1=enable security check on first inbound packet
270 @param fragments - 1=enable check on (subsequent) fragments too
272 autoreply define map_param_set_security_check
281 /** \brief Set MAP traffic class parameters
282 @param client_index - opaque cookie to identify the sender
283 @param context - sender context, to match reply w/ request
284 @param copy - 1 = copy packet class/TOS field, 0 = use class instead
285 @param class - class field value when copy == 0
287 autoreply define map_param_set_traffic_class
296 /** \brief Set MAP TCP parammeters
297 @param client_index - opaque cookie to identify the sender
298 @param context - sender context, to match reply w/ request
299 @parma tcp_mss - TCP MSS clamping value
301 autoreply define map_param_set_tcp
309 /** \brief Request for a single block of MAP parameters
310 @param client_index - opaque cookie to identify the sender
311 @param context - sender context, to match reply w/ request
320 /** \brief Reply for map_param_get request
321 @param context - sender context, to match reply w/ request
322 @param retval - return code for request
323 @param inner - 1=frag inner packet, 0=frag tunnel packets, ~0=untouched
324 @param ignore_df - 1=IP4 fragm despite DF bit, 0=honor DF, ~0=untouched
325 @param icmp_ip4_err_relay_src - IPv4 ICMP err relay src address
326 @param icmp6_enable_unreachable - 1 = send ICMP unreachable err msgs
327 @param ip4_nh_address - direct IP4 next-hop address
328 @param ip6_nh_address - direct IP6 next-hop address
329 @param ip4_lifetime_ms - reassembly valid lifetime, or ~0
330 @param ip4_pool_size - max number of reassemblies, or ~0
331 @param ip4_buffers - max number of reassembly buffers, or ~0
332 @param ip4_ht_ratio - reassembly valid lifetime, or ~0
333 @param ip6_lifetime_ms - max number of reassemblies, or ~0
334 @param ip6_pool_size - max number of reassemblies, or ~0
335 @param ip6_buffers - max number of reassembly buffers, or ~0
336 @param ip6_ht_ratio - hash-table size factor, or ~0
337 @param sec_check_enable - 1=enable security check on first inbound packet
338 @param sec_check_fragments - 1=enable check on (subsequent) fragments too
339 @param tc_copy - 1 = copy packet class/TOS field, 0 = use class instead
340 @param tc_class - class field value when copy == 0
342 define map_param_get_reply
348 vl_api_ip4_address_t icmp_ip4_err_relay_src;
349 bool icmp6_enable_unreachable;
350 vl_api_ip4_address_t ip4_nh_address;
351 vl_api_ip6_address_t ip6_nh_address;
360 bool sec_check_enable;
361 bool sec_check_fragments;