FD.io VPP  v20.05.1-6-gf53edbc3b
Vector Packet Processing
map_api.c
Go to the documentation of this file.
1 /*
2  *------------------------------------------------------------------
3  * map_api.c - vnet map api
4  *
5  * Copyright (c) 2016 Cisco and/or its affiliates.
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at:
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *------------------------------------------------------------------
18  */
19 
20 #include <vnet/ip/ip_types_api.h>
21 #include <map/map.h>
22 #include <map/map.api_enum.h>
23 #include <map/map.api_types.h>
24 #include <vnet/ip/ip.h>
28 #include <vnet/fib/fib_table.h>
29 #include <vlibmemory/api.h>
30 
31 #define REPLY_MSG_ID_BASE mm->msg_id_base
33 
34 static void
36 {
37  map_main_t *mm = &map_main;
39  int rv = 0;
40  u32 index;
41  u8 flags = 0;
42 
43  mp->tag[ARRAY_LEN (mp->tag) - 1] = '\0';
44  rv =
45  map_create_domain ((ip4_address_t *) & mp->ip4_prefix.address,
46  mp->ip4_prefix.len,
47  (ip6_address_t *) & mp->ip6_prefix.address,
48  mp->ip6_prefix.len,
49  (ip6_address_t *) & mp->ip6_src.address,
50  mp->ip6_src.len, mp->ea_bits_len, mp->psid_offset,
51  mp->psid_length, &index, ntohs (mp->mtu), flags,
52  mp->tag);
53 
54  /* *INDENT-OFF* */
55  REPLY_MACRO2(VL_API_MAP_ADD_DOMAIN_REPLY,
56  ({
57  rmp->index = ntohl(index);
58  }));
59  /* *INDENT-ON* */
60 }
61 
62 static void
64 {
65  map_main_t *mm = &map_main;
66  vl_api_map_del_domain_reply_t *rmp;
67  int rv = 0;
68 
69  rv = map_delete_domain (ntohl (mp->index));
70 
71  REPLY_MACRO (VL_API_MAP_DEL_DOMAIN_REPLY);
72 }
73 
74 static void
76 {
77  map_main_t *mm = &map_main;
78  vl_api_map_del_domain_reply_t *rmp;
79  int rv = 0;
80 
81  rv =
82  map_add_del_psid (ntohl (mp->index), ntohs (mp->psid),
83  (ip6_address_t *) & mp->ip6_dst, mp->is_add);
84 
85  REPLY_MACRO (VL_API_MAP_ADD_DEL_RULE_REPLY);
86 }
87 
88 static void
90 {
92  map_main_t *mm = &map_main;
93  map_domain_t *d;
96  u32 map_domain_index;
97 
98  if (pool_elts (mm->domains) == 0)
99  return;
100 
102  if (!reg)
103  return;
104 
105  /* *INDENT-OFF* */
106  pool_foreach(d, mm->domains,
107  ({
108  map_domain_index = d - mm->domains;
109  de = vec_elt_at_index(mm->domain_extras, map_domain_index);
110  int tag_len = clib_min(ARRAY_LEN(rmp->tag), vec_len(de->tag) + 1);
111 
112  /* Make sure every field is initiated (or don't skip the clib_memset()) */
113  rmp = vl_msg_api_alloc (sizeof (*rmp) + tag_len);
114 
115  rmp->_vl_msg_id = htons(VL_API_MAP_DOMAIN_DETAILS + mm->msg_id_base);
116  rmp->context = mp->context;
117  rmp->domain_index = htonl(map_domain_index);
118  clib_memcpy(&rmp->ip6_prefix.address, &d->ip6_prefix, sizeof(rmp->ip6_prefix.address));
119  clib_memcpy(&rmp->ip4_prefix.address, &d->ip4_prefix, sizeof(rmp->ip4_prefix.address));
120  clib_memcpy(&rmp->ip6_src.address, &d->ip6_src, sizeof(rmp->ip6_src.address));
121  rmp->ip6_prefix.len = d->ip6_prefix_len;
122  rmp->ip4_prefix.len = d->ip4_prefix_len;
123  rmp->ip6_src.len = d->ip6_src_len;
124  rmp->ea_bits_len = d->ea_bits_len;
125  rmp->psid_offset = d->psid_offset;
126  rmp->psid_length = d->psid_length;
127  rmp->flags = d->flags;
128  rmp->mtu = htons(d->mtu);
129  memcpy(rmp->tag, de->tag, tag_len-1);
130  rmp->tag[tag_len-1] = '\0';
131 
132  vl_api_send_msg (reg, (u8 *) rmp);
133  }));
134  /* *INDENT-ON* */
135 }
136 
137 static void
139 {
141  u16 i;
142  ip6_address_t dst;
144  map_main_t *mm = &map_main;
145  u32 domain_index = ntohl (mp->domain_index);
146  map_domain_t *d;
147 
148  if (pool_elts (mm->domains) == 0)
149  return;
150 
151  d = pool_elt_at_index (mm->domains, domain_index);
152  if (!d || !d->rules)
153  {
154  return;
155  }
156 
158  if (!reg)
159  return;
160 
161  for (i = 0; i < (0x1 << d->psid_length); i++)
162  {
163  dst = d->rules[i];
164  if (dst.as_u64[0] == 0 && dst.as_u64[1] == 0)
165  {
166  continue;
167  }
168  rmp = vl_msg_api_alloc (sizeof (*rmp));
169  clib_memset (rmp, 0, sizeof (*rmp));
170  rmp->_vl_msg_id = ntohs (VL_API_MAP_RULE_DETAILS + mm->msg_id_base);
171  rmp->psid = htons (i);
172  clib_memcpy (&rmp->ip6_dst, &dst, sizeof (rmp->ip6_dst));
173  rmp->context = mp->context;
174  vl_api_send_msg (reg, (u8 *) rmp);
175  }
176 }
177 
178 static void
180 {
183  vlib_counter_t v;
184  int i, which;
185  u64 total_pkts[VLIB_N_RX_TX];
186  u64 total_bytes[VLIB_N_RX_TX];
187  map_main_t *mm = &map_main;
189 
191  if (!reg)
192  return;
193 
194  rmp = vl_msg_api_alloc (sizeof (*rmp));
195  rmp->_vl_msg_id = htons (VL_API_MAP_SUMMARY_STATS_REPLY + mm->msg_id_base);
196  rmp->context = mp->context;
197  rmp->retval = 0;
198 
199  if (pool_elts (mm->domains) == 0)
200  {
201  rmp->retval = -1;
202  goto out;
203  }
204 
205  clib_memset (total_pkts, 0, sizeof (total_pkts));
206  clib_memset (total_bytes, 0, sizeof (total_bytes));
207 
209  vec_foreach (cm, mm->domain_counters)
210  {
211  which = cm - mm->domain_counters;
212 
213  for (i = 0; i < vlib_combined_counter_n_counters (cm); i++)
214  {
215  vlib_get_combined_counter (cm, i, &v);
216  total_pkts[which] += v.packets;
217  total_bytes[which] += v.bytes;
218  }
219  }
220 
222 
223  /* Note: in network byte order! */
225  clib_host_to_net_u64 (total_pkts[MAP_DOMAIN_COUNTER_RX]);
227  clib_host_to_net_u64 (total_bytes[MAP_DOMAIN_COUNTER_RX]);
229  clib_host_to_net_u64 (total_pkts[MAP_DOMAIN_COUNTER_TX]);
231  clib_host_to_net_u64 (total_bytes[MAP_DOMAIN_COUNTER_TX]);
232  rmp->total_bindings = clib_host_to_net_u64 (pool_elts (mm->domains));
233  rmp->total_ip4_fragments = 0; // Not yet implemented. Should be a simple counter.
235  clib_host_to_net_u64 (map_error_counter_get
236  (ip4_map_node.index, MAP_ERROR_ENCAP_SEC_CHECK));
238  clib_host_to_net_u64 (map_error_counter_get
239  (ip4_map_node.index, MAP_ERROR_DECAP_SEC_CHECK));
240 
241 out:
242  vl_api_send_msg (reg, (u8 *) rmp);
243 }
244 
245 
246 int
247 map_param_set_fragmentation (bool inner, bool ignore_df)
248 {
249  map_main_t *mm = &map_main;
250 
251  mm->frag_inner = ! !inner;
252  mm->frag_ignore_df = ! !ignore_df;
253 
254  return 0;
255 }
256 
257 static void
260 {
261  map_main_t *mm = &map_main;
262  vl_api_map_param_set_fragmentation_reply_t *rmp;
263  int rv = 0;
264 
266 
267  REPLY_MACRO (VL_API_MAP_PARAM_SET_FRAGMENTATION_REPLY);
268 }
269 
270 
271 int
272 map_param_set_icmp (ip4_address_t * icmp_src_address)
273 {
274  map_main_t *mm = &map_main;
275 
276  if (icmp_src_address == 0)
277  return -1;
278 
279  mm->icmp4_src_address = *icmp_src_address;
280 
281  return 0;
282 }
283 
284 
285 static void
287 {
288  map_main_t *mm = &map_main;
289  vl_api_map_param_set_icmp_reply_t *rmp;
290  int rv;
291 
293 
294  REPLY_MACRO (VL_API_MAP_PARAM_SET_ICMP_REPLY);
295 }
296 
297 
298 int
299 map_param_set_icmp6 (u8 enable_unreachable)
300 {
301  map_main_t *mm = &map_main;
302 
303  mm->icmp6_enabled = ! !enable_unreachable;
304 
305  return 0;
306 }
307 
308 static void
310 {
311  map_main_t *mm = &map_main;
312  vl_api_map_param_set_icmp6_reply_t *rmp;
313  int rv;
314 
316 
317  REPLY_MACRO (VL_API_MAP_PARAM_SET_ICMP6_REPLY);
318 }
319 
320 
321 static void
324 {
325  map_main_t *mm = &map_main;
326  vl_api_map_param_add_del_pre_resolve_reply_t *rmp;
327  int rv = 0;
328 
330  (ip6_address_t *) & mp->ip6_nh_address, !mp->is_add);
331 
332  REPLY_MACRO (VL_API_MAP_PARAM_ADD_DEL_PRE_RESOLVE_REPLY);
333 }
334 
335 int
336 map_param_set_security_check (bool enable, bool fragments)
337 {
338  map_main_t *mm = &map_main;
339 
340  mm->sec_check = ! !enable;
341  mm->sec_check_frag = ! !fragments;
342 
343  return 0;
344 }
345 
346 static void
349 {
350  map_main_t *mm = &map_main;
351  vl_api_map_param_set_security_check_reply_t *rmp;
352  int rv;
353 
355 
356  REPLY_MACRO (VL_API_MAP_PARAM_SET_SECURITY_CHECK_REPLY);
357 }
358 
359 
360 int
362 {
363  map_main_t *mm = &map_main;
364 
365  mm->tc_copy = ! !copy;
366  mm->tc = tc;
367 
368  return 0;
369 }
370 
371 static void
374 {
375  map_main_t *mm = &map_main;
376  vl_api_map_param_set_traffic_class_reply_t *rmp;
377  int rv;
378 
379  rv = map_param_set_traffic_class (mp->copy, mp->tc_class);
380 
381  REPLY_MACRO (VL_API_MAP_PARAM_SET_TRAFFIC_CLASS_REPLY);
382 }
383 
384 
385 int
387 {
388  map_main_t *mm = &map_main;
389 
390  mm->tcp_mss = tcp_mss;
391 
392  return 0;
393 }
394 
395 
396 static void
398 {
399  map_main_t *mm = &map_main;
400  vl_api_map_param_set_tcp_reply_t *rmp;
401  int rv = 0;
402 
403  map_param_set_tcp (ntohs (mp->tcp_mss));
404  REPLY_MACRO (VL_API_MAP_PARAM_SET_TCP_REPLY);
405 }
406 
407 
408 static void
410 {
411  map_main_t *mm = &map_main;
414 
416  if (!reg)
417  return;
418 
419  rmp = vl_msg_api_alloc (sizeof (*rmp));
420  rmp->_vl_msg_id = htons (VL_API_MAP_PARAM_GET_REPLY + mm->msg_id_base);
421  rmp->context = mp->context;
422  rmp->retval = 0;
423 
424  rmp->frag_inner = mm->frag_inner;
425  rmp->frag_ignore_df = mm->frag_ignore_df;
426 
428  &mm->icmp4_src_address, sizeof (rmp->icmp_ip4_err_relay_src));
429 
431 
432  /*
433  * FIXME: How are these addresses re-extracted from the FIB?
434  * Or should a local map_main copy be kept?
435  */
436  clib_memset (&rmp->ip4_nh_address, 0, sizeof (rmp->ip4_nh_address));
437  clib_memset (&rmp->ip6_nh_address, 0, sizeof (rmp->ip6_nh_address));
438 
439  rmp->sec_check_enable = mm->sec_check;
441 
442  rmp->tc_copy = mm->tc_copy;
443  rmp->tc_class = mm->tc;
444 
445  vl_api_send_msg (reg, (u8 *) rmp);
446 }
447 
448 
449 int
450 map_if_enable_disable (bool is_enable, u32 sw_if_index, bool is_translation)
451 {
452  map_main_t *mm = &map_main;
453 
455  sw_if_index))
456  return VNET_API_ERROR_INVALID_SW_IF_INDEX;
457 
458  is_enable = ! !is_enable;
459 
460  if (is_translation)
461  {
462  if (clib_bitmap_get (mm->bm_trans_enabled_by_sw_if, sw_if_index)
463  == is_enable)
464  return 0;
465  }
466  else
467  {
468  if (clib_bitmap_get (mm->bm_encap_enabled_by_sw_if, sw_if_index)
469  == is_enable)
470  return 0;
471  }
472 
473  if (is_translation == false)
474  {
475  ip4_sv_reass_enable_disable_with_refcnt (sw_if_index, is_enable);
476  ip6_full_reass_enable_disable_with_refcnt (sw_if_index, is_enable);
477  vnet_feature_enable_disable ("ip4-unicast", "ip4-map", sw_if_index,
478  is_enable ? 1 : 0, 0, 0);
479  vnet_feature_enable_disable ("ip6-unicast", "ip6-map", sw_if_index,
480  is_enable ? 1 : 0, 0, 0);
482  clib_bitmap_set (mm->bm_encap_enabled_by_sw_if, sw_if_index,
483  is_enable);
484  }
485  else
486  {
487  ip4_sv_reass_enable_disable_with_refcnt (sw_if_index, is_enable);
488  ip6_sv_reass_enable_disable_with_refcnt (sw_if_index, is_enable);
489  vnet_feature_enable_disable ("ip4-unicast", "ip4-map-t", sw_if_index,
490  is_enable ? 1 : 0, 0, 0);
491  vnet_feature_enable_disable ("ip6-unicast", "ip6-map-t", sw_if_index,
492  is_enable ? 1 : 0, 0, 0);
494  clib_bitmap_set (mm->bm_trans_enabled_by_sw_if, sw_if_index,
495  is_enable);
496  }
497 
498  return 0;
499 }
500 
501 
502 static void
504 {
505  map_main_t *mm = &map_main;
506  vl_api_map_if_enable_disable_reply_t *rmp;
507  int rv = 0;
508 
510 
511  rv =
512  map_if_enable_disable (mp->is_enable, htonl (mp->sw_if_index),
513  mp->is_translation);
514 
516  REPLY_MACRO (VL_API_MAP_IF_ENABLE_DISABLE_REPLY);
517 }
518 
519 /* API definitions */
520 #include <vnet/format_fns.h>
521 #include <map/map.api.c>
522 
523 /* Set up the API message handling tables */
524 clib_error_t *
526 {
527  map_main_t *mm = &map_main;
528 
530  return 0;
531 }
532 
533 /*
534  * fd.io coding-style-patch-verification: ON
535  *
536  * Local Variables:
537  * eval: (c-set-style "gnu")
538  * End:
539  */
static void vl_api_map_param_set_tcp_t_handler(vl_api_map_param_set_tcp_t *mp)
Definition: map_api.c:397
u8 psid_length
Definition: map.h:88
int map_add_del_psid(u32 map_domain_index, u16 psid, ip6_address_t *tep, bool is_add)
Definition: map.c:235
static void vl_api_map_if_enable_disable_t_handler(vl_api_map_if_enable_disable_t *mp)
Definition: map_api.c:503
static void vl_api_map_param_set_icmp_t_handler(vl_api_map_param_set_icmp_t *mp)
Definition: map_api.c:286
Set MAP traffic class parameters.
Definition: map.api:266
Add or Delete MAP rule from a domain (Only used for shared IPv4 per subscriber)
Definition: map.api:80
int map_delete_domain(u32 map_domain_index)
Definition: map.c:204
map_main_t map_main
Definition: map.c:27
int ip4_sv_reass_enable_disable_with_refcnt(u32 sw_if_index, int is_enable)
static void vl_api_map_domain_dump_t_handler(vl_api_map_domain_dump_t *mp)
Definition: map_api.c:89
vnet_interface_main_t interface_main
Definition: vnet.h:56
vl_api_ip6_prefix_t ip6_src
Definition: map.api:39
unsigned long u64
Definition: types.h:89
u16 msg_id_base
Definition: map.h:173
#define REPLY_MACRO2(t, body)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
Add/delete MAP pre-resolve IP addresses parameters.
Definition: map.api:236
u64 map_error_counter_get(u32 node_index, map_error_t map_error)
Definition: map.c:1036
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
Definition: api.h:35
u8 tc
Definition: map.h:176
static void vl_api_map_param_set_security_check_t_handler(vl_api_map_param_set_security_check_t *mp)
Definition: map_api.c:348
static void map_domain_counter_unlock(map_main_t *mm)
Definition: map.h:412
Combined counter to hold both packets and byte differences.
Definition: counter_types.h:26
static uword * clib_bitmap_set(uword *ai, uword i, uword value)
Sets the ith bit of a bitmap to new_value Removes trailing zeros from the bitmap. ...
Definition: bitmap.h:167
bool sec_check_frag
Definition: map.h:180
static void vl_api_map_param_set_traffic_class_t_handler(vl_api_map_param_set_traffic_class_t *mp)
Definition: map_api.c:373
vlib_node_registration_t ip4_map_node
(constructor) VLIB_REGISTER_NODE (ip4_map_node)
Definition: ip4_map.c:344
int map_param_set_traffic_class(bool copy, u8 tc)
Definition: map_api.c:361
int map_create_domain(ip4_address_t *ip4_prefix, u8 ip4_prefix_len, ip6_address_t *ip6_prefix, u8 ip6_prefix_len, ip6_address_t *ip6_src, u8 ip6_src_len, u8 ea_bits_len, u8 psid_offset, u8 psid_length, u32 *map_domain_index, u16 mtu, u8 flags, u8 *tag)
Definition: map.c:105
uword * bm_trans_enabled_by_sw_if
Definition: map.h:197
void map_pre_resolve(ip4_address_t *ip4, ip6_address_t *ip6, bool is_del)
Definition: map.c:407
void * vl_msg_api_alloc(int nbytes)
static void vl_api_map_param_set_icmp6_t_handler(vl_api_map_param_set_icmp6_t *mp)
Definition: map_api.c:309
static void vl_api_map_add_del_rule_t_handler(vl_api_map_add_del_rule_t *mp)
Definition: map_api.c:75
unsigned char u8
Definition: types.h:56
static void vl_api_map_summary_stats_t_handler(vl_api_map_summary_stats_t *mp)
Definition: map_api.c:179
vl_api_ip6_address_t ip6_dst
Definition: map.api:86
Get list of map domains.
Definition: map.api:94
#define clib_memcpy(d, s, n)
Definition: string.h:180
int map_param_set_security_check(bool enable, bool fragments)
Definition: map_api.c:336
Set MAP TCP parameters.
Definition: map.api:280
string tag[64]
Definition: map.api:44
static void vl_api_map_add_domain_t_handler(vl_api_map_add_domain_t *mp)
Definition: map_api.c:35
vl_api_ip4_prefix_t ip4_prefix
Definition: map.api:38
bool tc_copy
Definition: map.h:177
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
Definition: pool.h:513
vl_api_interface_index_t sw_if_index
Definition: gre.api:53
vlib_combined_counter_main_t * domain_counters
Definition: map.h:169
ip4_address_t icmp4_src_address
Definition: map.h:186
Reply for map_param_get request.
Definition: map.api:313
ip6_address_t * rules
Definition: map.h:78
unsigned int u32
Definition: types.h:88
static void vl_api_map_del_domain_t_handler(vl_api_map_del_domain_t *mp)
Definition: map_api.c:63
Set MAP fragmentation parameters.
Definition: map.api:194
static void vl_api_map_param_add_del_pre_resolve_t_handler(vl_api_map_param_add_del_pre_resolve_t *mp)
Definition: map_api.c:323
int map_param_set_icmp6(u8 enable_unreachable)
Definition: map_api.c:299
Delete MAP domain.
Definition: map.api:64
vnet_crypto_main_t * cm
Definition: quic_crypto.c:53
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
Definition: pool.h:534
counter_t packets
packet counter
Definition: counter_types.h:28
int map_if_enable_disable(bool is_enable, u32 sw_if_index, bool is_translation)
Definition: map_api.c:450
IPv6 shallow virtual reassembly.
clib_error_t * map_plugin_api_hookup(vlib_main_t *vm)
Definition: map_api.c:525
IPv4 shallow virtual reassembly.
bool frag_ignore_df
Definition: map.h:194
static void vl_api_map_rule_dump_t_handler(vl_api_map_rule_dump_t *mp)
Definition: map_api.c:138
u32 vlib_combined_counter_n_counters(const vlib_combined_counter_main_t *cm)
The number of counters (not the number of per-thread counters)
Definition: counter.c:137
unsigned short u16
Definition: types.h:57
map_domain_t * domains
Definition: map.h:164
vl_api_ip4_address_t ip4_nh_address
Definition: map.api:321
static void vl_api_map_param_get_t_handler(vl_api_map_param_get_t *mp)
Definition: map_api.c:409
vl_api_ip4_address_t ip4_nh_address
Definition: map.api:241
#define REPLY_MACRO(t)
vl_api_address_t dst
Definition: gre.api:55
vlib_main_t * vm
Definition: in2out_ed.c:1599
Request for a single block of MAP parameters.
Definition: map.api:292
int map_param_set_tcp(u16 tcp_mss)
Definition: map_api.c:386
Details about a single MAP domain.
Definition: map.api:113
An API client registration, only in vpp/vlib.
Definition: api_common.h:47
#define BAD_SW_IF_INDEX_LABEL
static void vl_api_map_param_set_fragmentation_t_handler(vl_api_map_param_set_fragmentation_t *mp)
Definition: map_api.c:259
Enable or disable a MAP interface.
Definition: map.api:149
u32 flags
Definition: vhost_user.h:248
static void vlib_get_combined_counter(const vlib_combined_counter_main_t *cm, u32 index, vlib_counter_t *result)
Get the value of a combined counter, never called in the speed path Scrapes the entire set of per-thr...
Definition: counter.h:259
vl_api_interface_index_t sw_if_index
Definition: map.api:153
vl_api_ip6_address_t ip6_nh_address
Definition: map.api:322
uword * bm_encap_enabled_by_sw_if
Definition: map.h:198
sll srl srl sll sra u16x4 i
Definition: vector_sse42.h:317
Set MAP ICMP6 parameters.
Definition: map.api:221
Reply for map_summary_stats request.
Definition: map.api:176
bool icmp6_enabled
Definition: map.h:181
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
Definition: pool.h:299
#define ARRAY_LEN(x)
Definition: clib.h:66
static uword clib_bitmap_get(uword *ai, uword i)
Gets the ith bit value from a bitmap.
Definition: bitmap.h:197
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
Definition: api.h:57
vl_api_ip6_address_t ip6_dst
Definition: map.api:138
static void map_domain_counter_lock(map_main_t *mm)
Definition: map.h:404
int map_param_set_icmp(ip4_address_t *icmp_src_address)
Definition: map_api.c:272
vl_api_ip6_address_t ip6_nh_address
Definition: map.api:242
bool sec_check
Definition: map.h:179
bool frag_inner
Definition: map.h:193
Request for a single block of summary stats.
Definition: map.api:162
Reply for MAP domain add.
Definition: map.api:52
int ip6_sv_reass_enable_disable_with_refcnt(u32 sw_if_index, int is_enable)
counter_t bytes
byte counter
Definition: counter_types.h:29
vnet_main_t * vnet_main
Definition: map.h:191
Set MAP security-check parameters.
Definition: map.api:251
vl_api_ip4_address_t ip4_err_relay_src
Definition: map.api:212
u16 mtu[default=1280]
Definition: map.api:43
vnet_sw_interface_t * sw_interfaces
Definition: interface.h:858
u16 tcp_mss
Definition: map.h:183
A collection of combined counters.
Definition: counter.h:188
Add MAP domains.
Definition: map.api:33
vl_api_ip4_address_t icmp_ip4_err_relay_src
Definition: map.api:319
vl_api_ip6_prefix_t ip6_prefix
Definition: map.api:37
#define vec_foreach(var, vec)
Vector iterator.
static void setup_message_id_table(snat_main_t *sm, api_main_t *am)
Definition: nat_api.c:3256
int ip6_full_reass_enable_disable_with_refcnt(u32 sw_if_index, int is_enable)
int vnet_feature_enable_disable(const char *arc_name, const char *node_name, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)
Definition: feature.c:304
#define VALIDATE_SW_IF_INDEX(mp)
int map_param_set_fragmentation(bool inner, bool ignore_df)
Definition: map_api.c:247
Set MAP ICMP parameters.
Definition: map.api:208
IPv6 Reassembly.
static uword pool_elts(void *v)
Number of active elements in a pool.
Definition: pool.h:128