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 = "2.3.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
35 vl_api_ip6_prefix_t ip6_prefix;
36 vl_api_ip4_prefix_t ip4_prefix;
37 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 define map_domain_details
103 vl_api_ip6_prefix_t ip6_prefix;
104 vl_api_ip4_prefix_t ip4_prefix;
105 vl_api_ip6_prefix_t ip6_src;
121 define map_rule_details
124 vl_api_ip6_address_t ip6_dst;
128 /** \brief Request for a single block of summary stats
129 @param client_index - opaque cookie to identify the sender
130 @param context - sender context, to match reply w/ request
132 define map_summary_stats
138 /** \brief Reply for map_summary_stats request
139 @param context - sender context, to match reply w/ request
140 @param retval - return code for request
141 @param total_bindings -
143 @param total_ip4_fragments -
144 @param total_security_check -
146 define map_summary_stats_reply
153 u64 total_ip4_fragments;
154 u64 total_security_check[2];
158 /** \brief Set MAP fragmentation parameters
159 @param client_index - opaque cookie to identify the sender
160 @param context - sender context, to match reply w/ request
161 @param inner - 1=frag inner packet, 0=frag tunnel packets
162 @param ignore_df - 1=IP4 fragment despite DF bit, 0=honor DF
164 autoreply define map_param_set_fragmentation
173 /** \brief Set MAP ICMP parameters
174 @param client_index - opaque cookie to identify the sender
175 @param context - sender context, to match reply w/ request
176 @param icmp4_err_relay_src - IPv4 ICMP err relay src address
178 autoreply define map_param_set_icmp
182 vl_api_ip4_address_t ip4_err_relay_src;
186 /** \brief Set MAP ICMP6 parameters
187 @param client_index - opaque cookie to identify the sender
188 @param context - sender context, to match reply w/ request
189 @param enable_unreachable - 1 = send ICMP unreachable err msgs
191 autoreply define map_param_set_icmp6
195 bool enable_unreachable;
199 /** \brief Add/delete MAP pre-resolve IP addresses parameters
200 @param client_index - opaque cookie to identify the sender
201 @param context - sender context, to match reply w/ request
202 @param is_add - 1 = Add non-zero IP addresses, 0 = delete
203 @param ip4_nh_address - direct IP4 next-hop address
204 @param ip6_nh_address - direct IP6 next-hop address
206 autoreply define map_param_add_del_pre_resolve
211 vl_api_ip4_address_t ip4_nh_address;
212 vl_api_ip6_address_t ip6_nh_address;
216 /** \brief Set MAP reassembly parameters
217 @param client_index - opaque cookie to identify the sender
218 @param context - sender context, to match reply w/ request
219 @param is_ip6 - 1 = params apply to IPv6, 0 = params apply to IPv4
220 @param lifetime_ms - reassembly valid lifetime, or ~0
221 @param pool_size - max number of reassemblies, or ~0
222 @param buffers - max number of reassembly buffers, or ~0
223 @param ht_ratio - hash-table size factor, or ~0
225 autoreply define map_param_set_reassembly
237 /** \brief Set MAP security-check parameters
238 @param client_index - opaque cookie to identify the sender
239 @param context - sender context, to match reply w/ request
240 @param enable - 1=enable security check on first inbound packet
241 @param fragments - 1=enable check on (subsequent) fragments too
243 autoreply define map_param_set_security_check
252 /** \brief Set MAP traffic class parameters
253 @param client_index - opaque cookie to identify the sender
254 @param context - sender context, to match reply w/ request
255 @param copy - 1 = copy packet class/TOS field, 0 = use class instead
256 @param class - class field value when copy == 0
258 autoreply define map_param_set_traffic_class
267 /** \brief Request for a single block of MAP parameters
268 @param client_index - opaque cookie to identify the sender
269 @param context - sender context, to match reply w/ request
278 /** \brief Reply for map_param_get request
279 @param context - sender context, to match reply w/ request
280 @param retval - return code for request
281 @param inner - 1=frag inner packet, 0=frag tunnel packets, ~0=untouched
282 @param ignore_df - 1=IP4 fragm despite DF bit, 0=honor DF, ~0=untouched
283 @param icmp_ip4_err_relay_src - IPv4 ICMP err relay src address
284 @param icmp6_enable_unreachable - 1 = send ICMP unreachable err msgs
285 @param ip4_nh_address - direct IP4 next-hop address
286 @param ip6_nh_address - direct IP6 next-hop address
287 @param ip4_lifetime_ms - reassembly valid lifetime, or ~0
288 @param ip4_pool_size - max number of reassemblies, or ~0
289 @param ip4_buffers - max number of reassembly buffers, or ~0
290 @param ip4_ht_ratio - reassembly valid lifetime, or ~0
291 @param ip6_lifetime_ms - max number of reassemblies, or ~0
292 @param ip6_pool_size - max number of reassemblies, or ~0
293 @param ip6_buffers - max number of reassembly buffers, or ~0
294 @param ip6_ht_ratio - hash-table size factor, or ~0
295 @param sec_check_enable - 1=enable security check on first inbound packet
296 @param sec_check_fragments - 1=enable check on (subsequent) fragments too
297 @param tc_copy - 1 = copy packet class/TOS field, 0 = use class instead
298 @param tc_class - class field value when copy == 0
300 define map_param_get_reply
306 vl_api_ip4_address_t icmp_ip4_err_relay_src;
307 bool icmp6_enable_unreachable;
308 vl_api_ip4_address_t ip4_nh_address;
309 vl_api_ip6_address_t ip6_nh_address;
318 bool sec_check_enable;
319 bool sec_check_fragments;