FD.io VPP  v20.01-48-g3e0dafb74
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  u8 *tag = format (0, "%s", mp->tag);
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, tag);
52  vec_free (tag);
53  /* *INDENT-OFF* */
54  REPLY_MACRO2(VL_API_MAP_ADD_DOMAIN_REPLY,
55  ({
56  rmp->index = ntohl(index);
57  }));
58  /* *INDENT-ON* */
59 }
60 
61 static void
63 {
64  map_main_t *mm = &map_main;
65  vl_api_map_del_domain_reply_t *rmp;
66  int rv = 0;
67 
68  rv = map_delete_domain (ntohl (mp->index));
69 
70  REPLY_MACRO (VL_API_MAP_DEL_DOMAIN_REPLY);
71 }
72 
73 static void
75 {
76  map_main_t *mm = &map_main;
77  vl_api_map_del_domain_reply_t *rmp;
78  int rv = 0;
79 
80  rv =
81  map_add_del_psid (ntohl (mp->index), ntohs (mp->psid),
82  (ip6_address_t *) & mp->ip6_dst, mp->is_add);
83 
84  REPLY_MACRO (VL_API_MAP_ADD_DEL_RULE_REPLY);
85 }
86 
87 static void
89 {
91  map_main_t *mm = &map_main;
92  map_domain_t *d;
95  u32 map_domain_index;
96 
97  if (pool_elts (mm->domains) == 0)
98  return;
99 
101  if (!reg)
102  return;
103 
104  /* *INDENT-OFF* */
105  pool_foreach(d, mm->domains,
106  ({
107  map_domain_index = d - mm->domains;
108  de = vec_elt_at_index(mm->domain_extras, map_domain_index);
109  int tag_len = clib_min(ARRAY_LEN(rmp->tag), vec_len(de->tag) + 1);
110 
111  /* Make sure every field is initiated (or don't skip the clib_memset()) */
112  rmp = vl_msg_api_alloc (sizeof (*rmp) + tag_len);
113 
114  rmp->_vl_msg_id = htons(VL_API_MAP_DOMAIN_DETAILS + mm->msg_id_base);
115  rmp->context = mp->context;
116  rmp->domain_index = htonl(map_domain_index);
117  clib_memcpy(&rmp->ip6_prefix.address, &d->ip6_prefix, sizeof(rmp->ip6_prefix.address));
118  clib_memcpy(&rmp->ip4_prefix.address, &d->ip4_prefix, sizeof(rmp->ip4_prefix.address));
119  clib_memcpy(&rmp->ip6_src.address, &d->ip6_src, sizeof(rmp->ip6_src.address));
120  rmp->ip6_prefix.len = d->ip6_prefix_len;
121  rmp->ip4_prefix.len = d->ip4_prefix_len;
122  rmp->ip6_src.len = d->ip6_src_len;
123  rmp->ea_bits_len = d->ea_bits_len;
124  rmp->psid_offset = d->psid_offset;
125  rmp->psid_length = d->psid_length;
126  rmp->flags = d->flags;
127  rmp->mtu = htons(d->mtu);
128  memcpy(rmp->tag, de->tag, tag_len-1);
129  rmp->tag[tag_len-1] = '\0';
130 
131  vl_api_send_msg (reg, (u8 *) rmp);
132  }));
133  /* *INDENT-ON* */
134 }
135 
136 static void
138 {
140  u16 i;
143  map_main_t *mm = &map_main;
144  u32 domain_index = ntohl (mp->domain_index);
145  map_domain_t *d;
146 
147  if (pool_elts (mm->domains) == 0)
148  return;
149 
150  d = pool_elt_at_index (mm->domains, domain_index);
151  if (!d || !d->rules)
152  {
153  return;
154  }
155 
157  if (!reg)
158  return;
159 
160  for (i = 0; i < (0x1 << d->psid_length); i++)
161  {
162  dst = d->rules[i];
163  if (dst.as_u64[0] == 0 && dst.as_u64[1] == 0)
164  {
165  continue;
166  }
167  rmp = vl_msg_api_alloc (sizeof (*rmp));
168  clib_memset (rmp, 0, sizeof (*rmp));
169  rmp->_vl_msg_id = ntohs (VL_API_MAP_RULE_DETAILS + mm->msg_id_base);
170  rmp->psid = htons (i);
171  clib_memcpy (&rmp->ip6_dst, &dst, sizeof (rmp->ip6_dst));
172  rmp->context = mp->context;
173  vl_api_send_msg (reg, (u8 *) rmp);
174  }
175 }
176 
177 static void
179 {
182  vlib_counter_t v;
183  int i, which;
184  u64 total_pkts[VLIB_N_RX_TX];
185  u64 total_bytes[VLIB_N_RX_TX];
186  map_main_t *mm = &map_main;
188 
190  if (!reg)
191  return;
192 
193  rmp = vl_msg_api_alloc (sizeof (*rmp));
194  rmp->_vl_msg_id = htons (VL_API_MAP_SUMMARY_STATS_REPLY + mm->msg_id_base);
195  rmp->context = mp->context;
196  rmp->retval = 0;
197 
198  if (pool_elts (mm->domains) == 0)
199  {
200  rmp->retval = -1;
201  goto out;
202  }
203 
204  clib_memset (total_pkts, 0, sizeof (total_pkts));
205  clib_memset (total_bytes, 0, sizeof (total_bytes));
206 
208  vec_foreach (cm, mm->domain_counters)
209  {
210  which = cm - mm->domain_counters;
211 
212  for (i = 0; i < vlib_combined_counter_n_counters (cm); i++)
213  {
214  vlib_get_combined_counter (cm, i, &v);
215  total_pkts[which] += v.packets;
216  total_bytes[which] += v.bytes;
217  }
218  }
219 
221 
222  /* Note: in network byte order! */
224  clib_host_to_net_u64 (total_pkts[MAP_DOMAIN_COUNTER_RX]);
226  clib_host_to_net_u64 (total_bytes[MAP_DOMAIN_COUNTER_RX]);
228  clib_host_to_net_u64 (total_pkts[MAP_DOMAIN_COUNTER_TX]);
230  clib_host_to_net_u64 (total_bytes[MAP_DOMAIN_COUNTER_TX]);
231  rmp->total_bindings = clib_host_to_net_u64 (pool_elts (mm->domains));
232  rmp->total_ip4_fragments = 0; // Not yet implemented. Should be a simple counter.
234  clib_host_to_net_u64 (map_error_counter_get
235  (ip4_map_node.index, MAP_ERROR_ENCAP_SEC_CHECK));
237  clib_host_to_net_u64 (map_error_counter_get
238  (ip4_map_node.index, MAP_ERROR_DECAP_SEC_CHECK));
239 
240 out:
241  vl_api_send_msg (reg, (u8 *) rmp);
242 }
243 
244 
245 int
246 map_param_set_fragmentation (bool inner, bool ignore_df)
247 {
248  map_main_t *mm = &map_main;
249 
250  mm->frag_inner = ! !inner;
251  mm->frag_ignore_df = ! !ignore_df;
252 
253  return 0;
254 }
255 
256 static void
259 {
260  map_main_t *mm = &map_main;
261  vl_api_map_param_set_fragmentation_reply_t *rmp;
262  int rv = 0;
263 
265 
266  REPLY_MACRO (VL_API_MAP_PARAM_SET_FRAGMENTATION_REPLY);
267 }
268 
269 
270 int
271 map_param_set_icmp (ip4_address_t * icmp_src_address)
272 {
273  map_main_t *mm = &map_main;
274 
275  if (icmp_src_address == 0)
276  return -1;
277 
278  mm->icmp4_src_address = *icmp_src_address;
279 
280  return 0;
281 }
282 
283 
284 static void
286 {
287  map_main_t *mm = &map_main;
288  vl_api_map_param_set_icmp_reply_t *rmp;
289  int rv;
290 
292 
293  REPLY_MACRO (VL_API_MAP_PARAM_SET_ICMP_REPLY);
294 }
295 
296 
297 int
298 map_param_set_icmp6 (u8 enable_unreachable)
299 {
300  map_main_t *mm = &map_main;
301 
302  mm->icmp6_enabled = ! !enable_unreachable;
303 
304  return 0;
305 }
306 
307 static void
309 {
310  map_main_t *mm = &map_main;
311  vl_api_map_param_set_icmp6_reply_t *rmp;
312  int rv;
313 
315 
316  REPLY_MACRO (VL_API_MAP_PARAM_SET_ICMP6_REPLY);
317 }
318 
319 
320 static void
323 {
324  map_main_t *mm = &map_main;
325  vl_api_map_param_add_del_pre_resolve_reply_t *rmp;
326  int rv = 0;
327 
329  (ip6_address_t *) & mp->ip6_nh_address, !mp->is_add);
330 
331  REPLY_MACRO (VL_API_MAP_PARAM_ADD_DEL_PRE_RESOLVE_REPLY);
332 }
333 
334 int
335 map_param_set_security_check (bool enable, bool fragments)
336 {
337  map_main_t *mm = &map_main;
338 
339  mm->sec_check = ! !enable;
340  mm->sec_check_frag = ! !fragments;
341 
342  return 0;
343 }
344 
345 static void
348 {
349  map_main_t *mm = &map_main;
350  vl_api_map_param_set_security_check_reply_t *rmp;
351  int rv;
352 
354 
355  REPLY_MACRO (VL_API_MAP_PARAM_SET_SECURITY_CHECK_REPLY);
356 }
357 
358 
359 int
361 {
362  map_main_t *mm = &map_main;
363 
364  mm->tc_copy = ! !copy;
365  mm->tc = tc;
366 
367  return 0;
368 }
369 
370 static void
373 {
374  map_main_t *mm = &map_main;
375  vl_api_map_param_set_traffic_class_reply_t *rmp;
376  int rv;
377 
378  rv = map_param_set_traffic_class (mp->copy, mp->tc_class);
379 
380  REPLY_MACRO (VL_API_MAP_PARAM_SET_TRAFFIC_CLASS_REPLY);
381 }
382 
383 
384 int
386 {
387  map_main_t *mm = &map_main;
388 
389  mm->tcp_mss = tcp_mss;
390 
391  return 0;
392 }
393 
394 
395 static void
397 {
398  map_main_t *mm = &map_main;
399  vl_api_map_param_set_tcp_reply_t *rmp;
400  int rv = 0;
401 
402  map_param_set_tcp (ntohs (mp->tcp_mss));
403  REPLY_MACRO (VL_API_MAP_PARAM_SET_TCP_REPLY);
404 }
405 
406 
407 static void
409 {
410  map_main_t *mm = &map_main;
413 
415  if (!reg)
416  return;
417 
418  rmp = vl_msg_api_alloc (sizeof (*rmp));
419  rmp->_vl_msg_id = htons (VL_API_MAP_PARAM_GET_REPLY + mm->msg_id_base);
420  rmp->context = mp->context;
421  rmp->retval = 0;
422 
423  rmp->frag_inner = mm->frag_inner;
424  rmp->frag_ignore_df = mm->frag_ignore_df;
425 
427  &mm->icmp4_src_address, sizeof (rmp->icmp_ip4_err_relay_src));
428 
430 
431  /*
432  * FIXME: How are these addresses re-extracted from the FIB?
433  * Or should a local map_main copy be kept?
434  */
435  clib_memset (&rmp->ip4_nh_address, 0, sizeof (rmp->ip4_nh_address));
436  clib_memset (&rmp->ip6_nh_address, 0, sizeof (rmp->ip6_nh_address));
437 
438  rmp->sec_check_enable = mm->sec_check;
440 
441  rmp->tc_copy = mm->tc_copy;
442  rmp->tc_class = mm->tc;
443 
444  vl_api_send_msg (reg, (u8 *) rmp);
445 }
446 
447 
448 int
449 map_if_enable_disable (bool is_enable, u32 sw_if_index, bool is_translation)
450 {
451  map_main_t *mm = &map_main;
452 
454  sw_if_index))
455  return VNET_API_ERROR_INVALID_SW_IF_INDEX;
456 
457  is_enable = ! !is_enable;
458 
459  if (is_translation)
460  {
461  if (clib_bitmap_get (mm->bm_trans_enabled_by_sw_if, sw_if_index)
462  == is_enable)
463  return 0;
464  }
465  else
466  {
467  if (clib_bitmap_get (mm->bm_encap_enabled_by_sw_if, sw_if_index)
468  == is_enable)
469  return 0;
470  }
471 
472  if (is_translation == false)
473  {
474  ip4_sv_reass_enable_disable_with_refcnt (sw_if_index, is_enable);
475  ip6_full_reass_enable_disable_with_refcnt (sw_if_index, is_enable);
476  vnet_feature_enable_disable ("ip4-unicast", "ip4-map", sw_if_index,
477  is_enable ? 1 : 0, 0, 0);
478  vnet_feature_enable_disable ("ip6-unicast", "ip6-map", sw_if_index,
479  is_enable ? 1 : 0, 0, 0);
481  clib_bitmap_set (mm->bm_encap_enabled_by_sw_if, sw_if_index,
482  is_enable);
483  }
484  else
485  {
486  ip4_sv_reass_enable_disable_with_refcnt (sw_if_index, is_enable);
487  ip6_sv_reass_enable_disable_with_refcnt (sw_if_index, is_enable);
488  vnet_feature_enable_disable ("ip4-unicast", "ip4-map-t", sw_if_index,
489  is_enable ? 1 : 0, 0, 0);
490  vnet_feature_enable_disable ("ip6-unicast", "ip6-map-t", sw_if_index,
491  is_enable ? 1 : 0, 0, 0);
493  clib_bitmap_set (mm->bm_trans_enabled_by_sw_if, sw_if_index,
494  is_enable);
495  }
496 
497  return 0;
498 }
499 
500 
501 static void
503 {
504  map_main_t *mm = &map_main;
505  vl_api_map_if_enable_disable_reply_t *rmp;
506  int rv = 0;
507 
509 
510  rv =
511  map_if_enable_disable (mp->is_enable, htonl (mp->sw_if_index),
512  mp->is_translation);
513 
515  REPLY_MACRO (VL_API_MAP_IF_ENABLE_DISABLE_REPLY);
516 }
517 
518 /* API definitions */
519 #include <vnet/format_fns.h>
520 #include <map/map.api.c>
521 
522 /* Set up the API message handling tables */
523 clib_error_t *
525 {
526  map_main_t *mm = &map_main;
527 
529  return 0;
530 }
531 
532 /*
533  * fd.io coding-style-patch-verification: ON
534  *
535  * Local Variables:
536  * eval: (c-set-style "gnu")
537  * End:
538  */
static void vl_api_map_param_set_tcp_t_handler(vl_api_map_param_set_tcp_t *mp)
Definition: map_api.c:396
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:502
static void vl_api_map_param_set_icmp_t_handler(vl_api_map_param_set_icmp_t *mp)
Definition: map_api.c:285
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:88
vnet_interface_main_t interface_main
Definition: vnet.h:56
vl_api_ip6_prefix_t ip6_src
Definition: map.api:39
u64 as_u64[2]
Definition: ip6_packet.h:51
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:1035
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:347
static void map_domain_counter_unlock(map_main_t *mm)
Definition: map.h:411
Combined counter to hold both packets and byte differences.
Definition: counter_types.h:26
int i
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:372
u8 * format(u8 *s, const char *fmt,...)
Definition: format.c:424
vlib_node_registration_t ip4_map_node
(constructor) VLIB_REGISTER_NODE (ip4_map_node)
Definition: ip4_map.c:358
int map_param_set_traffic_class(bool copy, u8 tc)
Definition: map_api.c:360
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:308
static void vl_api_map_add_del_rule_t_handler(vl_api_map_add_del_rule_t *mp)
Definition: map_api.c:74
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:178
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:335
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:498
vl_api_interface_index_t sw_if_index
Definition: gre.api:59
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:62
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:322
int map_param_set_icmp6(u8 enable_unreachable)
Definition: map_api.c:298
Delete MAP domain.
Definition: map.api:64
vnet_crypto_main_t * cm
Definition: quic_crypto.c:41
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
Definition: pool.h:519
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:449
IPv6 shallow virtual reassembly.
clib_error_t * map_plugin_api_hookup(vlib_main_t *vm)
Definition: map_api.c:524
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:137
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:109
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:408
vl_api_ip4_address_t ip4_nh_address
Definition: map.api:241
#define REPLY_MACRO(t)
vl_api_address_t dst
Definition: gre.api:61
vlib_main_t * vm
Definition: in2out_ed.c:1810
Request for a single block of MAP parameters.
Definition: map.api:292
int map_param_set_tcp(u16 tcp_mss)
Definition: map_api.c:385
Details about a single MAP domain.
Definition: map.api:113
An API client registration, only in vpp/vlib.
Definition: api_common.h:46
#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:258
Enable or disable a MAP interface.
Definition: map.api:149
u32 flags
Definition: vhost_user.h:141
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
#define vec_free(V)
Free vector&#39;s memory (no header).
Definition: vec.h:342
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:284
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:403
int map_param_set_icmp(ip4_address_t *icmp_src_address)
Definition: map_api.c:271
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
vnet_sw_interface_t * sw_interfaces
Definition: interface.h:854
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:3410
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:246
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