FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
one_api.c
Go to the documentation of this file.
1 /*
2  *------------------------------------------------------------------
3  * one_api.c - Overlay Network Engine API
4  *
5  * Copyright (c) 2016-2017 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/vnet.h>
21 #include <vlibmemory/api.h>
22 
23 #include <vnet/interface.h>
24 #include <vnet/api_errno.h>
25 #include <lisp/lisp-cp/control.h>
26 #include <lisp/lisp-gpe/lisp_gpe.h>
27 
28 #include <vnet/ip/ip_types_api.h>
30 
31 /* define message IDs */
32 #include <vnet/format_fns.h>
33 #include <lisp/lisp-cp/one.api_enum.h>
34 #include <lisp/lisp-cp/one.api_types.h>
35 
36 /**
37  * Base message ID fot the plugin
38  */
40 #define REPLY_MSG_ID_BASE one_base_msg_id
41 
43 
44 #define REPLY_DETAILS(t, body) \
45 do { \
46  vl_api_registration_t * reg; \
47  rv = vl_msg_api_pd_handler (mp, rv); \
48  reg = vl_api_client_index_to_registration (mp->client_index); \
49  if (!reg) \
50  return; \
51  \
52  rmp = vl_msg_api_alloc (sizeof (*rmp)); \
53  rmp->_vl_msg_id = ntohs((t)); \
54  rmp->context = mp->context; \
55  do {body;} while (0); \
56  vl_api_send_msg (reg, (u8 *)&rmp); \
57 } while(0);
58 
59 #define foreach_vpe_api_msg \
60 _(ONE_ADD_DEL_LOCATOR_SET, one_add_del_locator_set) \
61 _(ONE_ADD_DEL_LOCATOR, one_add_del_locator) \
62 _(ONE_ADD_DEL_LOCAL_EID, one_add_del_local_eid) \
63 _(ONE_ADD_DEL_MAP_RESOLVER, one_add_del_map_resolver) \
64 _(ONE_ADD_DEL_MAP_SERVER, one_add_del_map_server) \
65 _(ONE_ENABLE_DISABLE, one_enable_disable) \
66 _(ONE_RLOC_PROBE_ENABLE_DISABLE, one_rloc_probe_enable_disable) \
67 _(ONE_MAP_REGISTER_ENABLE_DISABLE, one_map_register_enable_disable) \
68 _(ONE_MAP_REGISTER_FALLBACK_THRESHOLD, \
69  one_map_register_fallback_threshold) \
70 _(ONE_ADD_DEL_REMOTE_MAPPING, one_add_del_remote_mapping) \
71 _(ONE_ADD_DEL_ADJACENCY, one_add_del_adjacency) \
72 _(ONE_PITR_SET_LOCATOR_SET, one_pitr_set_locator_set) \
73 _(ONE_NSH_SET_LOCATOR_SET, one_nsh_set_locator_set) \
74 _(ONE_MAP_REQUEST_MODE, one_map_request_mode) \
75 _(ONE_EID_TABLE_ADD_DEL_MAP, one_eid_table_add_del_map) \
76 _(ONE_LOCATOR_SET_DUMP, one_locator_set_dump) \
77 _(ONE_LOCATOR_DUMP, one_locator_dump) \
78 _(ONE_EID_TABLE_DUMP, one_eid_table_dump) \
79 _(ONE_MAP_RESOLVER_DUMP, one_map_resolver_dump) \
80 _(ONE_MAP_SERVER_DUMP, one_map_server_dump) \
81 _(ONE_EID_TABLE_MAP_DUMP, one_eid_table_map_dump) \
82 _(ONE_EID_TABLE_VNI_DUMP, one_eid_table_vni_dump) \
83 _(ONE_ADJACENCIES_GET, one_adjacencies_get) \
84 _(ONE_MAP_REGISTER_SET_TTL, one_map_register_set_ttl) \
85 _(SHOW_ONE_NSH_MAPPING, show_one_nsh_mapping) \
86 _(SHOW_ONE_RLOC_PROBE_STATE, show_one_rloc_probe_state) \
87 _(SHOW_ONE_MAP_REGISTER_STATE, show_one_map_register_state) \
88 _(SHOW_ONE_MAP_REGISTER_TTL, show_one_map_register_ttl) \
89 _(SHOW_ONE_MAP_REGISTER_FALLBACK_THRESHOLD, \
90  show_one_map_register_fallback_threshold) \
91 _(SHOW_ONE_STATUS, show_one_status) \
92 _(ONE_ADD_DEL_MAP_REQUEST_ITR_RLOCS, \
93  one_add_del_map_request_itr_rlocs) \
94 _(ONE_GET_MAP_REQUEST_ITR_RLOCS, one_get_map_request_itr_rlocs) \
95 _(SHOW_ONE_PITR, show_one_pitr) \
96 _(SHOW_ONE_MAP_REQUEST_MODE, show_one_map_request_mode) \
97 _(ONE_USE_PETR, one_use_petr) \
98 _(SHOW_ONE_USE_PETR, show_one_use_petr) \
99 _(SHOW_ONE_STATS_ENABLE_DISABLE, show_one_stats_enable_disable) \
100 _(ONE_STATS_ENABLE_DISABLE, one_stats_enable_disable) \
101 _(ONE_STATS_DUMP, one_stats_dump) \
102 _(ONE_STATS_FLUSH, one_stats_flush) \
103 _(ONE_L2_ARP_BD_GET, one_l2_arp_bd_get) \
104 _(ONE_L2_ARP_ENTRIES_GET, one_l2_arp_entries_get) \
105 _(ONE_ADD_DEL_L2_ARP_ENTRY, one_add_del_l2_arp_entry) \
106 _(ONE_ADD_DEL_NDP_ENTRY, one_add_del_ndp_entry) \
107 _(ONE_NDP_BD_GET, one_ndp_bd_get) \
108 _(ONE_NDP_ENTRIES_GET, one_ndp_entries_get) \
109 _(ONE_SET_TRANSPORT_PROTOCOL, one_set_transport_protocol) \
110 _(ONE_GET_TRANSPORT_PROTOCOL, one_get_transport_protocol) \
111 _(ONE_ENABLE_DISABLE_XTR_MODE, one_enable_disable_xtr_mode) \
112 _(ONE_SHOW_XTR_MODE, one_show_xtr_mode) \
113 _(ONE_ENABLE_DISABLE_PITR_MODE, one_enable_disable_pitr_mode) \
114 _(ONE_SHOW_PITR_MODE, one_show_pitr_mode) \
115 _(ONE_ENABLE_DISABLE_PETR_MODE, one_enable_disable_petr_mode) \
116 _(ONE_SHOW_PETR_MODE, one_show_petr_mode) \
117 
118 
119 static locator_t *
120 unformat_one_locs (vl_api_remote_locator_t * rmt_locs, u32 rloc_num)
121 {
122  u32 i;
123  locator_t *locs = 0, loc;
124  vl_api_remote_locator_t *r;
125 
126  for (i = 0; i < rloc_num; i++)
127  {
128  /* remote locators */
129  r = &rmt_locs[i];
130  clib_memset (&loc, 0, sizeof (loc));
131  ip_address_decode2 (&r->ip_address, &loc.address.ippref.addr);
132  loc.address.ippref.len =
133  ip_address_max_len (loc.address.ippref.addr.version);
134 
135  loc.priority = r->priority;
136  loc.weight = r->weight;
137 
138  vec_add1 (locs, loc);
139  }
140  return locs;
141 }
142 
143 static void
145  mp)
146 {
147  vl_api_one_map_register_set_ttl_reply_t *rmp;
148  int rv = 0;
149 
150  mp->ttl = clib_net_to_host_u32 (mp->ttl);
152 
153  REPLY_MACRO (VL_API_ONE_MAP_REGISTER_SET_TTL_REPLY);
154 }
155 
156 static void
159 {
161  int rv = 0;
162 
164  /* *INDENT-OFF* */
165  REPLY_MACRO2 (VL_API_SHOW_ONE_MAP_REGISTER_TTL_REPLY,
166  ({
167  rmp->ttl = clib_host_to_net_u32 (ttl);
168  }));
169  /* *INDENT-ON* */
170 }
171 
172 static void
174  mp)
175 {
177  int rv = 0;
179  locator_t locator;
180  vl_api_local_locator_t *ls_loc;
181  u32 ls_index = ~0, locator_num;
182  u8 *locator_name = NULL;
183  int i;
184 
185  clib_memset (a, 0, sizeof (a[0]));
186 
187  mp->locator_set_name[sizeof (mp->locator_set_name) - 1] = 0;
188  locator_name = format (0, "%s", mp->locator_set_name);
189  vec_terminate_c_string (locator_name);
190 
191  a->name = locator_name;
192  a->is_add = mp->is_add;
193  a->local = 1;
194  locator_num = clib_net_to_host_u32 (mp->locator_num);
195 
196  clib_memset (&locator, 0, sizeof (locator));
197  for (i = 0; i < locator_num; i++)
198  {
199  ls_loc = &mp->locators[i];
200  VALIDATE_SW_IF_INDEX (ls_loc);
201 
202  locator.sw_if_index = htonl (ls_loc->sw_if_index);
203  locator.priority = ls_loc->priority;
204  locator.weight = ls_loc->weight;
205  locator.local = 1;
206  vec_add1 (a->locators, locator);
207  }
208 
209  rv = vnet_lisp_add_del_locator_set (a, &ls_index);
210 
212 
213  vec_free (locator_name);
214  vec_free (a->locators);
215 
216  /* *INDENT-OFF* */
217  REPLY_MACRO2 (VL_API_ONE_ADD_DEL_LOCATOR_SET_REPLY,
218  ({
219  rmp->ls_index = clib_host_to_net_u32 (ls_index);
220  }));
221  /* *INDENT-ON* */
222 }
223 
224 static void
226 {
227  vl_api_one_add_del_locator_reply_t *rmp;
228  int rv = 0;
229  locator_t locator, *locators = NULL;
231  u32 ls_index = ~0;
232  u8 *locator_name = NULL;
233 
234  clib_memset (&locator, 0, sizeof (locator));
235  clib_memset (a, 0, sizeof (a[0]));
236 
237  locator.sw_if_index = ntohl (mp->sw_if_index);
238  locator.priority = mp->priority;
239  locator.weight = mp->weight;
240  locator.local = 1;
241  vec_add1 (locators, locator);
242 
243  mp->locator_set_name[sizeof (mp->locator_set_name) - 1] = 0;
244  locator_name = format (0, "%s", mp->locator_set_name);
245  vec_terminate_c_string (locator_name);
246 
247  a->name = locator_name;
248  a->locators = locators;
249  a->is_add = mp->is_add;
250  a->local = 1;
251 
252  rv = vnet_lisp_add_del_locator (a, NULL, &ls_index);
253 
254  vec_free (locators);
255  vec_free (locator_name);
256 
257  REPLY_MACRO (VL_API_ONE_ADD_DEL_LOCATOR_REPLY);
258 }
259 
260 typedef struct
261 {
264 } __attribute__ ((__packed__)) lisp_nsh_api_t;
265 
266 static int
268 {
270 
271  switch (eid->type)
272  {
273  case EID_TYPE_API_PREFIX:
274  ip_prefix_decode (&eid->address.prefix, &prefix);
276  if (prefix.fp_proto == FIB_PROTOCOL_IP4)
277  gid_address_ip_set (dst, &prefix.fp_addr.ip4, AF_IP4);
278  if (prefix.fp_proto == FIB_PROTOCOL_IP6)
279  gid_address_ip_set (dst, &prefix.fp_addr.ip6, AF_IP6);
280  gid_address_ippref_len (dst) = prefix.fp_len;
282  break;
283  case EID_TYPE_API_MAC:
285  mac_address_decode (eid->address.mac,
287  break;
288  case EID_TYPE_API_NSH:
290  gid_address_nsh_spi (dst) = clib_net_to_host_u32 (eid->address.nsh.spi);
291  gid_address_nsh_si (dst) = eid->address.nsh.si;
292  break;
293  default:
294  /* unknown type */
295  return VNET_API_ERROR_INVALID_VALUE;
296  }
297 
298  gid_address_vni (dst) = vni;
299 
300  return 0;
301 }
302 
303 static void
304 fid_to_api_eid (fid_address_t * fid, vl_api_eid_t * eid)
305 {
306  fib_prefix_t fib_prefix;
307  u32 eid_type;
308 
309  switch (fid_addr_type (fid))
310  {
311  case FID_ADDR_IP_PREF:
313  ip_prefix_to_fib_prefix (&fid_addr_ippref (fid), &fib_prefix);
314  ip_prefix_encode (&fib_prefix, &eid->address.prefix);
315  break;
316  case FID_ADDR_MAC:
319  eid->address.mac);
320  break;
321  default:
322  /* unknown type */
323  return;
324  }
325 
326  eid->type = eid_type;
327 }
328 
329 static void
331 {
332  vl_api_one_add_del_local_eid_reply_t *rmp;
334  int rv = 0;
335  gid_address_t _eid, *eid = &_eid;
336  uword *p = NULL;
337  u32 locator_set_index = ~0, map_index = ~0;
339  u8 *name = NULL, *key = NULL;
340  clib_memset (a, 0, sizeof (a[0]));
341  clib_memset (eid, 0, sizeof (eid[0]));
342 
343  rv = unformat_one_eid_api (eid, clib_net_to_host_u32 (mp->vni), &mp->eid);
344  if (rv)
345  goto out;
346 
348  {
349  rv = VNET_API_ERROR_INVALID_VALUE;
350  goto out;
351  }
352 
353  mp->locator_set_name[sizeof (mp->locator_set_name) - 1] = 0;
354  name = format (0, "%s", mp->locator_set_name);
357  if (!p)
358  {
359  rv = VNET_API_ERROR_INVALID_VALUE;
360  goto out;
361  }
362  locator_set_index = p[0];
363 
364  if (mp->key.id != KEY_ID_API_HMAC_NO_KEY)
365  key = format (0, "%s", mp->key.key);
366 
367  /* XXX treat batch configuration */
368  a->is_add = mp->is_add;
369  gid_address_copy (&a->eid, eid);
370  a->locator_set_index = locator_set_index;
371  a->local = 1;
372  a->key = key;
373  a->key_id = mp->key.id;
374 
375  rv = vnet_lisp_add_del_local_mapping (a, &map_index);
376 
377 out:
378  vec_free (name);
379  vec_free (key);
380  gid_address_free (&a->eid);
381 
382  REPLY_MACRO (VL_API_ONE_ADD_DEL_LOCAL_EID_REPLY);
383 }
384 
385 static void
388 {
389  vl_api_one_eid_table_add_del_map_reply_t *rmp;
390  int rv = 0;
391  rv = vnet_lisp_eid_table_map (clib_net_to_host_u32 (mp->vni),
392  clib_net_to_host_u32 (mp->dp_table),
393  mp->is_l2, mp->is_add);
394 REPLY_MACRO (VL_API_ONE_EID_TABLE_ADD_DEL_MAP_REPLY)}
395 
396 static void
398 {
399  vl_api_one_add_del_map_server_reply_t *rmp;
400  int rv = 0;
402 
403  clib_memset (&addr, 0, sizeof (addr));
404 
406 
408 
409  REPLY_MACRO (VL_API_ONE_ADD_DEL_MAP_SERVER_REPLY);
410 }
411 
412 static void
414  * mp)
415 {
416  vl_api_one_add_del_map_resolver_reply_t *rmp;
417  int rv = 0;
419 
420  clib_memset (a, 0, sizeof (a[0]));
421 
422  ip_address_decode2 (&mp->ip_address, &a->address);
423 
424  a->is_add = mp->is_add;
425 
427 
428  REPLY_MACRO (VL_API_ONE_ADD_DEL_MAP_RESOLVER_REPLY);
429 }
430 
431 static void
434 {
435  vl_api_one_map_register_enable_disable_reply_t *rmp;
436  int rv = 0;
437 
439  REPLY_MACRO (VL_API_ONE_ENABLE_DISABLE_REPLY);
440 }
441 
442 static void
445 {
446  vl_api_one_rloc_probe_enable_disable_reply_t *rmp;
447  int rv = 0;
448 
450  REPLY_MACRO (VL_API_ONE_ENABLE_DISABLE_REPLY);
451 }
452 
453 static void
455 {
456  vl_api_one_enable_disable_reply_t *rmp;
457  int rv = 0;
458 
460  REPLY_MACRO (VL_API_ONE_ENABLE_DISABLE_REPLY);
461 }
462 
463 static void
466 {
467  int rv = 0;
469 
470  /* *INDENT-OFF* */
471  REPLY_MACRO2(VL_API_SHOW_ONE_MAP_REQUEST_MODE_REPLY,
472  ({
474  }));
475  /* *INDENT-ON* */
476 }
477 
478 static void
480 {
481  vl_api_one_map_request_mode_reply_t *rmp;
482  int rv = 0;
483 
485 
486  REPLY_MACRO (VL_API_ONE_MAP_REQUEST_MODE_REPLY);
487 }
488 
489 static void
491  * mp)
492 {
493  vl_api_one_nsh_set_locator_set_reply_t *rmp;
494  int rv = 0;
495  u8 *ls_name = 0;
496 
497  mp->ls_name[sizeof (mp->ls_name) - 1] = 0;
498  ls_name = format (0, "%s", mp->ls_name);
499  vec_terminate_c_string (ls_name);
500  rv = vnet_lisp_nsh_set_locator_set (ls_name, mp->is_add);
501  vec_free (ls_name);
502 
503  REPLY_MACRO (VL_API_ONE_PITR_SET_LOCATOR_SET_REPLY);
504 }
505 
506 static void
508  * mp)
509 {
510  vl_api_one_pitr_set_locator_set_reply_t *rmp;
511  int rv = 0;
512  u8 *ls_name = 0;
513 
514  mp->ls_name[sizeof (mp->ls_name) - 1] = 0;
515  ls_name = format (0, "%s", mp->ls_name);
516  vec_terminate_c_string (ls_name);
517  rv = vnet_lisp_pitr_set_locator_set (ls_name, mp->is_add);
518  vec_free (ls_name);
519 
520  REPLY_MACRO (VL_API_ONE_PITR_SET_LOCATOR_SET_REPLY);
521 }
522 
523 static void
525 {
526  vl_api_one_use_petr_reply_t *rmp;
527  int rv = 0;
529 
531 
532  rv = vnet_lisp_use_petr (&addr, mp->is_add);
533 
534  REPLY_MACRO (VL_API_ONE_USE_PETR_REPLY);
535 }
536 
537 static void
539 {
542  mapping_t *m;
543  locator_set_t *ls = 0;
544  int rv = 0;
545  locator_t *loc = 0;
546  u8 status = 0;
548 
549  clib_memset (&addr, 0, sizeof (addr));
550  status = lcm->flags & LISP_FLAG_USE_PETR;
551  if (status)
552  {
554  if (~0 != m->locator_set_index)
555  {
556  ls =
558  loc = pool_elt_at_index (lcm->locator_pool, ls->locator_indices[0]);
559  gid_address_copy (&addr, &loc->address);
560  }
561  }
562 
563  /* *INDENT-OFF* */
564  REPLY_MACRO2 (VL_API_SHOW_ONE_USE_PETR_REPLY,
565  {
566  rmp->status = status;
568 
570  });
571  /* *INDENT-ON* */
572 }
573 
574 static void
577 {
578  vl_api_one_add_del_map_request_itr_rlocs_reply_t *rmp;
579  int rv = 0;
580  u8 *locator_set_name = NULL;
582 
583  mp->locator_set_name[sizeof (mp->locator_set_name) - 1] = 0;
584  locator_set_name = format (0, "%s", mp->locator_set_name);
585  vec_terminate_c_string (locator_set_name);
586 
587  a->is_add = mp->is_add;
588  a->locator_set_name = locator_set_name;
589 
591 
592  vec_free (locator_set_name);
593 
594  REPLY_MACRO (VL_API_ONE_ADD_DEL_MAP_REQUEST_ITR_RLOCS_REPLY);
595 }
596 
597 static void
600 {
601  locator_t *rlocs = 0;
602  vl_api_one_add_del_remote_mapping_reply_t *rmp;
603  int rv = 0;
604  gid_address_t _eid, *eid = &_eid;
605  u32 rloc_num = clib_net_to_host_u32 (mp->rloc_num);
606 
607  clib_memset (eid, 0, sizeof (eid[0]));
608 
609  rv = unformat_one_eid_api (eid, clib_net_to_host_u32 (mp->vni), &mp->deid);
610  if (rv)
611  goto send_reply;
612 
613  rlocs = unformat_one_locs (mp->rlocs, rloc_num);
614 
615  if (!mp->is_add)
616  {
618  clib_memset (a, 0, sizeof (a[0]));
619  gid_address_copy (&a->reid, eid);
620  a->is_add = 0;
622  if (rv)
623  {
624  goto out;
625  }
626  }
627 
628  /* NOTE: for now this works as a static remote mapping, i.e.,
629  * not authoritative and ttl infinite. */
630  if (mp->is_add)
631  {
632  vnet_lisp_add_del_mapping_args_t _m_args, *m_args = &_m_args;
633  clib_memset (m_args, 0, sizeof (m_args[0]));
634  gid_address_copy (&m_args->eid, eid);
635  m_args->action = mp->action;
636  m_args->is_static = 1;
637  m_args->ttl = ~0;
638  m_args->authoritative = 0;
639  rv = vnet_lisp_add_mapping (m_args, rlocs, NULL, NULL);
640  }
641  else
642  rv = vnet_lisp_del_mapping (eid, NULL);
643 
644  if (mp->del_all)
646 
647 out:
648  vec_free (rlocs);
649 send_reply:
650  REPLY_MACRO (VL_API_ONE_ADD_DEL_REMOTE_MAPPING_REPLY);
651 }
652 
653 static void
655 {
656  vl_api_one_add_del_adjacency_reply_t *rmp;
658 
659  int rv = 0;
660  clib_memset (a, 0, sizeof (a[0]));
661 
662  rv =
663  unformat_one_eid_api (&a->leid, clib_net_to_host_u32 (mp->vni),
664  &mp->leid);
665  rv |=
666  unformat_one_eid_api (&a->reid, clib_net_to_host_u32 (mp->vni),
667  &mp->reid);
668 
669  if (rv)
670  goto send_reply;
671 
672  a->is_add = mp->is_add;
674 
675 send_reply:
676  REPLY_MACRO (VL_API_ONE_ADD_DEL_ADJACENCY_REPLY);
677 }
678 
679 static void
681  locator_t * loc, vl_api_registration_t * reg,
682  u32 context)
683 {
685 
686  rmp = vl_msg_api_alloc (sizeof (*rmp));
687  clib_memset (rmp, 0, sizeof (*rmp));
688  rmp->_vl_msg_id = ntohs (VL_API_ONE_LOCATOR_DETAILS);
689  rmp->context = context;
690 
691  rmp->local = loc->local;
692  if (loc->local)
693  {
694  rmp->sw_if_index = ntohl (loc->sw_if_index);
695  }
696  else
697  {
698  ip_address_encode2 (&loc->address.ippref.addr, &rmp->ip_address);
699  }
700  rmp->priority = loc->priority;
701  rmp->weight = loc->weight;
702 
703  vl_api_send_msg (reg, (u8 *) rmp);
704 }
705 
706 static void
708 {
709  u8 *ls_name = 0;
712  locator_set_t *lsit = 0;
713  locator_t *loc = 0;
714  u32 ls_index = ~0, *locit = 0;
715  uword *p = 0;
716 
718  if (!reg)
719  return;
720 
721  if (mp->is_index_set)
722  ls_index = htonl (mp->ls_index);
723  else
724  {
725  /* make sure we get a proper C-string */
726  mp->ls_name[sizeof (mp->ls_name) - 1] = 0;
727  ls_name = format (0, "%s", mp->ls_name);
728  vec_terminate_c_string (ls_name);
729  p = hash_get_mem (lcm->locator_set_index_by_name, ls_name);
730  if (!p)
731  goto out;
732  ls_index = p[0];
733  }
734 
735  if (pool_is_free_index (lcm->locator_set_pool, ls_index))
736  return;
737 
738  lsit = pool_elt_at_index (lcm->locator_set_pool, ls_index);
739 
740  vec_foreach (locit, lsit->locator_indices)
741  {
742  loc = pool_elt_at_index (lcm->locator_pool, locit[0]);
743  send_one_locator_details (lcm, loc, reg, mp->context);
744  };
745 out:
746  vec_free (ls_name);
747 }
748 
749 static void
751  locator_set_t * lsit,
753  u32 ls_index)
754 {
756  u8 *str = 0;
757 
758  rmp = vl_msg_api_alloc (sizeof (*rmp));
759  clib_memset (rmp, 0, sizeof (*rmp));
760  rmp->_vl_msg_id = ntohs (VL_API_ONE_LOCATOR_SET_DETAILS);
761  rmp->context = context;
762 
763  rmp->ls_index = htonl (ls_index);
764  if (lsit->local)
765  {
766  ASSERT (lsit->name != NULL);
767  strncpy ((char *) rmp->ls_name, (char *) lsit->name,
768  vec_len (lsit->name));
769  }
770  else
771  {
772  str = format (0, "<remote-%d>", ls_index);
773  strncpy ((char *) rmp->ls_name, (char *) str, vec_len (str));
774  vec_free (str);
775  }
776 
777  vl_api_send_msg (reg, (u8 *) rmp);
778 }
779 
780 static void
782 {
785  locator_set_t *lsit = NULL;
786  u8 filter;
787 
789  if (!reg)
790  return;
791 
792  filter = mp->filter;
793  /* *INDENT-OFF* */
794  pool_foreach (lsit, lcm->locator_set_pool)
795  {
796  if (filter && !((1 == filter && lsit->local) ||
797  (2 == filter && !lsit->local)))
798  {
799  continue;
800  }
801  send_one_locator_set_details (lcm, lsit, reg, mp->context,
802  lsit - lcm->locator_set_pool);
803  }
804  /* *INDENT-ON* */
805 }
806 
807 static void
810  u8 filter)
811 {
813  locator_set_t *ls = 0;
814  vl_api_one_eid_table_details_t *rmp = NULL;
815  gid_address_t *gid = NULL;
816  u32 eid_type;
817  fib_prefix_t fib_prefix;
818 
819  if (mapit->pitr_set || mapit->nsh_set)
820  return;
821 
822  switch (filter)
823  {
824  case ONE_FILTER_API_ALL: /* all mappings */
825  break;
826 
827  case ONE_FILTER_API_LOCAL: /* local only */
828  if (!mapit->local)
829  return;
830  break;
831  case ONE_FILTER_API_REMOTE: /* remote only */
832  if (mapit->local)
833  return;
834  break;
835  default:
836  clib_warning ("Filter error, unknown filter: %d", filter);
837  return;
838  }
839 
840  gid = &mapit->eid;
841 
842  rmp = vl_msg_api_alloc (sizeof (*rmp));
843  clib_memset (rmp, 0, sizeof (*rmp));
844  rmp->_vl_msg_id = ntohs (VL_API_ONE_EID_TABLE_DETAILS);
845 
847  if (vec_len (ls->locator_indices) == 0)
848  rmp->locator_set_index = ~0;
849  else
850  rmp->locator_set_index = clib_host_to_net_u32 (mapit->locator_set_index);
851 
852  rmp->is_local = mapit->local;
853  rmp->ttl = clib_host_to_net_u32 (mapit->ttl);
854  rmp->action = mapit->action;
855  rmp->authoritative = mapit->authoritative;
856 
857  switch (gid_address_type (gid))
858  {
859  case GID_ADDR_SRC_DST:
860  fid_to_api_eid (&gid_address_sd_src (gid), &rmp->seid);
861  fid_to_api_eid (&gid_address_sd_dst (gid), &rmp->deid);
862  break;
863  case GID_ADDR_IP_PREFIX:
865  rmp->seid.type = eid_type;
866  ip_prefix_to_fib_prefix (&gid_address_ippref (gid), &fib_prefix);
867  ip_prefix_encode (&fib_prefix, &rmp->seid.address.prefix);
868  break;
869  case GID_ADDR_MAC:
871  rmp->seid.type = eid_type;
873  rmp->seid.address.mac);
874  break;
875  case GID_ADDR_NSH:
877  rmp->seid.type = eid_type;
878  rmp->seid.address.nsh.spi =
879  clib_host_to_net_u32 (gid_address_nsh_spi (gid));
880  rmp->seid.address.nsh.si = gid_address_nsh_si (gid);
881  break;
882  default:
883  /* unknown type */
884  return;
885  }
886 
887  rmp->context = context;
888  rmp->vni = clib_host_to_net_u32 (gid_address_vni (gid));
889  rmp->key.id = mapit->key_id;
890  memcpy (rmp->key.key, mapit->key, vec_len (mapit->key));
891  vl_api_send_msg (reg, (u8 *) rmp);
892 }
893 
894 static void
896 {
897  u32 mi;
900  mapping_t *mapit = NULL;
901  gid_address_t _eid, *eid = &_eid;
902 
904  if (!reg)
905  return;
906 
907  if (mp->eid_set)
908  {
909  clib_memset (eid, 0, sizeof (*eid));
910 
911  unformat_one_eid_api (eid, clib_net_to_host_u32 (mp->vni), &mp->eid);
912 
914  if ((u32) ~ 0 == mi)
915  return;
916 
917  mapit = pool_elt_at_index (lcm->mapping_pool, mi);
918  send_one_eid_table_details (mapit, reg, mp->context,
919  0 /* ignore filter */ );
920  }
921  else
922  {
923  /* *INDENT-OFF* */
924  pool_foreach (mapit, lcm->mapping_pool)
925  {
926  send_one_eid_table_details(mapit, reg, mp->context,
927  mp->filter);
928  }
929  /* *INDENT-ON* */
930  }
931 }
932 
933 static void
935  u32 context)
936 {
938 
939  rmp = vl_msg_api_alloc (sizeof (*rmp));
940  clib_memset (rmp, 0, sizeof (*rmp));
941  rmp->_vl_msg_id = ntohs (VL_API_ONE_MAP_SERVER_DETAILS);
942 
943 
945 
946  rmp->context = context;
947 
948  vl_api_send_msg (reg, (u8 *) rmp);
949 }
950 
951 static void
953 {
956  lisp_msmr_t *mr;
957 
959  if (!reg)
960  return;
961 
962  vec_foreach (mr, lcm->map_servers)
963  {
965  }
966 }
967 
968 static void
971 {
973 
974  rmp = vl_msg_api_alloc (sizeof (*rmp));
975  clib_memset (rmp, 0, sizeof (*rmp));
976  rmp->_vl_msg_id = ntohs (VL_API_ONE_MAP_RESOLVER_DETAILS);
977 
979  rmp->context = context;
980 
981  vl_api_send_msg (reg, (u8 *) rmp);
982 }
983 
984 static void
986 {
989  lisp_msmr_t *mr;
990 
992  if (!reg)
993  return;
994 
995  vec_foreach (mr, lcm->map_resolvers)
996  {
998  }
999 }
1000 
1001 static void
1003  u32 context)
1004 {
1006 
1007  rmp = vl_msg_api_alloc (sizeof (*rmp));
1008  clib_memset (rmp, 0, sizeof (*rmp));
1009  rmp->_vl_msg_id = ntohs (VL_API_ONE_EID_TABLE_MAP_DETAILS);
1010 
1011  rmp->vni = clib_host_to_net_u32 (p->key);
1012  rmp->dp_table = clib_host_to_net_u32 (p->value[0]);
1013  rmp->context = context;
1014  vl_api_send_msg (reg, (u8 *) rmp);
1015 }
1016 
1017 static void
1019 {
1020  vl_api_registration_t *reg;
1022  hash_pair_t *p;
1023  uword *vni_table = 0;
1024 
1026  if (!reg)
1027  return;
1028 
1029  if (mp->is_l2)
1030  {
1031  vni_table = lcm->bd_id_by_vni;
1032  }
1033  else
1034  {
1035  vni_table = lcm->table_id_by_vni;
1036  }
1037 
1038  /* *INDENT-OFF* */
1039  hash_foreach_pair (p, vni_table,
1040  ({
1041  send_eid_table_map_pair (p, reg, mp->context);
1042  }));
1043  /* *INDENT-ON* */
1044 }
1045 
1046 static void
1048 {
1050 
1051  rmp = vl_msg_api_alloc (sizeof (*rmp));
1052  clib_memset (rmp, 0, sizeof (*rmp));
1053  rmp->_vl_msg_id = ntohs (VL_API_ONE_EID_TABLE_VNI_DETAILS);
1054  rmp->context = context;
1055  rmp->vni = clib_host_to_net_u32 (vni);
1056  vl_api_send_msg (reg, (u8 *) rmp);
1057 }
1058 
1059 static void
1060 one_adjacency_copy (vl_api_one_adjacency_t * dst, lisp_adjacency_t * adjs)
1061 {
1062  lisp_adjacency_t *adj;
1063  vl_api_one_adjacency_t a;
1064  u32 i, n = vec_len (adjs);
1065  fib_prefix_t rfib_prefix, lfib_prefix;
1066  u32 eid_type;
1067 
1068  for (i = 0; i < n; i++)
1069  {
1070  adj = vec_elt_at_index (adjs, i);
1071  clib_memset (&a, 0, sizeof (a));
1072 
1073  switch (gid_address_type (&adj->reid))
1074  {
1075  case GID_ADDR_IP_PREFIX:
1078  &rfib_prefix);
1080  &lfib_prefix);
1081  ip_prefix_encode (&rfib_prefix, &a.reid.address.prefix);
1082  ip_prefix_encode (&lfib_prefix, &a.leid.address.prefix);
1083  break;
1084  case GID_ADDR_MAC:
1087  a.reid.address.mac);
1089  a.leid.address.mac);
1090  break;
1091  case GID_ADDR_NSH:
1093  a.reid.address.nsh.spi =
1094  clib_host_to_net_u32 (gid_address_nsh_spi (&adj->reid));
1095  a.reid.address.nsh.si = gid_address_nsh_si (&adj->reid);
1096  a.leid.address.nsh.spi =
1097  clib_host_to_net_u32 (gid_address_nsh_spi (&adj->leid));
1098  a.leid.address.nsh.si = gid_address_nsh_si (&adj->leid);
1099  break;
1100  default:
1101  ALWAYS_ASSERT (0);
1102  }
1103  a.reid.type = eid_type;
1104  a.leid.type = eid_type;
1105  dst[i] = a;
1106  }
1107 }
1108 
1109 static void
1112 {
1114  int rv = 0;
1115 
1116  /* *INDENT-OFF* */
1117  REPLY_MACRO2 (VL_API_SHOW_ONE_RLOC_PROBE_STATE_REPLY,
1118  {
1120  });
1121  /* *INDENT-ON* */
1122 }
1123 
1124 static void
1127 {
1129  int rv = 0;
1130 
1131  /* *INDENT-OFF* */
1132  REPLY_MACRO2 (VL_API_SHOW_ONE_MAP_REGISTER_STATE_REPLY,
1133  {
1135  });
1136  /* *INDENT-ON* */
1137 }
1138 
1139 static void
1141 {
1143  lisp_adjacency_t *adjs = 0;
1144  int rv = 0;
1145  u32 size = ~0;
1146  u32 vni = clib_net_to_host_u32 (mp->vni);
1147 
1149  size = vec_len (adjs) * sizeof (vl_api_one_adjacency_t);
1150 
1151  /* *INDENT-OFF* */
1152  REPLY_MACRO4 (VL_API_ONE_ADJACENCIES_GET_REPLY, size,
1153  {
1154  rmp->count = clib_host_to_net_u32 (vec_len (adjs));
1155  one_adjacency_copy (rmp->adjacencies, adjs);
1156  });
1157  /* *INDENT-ON* */
1158 
1159  vec_free (adjs);
1160 }
1161 
1162 static void
1164 {
1165  hash_pair_t *p;
1166  u32 *vnis = 0;
1167  vl_api_registration_t *reg;
1169 
1171  if (!reg)
1172  return;
1173 
1174  /* *INDENT-OFF* */
1176  ({
1177  hash_set (vnis, p->key, 0);
1178  }));
1179 
1181  ({
1182  hash_set (vnis, p->key, 0);
1183  }));
1184 
1185  hash_foreach_pair (p, vnis,
1186  ({
1187  send_eid_table_vni (p->key, reg, mp->context);
1188  }));
1189  /* *INDENT-ON* */
1190 
1191  hash_free (vnis);
1192 }
1193 
1194 static void
1196 {
1197  vl_api_show_one_status_reply_t *rmp = NULL;
1198  int rv = 0;
1199 
1200  /* *INDENT-OFF* */
1201  REPLY_MACRO2(VL_API_SHOW_ONE_STATUS_REPLY,
1202  ({
1205  }));
1206  /* *INDENT-ON* */
1207 }
1208 
1209 static void
1212 {
1215  locator_set_t *loc_set = 0;
1216  u8 *tmp_str = 0;
1217  int rv = 0;
1218 
1219  if (~0 == lcm->mreq_itr_rlocs)
1220  {
1221  tmp_str = format (0, " ");
1222  }
1223  else
1224  {
1225  loc_set =
1227  tmp_str = format (0, "%s", loc_set->name);
1228  }
1229 
1230  /* *INDENT-OFF* */
1231  REPLY_MACRO2(VL_API_ONE_GET_MAP_REQUEST_ITR_RLOCS_REPLY,
1232  ({
1233  strncpy((char *) rmp->locator_set_name, (char *) tmp_str,
1234  ARRAY_LEN(rmp->locator_set_name) - 1);
1235  }));
1236  /* *INDENT-ON* */
1237 
1238  vec_free (tmp_str);
1239 }
1240 
1241 static void
1243 {
1246  mapping_t *m;
1247  locator_set_t *ls = 0;
1248  u8 *tmp_str = 0;
1249  u8 is_set = 0;
1250  int rv = 0;
1251 
1252  if (lcm->nsh_map_index == (u32) ~ 0)
1253  {
1254  tmp_str = format (0, "N/A");
1255  }
1256  else
1257  {
1258  m = pool_elt_at_index (lcm->mapping_pool, lcm->nsh_map_index);
1259  if (~0 != m->locator_set_index)
1260  {
1261  ls =
1263  tmp_str = format (0, "%s", ls->name);
1264  is_set = 1;
1265  }
1266  else
1267  {
1268  tmp_str = format (0, "N/A");
1269  }
1270  }
1271  vec_add1 (tmp_str, 0);
1272 
1273  /* *INDENT-OFF* */
1274  REPLY_MACRO2(VL_API_SHOW_ONE_NSH_MAPPING_REPLY,
1275  ({
1276  rmp->is_set = is_set;
1277  strncpy((char *) rmp->locator_set_name, (char *) tmp_str,
1278  ARRAY_LEN(rmp->locator_set_name) - 1);
1279  }));
1280  /* *INDENT-ON* */
1281 }
1282 
1283 static void
1285 {
1286  vl_api_show_one_pitr_reply_t *rmp = NULL;
1288  mapping_t *m;
1289  locator_set_t *ls = 0;
1290  u8 *tmp_str = 0;
1291  int rv = 0;
1292 
1293  u8 is_enable = (lcm->flags & LISP_FLAG_PITR_MODE)
1294  && lcm->pitr_map_index != ~0;
1295 
1296  if (!is_enable)
1297  {
1298  tmp_str = format (0, "N/A");
1299  }
1300  else
1301  {
1303  if (~0 != m->locator_set_index)
1304  {
1305  ls =
1307  tmp_str = format (0, "%s", ls->name);
1308  }
1309  else
1310  {
1311  tmp_str = format (0, "N/A");
1312  }
1313  }
1314  vec_add1 (tmp_str, 0);
1315 
1316  /* *INDENT-OFF* */
1317  REPLY_MACRO2(VL_API_SHOW_ONE_PITR_REPLY,
1318  ({
1319  rmp->status = lcm->flags & LISP_FLAG_PITR_MODE;
1320  strncpy((char *) rmp->locator_set_name, (char *) tmp_str,
1321  ARRAY_LEN(rmp->locator_set_name) - 1);
1322  }));
1323  /* *INDENT-ON* */
1324 }
1325 
1326 static void
1329 {
1331  vnet_api_error_t rv = 0;
1332 
1333  /* *INDENT-OFF* */
1334  REPLY_MACRO2 (VL_API_SHOW_ONE_STATS_ENABLE_DISABLE_REPLY,
1335  ({
1337  }));
1338  /* *INDENT-ON* */
1339 }
1340 
1341 static void
1344 {
1345  vl_api_one_enable_disable_reply_t *rmp = NULL;
1346 
1348  REPLY_MACRO (VL_API_ONE_ENABLE_DISABLE_REPLY);
1349 }
1350 
1351 static void
1353 {
1354  vl_api_one_stats_flush_reply_t *rmp;
1355  u8 rv;
1356 
1358  REPLY_MACRO (VL_API_ONE_STATS_FLUSH_REPLY);
1359 }
1360 
1361 static void
1363 {
1365  lisp_api_stats_t *stats, *stat;
1366  u8 rv = 0;
1367 
1369  vec_foreach (stat, stats)
1370  {
1371  /* *INDENT-OFF* */
1372  REPLY_DETAILS (VL_API_ONE_STATS_DETAILS,
1373  ({
1374  fid_to_api_eid (&stat->deid, &rmp->deid);
1375  fid_to_api_eid (&stat->seid, &rmp->seid);
1376  rmp->vni = clib_host_to_net_u32 (stat->vni);
1377 
1378  ip_address_encode2 (&stat->rmt_rloc, &rmp->rloc);
1379  ip_address_encode2 (&stat->loc_rloc, &rmp->lloc);
1380 
1381  rmp->pkt_count = clib_host_to_net_u32 (stat->counters.packets);
1382  rmp->bytes = clib_host_to_net_u32 (stat->counters.bytes);
1383  }));
1384  /* *INDENT-ON* */
1385  }
1386 }
1387 
1388 static void
1391 {
1392  vl_api_one_add_del_l2_arp_entry_reply_t *rmp;
1393  int rv = 0;
1394  gid_address_t _arp, *arp = &_arp;
1397  clib_memset (arp, 0, sizeof (*arp));
1398 
1400  gid_address_arp_bd (arp) = clib_net_to_host_u32 (mp->bd);
1401 
1402  ip4_address_decode (mp->entry.ip4, &ip4);
1404  mac_address_decode (mp->entry.mac, &mac);
1405 
1406  rv = vnet_lisp_add_del_l2_arp_ndp_entry (arp, mac.bytes, mp->is_add);
1407 
1408  REPLY_MACRO (VL_API_ONE_ADD_DEL_L2_ARP_ENTRY_REPLY);
1409 }
1410 
1411 static void
1413 {
1414  vl_api_one_add_del_ndp_entry_reply_t *rmp;
1415  int rv = 0;
1416  gid_address_t _g, *g = &_g;
1417  ip6_address_t ip6;
1419  clib_memset (g, 0, sizeof (*g));
1420 
1422  gid_address_ndp_bd (g) = clib_net_to_host_u32 (mp->bd);
1423 
1424  ip6_address_decode (mp->entry.ip6, &ip6);
1426  mac_address_decode (mp->entry.mac, &mac);
1427 
1428  rv = vnet_lisp_add_del_l2_arp_ndp_entry (g, mac.bytes, mp->is_add);
1429 
1430  REPLY_MACRO (VL_API_ONE_ADD_DEL_NDP_ENTRY_REPLY);
1431 }
1432 
1433 static void
1435 {
1437  int rv = 0;
1438  u32 i = 0;
1439  hash_pair_t *p;
1440 
1441  u32 *bds = vnet_lisp_ndp_bds_get ();
1442  u32 size = hash_elts (bds) * sizeof (u32);
1443 
1444  /* *INDENT-OFF* */
1445  REPLY_MACRO4 (VL_API_ONE_NDP_BD_GET_REPLY, size,
1446  {
1447  rmp->count = clib_host_to_net_u32 (hash_elts (bds));
1448  hash_foreach_pair (p, bds,
1449  ({
1450  rmp->bridge_domains[i++] = clib_host_to_net_u32 (p->key);
1451  }));
1452  });
1453  /* *INDENT-ON* */
1454 
1455  hash_free (bds);
1456 }
1457 
1458 static void
1460 {
1462  int rv = 0;
1463  u32 i = 0;
1464  hash_pair_t *p;
1465 
1466  u32 *bds = vnet_lisp_l2_arp_bds_get ();
1467  u32 size = hash_elts (bds) * sizeof (u32);
1468 
1469  /* *INDENT-OFF* */
1470  REPLY_MACRO4 (VL_API_ONE_L2_ARP_BD_GET_REPLY, size,
1471  {
1472  rmp->count = clib_host_to_net_u32 (hash_elts (bds));
1473  hash_foreach_pair (p, bds,
1474  ({
1475  rmp->bridge_domains[i++] = clib_host_to_net_u32 (p->key);
1476  }));
1477  });
1478  /* *INDENT-ON* */
1479 
1480  hash_free (bds);
1481 }
1482 
1483 static void
1485 {
1488  u32 i = 0;
1489  int rv = 0;
1490 
1491  u32 bd = clib_net_to_host_u32 (mp->bd);
1492 
1494  u32 size = vec_len (entries) * sizeof (vl_api_one_l2_arp_entry_t);
1495 
1496  /* *INDENT-OFF* */
1497  REPLY_MACRO4 (VL_API_ONE_L2_ARP_ENTRIES_GET_REPLY, size,
1498  {
1499  rmp->count = clib_host_to_net_u32 (vec_len (entries));
1500  vec_foreach (e, entries)
1501  {
1502  mac_address_encode ((mac_address_t *) e->mac, rmp->entries[i].mac);
1503  ip4_address_encode ((ip4_address_t *) &e->ip4, rmp->entries[i].ip4);
1504  i++;
1505  }
1506  });
1507  /* *INDENT-ON* */
1508 
1509  vec_free (entries);
1510 }
1511 
1512 static void
1515 {
1516  vl_api_one_map_register_fallback_threshold_reply_t *rmp;
1517  int rv = 0;
1518 
1519  mp->value = clib_net_to_host_u32 (mp->value);
1521  REPLY_MACRO (VL_API_ONE_MAP_REGISTER_FALLBACK_THRESHOLD_REPLY);
1522 }
1523 
1524 static void
1527 {
1529  int rv = 0;
1530 
1532 
1533  /* *INDENT-OFF* */
1534  REPLY_MACRO2 (VL_API_SHOW_ONE_MAP_REGISTER_FALLBACK_THRESHOLD_REPLY,
1535  ({
1536  rmp->value = clib_host_to_net_u32 (value);
1537  }));
1538  /* *INDENT-ON* */
1539 }
1540 
1541 static void
1544 {
1545  vl_api_one_set_transport_protocol_reply_t *rmp;
1546  int rv = 0;
1547 
1549 
1550  REPLY_MACRO (VL_API_ONE_SET_TRANSPORT_PROTOCOL_REPLY);
1551 }
1552 
1553 static void
1556 {
1558  int rv = 0;
1560 
1561  /* *INDENT-OFF* */
1562  REPLY_MACRO2 (VL_API_ONE_GET_TRANSPORT_PROTOCOL_REPLY,
1563  ({
1564  rmp->protocol = proto;
1565  }));
1566  /* *INDENT-ON* */
1567 }
1568 
1569 static void
1571 {
1573  lisp_api_ndp_entry_t *entries = 0, *e;
1574  u32 i = 0;
1575  int rv = 0;
1576 
1577  u32 bd = clib_net_to_host_u32 (mp->bd);
1578 
1580  u32 size = vec_len (entries) * sizeof (vl_api_one_ndp_entry_t);
1581 
1582  /* *INDENT-OFF* */
1583  REPLY_MACRO4 (VL_API_ONE_NDP_ENTRIES_GET_REPLY, size,
1584  {
1585  rmp->count = clib_host_to_net_u32 (vec_len (entries));
1586  vec_foreach (e, entries)
1587  {
1588  mac_address_encode ((mac_address_t *) e->mac, rmp->entries[i].mac);
1589  ip6_address_encode ((ip6_address_t *) &e->ip6, rmp->entries[i].ip6);
1590  i++;
1591  }
1592  });
1593  /* *INDENT-ON* */
1594 
1595  vec_free (entries);
1596 }
1597 
1598 static void
1601 {
1602  vl_api_one_enable_disable_xtr_mode_reply_t *rmp = 0;
1604 
1605  REPLY_MACRO (VL_API_ONE_ENABLE_DISABLE_XTR_MODE_REPLY);
1606 }
1607 
1608 static void
1610 {
1612  int rv = 0;
1613 
1614  /* *INDENT-OFF* */
1615  REPLY_MACRO2 (VL_API_ONE_SHOW_XTR_MODE_REPLY,
1616  {
1618  });
1619  /* *INDENT-ON* */
1620 }
1621 
1622 static void
1625 {
1626  vl_api_one_enable_disable_pitr_mode_reply_t *rmp = 0;
1628 
1629  REPLY_MACRO (VL_API_ONE_ENABLE_DISABLE_PITR_MODE_REPLY);
1630 }
1631 
1632 static void
1634 {
1636  int rv = 0;
1637 
1638  /* *INDENT-OFF* */
1639  REPLY_MACRO2 (VL_API_ONE_SHOW_PITR_MODE_REPLY,
1640  {
1642  });
1643  /* *INDENT-ON* */
1644 }
1645 
1646 static void
1649 {
1650  vl_api_one_enable_disable_petr_mode_reply_t *rmp = 0;
1652 
1653  REPLY_MACRO (VL_API_ONE_ENABLE_DISABLE_PETR_MODE_REPLY);
1654 }
1655 
1656 static void
1658 {
1660  int rv = 0;
1661 
1662  /* *INDENT-OFF* */
1663  REPLY_MACRO2 (VL_API_ONE_SHOW_PETR_MODE_REPLY,
1664  {
1666  });
1667  /* *INDENT-ON* */
1668 }
1669 
1670 /*
1671  * one_api_hookup
1672  * Add vpe's API message handlers to the table.
1673  * vlib has already mapped shared memory and
1674  * added the client registration handlers.
1675  * See .../vlib-api/vlibmemory/memclnt_vlib.c:memclnt_process()
1676  */
1677 #include <lisp/lisp-cp/one.api.c>
1678 
1679 static clib_error_t *
1681 {
1683 
1684  return 0;
1685 }
1686 
1688 
1689 #include <vlib/unix/plugin.h>
1690 #include <vpp/app/version.h>
1691 
1692 /* *INDENT-OFF* */
1693 VLIB_PLUGIN_REGISTER () = {
1694  .version = VPP_BUILD_VER,
1695  .description = "Locator ID Separation Protocol (LISP)",
1696 };
1697 /* *INDENT-ON* */
1698 
1699 /*
1700  * fd.io coding-style-patch-verification: ON
1701  *
1702  * Local Variables:
1703  * eval: (c-set-style "gnu")
1704  * End:
1705  */
vl_api_one_map_server_details_t
ONE map server details.
Definition: one.api:798
send_one_locator_set_details
static void send_one_locator_set_details(lisp_cp_main_t *lcm, locator_set_t *lsit, vl_api_registration_t *reg, u32 context, u32 ls_index)
Definition: one_api.c:750
lisp_api_ndp_entry_t
Definition: control.h:107
vl_api_one_adjacencies_get_reply_t
ONE adjacency reply.
Definition: one.api:711
vl_api_one_locator_set_details_t::ls_name
string ls_name[64]
Definition: one.api:617
vl_api_one_l2_arp_entries_get_t::bd
u32 bd
Definition: one.api:404
ip_address
Definition: ip_types.h:79
lisp_cp_main_t::table_id_by_vni
uword * table_id_by_vni
Definition: control.h:240
vl_api_one_locator_set_dump_t::client_index
u32 client_index
Definition: one.api:638
vl_api_one_ndp_bd_get_reply_t::count
u32 count
Definition: one.api:498
vl_api_one_get_transport_protocol_reply_t::protocol
u8 protocol
Definition: one.api:476
gid_address_ippref_len
#define gid_address_ippref_len(_a)
Definition: lisp_types.h:205
vl_api_one_add_del_local_eid_t::vni
u32 vni
Definition: one.api:88
vnet_lisp_add_del_mreq_itr_rloc_args_t
Definition: control.h:390
one_api_hookup
static clib_error_t * one_api_hookup(vlib_main_t *vm)
Definition: one_api.c:1680
vl_api_one_nsh_set_locator_set_t
configure or delete ONE NSH mapping
Definition: one.api:174
VALIDATE_SW_IF_INDEX
#define VALIDATE_SW_IF_INDEX(mp)
Definition: api_helper_macros.h:281
vl_api_one_locator_set_details_t::context
u32 context
Definition: one.api:615
vl_api_client_index_to_registration
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
Definition: api.h:79
vl_api_one_eid_table_add_del_map_t::is_l2
bool is_l2
Definition: one.api:572
api.h
vl_api_one_eid_table_add_del_map_t::is_add
bool is_add[default=true]
Definition: one.api:569
vl_api_one_stats_flush_t_handler
static void vl_api_one_stats_flush_t_handler(vl_api_one_stats_flush_t *mp)
Definition: one_api.c:1352
locator_t::priority
u8 priority
Definition: lisp_types.h:269
vl_api_one_eid_table_vni_dump_t::client_index
u32 client_index
Definition: one.api:760
mac
vl_api_mac_address_t mac
Definition: l2.api:559
ntohs
#define ntohs(x)
Definition: af_xdp.bpf.c:29
vl_api_one_eid_table_add_del_map_t
map/unmap vni/bd_index to vrf
Definition: one.api:565
vl_api_one_add_del_map_server_t
Add/delete map server.
Definition: one.api:133
locator_set_t::name
u8 * name
Definition: lisp_types.h:284
vl_api_show_one_status_t_handler
static void vl_api_show_one_status_t_handler(vl_api_show_one_status_t *mp)
Definition: one_api.c:1195
vl_api_one_locator_set_dump_t
Request for locator_set summary status.
Definition: one.api:636
vl_api_one_eid_table_dump_t::filter
vl_api_one_filter_t filter
Definition: one.api:694
vl_api_show_one_use_petr_t_handler
static void vl_api_show_one_use_petr_t_handler(vl_api_show_one_use_petr_t *mp)
Definition: one_api.c:538
vl_api_one_map_request_mode_t::mode
vl_api_one_map_mode_t mode
Definition: one.api:320
vl_api_one_eid_table_details_t::locator_set_index
u32 locator_set_index
Definition: one.api:663
vl_api_one_nsh_set_locator_set_t::is_add
bool is_add[default=true]
Definition: one.api:178
vl_api_show_one_rloc_probe_state_t
Get state of ONE RLOC probing.
Definition: one.api:239
fid_address_t
Definition: lisp_types.h:69
vl_api_one_show_pitr_mode_t_handler
static void vl_api_one_show_pitr_mode_t_handler(vl_api_one_show_pitr_mode_t *mp)
Definition: one_api.c:1633
send_one_map_server_details
static void send_one_map_server_details(ip_address_t *ip, vl_api_registration_t *reg, u32 context)
Definition: one_api.c:934
vl_api_one_add_del_map_server_t_handler
static void vl_api_one_add_del_map_server_t_handler(vl_api_one_add_del_map_server_t *mp)
Definition: one_api.c:397
vnet_lisp_map_register_state_get
u8 vnet_lisp_map_register_state_get(void)
Definition: control.c:375
lisp_cp_main_t::flags
u32 flags
Definition: control.h:163
vl_api_one_rloc_probe_enable_disable_t
enable/disable ONE RLOC probing
Definition: one.api:262
vl_api_one_add_del_locator_t::is_add
bool is_add[default=true]
Definition: one.api:64
hash_free
#define hash_free(h)
Definition: hash.h:310
REPLY_MACRO2
#define REPLY_MACRO2(t, body)
Definition: api_helper_macros.h:65
ip4_address_decode
void ip4_address_decode(const vl_api_ip4_address_t in, ip4_address_t *out)
Definition: ip_types_api.c:141
vl_api_one_eid_table_details_t::vni
u32 vni
Definition: one.api:667
vl_api_one_enable_disable_t
enable or disable ONE feature
Definition: one.api:161
vnet_lisp_stats_enable_disable_state
u8 vnet_lisp_stats_enable_disable_state(void)
Definition: control.c:4858
vl_api_one_eid_table_details_t
Dump ONE eid-table.
Definition: one.api:660
vnet_lisp_get_petr_mode
u8 vnet_lisp_get_petr_mode(void)
Definition: control.c:5012
vnet_lisp_flush_stats
int vnet_lisp_flush_stats(void)
Definition: lisp_gpe_fwd_entry.c:1286
ip4
vl_api_ip4_address_t ip4
Definition: one.api:376
vl_api_show_one_status_t
Request for ONE status.
Definition: one.api:818
vl_api_one_adjacencies_get_reply_t::count
u32 count
Definition: one.api:715
fid_to_api_eid
static void fid_to_api_eid(fid_address_t *fid, vl_api_eid_t *eid)
Definition: one_api.c:304
vl_api_one_add_del_local_eid_t_handler
static void vl_api_one_add_del_local_eid_t_handler(vl_api_one_add_del_local_eid_t *mp)
Definition: one_api.c:330
vl_api_show_one_use_petr_reply_t::status
bool status
Definition: one.api:231
vnet_lisp_use_petr
int vnet_lisp_use_petr(ip_address_t *ip, u8 is_add)
Configure Proxy-ETR.
Definition: control.c:1645
vl_api_one_add_del_adjacency_t
add or delete ONE adjacency adjacency
Definition: one.api:533
vnet_lisp_get_pitr_mode
u8 vnet_lisp_get_pitr_mode(void)
Definition: control.c:5005
vl_api_one_ndp_bd_get_t_handler
static void vl_api_one_ndp_bd_get_t_handler(vl_api_one_ndp_bd_get_t *mp)
Definition: one_api.c:1434
lisp_api_stats_t::loc_rloc
ip_address_t loc_rloc
Definition: lisp_gpe.h:105
vl_api_one_enable_disable_xtr_mode_t_handler
static void vl_api_one_enable_disable_xtr_mode_t_handler(vl_api_one_enable_disable_xtr_mode_t *mp)
Definition: one_api.c:1600
vl_api_send_msg
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
Definition: api.h:35
vl_api_one_eid_table_dump_t_handler
static void vl_api_one_eid_table_dump_t_handler(vl_api_one_eid_table_dump_t *mp)
Definition: one_api.c:895
vl_api_one_add_del_map_server_t::is_add
bool is_add[default=true]
Definition: one.api:137
VLIB_API_INIT_FUNCTION
VLIB_API_INIT_FUNCTION(one_api_hookup)
control.h
vnet_lisp_add_del_mapping_args_t
Definition: control.h:334
gid_address_sd_dst
#define gid_address_sd_dst(_a)
Definition: lisp_types.h:221
vl_api_show_one_status_reply_t::feature_status
bool feature_status
Definition: one.api:833
hash_foreach_pair
#define hash_foreach_pair(p, v, body)
Iterate over hash pairs.
Definition: hash.h:373
pool_elt_at_index
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
Definition: pool.h:549
vl_api_one_l2_arp_entries_get_t
Request for L2 ARP entries from specified bridge domain.
Definition: one.api:400
name
string name[64]
Definition: fib.api:25
vl_api_one_add_del_ndp_entry_t::bd
u32 bd
Definition: one.api:433
vl_api_one_map_resolver_dump_t
Request for map resolver summary status.
Definition: one.api:788
vl_api_one_add_del_locator_t::priority
u8 priority
Definition: one.api:67
vl_api_one_adjacencies_get_t_handler
static void vl_api_one_adjacencies_get_t_handler(vl_api_one_adjacencies_get_t *mp)
Definition: one_api.c:1140
vl_api_one_eid_table_dump_t::client_index
u32 client_index
Definition: one.api:689
vl_api_one_eid_table_vni_dump_t
Dumps all VNIs used in mappings.
Definition: one.api:758
lisp_cp_main_t::nsh_map_index
u32 nsh_map_index
Definition: control.h:258
ttl
u8 ttl
Definition: fib_types.api:26
lisp_cp_main_t::map_resolvers
lisp_msmr_t * map_resolvers
Definition: control.h:221
eid_type
eid_type
Definition: lisp_types.api:37
vl_api_one_map_server_dump_t::client_index
u32 client_index
Definition: one.api:810
vl_api_one_stats_dump_t_handler
static void vl_api_one_stats_dump_t_handler(vl_api_one_stats_dump_t *mp)
Definition: one_api.c:1362
vl_api_one_enable_disable_t::is_enable
bool is_enable[default=true]
Definition: one.api:165
REPLY_MACRO4
#define REPLY_MACRO4(t, n, body)
Definition: api_helper_macros.h:173
vnet_lisp_set_transport_protocol
u32 vnet_lisp_set_transport_protocol(u8 protocol)
Definition: control.c:4881
lisp_msmr_t
Definition: control.h:85
vl_api_one_enable_disable_pitr_mode_t_handler
static void vl_api_one_enable_disable_pitr_mode_t_handler(vl_api_one_enable_disable_pitr_mode_t *mp)
Definition: one_api.c:1624
vl_api_one_ndp_bd_get_t
Request for list of bridge domains used by neighbor discovery.
Definition: one.api:483
lisp_cp_main_t::map_servers
lisp_msmr_t * map_servers
Definition: control.h:224
vl_api_one_enable_disable_petr_mode_t_handler
static void vl_api_one_enable_disable_petr_mode_t_handler(vl_api_one_enable_disable_petr_mode_t *mp)
Definition: one_api.c:1648
vni
u32 vni
Definition: flow_types.api:160
send_one_locator_details
static void send_one_locator_details(lisp_cp_main_t *lcm, locator_t *loc, vl_api_registration_t *reg, u32 context)
Definition: one_api.c:680
u8
#define u8
Padding.
Definition: clib.h:121
vl_api_one_eid_table_vni_details_t
reply to one_eid_table_vni_dump
Definition: one.api:768
vl_api_show_one_rloc_probe_state_t_handler
static void vl_api_show_one_rloc_probe_state_t_handler(vl_api_show_one_rloc_probe_state_t *mp)
Definition: one_api.c:1111
vl_api_one_eid_table_dump_t
Request for eid table summary status.
Definition: one.api:687
send_one_eid_table_details
static void send_one_eid_table_details(mapping_t *mapit, vl_api_registration_t *reg, u32 context, u8 filter)
Definition: one_api.c:808
vl_api_show_one_map_request_mode_reply_t::mode
vl_api_one_map_mode_t mode
Definition: one.api:342
gid_address_ippref
#define gid_address_ippref(_a)
Definition: lisp_types.h:204
vl_api_show_one_nsh_mapping_reply_t
Reply for ONE NSH mapping.
Definition: one.api:871
hash_elts
static uword hash_elts(void *v)
Definition: hash.h:118
vl_api_one_map_server_details_t::ip_address
vl_api_address_t ip_address
Definition: one.api:801
ip_prefix_normalize
void ip_prefix_normalize(ip_prefix_t *a)
Definition: ip_types.c:357
vnet_lisp_add_del_adjacency
int vnet_lisp_add_del_adjacency(vnet_lisp_add_del_adjacency_args_t *a)
Adds adjacency or removes forwarding entry associated to remote mapping.
Definition: control.c:1435
entries
u32 entries
Definition: flowhash_template.h:362
vl_api_one_add_del_locator_t::sw_if_index
vl_api_interface_index_t sw_if_index
Definition: one.api:66
vl_api_one_map_register_set_ttl_t::ttl
u32 ttl
Definition: one.api:101
ip6_address_decode
void ip6_address_decode(const vl_api_ip6_address_t in, ip6_address_t *out)
Definition: ip_types_api.c:129
vl_api_one_show_pitr_mode_t
Definition: one.api:1014
vnet_lisp_ndp_entries_get_by_bd
lisp_api_ndp_entry_t * vnet_lisp_ndp_entries_get_by_bd(u32 bd)
Definition: control.c:981
vl_api_one_locator_dump_t::ls_name
string ls_name[64]
Definition: one.api:587
vl_api_one_stats_flush_t
Definition: one.api:921
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition: nat44_ei.c:3047
vl_api_one_rloc_probe_enable_disable_t_handler
static void vl_api_one_rloc_probe_enable_disable_t_handler(vl_api_one_rloc_probe_enable_disable_t *mp)
Definition: one_api.c:444
AF_IP4
@ AF_IP4
Definition: ip_types.h:23
vl_api_show_one_rloc_probe_state_reply_t::is_enable
bool is_enable
Definition: one.api:254
vl_api_one_get_map_request_itr_rlocs_reply_t
Request for map request itr rlocs summary status.
Definition: one.api:849
vl_api_one_stats_details_t::pkt_count
u32 pkt_count
Definition: one.api:917
vl_api_one_eid_table_vni_dump_t_handler
static void vl_api_one_eid_table_vni_dump_t_handler(vl_api_one_eid_table_vni_dump_t *mp)
Definition: one_api.c:1163
vl_api_show_one_stats_enable_disable_t_handler
static void vl_api_show_one_stats_enable_disable_t_handler(vl_api_show_one_stats_enable_disable_t *mp)
Definition: one_api.c:1328
plugin.h
vl_api_one_map_resolver_dump_t::context
u32 context
Definition: one.api:791
vl_api_show_one_map_register_fallback_threshold_t
Definition: one.api:954
vl_api_one_map_register_fallback_threshold_t
Definition: one.api:947
vl_api_one_locator_set_details_t::ls_index
u32 ls_index
Definition: one.api:616
mapping_t::key
u8 * key
Definition: lisp_types.h:315
stats
vl_api_ikev2_sa_stats_t stats
Definition: ikev2_types.api:162
GID_ADDR_IP_PREFIX
@ GID_ADDR_IP_PREFIX
Definition: lisp_types.h:39
vl_api_one_add_del_remote_mapping_t::rlocs
vl_api_remote_locator_t rlocs[rloc_num]
Definition: one.api:370
vl_api_one_stats_details_t::deid
vl_api_eid_t deid
Definition: one.api:912
vl_api_one_adjacencies_get_t::vni
u32 vni
Definition: one.api:728
vnet_lisp_pitr_set_locator_set
int vnet_lisp_pitr_set_locator_set(u8 *locator_set_name, u8 is_add)
Definition: control.c:1578
gid_address_ip
#define gid_address_ip(_a)
Definition: lisp_types.h:206
vl_api_one_map_resolver_dump_t::client_index
u32 client_index
Definition: one.api:790
vl_api_one_add_del_map_resolver_t::ip_address
vl_api_address_t ip_address
Definition: one.api:153
vl_api_one_rloc_probe_enable_disable_t::is_enable
bool is_enable[default=true]
Definition: one.api:266
vl_api_one_map_resolver_dump_t_handler
static void vl_api_one_map_resolver_dump_t_handler(vl_api_one_map_resolver_dump_t *mp)
Definition: one_api.c:985
addr
vhost_vring_addr_t addr
Definition: vhost_user.h:130
vnet_lisp_stats_enable_disable
vnet_api_error_t vnet_lisp_stats_enable_disable(u8 enable)
Definition: control.c:4842
r
vnet_hw_if_output_node_runtime_t * r
Definition: interface_output.c:1089
locator_t
Definition: lisp_types.h:259
vl_api_one_add_del_l2_arp_entry_t::bd
u32 bd
Definition: one.api:391
vl_api_one_get_transport_protocol_t
Definition: one.api:466
lisp_cp_main_t::petr_map_index
u32 petr_map_index
Proxy ETR map index used for 'use-petr'.
Definition: control.h:255
vl_api_one_l2_arp_entries_get_t_handler
static void vl_api_one_l2_arp_entries_get_t_handler(vl_api_one_l2_arp_entries_get_t *mp)
Definition: one_api.c:1484
vl_api_one_show_petr_mode_t
Definition: one.api:994
vl_api_one_locator_details_t
ONE locator_set status.
Definition: one.api:598
vl_api_one_l2_arp_entries_get_reply_t
Reply with L2 ARP entries from specified bridge domain.
Definition: one.api:413
vl_api_one_map_resolver_details_t::ip_address
vl_api_address_t ip_address
Definition: one.api:781
EID_TYPE_API_PREFIX
@ EID_TYPE_API_PREFIX
Definition: lisp_types.api:39
eid
typedef eid
Definition: lisp_types.api:59
vnet_lisp_get_map_request_mode
u8 vnet_lisp_get_map_request_mode(void)
Definition: control.c:55
vl_api_one_map_request_mode_t
set ONE map-request mode.
Definition: one.api:316
lisp_gpe.h
LISP-GPE definitions.
ip_prefix_encode
void ip_prefix_encode(const fib_prefix_t *in, vl_api_prefix_t *out)
Definition: ip_types_api.c:273
vnet_lisp_eid_table_map
int vnet_lisp_eid_table_map(u32 vni, u32 dp_id, u8 is_l2, u8 is_add)
Definition: control.c:1035
ONE_FILTER_API_REMOTE
@ ONE_FILTER_API_REMOTE
Definition: one.api:624
key
typedef key
Definition: ipsec_types.api:91
vl_api_one_ndp_entries_get_reply_t::count
u32 count
Definition: one.api:448
vl_api_one_add_del_locator_set_t
add or delete locator_set
Definition: one.api:29
vl_api_one_add_del_remote_mapping_t_handler
static void vl_api_one_add_del_remote_mapping_t_handler(vl_api_one_add_del_remote_mapping_t *mp)
Definition: one_api.c:599
vl_api_one_set_transport_protocol_t
Set ONE transport protocol.
Definition: one.api:459
lisp_cp_main_t::mapping_pool
mapping_t * mapping_pool
Definition: control.h:172
vl_api_one_locator_set_dump_t_handler
static void vl_api_one_locator_set_dump_t_handler(vl_api_one_locator_set_dump_t *mp)
Definition: one_api.c:781
vnet_lisp_get_stats
lisp_api_stats_t * vnet_lisp_get_stats(void)
Definition: control.c:4543
vl_api_one_enable_disable_pitr_mode_t::is_enable
bool is_enable[default=true]
Definition: one.api:1011
vl_api_one_show_petr_mode_t_handler
static void vl_api_one_show_petr_mode_t_handler(vl_api_one_show_petr_mode_t *mp)
Definition: one_api.c:1657
ip_address_encode2
void ip_address_encode2(const ip_address_t *in, vl_api_address_t *out)
Definition: ip_types_api.c:228
unformat_one_locs
static locator_t * unformat_one_locs(vl_api_remote_locator_t *rmt_locs, u32 rloc_num)
Definition: one_api.c:120
mapping_t::local
u8 local
Definition: lisp_types.h:306
lisp_msmr_t::address
ip_address_t address
Definition: control.h:89
pool_is_free_index
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
Definition: pool.h:302
locator_t::local
u8 local
Definition: lisp_types.h:262
vl_api_one_ndp_entries_get_t_handler
static void vl_api_one_ndp_entries_get_t_handler(vl_api_one_ndp_entries_get_t *mp)
Definition: one_api.c:1570
vl_api_one_eid_table_details_t::action
u8 action
Definition: one.api:664
vl_api_one_locator_set_dump_t::filter
vl_api_one_filter_t filter
Definition: one.api:640
vl_api_one_add_del_locator_set_t::locators
vl_api_local_locator_t locators[locator_num]
Definition: one.api:36
vl_api_show_one_use_petr_t
Request for ONE PETR status.
Definition: one.api:215
vnet_lisp_enable_disable_pitr_mode
int vnet_lisp_enable_disable_pitr_mode(u8 is_enabled)
Definition: control.c:4938
vl_api_one_map_server_dump_t
Request for map server summary status.
Definition: one.api:808
vl_api_one_show_pitr_mode_reply_t::is_enable
bool is_enable
Definition: one.api:1024
vl_api_one_enable_disable_pitr_mode_t
Definition: one.api:1007
vl_api_one_show_xtr_mode_reply_t::is_enable
bool is_enable
Definition: one.api:984
vl_api_one_add_del_adjacency_t::leid
vl_api_eid_t leid
Definition: one.api:540
vl_api_show_one_nsh_mapping_reply_t::is_set
bool is_set
Definition: one.api:875
pool_foreach
#define pool_foreach(VAR, POOL)
Iterate through pool.
Definition: pool.h:534
vl_api_one_locator_dump_t
Request for map one locator status.
Definition: one.api:582
vl_api_one_set_transport_protocol_t_handler
static void vl_api_one_set_transport_protocol_t_handler(vl_api_one_set_transport_protocol_t *mp)
Definition: one_api.c:1543
vl_api_one_add_del_locator_set_reply_t
Reply for locator_set add/del.
Definition: one.api:44
ip_address_max_len
u8 ip_address_max_len(u8 version)
Definition: lisp_types.c:432
vnet_lisp_rloc_probe_state_get
u8 vnet_lisp_rloc_probe_state_get(void)
Definition: control.c:382
lisp_api_stats_t
Definition: lisp_gpe.h:100
vnet_lisp_enable_disable
clib_error_t * vnet_lisp_enable_disable(u8 is_enable)
Definition: control.c:2202
vec_len
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
Definition: vec_bootstrap.h:142
vl_api_one_use_petr_t
configure or disable use of PETR
Definition: one.api:203
vl_api_one_map_server_details_t::context
u32 context
Definition: one.api:800
vl_api_show_one_map_register_fallback_threshold_t_handler
static void vl_api_show_one_map_register_fallback_threshold_t_handler(vl_api_show_one_map_register_fallback_threshold_t *mp)
Definition: one_api.c:1526
vl_api_one_add_del_remote_mapping_t::vni
u32 vni
Definition: one.api:365
vnet_lisp_add_mapping
int vnet_lisp_add_mapping(vnet_lisp_add_del_mapping_args_t *a, locator_t *rlocs, u32 *res_map_index, u8 *is_updated)
Adds/updates mapping.
Definition: control.c:1226
vl_api_one_add_del_map_server_t::ip_address
vl_api_address_t ip_address
Definition: one.api:138
vl_api_one_l2_arp_bd_get_reply_t::count
u32 count
Definition: one.api:521
vl_api_one_eid_table_dump_t::vni
u32 vni
Definition: one.api:692
vl_api_one_add_del_ndp_entry_t
Definition: one.api:428
vl_api_one_enable_disable_xtr_mode_t
Definition: one.api:967
vl_api_one_locator_dump_t::is_index_set
bool is_index_set
Definition: one.api:588
vec_add1
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
Definition: vec.h:606
hash_pair_t::value
uword value[0]
Definition: hash.h:165
ip6_address_encode
void ip6_address_encode(const ip6_address_t *in, vl_api_ip6_address_t out)
Definition: ip_types_api.c:123
vnet_lisp_add_del_local_mapping
int vnet_lisp_add_del_local_mapping(vnet_lisp_add_del_mapping_args_t *a, u32 *map_index_result)
Add/update/delete mapping to/in/from map-cache.
Definition: control.c:836
lisp_cp_main_t::locator_set_pool
locator_set_t * locator_set_pool
Definition: control.h:181
vl_api_one_pitr_set_locator_set_t::is_add
bool is_add[default=true]
Definition: one.api:192
ONE_FILTER_API_LOCAL
@ ONE_FILTER_API_LOCAL
Definition: one.api:623
vl_api_one_get_map_request_itr_rlocs_t_handler
static void vl_api_one_get_map_request_itr_rlocs_t_handler(vl_api_one_get_map_request_itr_rlocs_t *mp)
Definition: one_api.c:1211
vnet_lisp_set_map_request_mode
int vnet_lisp_set_map_request_mode(u8 mode)
Definition: control.c:1506
vl_api_show_one_nsh_mapping_t
Request for ONE NSH mapping.
Definition: one.api:860
vec_elt_at_index
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
Definition: vec_bootstrap.h:203
mapping_t::ttl
u32 ttl
Definition: lisp_types.h:302
locator_t::sw_if_index
u32 sw_if_index
Definition: lisp_types.h:266
vl_api_one_eid_table_map_dump_t_handler
static void vl_api_one_eid_table_map_dump_t_handler(vl_api_one_eid_table_map_dump_t *mp)
Definition: one_api.c:1018
vl_api_one_add_del_local_eid_t::eid
vl_api_eid_t eid
Definition: one.api:86
vnet_lisp_get_transport_protocol
lisp_transport_protocol_t vnet_lisp_get_transport_protocol(void)
Definition: control.c:4894
vl_api_one_use_petr_t_handler
static void vl_api_one_use_petr_t_handler(vl_api_one_use_petr_t *mp)
Definition: one_api.c:524
vnet_lisp_cp_get_main
static lisp_cp_main_t * vnet_lisp_cp_get_main()
Definition: control.h:305
vl_api_registration_
An API client registration, only in vpp/vlib.
Definition: api_common.h:47
one_adjacency_copy
static void one_adjacency_copy(vl_api_one_adjacency_t *dst, lisp_adjacency_t *adjs)
Definition: one_api.c:1060
REPLY_MACRO
#define REPLY_MACRO(t)
Definition: api_helper_macros.h:30
setup_message_id_table
static void setup_message_id_table(api_main_t *am)
Definition: sr_mpls_api.c:174
vl_api_one_eid_table_details_t::seid
vl_api_eid_t seid
Definition: one.api:669
fid_addr_type
#define fid_addr_type(_a)
Definition: lisp_types.h:87
FID_ADDR_IP_PREF
@ FID_ADDR_IP_PREF
Definition: lisp_types.h:63
ARRAY_LEN
#define ARRAY_LEN(x)
Definition: clib.h:70
vl_api_one_get_transport_protocol_reply_t
Definition: one.api:472
vl_api_one_map_resolver_details_t
ONE map resolver status.
Definition: one.api:778
vnet_lisp_enable_disable_petr_mode
int vnet_lisp_enable_disable_petr_mode(u8 is_enabled)
Definition: control.c:4967
vl_api_one_eid_table_add_del_map_t::dp_table
u32 dp_table
Definition: one.api:571
vl_api_one_add_del_map_request_itr_rlocs_t::locator_set_name
string locator_set_name[64]
Definition: one.api:554
lisp_cp_main_t::mapping_index_by_gid
gid_dictionary_t mapping_index_by_gid
Definition: control.h:169
mapping_t::authoritative
u8 authoritative
Definition: lisp_types.h:305
gid_address_vni
#define gid_address_vni(_a)
Definition: lisp_types.h:213
vl_api_one_add_del_local_eid_t::locator_set_name
string locator_set_name[64]
Definition: one.api:87
vnet_lisp_get_xtr_mode
u8 vnet_lisp_get_xtr_mode(void)
Definition: control.c:4998
GID_ADDR_ARP
@ GID_ADDR_ARP
Definition: lisp_types.h:44
vl_api_one_stats_enable_disable_t
Definition: one.api:927
vl_api_one_locator_details_t::weight
u8 weight
Definition: one.api:605
ip_prefix_decode
void ip_prefix_decode(const vl_api_prefix_t *in, fib_prefix_t *out)
Definition: ip_types_api.c:245
vl_api_one_l2_arp_entries_get_reply_t::entries
vl_api_one_l2_arp_entry_t entries[count]
Definition: one.api:418
vl_api_show_one_map_register_ttl_reply_t
Contains current TTL for map register messages.
Definition: one.api:119
FID_ADDR_MAC
@ FID_ADDR_MAC
Definition: lisp_types.h:64
vl_api_show_one_map_register_ttl_reply_t::ttl
u32 ttl
Definition: one.api:123
vl_api_show_one_pitr_t
Request for ONE PITR status.
Definition: one.api:883
vl_api_show_one_status_reply_t::gpe_status
bool gpe_status
Definition: one.api:834
vl_api_one_eid_table_map_dump_t::is_l2
bool is_l2
Definition: one.api:751
uword
u64 uword
Definition: types.h:112
lisp_cp_main_t::bd_id_by_vni
uword * bd_id_by_vni
Definition: control.h:244
if
if(node->flags &VLIB_NODE_FLAG_TRACE) vnet_interface_output_trace(vm
vl_api_one_stats_enable_disable_t::is_enable
bool is_enable[default=true]
Definition: one.api:931
vl_api_one_ndp_entries_get_reply_t
Definition: one.api:444
vnet_lisp_add_del_locator_set_args_t
Definition: control.h:315
mapping_t
Definition: lisp_types.h:291
vl_api_one_eid_table_add_del_map_t_handler
static void vl_api_one_eid_table_add_del_map_t_handler(vl_api_one_eid_table_add_del_map_t *mp)
Definition: one_api.c:387
EID_TYPE_API_NSH
@ EID_TYPE_API_NSH
Definition: lisp_types.api:41
vl_api_one_eid_table_details_t::authoritative
u8 authoritative
Definition: one.api:671
vnet_lisp_add_del_adjacency_args_t
Definition: control.h:364
gid_address_arp_bd
#define gid_address_arp_bd
Definition: lisp_types.h:230
lisp_api_stats_t::deid
dp_address_t deid
Definition: lisp_gpe.h:103
interface.h
vl_api_one_add_del_local_eid_t::key
vl_api_hmac_key_t key
Definition: one.api:89
vnet_lisp_enable_disable_xtr_mode
int vnet_lisp_enable_disable_xtr_mode(u8 is_enabled)
Definition: control.c:4901
vl_api_show_one_nsh_mapping_reply_t::locator_set_name
string locator_set_name[64]
Definition: one.api:876
lisp_cp_main_t
Definition: control.h:161
vl_api_one_add_del_map_request_itr_rlocs_t::is_add
bool is_add[default=true]
Definition: one.api:553
vl_api_one_add_del_l2_arp_entry_t::entry
vl_api_one_l2_arp_entry_t entry
Definition: one.api:392
vl_api_one_stats_details_t
Definition: one.api:908
vl_api_one_add_del_remote_mapping_t::rloc_num
u32 rloc_num
Definition: one.api:369
vl_api_one_add_del_ndp_entry_t::is_add
bool is_add[default=true]
Definition: one.api:432
vl_api_one_map_register_set_ttl_t_handler
static void vl_api_one_map_register_set_ttl_t_handler(vl_api_one_map_register_set_ttl_t *mp)
Definition: one_api.c:144
vl_api_one_l2_arp_entries_get_reply_t::count
u32 count
Definition: one.api:417
lisp_api_l2_arp_entry_t
Definition: control.h:101
vnet_lisp_add_del_map_server
int vnet_lisp_add_del_map_server(ip_address_t *addr, u8 is_add)
Definition: control.c:632
vl_api_one_add_del_locator_t_handler
static void vl_api_one_add_del_locator_t_handler(vl_api_one_add_del_locator_t *mp)
Definition: one_api.c:225
vl_api_one_ndp_entries_get_t
Definition: one.api:437
vl_api_show_one_pitr_t_handler
static void vl_api_show_one_pitr_t_handler(vl_api_show_one_pitr_t *mp)
Definition: one_api.c:1284
KEY_ID_API_HMAC_NO_KEY
@ KEY_ID_API_HMAC_NO_KEY
Definition: lisp_types.api:66
vl_api_one_l2_arp_bd_get_t
Request for list of bridge domains used by L2 ARP table.
Definition: one.api:506
vl_api_one_add_del_l2_arp_entry_t_handler
static void vl_api_one_add_del_l2_arp_entry_t_handler(vl_api_one_add_del_l2_arp_entry_t *mp)
Definition: one_api.c:1390
vl_api_one_l2_arp_bd_get_reply_t
Reply with list of bridge domains used by L2 ARP table.
Definition: one.api:517
lisp_cp_main_t::locator_set_index_by_name
uword * locator_set_index_by_name
Definition: control.h:187
mapping_t::pitr_set
u8 pitr_set
Definition: lisp_types.h:309
vl_api_one_map_register_fallback_threshold_t::value
u32 value
Definition: one.api:951
vl_api_one_add_del_adjacency_t::reid
vl_api_eid_t reid
Definition: one.api:539
vnet_lisp_add_del_mapping_args_t::eid
gid_address_t eid
Definition: control.h:337
vl_api_one_add_del_locator_t::locator_set_name
string locator_set_name[64]
Definition: one.api:65
ip_address_set
void ip_address_set(ip_address_t *dst, const void *src, ip_address_family_t af)
Definition: ip_types.c:207
vnet_lisp_clear_all_remote_adjacencies
int vnet_lisp_clear_all_remote_adjacencies(void)
Definition: control.c:1384
ip4_address_t
Definition: ip4_packet.h:50
vnet_lisp_add_del_mapping_args_t::ttl
u32 ttl
Definition: control.h:340
ALWAYS_ASSERT
#define ALWAYS_ASSERT(truth)
Definition: error_bootstrap.h:89
vl_api_one_show_petr_mode_reply_t
Definition: one.api:1000
REPLY_DETAILS
#define REPLY_DETAILS(t, body)
Definition: one_api.c:44
FIB_PROTOCOL_IP4
@ FIB_PROTOCOL_IP4
Definition: fib_types.h:36
vlib_counter_t::packets
counter_t packets
packet counter
Definition: counter_types.h:28
lisp_api_stats_t::counters
vlib_counter_t counters
Definition: lisp_gpe.h:108
vl_api_one_get_map_request_itr_rlocs_reply_t::locator_set_name
string locator_set_name[64]
Definition: one.api:853
vl_api_one_enable_disable_t_handler
static void vl_api_one_enable_disable_t_handler(vl_api_one_enable_disable_t *mp)
Definition: one_api.c:454
vl_api_one_ndp_entries_get_t::bd
u32 bd
Definition: one.api:441
vl_api_one_add_del_ndp_entry_t_handler
static void vl_api_one_add_del_ndp_entry_t_handler(vl_api_one_add_del_ndp_entry_t *mp)
Definition: one_api.c:1412
lisp_nsh_api_t::spi
u32 spi
Definition: one_api.c:262
vl_api_one_get_map_request_itr_rlocs_t
Get ONE map request itr rlocs status.
Definition: one.api:841
mapping_t::locator_set_index
u32 locator_set_index
Definition: lisp_types.h:298
vl_api_one_eid_table_map_dump_t::context
u32 context
Definition: one.api:750
vl_api_show_one_use_petr_reply_t
ONE PETR status, enable or disable.
Definition: one.api:227
vl_api_one_stats_enable_disable_t_handler
static void vl_api_one_stats_enable_disable_t_handler(vl_api_one_stats_enable_disable_t *mp)
Definition: one_api.c:1343
gid_address_sd_src
#define gid_address_sd_src(_a)
Definition: lisp_types.h:220
vl_api_one_map_server_dump_t_handler
static void vl_api_one_map_server_dump_t_handler(vl_api_one_map_server_dump_t *mp)
Definition: one_api.c:952
lisp_nsh_api_t::si
u8 si
Definition: one_api.c:263
gid_address_ndp_bd
#define gid_address_ndp_bd
Definition: lisp_types.h:229
mapping_t::key_id
lisp_key_type_t key_id
Definition: lisp_types.h:316
vl_api_one_stats_dump_t
Definition: one.api:902
locator_t::weight
u8 weight
Definition: lisp_types.h:270
vnet_lisp_add_del_mapping_args_t::is_static
u8 is_static
Definition: control.h:345
vl_api_one_ndp_bd_get_reply_t::bridge_domains
u32 bridge_domains[count]
Definition: one.api:499
vl_api_one_show_petr_mode_reply_t::is_enable
bool is_enable
Definition: one.api:1004
vl_api_one_map_register_set_ttl_t
Set TTL for map register messages.
Definition: one.api:97
vl_api_one_locator_set_dump_t::context
u32 context
Definition: one.api:639
vnet_lisp_ndp_bds_get
u32 * vnet_lisp_ndp_bds_get(void)
Definition: control.c:907
vl_api_one_pitr_set_locator_set_t::ls_name
string ls_name[64]
Definition: one.api:193
ip_address_decode2
void ip_address_decode2(const vl_api_address_t *in, ip_address_t *out)
Definition: ip_types_api.c:178
vnet_lisp_gpe_enable_disable_status
u8 vnet_lisp_gpe_enable_disable_status(void)
Check if LISP-GPE is enabled.
Definition: lisp_gpe.c:184
BAD_SW_IF_INDEX_LABEL
#define BAD_SW_IF_INDEX_LABEL
Definition: api_helper_macros.h:289
locator_set_t::locator_indices
u32 * locator_indices
Definition: lisp_types.h:287
vl_api_one_ndp_entries_get_reply_t::entries
vl_api_one_ndp_entry_t entries[count]
Definition: one.api:449
vl_api_one_add_del_remote_mapping_t
add or delete remote static mapping
Definition: one.api:358
vl_api_one_eid_table_details_t::is_local
bool is_local
Definition: one.api:665
vl_api_show_one_pitr_reply_t::status
bool status
Definition: one.api:898
vnet_lisp_enable_disable_status
u8 vnet_lisp_enable_disable_status(void)
Definition: control.c:2267
vl_api_one_eid_table_dump_t::eid_set
bool eid_set
Definition: one.api:691
vnet_lisp_add_del_mreq_itr_rlocs
int vnet_lisp_add_del_mreq_itr_rlocs(vnet_lisp_add_del_mreq_itr_rloc_args_t *a)
Definition: control.c:2337
vl_api_show_one_map_register_ttl_t_handler
static void vl_api_show_one_map_register_ttl_t_handler(vl_api_show_one_map_register_ttl_t *mp)
Definition: one_api.c:158
vnet_lisp_add_del_mapping_args_t::action
u8 action
Definition: control.h:341
gid_address_arp_ndp_ip
#define gid_address_arp_ndp_ip(_a)
Definition: lisp_types.h:226
vl_api_one_map_register_fallback_threshold_t_handler
static void vl_api_one_map_register_fallback_threshold_t_handler(vl_api_one_map_register_fallback_threshold_t *mp)
Definition: one_api.c:1514
vl_api_one_adjacencies_get_t
Request for ONE adjacencies.
Definition: one.api:724
hash_get_mem
#define hash_get_mem(h, key)
Definition: hash.h:269
vec_free
#define vec_free(V)
Free vector's memory (no header).
Definition: vec.h:395
GID_ADDR_NSH
@ GID_ADDR_NSH
Definition: lisp_types.h:43
vl_api_one_add_del_ndp_entry_t::entry
vl_api_one_ndp_entry_t entry
Definition: one.api:434
lisp_api_stats_t::rmt_rloc
ip_address_t rmt_rloc
Definition: lisp_gpe.h:106
vl_api_one_eid_table_map_details_t::vni
u32 vni
Definition: one.api:738
size
u32 size
Definition: vhost_user.h:125
vl_api_one_add_del_remote_mapping_t::del_all
bool del_all
Definition: one.api:364
vl_api_show_one_use_petr_reply_t::ip_address
vl_api_address_t ip_address
Definition: one.api:232
vl_api_one_eid_table_details_t::context
u32 context
Definition: one.api:662
vl_api_one_eid_table_map_dump_t
Request for one_eid_table_map_details.
Definition: one.api:747
vl_api_one_eid_table_vni_dump_t::context
u32 context
Definition: one.api:761
vl_api_one_pitr_set_locator_set_t
configure or disable ONE PITR node
Definition: one.api:188
vl_api_one_ndp_bd_get_reply_t
Reply with list of bridge domains used by neighbor discovery.
Definition: one.api:494
gid_address_copy
void gid_address_copy(gid_address_t *dst, gid_address_t *src)
Definition: lisp_types.c:1203
vl_api_show_one_pitr_reply_t::locator_set_name
string locator_set_name[64]
Definition: one.api:899
vl_api_one_eid_table_dump_t::eid
vl_api_eid_t eid
Definition: one.api:693
mac_address_encode
void mac_address_encode(const mac_address_t *in, u8 *out)
Definition: ethernet_types_api.c:26
format_fns.h
vl_api_one_l2_arp_bd_get_reply_t::bridge_domains
u32 bridge_domains[count]
Definition: one.api:522
vl_api_one_add_del_locator_set_t::locator_set_name
string locator_set_name[64]
Definition: one.api:34
vl_api_one_eid_table_details_t::key
vl_api_hmac_key_t key
Definition: one.api:672
vl_api_one_locator_dump_t::ls_index
u32 ls_index
Definition: one.api:586
vl_api_one_nsh_set_locator_set_t_handler
static void vl_api_one_nsh_set_locator_set_t_handler(vl_api_one_nsh_set_locator_set_t *mp)
Definition: one_api.c:490
vl_api_one_add_del_locator_set_reply_t::ls_index
u32 ls_index
Definition: one.api:48
format
description fragment has unexpected format
Definition: map.api:433
ASSERT
#define ASSERT(truth)
Definition: error_bootstrap.h:69
ONE_FILTER_API_ALL
@ ONE_FILTER_API_ALL
Definition: one.api:622
GID_ADDR_SRC_DST
@ GID_ADDR_SRC_DST
Definition: lisp_types.h:42
vnet_lisp_adjacencies_get_by_vni
lisp_adjacency_t * vnet_lisp_adjacencies_get_by_vni(u32 vni)
Returns vector of adjacencies.
Definition: control.c:578
gid_address_nsh_si
#define gid_address_nsh_si(_a)
Definition: lisp_types.h:212
vl_api_one_locator_dump_t::context
u32 context
Definition: one.api:585
vl_api_one_add_del_adjacency_t::is_add
u8 is_add
Definition: one.api:537
vl_api_one_show_xtr_mode_reply_t
Definition: one.api:980
vnet_lisp_l2_arp_bds_get
u32 * vnet_lisp_l2_arp_bds_get(void)
Definition: control.c:883
vl_api_show_one_map_register_state_t_handler
static void vl_api_show_one_map_register_state_t_handler(vl_api_show_one_map_register_state_t *mp)
Definition: one_api.c:1126
vl_api_one_use_petr_t::is_add
bool is_add[default=true]
Definition: one.api:208
vl_api_one_add_del_map_resolver_t::is_add
bool is_add[default=true]
Definition: one.api:152
VLIB_PLUGIN_REGISTER
VLIB_PLUGIN_REGISTER()
vl_api_one_get_transport_protocol_t_handler
static void vl_api_one_get_transport_protocol_t_handler(vl_api_one_get_transport_protocol_t *mp)
Definition: one_api.c:1555
vl_api_one_add_del_remote_mapping_t::action
u8 action
Definition: one.api:366
u32
unsigned int u32
Definition: types.h:88
unformat_one_eid_api
static int unformat_one_eid_api(gid_address_t *dst, u32 vni, vl_api_eid_t *eid)
Definition: one_api.c:267
vl_api_show_one_map_register_ttl_t
Get TTL for map register messages.
Definition: one.api:108
vl_api_one_add_del_l2_arp_entry_t
Add/delete L2 ARP entries.
Definition: one.api:386
vl_api_one_stats_details_t::rloc
vl_api_address_t rloc
Definition: one.api:914
vlib_counter_t::bytes
counter_t bytes
byte counter
Definition: counter_types.h:29
ip6
vl_api_ip6_address_t ip6
Definition: one.api:424
vl_api_show_one_map_register_state_t
Get state of ONE map-register.
Definition: one.api:285
gid_address_ip_set
void gid_address_ip_set(gid_address_t *dst, void *src, ip_address_family_t version)
Definition: lisp_types.c:1268
FIB_PROTOCOL_IP6
@ FIB_PROTOCOL_IP6
Definition: fib_types.h:37
dst
vl_api_ip4_address_t dst
Definition: pnat.api:41
ethernet_types_api.h
vl_api_one_show_xtr_mode_t_handler
static void vl_api_one_show_xtr_mode_t_handler(vl_api_one_show_xtr_mode_t *mp)
Definition: one_api.c:1609
vl_api_one_add_del_l2_arp_entry_t::is_add
bool is_add[default=true]
Definition: one.api:390
vl_api_one_add_del_locator_t
add or delete locator for locator set
Definition: one.api:60
vnet_lisp_add_del_locator_set
int vnet_lisp_add_del_locator_set(vnet_lisp_add_del_locator_set_args_t *a, u32 *ls_result)
Definition: control.c:1992
api_helper_macros.h
vec_foreach
#define vec_foreach(var, vec)
Vector iterator.
Definition: vec_bootstrap.h:213
lisp_adjacency_t::reid
gid_address_t reid
Definition: control.h:75
GID_ADDR_NDP
@ GID_ADDR_NDP
Definition: lisp_types.h:45
hash_pair_t::key
uword key
Definition: hash.h:162
ip4_address_encode
void ip4_address_encode(const ip4_address_t *in, vl_api_ip4_address_t out)
Definition: ip_types_api.c:135
vl_api_show_one_nsh_mapping_t_handler
static void vl_api_show_one_nsh_mapping_t_handler(vl_api_show_one_nsh_mapping_t *mp)
Definition: one_api.c:1242
vl_api_one_map_register_enable_disable_t
enable/disable ONE map-register
Definition: one.api:274
vl_api_one_eid_table_map_details_t
Shows relationship between vni and vrf/bd.
Definition: one.api:735
vl_api_show_one_rloc_probe_state_reply_t
Reply for show_one_rloc_probe_state.
Definition: one.api:250
fid_addr_ippref
#define fid_addr_ippref(_a)
Definition: lisp_types.h:82
vl_api_one_add_del_adjacency_t::vni
u32 vni
Definition: one.api:538
mac_address_decode
void mac_address_decode(const u8 *in, mac_address_t *out)
Conversion functions to/from (decode/encode) API types to VPP internal types.
Definition: ethernet_types_api.c:20
AF_IP6
@ AF_IP6
Definition: ip_types.h:24
vl_api_one_pitr_set_locator_set_t_handler
static void vl_api_one_pitr_set_locator_set_t_handler(vl_api_one_pitr_set_locator_set_t *mp)
Definition: one_api.c:507
vl_api_one_add_del_local_eid_t
add or delete ONE eid-table
Definition: one.api:81
lisp_api_stats_t::vni
u32 vni
Definition: lisp_gpe.h:102
vl_api_one_locator_details_t::ip_address
vl_api_address_t ip_address
Definition: one.api:603
value
u8 value
Definition: qos.api:54
vl_api_one_enable_disable_petr_mode_t
Definition: one.api:987
vl_api_one_locator_details_t::local
u8 local
Definition: one.api:601
vl_api_one_map_register_enable_disable_t::is_enable
bool is_enable[default=true]
Definition: one.api:278
vnet_lisp_rloc_probe_enable_disable
int vnet_lisp_rloc_probe_enable_disable(u8 is_enable)
Definition: control.c:2127
vl_api_one_add_del_map_resolver_t_handler
static void vl_api_one_add_del_map_resolver_t_handler(vl_api_one_add_del_map_resolver_t *mp)
Definition: one_api.c:413
mac_address_t_
Definition: mac_address.h:21
vnet_lisp_del_mapping
int vnet_lisp_del_mapping(gid_address_t *eid, u32 *res_map_index)
Removes a mapping.
Definition: control.c:1335
locator_set_t
Definition: lisp_types.h:281
vnet_lisp_map_register_fallback_threshold_get
u32 vnet_lisp_map_register_fallback_threshold_get(void)
Definition: control.c:1630
vnet_lisp_map_register_enable_disable
int vnet_lisp_map_register_enable_disable(u8 is_enable)
Definition: control.c:2136
vl_api_one_eid_table_details_t::ttl
u32 ttl
Definition: one.api:670
vl_api_show_one_map_register_fallback_threshold_reply_t::value
u32 value
Definition: one.api:964
send_one_map_resolver_details
static void send_one_map_resolver_details(ip_address_t *ip, vl_api_registration_t *reg, u32 context)
Definition: one_api.c:969
clib_memset
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
vlib_main_t
Definition: main.h:102
vnet_lisp_map_register_set_ttl
int vnet_lisp_map_register_set_ttl(u32 ttl)
Definition: control.c:2322
vl_api_show_one_map_request_mode_reply_t
Reply for show_one_map_request_mode.
Definition: one.api:338
vl_api_one_add_del_locator_set_t_handler
static void vl_api_one_add_del_locator_set_t_handler(vl_api_one_add_del_locator_set_t *mp)
Definition: one_api.c:173
gid_dictionary_lookup
u64 gid_dictionary_lookup(gid_dictionary_t *db, gid_address_t *key)
Definition: gid_dictionary.c:399
vnet_lisp_map_register_fallback_threshold_set
int vnet_lisp_map_register_fallback_threshold_set(u32 value)
Definition: control.c:1617
gid_address_type
#define gid_address_type(_a)
Definition: lisp_types.h:203
u8
unsigned char u8
Definition: types.h:56
clib_error_t
Definition: clib_error.h:21
locator_t::address
gid_address_t address
Definition: lisp_types.h:267
gid_address_free
void gid_address_free(gid_address_t *a)
Definition: lisp_types.c:733
vl_api_one_add_del_local_eid_t::is_add
bool is_add[default=true]
Definition: one.api:85
a
a
Definition: bitmap.h:525
lisp_adjacency_t
Definition: control.h:72
ip
vl_api_address_t ip
Definition: l2.api:558
mapping_t::eid
gid_address_t eid
Definition: lisp_types.h:293
locator_set_t::local
u8 local
Definition: lisp_types.h:288
vec_terminate_c_string
#define vec_terminate_c_string(V)
(If necessary) NULL terminate a vector containing a c-string.
Definition: vec.h:1132
vl_api_one_map_register_enable_disable_t_handler
static void vl_api_one_map_register_enable_disable_t_handler(vl_api_one_map_register_enable_disable_t *mp)
Definition: one_api.c:433
vnet_lisp_add_del_l2_arp_ndp_entry
int vnet_lisp_add_del_l2_arp_ndp_entry(gid_address_t *key, u8 *mac, u8 is_add)
Definition: control.c:996
send_eid_table_map_pair
static void send_eid_table_map_pair(hash_pair_t *p, vl_api_registration_t *reg, u32 context)
Definition: one_api.c:1002
i
int i
Definition: flowhash_template.h:376
vl_api_one_show_xtr_mode_t
Definition: one.api:974
vl_api_show_one_stats_enable_disable_reply_t::is_enable
bool is_enable
Definition: one.api:944
vl_api_one_add_del_locator_set_t::locator_num
u32 locator_num
Definition: one.api:35
clib_warning
#define clib_warning(format, args...)
Definition: error.h:59
vl_api_show_one_pitr_reply_t
Status of ONE PITR, enable or disable.
Definition: one.api:894
vl_api_show_one_stats_enable_disable_reply_t
Definition: one.api:940
gid_address_t
struct _gid_address_t gid_address_t
vl_api_one_eid_table_dump_t::context
u32 context
Definition: one.api:690
context
u32 context
Definition: ip.api:852
vnet_lisp_add_del_mapping_args_t::authoritative
u8 authoritative
Definition: control.h:342
vl_api_one_l2_arp_bd_get_t_handler
static void vl_api_one_l2_arp_bd_get_t_handler(vl_api_one_l2_arp_bd_get_t *mp)
Definition: one_api.c:1459
rv
int __clib_unused rv
Definition: application.c:491
vl_api_one_locator_dump_t_handler
static void vl_api_one_locator_dump_t_handler(vl_api_one_locator_dump_t *mp)
Definition: one_api.c:707
vl_api_one_stats_details_t::vni
u32 vni
Definition: one.api:911
vl_api_one_use_petr_t::ip_address
vl_api_address_t ip_address
Definition: one.api:207
vl_api_one_add_del_locator_set_t::is_add
bool is_add[default=true]
Definition: one.api:33
vl_api_one_enable_disable_petr_mode_t::is_enable
bool is_enable[default=true]
Definition: one.api:991
vl_api_one_map_resolver_details_t::context
u32 context
Definition: one.api:780
vl_api_one_locator_set_details_t
ONE locator_set status.
Definition: one.api:613
vl_api_one_eid_table_map_details_t::dp_table
u32 dp_table
Definition: one.api:739
vnet.h
vl_api_show_one_status_reply_t
ONE status.
Definition: one.api:829
api_errno.h
GID_ADDR_MAC
@ GID_ADDR_MAC
Definition: lisp_types.h:41
vl_api_show_one_stats_enable_disable_t
Definition: one.api:934
vl_api_one_locator_dump_t::client_index
u32 client_index
Definition: one.api:584
vl_api_one_eid_table_map_details_t::context
u32 context
Definition: one.api:737
vl_api_one_stats_details_t::bytes
u32 bytes
Definition: one.api:918
lisp_cp_main_t::mreq_itr_rlocs
u32 mreq_itr_rlocs
Definition: control.h:237
vl_api_show_one_map_register_fallback_threshold_reply_t
Definition: one.api:960
vl_api_one_map_request_mode_t_handler
static void vl_api_one_map_request_mode_t_handler(vl_api_one_map_request_mode_t *mp)
Definition: one_api.c:479
proto
vl_api_ip_proto_t proto
Definition: acl_types.api:51
fid_addr_mac
#define fid_addr_mac(_a)
Definition: lisp_types.h:85
one_base_msg_id
static u32 one_base_msg_id
Base message ID fot the plugin.
Definition: one_api.c:39
vl_api_one_eid_table_add_del_map_t::vni
u32 vni
Definition: one.api:570
vnet_lisp_add_del_map_resolver_args_t
Definition: control.h:373
vl_api_one_add_del_map_request_itr_rlocs_t_handler
static void vl_api_one_add_del_map_request_itr_rlocs_t_handler(vl_api_one_add_del_map_request_itr_rlocs_t *mp)
Definition: one_api.c:576
send_eid_table_vni
static void send_eid_table_vni(u32 vni, vl_api_registration_t *reg, u32 context)
Definition: one_api.c:1047
vl_api_one_enable_disable_xtr_mode_t::is_enable
bool is_enable[default=true]
Definition: one.api:971
gid_address_nsh_spi
#define gid_address_nsh_spi(_a)
Definition: lisp_types.h:211
vl_api_one_stats_details_t::seid
vl_api_eid_t seid
Definition: one.api:913
lisp_adjacency_t::leid
gid_address_t leid
Definition: control.h:74
mapping_t::action
u8 action
Definition: lisp_types.h:303
vl_api_one_add_del_locator_t::weight
u8 weight
Definition: one.api:68
vl_api_one_eid_table_details_t::deid
vl_api_eid_t deid
Definition: one.api:668
lisp_cp_main_t::pitr_map_index
u32 pitr_map_index
Definition: control.h:251
ip_types_api.h
vnet_lisp_add_del_map_resolver
int vnet_lisp_add_del_map_resolver(vnet_lisp_add_del_map_resolver_args_t *a)
Definition: control.c:2274
vl_api_one_eid_table_map_dump_t::client_index
u32 client_index
Definition: one.api:749
vl_api_one_add_del_map_request_itr_rlocs_t
add or delete map request itr rlocs
Definition: one.api:549
vnet_lisp_l2_arp_entries_get_by_bd
lisp_api_l2_arp_entry_t * vnet_lisp_l2_arp_entries_get_by_bd(u32 bd)
Definition: control.c:945
vl_api_one_set_transport_protocol_t::protocol
u8 protocol
Definition: one.api:463
vl_api_one_nsh_set_locator_set_t::ls_name
string ls_name[64]
Definition: one.api:179
vl_api_show_one_map_register_state_reply_t
Reply for show_one_map_register_state.
Definition: one.api:295
vl_api_show_one_map_register_state_reply_t::is_enable
bool is_enable
Definition: one.api:299
vl_api_one_stats_details_t::lloc
vl_api_address_t lloc
Definition: one.api:915
vl_api_one_add_del_remote_mapping_t::is_add
bool is_add[default=true]
Definition: one.api:362
vl_api_one_add_del_adjacency_t_handler
static void vl_api_one_add_del_adjacency_t_handler(vl_api_one_add_del_adjacency_t *mp)
Definition: one_api.c:654
vl_api_one_add_del_map_resolver_t
add or delete map-resolver
Definition: one.api:148
lisp_nsh_api_t
Definition: one_api.c:260
vl_api_one_eid_table_vni_details_t::context
u32 context
Definition: one.api:770
fib_prefix_t_
Aggregate type for a prefix.
Definition: fib_types.h:202
vl_api_one_add_del_remote_mapping_t::deid
vl_api_eid_t deid
Definition: one.api:367
EID_TYPE_API_MAC
@ EID_TYPE_API_MAC
Definition: lisp_types.api:40
vl_api_one_eid_table_vni_details_t::vni
u32 vni
Definition: one.api:771
vl_api_one_adjacencies_get_reply_t::adjacencies
vl_api_one_adjacency_t adjacencies[count]
Definition: one.api:716
gid_address_mac
#define gid_address_mac(_a)
Definition: lisp_types.h:209
vl_api_one_locator_details_t::priority
u8 priority
Definition: one.api:604
lisp_api_stats_t::seid
dp_address_t seid
Definition: lisp_gpe.h:104
vl_api_show_one_map_request_mode_t_handler
static void vl_api_show_one_map_request_mode_t_handler(vl_api_show_one_map_request_mode_t *mp)
Definition: one_api.c:465
hash_pair_t
Definition: hash.h:159
vl_api_one_locator_details_t::context
u32 context
Definition: one.api:600
mapping_t::nsh_set
u8 nsh_set
Definition: lisp_types.h:310
prefix
vl_api_prefix_t prefix
Definition: ip.api:175
vl_api_one_show_pitr_mode_reply_t
Definition: one.api:1020
vnet_lisp_add_del_locator
int vnet_lisp_add_del_locator(vnet_lisp_add_del_locator_set_args_t *a, locator_set_t *ls, u32 *ls_result)
Definition: control.c:1888
vnet_api_error_t
vnet_api_error_t
Definition: api_errno.h:162
lisp_cp_main_t::locator_pool
locator_t * locator_pool
Definition: control.h:178
vl_api_one_locator_details_t::sw_if_index
vl_api_interface_index_t sw_if_index
Definition: one.api:602
vl_msg_api_alloc
void * vl_msg_api_alloc(int nbytes)
Definition: memory_shared.c:199
vl_api_show_one_map_request_mode_t
Request for ONE map-request mode.
Definition: one.api:327
vnet_lisp_map_register_get_ttl
u32 vnet_lisp_map_register_get_ttl(void)
Definition: control.c:2330
vl_api_one_map_server_dump_t::context
u32 context
Definition: one.api:811
ip_prefix_to_fib_prefix
void ip_prefix_to_fib_prefix(const ip_prefix_t *ip_prefix, fib_prefix_t *fib_prefix)
convert from a LISP to a FIB prefix
Definition: ip_types.c:410
vnet_lisp_nsh_set_locator_set
int vnet_lisp_nsh_set_locator_set(u8 *locator_set_name, u8 is_add)
Definition: control.c:1527