FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
gbp_api.c
Go to the documentation of this file.
1 /*
2  *------------------------------------------------------------------
3  * Copyright (c) 2018 Cisco and/or its affiliates.
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *------------------------------------------------------------------
16  */
17 
18 #include <vnet/vnet.h>
19 #include <vnet/plugin/plugin.h>
20 
21 #include <vnet/interface.h>
22 #include <vnet/api_errno.h>
23 #include <vnet/ip/ip_types_api.h>
25 #include <vpp/app/version.h>
26 
27 #include <gbp/gbp.h>
28 #include <gbp/gbp_learn.h>
29 #include <gbp/gbp_itf.h>
30 #include <gbp/gbp_vxlan.h>
31 #include <gbp/gbp_bridge_domain.h>
32 #include <gbp/gbp_route_domain.h>
33 #include <gbp/gbp_ext_itf.h>
34 #include <gbp/gbp_contract.h>
35 
36 #include <vlibapi/api.h>
37 #include <vlibmemory/api.h>
38 
39 /* define message IDs */
40 #include <gbp/gbp.api_enum.h>
41 #include <gbp/gbp.api_types.h>
42 #include <vnet/format_fns.h>
44 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
45 
47 
49 
50 #define GBP_MSG_BASE msg_id_base
51 
53 gbp_endpoint_flags_decode (vl_api_gbp_endpoint_flags_t v)
54 {
56 
57  v = ntohl (v);
58 
67 
68  return (f);
69 }
70 
71 static vl_api_gbp_endpoint_flags_t
73 {
74  vl_api_gbp_endpoint_flags_t v = 0;
75 
76 
85 
86  v = htonl (v);
87 
88  return (v);
89 }
90 
91 static void
93 {
96  u32 sw_if_index, handle;
97  ip46_address_t *ips;
99  int rv = 0, ii;
100 
101  handle = INDEX_INVALID;
102 
104 
105  gef = gbp_endpoint_flags_decode (mp->endpoint.flags), ips = NULL;
106  sw_if_index = ntohl (mp->endpoint.sw_if_index);
107 
108  if (mp->endpoint.n_ips)
109  {
110  vec_validate (ips, mp->endpoint.n_ips - 1);
111 
112  vec_foreach_index (ii, ips)
113  {
114  ip_address_decode (&mp->endpoint.ips[ii], &ips[ii]);
115  }
116  }
117  mac_address_decode (mp->endpoint.mac, &mac);
118 
119  if (GBP_ENDPOINT_FLAG_REMOTE & gef)
120  {
121  ip46_address_t tun_src, tun_dst;
122 
123  ip_address_decode (&mp->endpoint.tun.src, &tun_src);
124  ip_address_decode (&mp->endpoint.tun.dst, &tun_dst);
125 
126  rv = gbp_endpoint_update_and_lock (GBP_ENDPOINT_SRC_CP,
127  sw_if_index, ips, &mac,
129  ntohs (mp->endpoint.sclass),
130  gef, &tun_src, &tun_dst, &handle);
131  }
132  else
133  {
134  rv = gbp_endpoint_update_and_lock (GBP_ENDPOINT_SRC_CP,
135  sw_if_index, ips, &mac,
137  ntohs (mp->endpoint.sclass),
138  gef, NULL, NULL, &handle);
139  }
140  vec_free (ips);
142 
143  /* *INDENT-OFF* */
144  REPLY_MACRO2 (VL_API_GBP_ENDPOINT_ADD_REPLY + GBP_MSG_BASE,
145  ({
146  rmp->handle = htonl (handle);
147  }));
148  /* *INDENT-ON* */
149 }
150 
151 static void
153 {
154  vl_api_gbp_endpoint_del_reply_t *rmp;
155  int rv = 0;
156 
157  gbp_endpoint_unlock (GBP_ENDPOINT_SRC_CP, ntohl (mp->handle));
158 
159  REPLY_MACRO (VL_API_GBP_ENDPOINT_DEL_REPLY + GBP_MSG_BASE);
160 }
161 
162 typedef struct gbp_walk_ctx_t_
163 {
167 
168 static walk_rc_t
170 {
172  gbp_endpoint_loc_t *gel;
173  gbp_endpoint_fwd_t *gef;
176  u8 n_ips, ii;
177 
178  ctx = args;
179  ge = gbp_endpoint_get (gei);
180 
181  n_ips = vec_len (ge->ge_key.gek_ips);
182  mp = vl_msg_api_alloc (sizeof (*mp) + (sizeof (*mp->endpoint.ips) * n_ips));
183  if (!mp)
184  return 1;
185 
186  clib_memset (mp, 0, sizeof (*mp));
187  mp->_vl_msg_id = ntohs (VL_API_GBP_ENDPOINT_DETAILS + GBP_MSG_BASE);
188  mp->context = ctx->context;
189 
190  gel = &ge->ge_locs[0];
191  gef = &ge->ge_fwd;
192 
194  {
195  mp->endpoint.sw_if_index = ntohl (gel->tun.gel_parent_sw_if_index);
197  &mp->endpoint.tun.src);
199  &mp->endpoint.tun.dst);
200  }
201  else
202  {
203  mp->endpoint.sw_if_index =
204  ntohl (gbp_itf_get_sw_if_index (gef->gef_itf));
205  }
206  mp->endpoint.sclass = ntohs (ge->ge_fwd.gef_sclass);
207  mp->endpoint.n_ips = n_ips;
208  mp->endpoint.flags = gbp_endpoint_flags_encode (gef->gef_flags);
209  mp->handle = htonl (gei);
210  mp->age =
212  ge->ge_last_time);
213  mac_address_encode (&ge->ge_key.gek_mac, mp->endpoint.mac);
214 
215  vec_foreach_index (ii, ge->ge_key.gek_ips)
216  {
217  ip_address_encode (&ge->ge_key.gek_ips[ii].fp_addr,
218  IP46_TYPE_ANY, &mp->endpoint.ips[ii]);
219  }
220 
221  vl_api_send_msg (ctx->reg, (u8 *) mp);
222 
223  return (WALK_CONTINUE);
224 }
225 
226 static void
228 {
230 
232  if (!reg)
233  return;
234 
235  gbp_walk_ctx_t ctx = {
236  .reg = reg,
237  .context = mp->context,
238  };
239 
241 }
242 
243 static void
244 gbp_retention_decode (const vl_api_gbp_endpoint_retention_t * in,
246 {
247  out->remote_ep_timeout = ntohl (in->remote_ep_timeout);
248 }
249 
250 static void
253 {
254  vl_api_gbp_endpoint_group_add_reply_t *rmp;
256  int rv = 0;
257 
258  gbp_retention_decode (&mp->epg.retention, &retention);
259 
260  rv = gbp_endpoint_group_add_and_lock (ntohl (mp->epg.vnid),
261  ntohs (mp->epg.sclass),
262  ntohl (mp->epg.bd_id),
263  ntohl (mp->epg.rd_id),
264  ntohl (mp->epg.uplink_sw_if_index),
265  &retention);
266 
267  REPLY_MACRO (VL_API_GBP_ENDPOINT_GROUP_ADD_REPLY + GBP_MSG_BASE);
268 }
269 
270 static void
273 {
274  vl_api_gbp_endpoint_group_del_reply_t *rmp;
275  int rv = 0;
276 
278 
279  REPLY_MACRO (VL_API_GBP_ENDPOINT_GROUP_DEL_REPLY + GBP_MSG_BASE);
280 }
281 
283 gbp_bridge_domain_flags_from_api (vl_api_gbp_bridge_domain_flags_t a)
284 {
286 
287  g = GBP_BD_FLAG_NONE;
288  a = clib_net_to_host_u32 (a);
289 
298 
299  return (g);
300 }
301 
302 static void
304 {
305  vl_api_gbp_bridge_domain_add_reply_t *rmp;
306  int rv = 0;
307 
308  rv = gbp_bridge_domain_add_and_lock (ntohl (mp->bd.bd_id),
309  ntohl (mp->bd.rd_id),
311  (mp->bd.flags),
312  ntohl (mp->bd.bvi_sw_if_index),
313  ntohl (mp->bd.uu_fwd_sw_if_index),
314  ntohl (mp->bd.bm_flood_sw_if_index));
315 
316  REPLY_MACRO (VL_API_GBP_BRIDGE_DOMAIN_ADD_REPLY + GBP_MSG_BASE);
317 }
318 
319 static void
321 {
322  vl_api_gbp_bridge_domain_del_reply_t *rmp;
323  int rv = 0;
324 
325  rv = gbp_bridge_domain_delete (ntohl (mp->bd_id));
326 
327  REPLY_MACRO (VL_API_GBP_BRIDGE_DOMAIN_DEL_REPLY + GBP_MSG_BASE);
328 }
329 
330 static void
332 {
333  vl_api_gbp_route_domain_add_reply_t *rmp;
334  int rv = 0;
335 
336  rv = gbp_route_domain_add_and_lock (ntohl (mp->rd.rd_id),
337  ntohs (mp->rd.scope),
338  ntohl (mp->rd.ip4_table_id),
339  ntohl (mp->rd.ip6_table_id),
340  ntohl (mp->rd.ip4_uu_sw_if_index),
341  ntohl (mp->rd.ip6_uu_sw_if_index));
342 
343  REPLY_MACRO (VL_API_GBP_ROUTE_DOMAIN_ADD_REPLY + GBP_MSG_BASE);
344 }
345 
346 static void
348 {
349  vl_api_gbp_route_domain_del_reply_t *rmp;
350  int rv = 0;
351 
352  rv = gbp_route_domain_delete (ntohl (mp->rd_id));
353 
354  REPLY_MACRO (VL_API_GBP_ROUTE_DOMAIN_DEL_REPLY + GBP_MSG_BASE);
355 }
356 
357 static int
358 gub_subnet_type_from_api (vl_api_gbp_subnet_type_t a, gbp_subnet_type_t * t)
359 {
360  a = clib_net_to_host_u32 (a);
361 
362  switch (a)
363  {
366  return (0);
368  *t = GBP_SUBNET_L3_OUT;
369  return (0);
372  return (0);
375  return (0);
378  return (0);
379  }
380 
381  return (-1);
382 }
383 
384 static void
386 {
387  vl_api_gbp_subnet_add_del_reply_t *rmp;
389  fib_prefix_t pfx;
390  int rv = 0;
391 
392  ip_prefix_decode (&mp->subnet.prefix, &pfx);
393 
394  rv = gub_subnet_type_from_api (mp->subnet.type, &type);
395 
396  if (0 != rv)
397  goto out;
398 
399  if (mp->is_add)
400  rv = gbp_subnet_add (ntohl (mp->subnet.rd_id),
401  &pfx, type,
402  ntohl (mp->subnet.sw_if_index),
403  ntohs (mp->subnet.sclass));
404  else
405  rv = gbp_subnet_del (ntohl (mp->subnet.rd_id), &pfx);
406 
407 out:
408  REPLY_MACRO (VL_API_GBP_SUBNET_ADD_DEL_REPLY + GBP_MSG_BASE);
409 }
410 
411 static vl_api_gbp_subnet_type_t
413 {
414  vl_api_gbp_subnet_type_t a = 0;
415 
416  switch (t)
417  {
420  break;
423  break;
426  break;
427  case GBP_SUBNET_L3_OUT:
429  break;
432  break;
433  }
434 
435  a = clib_host_to_net_u32 (a);
436 
437  return (a);
438 }
439 
440 static walk_rc_t
442  const fib_prefix_t * pfx,
444  u32 sw_if_index, sclass_t sclass, void *args)
445 {
448 
449  ctx = args;
450  mp = vl_msg_api_alloc (sizeof (*mp));
451  if (!mp)
452  return 1;
453 
454  clib_memset (mp, 0, sizeof (*mp));
455  mp->_vl_msg_id = ntohs (VL_API_GBP_SUBNET_DETAILS + GBP_MSG_BASE);
456  mp->context = ctx->context;
457 
458  mp->subnet.type = gub_subnet_type_to_api (type);
459  mp->subnet.sw_if_index = ntohl (sw_if_index);
460  mp->subnet.sclass = ntohs (sclass);
461  mp->subnet.rd_id = ntohl (rd_id);
462  ip_prefix_encode (pfx, &mp->subnet.prefix);
463 
464  vl_api_send_msg (ctx->reg, (u8 *) mp);
465 
466  return (WALK_CONTINUE);
467 }
468 
469 static void
471 {
473 
475  if (!reg)
476  return;
477 
478  gbp_walk_ctx_t ctx = {
479  .reg = reg,
480  .context = mp->context,
481  };
482 
484 }
485 
486 static int
488 {
491 
492  ctx = args;
493  mp = vl_msg_api_alloc (sizeof (*mp));
494  if (!mp)
495  return 1;
496 
497  clib_memset (mp, 0, sizeof (*mp));
498  mp->_vl_msg_id = ntohs (VL_API_GBP_ENDPOINT_GROUP_DETAILS + GBP_MSG_BASE);
499  mp->context = ctx->context;
500 
501  mp->epg.uplink_sw_if_index = ntohl (gg->gg_uplink_sw_if_index);
502  mp->epg.vnid = ntohl (gg->gg_vnid);
503  mp->epg.sclass = ntohs (gg->gg_sclass);
504  mp->epg.bd_id = ntohl (gbp_endpoint_group_get_bd_id (gg));
505  mp->epg.rd_id = ntohl (gbp_route_domain_get_rd_id (gg->gg_rd));
506 
507  vl_api_send_msg (ctx->reg, (u8 *) mp);
508 
509  return (1);
510 }
511 
512 static void
514  mp)
515 {
517 
519  if (!reg)
520  return;
521 
522  gbp_walk_ctx_t ctx = {
523  .reg = reg,
524  .context = mp->context,
525  };
526 
528 }
529 
530 static int
532 {
534  gbp_route_domain_t *gr;
536 
537  ctx = args;
538  mp = vl_msg_api_alloc (sizeof (*mp));
539  if (!mp)
540  return 1;
541 
542  memset (mp, 0, sizeof (*mp));
543  mp->_vl_msg_id = ntohs (VL_API_GBP_BRIDGE_DOMAIN_DETAILS + GBP_MSG_BASE);
544  mp->context = ctx->context;
545 
546  gr = gbp_route_domain_get (gb->gb_rdi);
547 
548  mp->bd.bd_id = ntohl (gb->gb_bd_id);
549  mp->bd.rd_id = ntohl (gr->grd_id);
550  mp->bd.bvi_sw_if_index = ntohl (gb->gb_bvi_sw_if_index);
551  mp->bd.uu_fwd_sw_if_index = ntohl (gb->gb_uu_fwd_sw_if_index);
552  mp->bd.bm_flood_sw_if_index =
554 
555  vl_api_send_msg (ctx->reg, (u8 *) mp);
556 
557  return (1);
558 }
559 
560 static void
562 {
564 
566  if (!reg)
567  return;
568 
569  gbp_walk_ctx_t ctx = {
570  .reg = reg,
571  .context = mp->context,
572  };
573 
575 }
576 
577 static int
579 {
582 
583  ctx = args;
584  mp = vl_msg_api_alloc (sizeof (*mp));
585  if (!mp)
586  return 1;
587 
588  memset (mp, 0, sizeof (*mp));
589  mp->_vl_msg_id = ntohs (VL_API_GBP_ROUTE_DOMAIN_DETAILS + GBP_MSG_BASE);
590  mp->context = ctx->context;
591 
592  mp->rd.rd_id = ntohl (grd->grd_id);
593  mp->rd.ip4_uu_sw_if_index =
594  ntohl (grd->grd_uu_sw_if_index[FIB_PROTOCOL_IP4]);
595  mp->rd.ip6_uu_sw_if_index =
596  ntohl (grd->grd_uu_sw_if_index[FIB_PROTOCOL_IP6]);
597 
598  vl_api_send_msg (ctx->reg, (u8 *) mp);
599 
600  return (1);
601 }
602 
603 static void
605 {
607 
609  if (!reg)
610  return;
611 
612  gbp_walk_ctx_t ctx = {
613  .reg = reg,
614  .context = mp->context,
615  };
616 
618 }
619 
620 static void
622 {
623  vl_api_gbp_recirc_add_del_reply_t *rmp;
625  int rv = 0;
626 
627  sw_if_index = ntohl (mp->recirc.sw_if_index);
629  goto bad_sw_if_index;
630 
631  if (mp->is_add)
633  ntohs (mp->recirc.sclass), mp->recirc.is_ext);
634  else
636 
638 
639  REPLY_MACRO (VL_API_GBP_RECIRC_ADD_DEL_REPLY + GBP_MSG_BASE);
640 }
641 
642 static walk_rc_t
644 {
647 
648  ctx = args;
649  mp = vl_msg_api_alloc (sizeof (*mp));
650  if (!mp)
651  return (WALK_STOP);
652 
653  clib_memset (mp, 0, sizeof (*mp));
654  mp->_vl_msg_id = ntohs (VL_API_GBP_RECIRC_DETAILS + GBP_MSG_BASE);
655  mp->context = ctx->context;
656 
657  mp->recirc.sclass = ntohs (gr->gr_sclass);
658  mp->recirc.sw_if_index = ntohl (gr->gr_sw_if_index);
659  mp->recirc.is_ext = gr->gr_is_ext;
660 
661  vl_api_send_msg (ctx->reg, (u8 *) mp);
662 
663  return (WALK_CONTINUE);
664 }
665 
666 static void
668 {
670 
672  if (!reg)
673  return;
674 
675  gbp_walk_ctx_t ctx = {
676  .reg = reg,
677  .context = mp->context,
678  };
679 
681 }
682 
683 static void
685 {
686  vl_api_gbp_ext_itf_add_del_reply_t *rmp;
687  u32 sw_if_index = ~0;
688  vl_api_gbp_ext_itf_t *ext_itf;
689  int rv = 0;
690 
691  ext_itf = &mp->ext_itf;
692  if (ext_itf)
693  sw_if_index = ntohl (ext_itf->sw_if_index);
694 
696  goto bad_sw_if_index;
697 
698  if (mp->is_add)
700  ntohl (ext_itf->bd_id), ntohl (ext_itf->rd_id),
701  ntohl (ext_itf->flags));
702  else
704 
706 
707  REPLY_MACRO (VL_API_GBP_EXT_ITF_ADD_DEL_REPLY + GBP_MSG_BASE);
708 }
709 
710 static walk_rc_t
712 {
715 
716  ctx = args;
717  mp = vl_msg_api_alloc (sizeof (*mp));
718  if (!mp)
719  return (WALK_STOP);
720 
721  clib_memset (mp, 0, sizeof (*mp));
722  mp->_vl_msg_id = ntohs (VL_API_GBP_EXT_ITF_DETAILS + GBP_MSG_BASE);
723  mp->context = ctx->context;
724 
725  mp->ext_itf.flags = ntohl (gx->gx_flags);
726  mp->ext_itf.bd_id = ntohl (gbp_bridge_domain_get_bd_id (gx->gx_bd));
727  mp->ext_itf.rd_id = ntohl (gbp_route_domain_get_rd_id (gx->gx_rd));
728  mp->ext_itf.sw_if_index = ntohl (gbp_itf_get_sw_if_index (gx->gx_itf));
729 
730  vl_api_send_msg (ctx->reg, (u8 *) mp);
731 
732  return (WALK_CONTINUE);
733 }
734 
735 static void
737 {
739 
741  if (!reg)
742  return;
743 
744  gbp_walk_ctx_t ctx = {
745  .reg = reg,
746  .context = mp->context,
747  };
748 
750 }
751 
752 static int
753 gbp_contract_rule_action_deocde (vl_api_gbp_rule_action_t in,
754  gbp_rule_action_t * out)
755 {
756  in = clib_net_to_host_u32 (in);
757 
758  switch (in)
759  {
760  case GBP_API_RULE_PERMIT:
761  *out = GBP_RULE_PERMIT;
762  return (0);
763  case GBP_API_RULE_DENY:
764  *out = GBP_RULE_DENY;
765  return (0);
767  *out = GBP_RULE_REDIRECT;
768  return (0);
769  }
770 
771  return (-1);
772 }
773 
774 static int
775 gbp_hash_mode_decode (vl_api_gbp_hash_mode_t in, gbp_hash_mode_t * out)
776 {
777  in = clib_net_to_host_u32 (in);
778 
779  switch (in)
780  {
782  *out = GBP_HASH_MODE_SRC_IP;
783  return (0);
785  *out = GBP_HASH_MODE_DST_IP;
786  return (0);
788  *out = GBP_HASH_MODE_SYMMETRIC;
789  return (0);
790  }
791 
792  return (-2);
793 }
794 
795 static int
796 gbp_next_hop_decode (const vl_api_gbp_next_hop_t * in, index_t * gnhi)
797 {
798  ip46_address_t ip;
800  index_t grd, gbd;
801 
802  gbd = gbp_bridge_domain_find_and_lock (ntohl (in->bd_id));
803 
804  if (INDEX_INVALID == gbd)
805  return (VNET_API_ERROR_BD_NOT_MODIFIABLE);
806 
807  grd = gbp_route_domain_find_and_lock (ntohl (in->rd_id));
808 
809  if (INDEX_INVALID == grd)
810  return (VNET_API_ERROR_NO_SUCH_FIB);
811 
812  ip_address_decode (&in->ip, &ip);
813  mac_address_decode (in->mac, &mac);
814 
815  *gnhi = gbp_next_hop_alloc (&ip, grd, &mac, gbd);
816 
817  return (0);
818 }
819 
820 static int
821 gbp_next_hop_set_decode (const vl_api_gbp_next_hop_set_t * in,
822  gbp_hash_mode_t * hash_mode, index_t ** out)
823 {
824 
825  index_t *gnhis = NULL;
826  int rv;
827  u8 ii;
828 
829  rv = gbp_hash_mode_decode (in->hash_mode, hash_mode);
830 
831  if (0 != rv)
832  return rv;
833 
834  vec_validate (gnhis, in->n_nhs - 1);
835 
836  for (ii = 0; ii < in->n_nhs; ii++)
837  {
838  rv = gbp_next_hop_decode (&in->nhs[ii], &gnhis[ii]);
839 
840  if (0 != rv)
841  {
842  vec_free (gnhis);
843  break;
844  }
845  }
846 
847  *out = gnhis;
848  return (rv);
849 }
850 
851 static int
852 gbp_contract_rule_decode (const vl_api_gbp_rule_t * in, index_t * gui)
853 {
854  gbp_hash_mode_t hash_mode;
856  index_t *nhs = NULL;
857  int rv;
858 
859  rv = gbp_contract_rule_action_deocde (in->action, &action);
860 
861  if (0 != rv)
862  return rv;
863 
864  if (GBP_RULE_REDIRECT == action)
865  {
866  rv = gbp_next_hop_set_decode (&in->nh_set, &hash_mode, &nhs);
867 
868  if (0 != rv)
869  return (rv);
870  }
871  else
872  {
873  hash_mode = GBP_HASH_MODE_SRC_IP;
874  }
875 
876  *gui = gbp_rule_alloc (action, hash_mode, nhs);
877 
878  return (rv);
879 }
880 
881 static int
883  const vl_api_gbp_rule_t * rules, index_t ** out)
884 {
885  index_t *guis = NULL;
886  int rv;
887  u8 ii;
888 
889  if (0 == n_rules)
890  {
891  *out = NULL;
892  return (0);
893  }
894 
895  vec_validate (guis, n_rules - 1);
896 
897  for (ii = 0; ii < n_rules; ii++)
898  {
899  rv = gbp_contract_rule_decode (&rules[ii], &guis[ii]);
900 
901  if (0 != rv)
902  {
903  index_t *gui;
904  vec_foreach (gui, guis) gbp_rule_free (*gui);
905  vec_free (guis);
906  return (rv);
907  }
908  }
909 
910  *out = guis;
911  return (rv);
912 }
913 
914 static void
916 {
919  u32 stats_index = ~0;
920  index_t *rules;
921  int ii, rv = 0;
922  u8 n_et;
923 
924  if (mp->is_add)
925  {
926  rv = gbp_contract_rules_decode (mp->contract.n_rules,
927  mp->contract.rules, &rules);
928  if (0 != rv)
929  goto out;
930 
931  allowed_ethertypes = NULL;
932 
933  /*
934  * allowed ether types
935  */
936  n_et = mp->contract.n_ether_types;
937  vec_validate (allowed_ethertypes, n_et - 1);
938 
939  for (ii = 0; ii < n_et; ii++)
940  {
941  /* leave the ether types in network order */
942  allowed_ethertypes[ii] = mp->contract.allowed_ethertypes[ii];
943  }
944 
945  rv = gbp_contract_update (ntohs (mp->contract.scope),
946  ntohs (mp->contract.sclass),
947  ntohs (mp->contract.dclass),
948  ntohl (mp->contract.acl_index),
950  }
951  else
952  rv = gbp_contract_delete (ntohs (mp->contract.scope),
953  ntohs (mp->contract.sclass),
954  ntohs (mp->contract.dclass));
955 
956 out:
957  /* *INDENT-OFF* */
958  REPLY_MACRO2 (VL_API_GBP_CONTRACT_ADD_DEL_REPLY + GBP_MSG_BASE,
959  ({
960  rmp->stats_index = htonl (stats_index);
961  }));
962  /* *INDENT-ON* */
963 }
964 
965 static int
967 {
970 
971  ctx = args;
972  mp = vl_msg_api_alloc (sizeof (*mp));
973  if (!mp)
974  return 1;
975 
976  clib_memset (mp, 0, sizeof (*mp));
977  mp->_vl_msg_id = ntohs (VL_API_GBP_CONTRACT_DETAILS + GBP_MSG_BASE);
978  mp->context = ctx->context;
979 
980  mp->contract.sclass = ntohs (gbpc->gc_key.gck_src);
981  mp->contract.dclass = ntohs (gbpc->gc_key.gck_dst);
982  mp->contract.acl_index = ntohl (gbpc->gc_acl_index);
983  mp->contract.scope = ntohs (gbpc->gc_key.gck_scope);
984 
985  vl_api_send_msg (ctx->reg, (u8 *) mp);
986 
987  return (1);
988 }
989 
990 static void
992 {
994 
996  if (!reg)
997  return;
998 
999  gbp_walk_ctx_t ctx = {
1000  .reg = reg,
1001  .context = mp->context,
1002  };
1003 
1005 }
1006 
1007 static int
1008 gbp_vxlan_tunnel_mode_2_layer (vl_api_gbp_vxlan_tunnel_mode_t mode,
1010 {
1011  mode = clib_net_to_host_u32 (mode);
1012 
1013  switch (mode)
1014  {
1016  *l = GBP_VXLAN_TUN_L2;
1017  return (0);
1019  *l = GBP_VXLAN_TUN_L3;
1020  return (0);
1021  }
1022  return (-1);
1023 }
1024 
1025 static void
1027 {
1031  u32 sw_if_index;
1032  int rv = 0;
1033 
1034  ip4_address_decode (mp->tunnel.src, &src);
1035  rv = gbp_vxlan_tunnel_mode_2_layer (mp->tunnel.mode, &layer);
1036 
1037  if (0 != rv)
1038  goto out;
1039 
1040  rv = gbp_vxlan_tunnel_add (ntohl (mp->tunnel.vni),
1041  layer,
1042  ntohl (mp->tunnel.bd_rd_id), &src, &sw_if_index);
1043 
1044 out:
1045  /* *INDENT-OFF* */
1046  REPLY_MACRO2 (VL_API_GBP_VXLAN_TUNNEL_ADD_REPLY + GBP_MSG_BASE,
1047  ({
1048  rmp->sw_if_index = htonl (sw_if_index);
1049  }));
1050  /* *INDENT-ON* */
1051 }
1052 
1053 static void
1055 {
1056  vl_api_gbp_vxlan_tunnel_del_reply_t *rmp;
1057  int rv = 0;
1058 
1059  rv = gbp_vxlan_tunnel_del (ntohl (mp->tunnel.vni));
1060 
1061  REPLY_MACRO (VL_API_GBP_VXLAN_TUNNEL_DEL_REPLY + GBP_MSG_BASE);
1062 }
1063 
1064 static vl_api_gbp_vxlan_tunnel_mode_t
1066 {
1067  vl_api_gbp_vxlan_tunnel_mode_t mode = GBP_VXLAN_TUNNEL_MODE_L2;
1068 
1069  switch (layer)
1070  {
1071  case GBP_VXLAN_TUN_L2:
1073  break;
1074  case GBP_VXLAN_TUN_L3:
1076  break;
1077  }
1078  mode = clib_host_to_net_u32 (mode);
1079 
1080  return (mode);
1081 }
1082 
1083 static walk_rc_t
1085 {
1088 
1089  ctx = args;
1090  mp = vl_msg_api_alloc (sizeof (*mp));
1091  if (!mp)
1092  return 1;
1093 
1094  memset (mp, 0, sizeof (*mp));
1095  mp->_vl_msg_id = htons (VL_API_GBP_VXLAN_TUNNEL_DETAILS + GBP_MSG_BASE);
1096  mp->context = ctx->context;
1097 
1098  mp->tunnel.vni = htonl (gt->gt_vni);
1100  mp->tunnel.bd_rd_id = htonl (gt->gt_bd_rd_id);
1101 
1102  vl_api_send_msg (ctx->reg, (u8 *) mp);
1103 
1104  return (1);
1105 }
1106 
1107 static void
1109 {
1110  vl_api_registration_t *reg;
1111 
1113  if (!reg)
1114  return;
1115 
1116  gbp_walk_ctx_t ctx = {
1117  .reg = reg,
1118  .context = mp->context,
1119  };
1120 
1122 }
1123 
1124 #include <gbp/gbp.api.c>
1125 static clib_error_t *
1127 {
1128  gbp_main_t *gbpm = &gbp_main;
1129 
1130  gbpm->gbp_acl_user_id = ~0;
1131 
1132  /* Ask for a correctly-sized block of API message decode slots */
1134 
1135  return (NULL);
1136 }
1137 
1139 
1140 /* *INDENT-OFF* */
1141 VLIB_PLUGIN_REGISTER () = {
1142  .version = VPP_BUILD_VER,
1143  .description = "Group Based Policy (GBP)",
1144 };
1145 /* *INDENT-ON* */
1146 
1147 
1148 /*
1149  * fd.io coding-style-patch-verification: ON
1150  *
1151  * Local Variables:
1152  * eval: (c-set-style "gnu")
1153  * End:
1154  */
gbp_ext_itf_walk
void gbp_ext_itf_walk(gbp_ext_itf_cb_t cb, void *ctx)
Definition: gbp_ext_itf.c:231
gbp_next_hop_set_decode
static int gbp_next_hop_set_decode(const vl_api_gbp_next_hop_set_t *in, gbp_hash_mode_t *hash_mode, index_t **out)
Definition: gbp_api.c:821
gbp_endpoint_group_delete
int gbp_endpoint_group_delete(sclass_t sclass)
Definition: gbp_endpoint_group.c:199
gbp_learn.h
stats_index
u32 stats_index
Definition: ip.api:174
gbp_ext_itf_send_details
static walk_rc_t gbp_ext_itf_send_details(gbp_ext_itf_t *gx, void *args)
Definition: gbp_api.c:711
GBP_BD_FLAG_DO_NOT_LEARN
@ GBP_BD_FLAG_DO_NOT_LEARN
Definition: gbp_bridge_domain.h:31
GBP_API_ENDPOINT_FLAG_LEARNT
@ GBP_API_ENDPOINT_FLAG_LEARNT
Definition: gbp.api:118
vl_api_gbp_vxlan_tunnel_del_t_handler
static void vl_api_gbp_vxlan_tunnel_del_t_handler(vl_api_gbp_vxlan_tunnel_add_t *mp)
Definition: gbp_api.c:1054
gbp_bridge_domain_get_bd_id
u32 gbp_bridge_domain_get_bd_id(index_t gbdi)
Definition: gbp_bridge_domain.c:68
vl_api_gbp_endpoint_group_details_t::context
u32 context
Definition: gbp.api:219
gbp_contract_t_::gc_acl_index
u32 gc_acl_index
Definition: gbp_contract.h:141
VALIDATE_SW_IF_INDEX
#define VALIDATE_SW_IF_INDEX(mp)
Definition: api_helper_macros.h:281
vl_api_client_index_to_registration
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
Definition: api.h:79
GBP_API_SUBNET_L3_OUT
@ GBP_API_SUBNET_L3_OUT
Definition: gbp.api:258
GBP_API_RULE_REDIRECT
@ GBP_API_RULE_REDIRECT
Definition: gbp.api:320
api.h
vl_api_gbp_recirc_add_del_t::is_add
bool is_add
Definition: gbp.api:235
n_ips
u8 n_ips
Definition: gbp.api:135
vl_api_gbp_subnet_add_del_t::is_add
bool is_add
Definition: gbp.api:276
GBP_ENDPOINT_FLAG_LEARNT
@ GBP_ENDPOINT_FLAG_LEARNT
Definition: gbp_endpoint.h:47
mac
vl_api_mac_address_t mac
Definition: l2.api:559
gbp_bridge_domain_send_details
static int gbp_bridge_domain_send_details(gbp_bridge_domain_t *gb, void *args)
Definition: gbp_api.c:531
vl_api_gbp_bridge_domain_add_t_handler
static void vl_api_gbp_bridge_domain_add_t_handler(vl_api_gbp_bridge_domain_add_t *mp)
Definition: gbp_api.c:303
GBP_API_HASH_MODE_DST_IP
@ GBP_API_HASH_MODE_DST_IP
Definition: gbp.api:305
ntohs
#define ntohs(x)
Definition: af_xdp.bpf.c:29
gbp_recirc_add
int gbp_recirc_add(u32 sw_if_index, sclass_t sclass, u8 is_ext)
Definition: gbp_recirc.c:62
gpb_recirc_t_::gr_sclass
sclass_t gr_sclass
EPG ID that packets will classify to when they arrive on this recirc.
Definition: gbp_recirc.h:34
vl_api_gbp_endpoint_group_del_t_handler
static void vl_api_gbp_endpoint_group_del_t_handler(vl_api_gbp_endpoint_group_del_t *mp)
Definition: gbp_api.c:272
gbp_contract_rule_action_deocde
static int gbp_contract_rule_action_deocde(vl_api_gbp_rule_action_t in, gbp_rule_action_t *out)
Definition: gbp_api.c:753
WALK_CONTINUE
@ WALK_CONTINUE
Definition: interface_funcs.h:174
vl_api_gbp_bridge_domain_dump_t
Definition: gbp.api:56
GBP_API_HASH_MODE_SRC_IP
@ GBP_API_HASH_MODE_SRC_IP
Definition: gbp.api:304
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
GBP_API_SUBNET_ANON_L3_OUT
@ GBP_API_SUBNET_ANON_L3_OUT
Definition: gbp.api:259
gpb_endpoint_group_t_::gg_vnid
vnid_t gg_vnid
ID.
Definition: gbp_endpoint_group.h:41
GBP_ENDPOINT_FLAG_REMOTE
@ GBP_ENDPOINT_FLAG_REMOTE
Definition: gbp_endpoint.h:46
vl_api_gbp_vxlan_tunnel_dump_t::context
u32 context
Definition: gbp.api:419
gbp_rule_free
void gbp_rule_free(index_t gui)
Definition: gbp_contract.c:77
gbp_bridge_domain_t_::gb_rdi
u32 gb_rdi
Index of the Route-domain this BD is associated with.
Definition: gbp_bridge_domain.h:54
vl_api_gbp_bridge_domain_del_t_handler
static void vl_api_gbp_bridge_domain_del_t_handler(vl_api_gbp_bridge_domain_del_t *mp)
Definition: gbp_api.c:320
gbp_ext_itf_add
int gbp_ext_itf_add(u32 sw_if_index, u32 bd_id, u32 rd_id, u32 flags)
Definition: gbp_ext_itf.c:53
gbp_subnet_walk
void gbp_subnet_walk(gbp_subnet_cb_t cb, void *ctx)
Definition: gbp_subnet.c:416
vl_api_send_msg
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
Definition: api.h:35
gbp_vxlan_tunnel_mode_2_layer
static int gbp_vxlan_tunnel_mode_2_layer(vl_api_gbp_vxlan_tunnel_mode_t mode, gbp_vxlan_tunnel_layer_t *l)
Definition: gbp_api.c:1008
vl_api_gbp_bridge_domain_add_t
Definition: gbp.api:42
f
vlib_frame_t * f
Definition: interface_output.c:1098
vl_api_gbp_vxlan_tunnel_add_t_handler
static void vl_api_gbp_vxlan_tunnel_add_t_handler(vl_api_gbp_vxlan_tunnel_add_t *mp)
Definition: gbp_api.c:1026
clib_host_to_net_f64
static f64 clib_host_to_net_f64(f64 x)
Definition: byte_order.h:178
gbp_contract_t_::gc_key
gbp_contract_key_t gc_key
source and destination EPGs
Definition: gbp_contract.h:139
gbp_endpoint_unlock
void gbp_endpoint_unlock(gbp_endpoint_src_t src, index_t gei)
Definition: gbp_endpoint.c:916
vl_api_gbp_vxlan_tunnel_details_t
Definition: gbp.api:422
vl_api_gbp_bridge_domain_details_t
Definition: gbp.api:62
vl_api_gbp_subnet_add_del_t
Definition: gbp.api:271
vl_api_gbp_route_domain_del_t_handler
static void vl_api_gbp_route_domain_del_t_handler(vl_api_gbp_route_domain_del_t *mp)
Definition: gbp_api.c:347
vl_api_gbp_endpoint_group_add_t
Definition: gbp.api:194
gbp_endpoint_group_walk
void gbp_endpoint_group_walk(gbp_endpoint_group_cb_t cb, void *ctx)
Definition: gbp_endpoint_group.c:239
gbp_contract_rule_decode
static int gbp_contract_rule_decode(const vl_api_gbp_rule_t *in, index_t *gui)
Definition: gbp_api.c:852
vl_api_gbp_contract_add_del_t::contract
vl_api_gbp_contract_t contract
Definition: gbp.api:347
gbp_hash_mode_decode
static int gbp_hash_mode_decode(vl_api_gbp_hash_mode_t in, gbp_hash_mode_t *out)
Definition: gbp_api.c:775
vl_api_gbp_endpoint_add_reply_t
Definition: gbp.api:147
vl_api_gbp_endpoint_del_t
Definition: gbp.api:155
vl_api_gbp_subnet_dump_t::client_index
u32 client_index
Definition: gbp.api:283
vl_api_gbp_bridge_domain_dump_t::client_index
u32 client_index
Definition: gbp.api:59
gbp_route_domain_walk
void gbp_route_domain_walk(gbp_route_domain_cb_t cb, void *ctx)
Definition: gbp_route_domain.c:288
gbp_endpoint_flags_encode
static vl_api_gbp_endpoint_flags_t gbp_endpoint_flags_encode(gbp_endpoint_flags_t f)
Definition: gbp_api.c:72
gpb_endpoint_group_t_::gg_sclass
u16 gg_sclass
Sclass.
Definition: gbp_endpoint_group.h:46
vl_api_gbp_ext_itf_details_t::ext_itf
vl_api_gbp_ext_itf_t ext_itf
Definition: gbp.api:463
gbp.h
vl_api_gbp_ext_itf_dump_t
Definition: gbp.api:452
gbp_endpoint_is_remote
int gbp_endpoint_is_remote(const gbp_endpoint_t *ge)
Definition: gbp_endpoint.c:89
gub_subnet_type_from_api
static int gub_subnet_type_from_api(vl_api_gbp_subnet_type_t a, gbp_subnet_type_t *t)
Definition: gbp_api.c:358
u16
unsigned short u16
Definition: types.h:57
gbp_endpoint_get
static gbp_endpoint_t * gbp_endpoint_get(index_t gbpei)
Get the endpoint from a port/interface.
Definition: gbp_endpoint.h:265
gbp_endpoint_group_add_and_lock
int gbp_endpoint_group_add_and_lock(vnid_t vnid, u16 sclass, u32 bd_id, u32 rd_id, u32 uplink_sw_if_index, const gbp_endpoint_retention_t *retention)
Definition: gbp_endpoint_group.c:80
mode
vl_api_tunnel_mode_t mode
Definition: gre.api:48
gpb_endpoint_group_t_::gg_uplink_sw_if_index
u32 gg_uplink_sw_if_index
the uplink interface dedicated to the EPG
Definition: gbp_endpoint_group.h:66
gpb_route_domain_t_
A route Domain Representation.
Definition: gbp_route_domain.h:29
GBP_API_ENDPOINT_FLAG_BOUNCE
@ GBP_API_ENDPOINT_FLAG_BOUNCE
Definition: gbp.api:116
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition: nat44_ei.c:3047
api.h
GBP_SUBNET_STITCHED_INTERNAL
@ GBP_SUBNET_STITCHED_INTERNAL
Definition: gbp_subnet.h:24
gpb_recirc_t_::gr_is_ext
u8 gr_is_ext
Is the interface for packets post-NAT translation (i.e.
Definition: gbp_recirc.h:50
vl_api_gbp_contract_dump_t
Definition: gbp.api:357
gpb_route_domain_t_::grd_id
u32 grd_id
Route-domain ID.
Definition: gbp_route_domain.h:34
vl_api_gbp_endpoint_group_add_t_handler
static void vl_api_gbp_endpoint_group_add_t_handler(vl_api_gbp_endpoint_group_add_t *mp)
Definition: gbp_api.c:252
gbp_endpoint_fwd_t_::gef_flags
gbp_endpoint_flags_t gef_flags
Definition: gbp_endpoint.h:179
vl_api_gbp_ext_itf_details_t
Definition: gbp.api:459
vl_api_gbp_route_domain_details_t::rd
vl_api_gbp_route_domain_t rd
Definition: gbp.api:105
GBP_VXLAN_TUNNEL_MODE_L2
@ GBP_VXLAN_TUNNEL_MODE_L2
Definition: gbp.api:379
nhs
vl_api_gbp_next_hop_t nhs[8]
Definition: gbp.api:313
gpb_ext_itf_t_::gx_flags
u32 gx_flags
The associated flags.
Definition: gbp_ext_itf.h:58
gbp_endpoint_fwd_t_
And endpoints current forwarding state.
Definition: gbp_endpoint.h:157
vl_api_gbp_vxlan_tunnel_add_reply_t::sw_if_index
vl_api_interface_index_t sw_if_index
Definition: gbp.api:404
gbp_walk_ctx_t
struct gbp_walk_ctx_t_ gbp_walk_ctx_t
vl_api_gbp_endpoint_group_details_t::epg
vl_api_gbp_endpoint_group_t epg
Definition: gbp.api:220
gbp_subnet_add
int gbp_subnet_add(u32 rd_id, const fib_prefix_t *pfx, gbp_subnet_type_t type, u32 sw_if_index, sclass_t sclass)
Definition: gbp_subnet.c:255
vl_api_gbp_endpoint_add_t_handler
static void vl_api_gbp_endpoint_add_t_handler(vl_api_gbp_endpoint_add_t *mp)
Definition: gbp_api.c:92
vl_api_gbp_endpoint_add_reply_t::handle
u32 handle
Definition: gbp.api:152
vl_api_gbp_recirc_dump_t::context
u32 context
Definition: gbp.api:243
vl_api_gbp_bridge_domain_details_t::bd
vl_api_gbp_bridge_domain_t bd
Definition: gbp.api:66
allowed_ethertypes
u16 allowed_ethertypes[16]
Definition: gbp.api:336
gbp_bridge_domain_t_::gb_bd_id
u32 gb_bd_id
Bridge-domain ID.
Definition: gbp_bridge_domain.h:47
gbp_bridge_domain_t_::gb_bvi_sw_if_index
u32 gb_bvi_sw_if_index
The BD's BVI interface (obligatory)
Definition: gbp_bridge_domain.h:64
GBP_API_SUBNET_STITCHED_INTERNAL
@ GBP_API_SUBNET_STITCHED_INTERNAL
Definition: gbp.api:256
vl_api_gbp_endpoint_group_del_t
Definition: gbp.api:201
GBP_ENDPOINT_FLAG_NONE
@ GBP_ENDPOINT_FLAG_NONE
Definition: gbp_endpoint.h:44
gbp_bridge_domain_flags_from_api
static gbp_bridge_domain_flags_t gbp_bridge_domain_flags_from_api(vl_api_gbp_bridge_domain_flags_t a)
Definition: gbp_api.c:283
gbp_endpoint_loc_t_::tun
struct gbp_endpoint_loc_t_::@669 tun
Tunnel info for remote endpoints.
GBP_API_ENDPOINT_FLAG_REMOTE
@ GBP_API_ENDPOINT_FLAG_REMOTE
Definition: gbp.api:117
vl_api_gbp_contract_dump_t_handler
static void vl_api_gbp_contract_dump_t_handler(vl_api_gbp_contract_dump_t *mp)
Definition: gbp_api.c:991
gbp_endpoint_loc_t_::gel_src
gbp_endpoint_src_t gel_src
The source providing this location information.
Definition: gbp_endpoint.h:121
gbp_bridge_domain_walk
void gbp_bridge_domain_walk(gbp_bridge_domain_cb_t cb, void *ctx)
Definition: gbp_bridge_domain.c:362
vl_api_gbp_recirc_details_t::recirc
vl_api_gbp_recirc_t recirc
Definition: gbp.api:250
ip_prefix_encode
void ip_prefix_encode(const fib_prefix_t *in, vl_api_prefix_t *out)
Definition: ip_types_api.c:273
gbp_endpoint_flags_t
enum gbp_endpoint_flags_t_ gbp_endpoint_flags_t
vl_api_gbp_endpoint_add_t
Definition: gbp.api:139
gbp_retention_decode
static void gbp_retention_decode(const vl_api_gbp_endpoint_retention_t *in, gbp_endpoint_retention_t *out)
Definition: gbp_api.c:244
gbp_route_domain_add_and_lock
int gbp_route_domain_add_and_lock(u32 rd_id, gbp_scope_t scope, u32 ip4_table_id, u32 ip6_table_id, u32 ip4_uu_sw_if_index, u32 ip6_uu_sw_if_index)
Definition: gbp_route_domain.c:128
gbp_contract_delete
int gbp_contract_delete(gbp_scope_t scope, sclass_t sclass, sclass_t dclass)
Definition: gbp_contract.c:536
vl_api_gbp_bridge_domain_add_t::bd
vl_api_gbp_bridge_domain_t bd
Definition: gbp.api:47
gbp_vxlan_tunnel_layer_2_mode
static vl_api_gbp_vxlan_tunnel_mode_t gbp_vxlan_tunnel_layer_2_mode(gbp_vxlan_tunnel_layer_t layer)
Definition: gbp_api.c:1065
vl_api_gbp_contract_dump_t::context
u32 context
Definition: gbp.api:361
ip_address_decode
ip46_type_t ip_address_decode(const vl_api_address_t *in, ip46_address_t *out)
Decode/Encode for struct/union types.
Definition: ip_types_api.c:172
GBP_SUBNET_STITCHED_EXTERNAL
@ GBP_SUBNET_STITCHED_EXTERNAL
Definition: gbp_subnet.h:25
gpb_recirc_t_
A GBP recirculation interface representation Thes interfaces join Bridge domains that are internal to...
Definition: gbp_recirc.h:29
vl_api_gbp_vxlan_tunnel_dump_t::client_index
u32 client_index
Definition: gbp.api:418
vl_api_gbp_recirc_add_del_t::recirc
vl_api_gbp_recirc_t recirc
Definition: gbp.api:236
ips
vl_api_address_t ips[n_ips]
Definition: gbp.api:136
vl_api_gbp_endpoint_del_t::handle
u32 handle
Definition: gbp.api:160
vl_api_gbp_recirc_dump_t_handler
static void vl_api_gbp_recirc_dump_t_handler(vl_api_gbp_recirc_dump_t *mp)
Definition: gbp_api.c:667
vl_api_gbp_endpoint_details_t
Definition: gbp.api:170
GBP_SUBNET_TRANSPORT
@ GBP_SUBNET_TRANSPORT
Definition: gbp_subnet.h:23
vl_api_gbp_subnet_details_t::subnet
vl_api_gbp_subnet_t subnet
Definition: gbp.api:291
gbp_hash_mode_t
enum gbp_hash_mode_t_ gbp_hash_mode_t
gbp_ext_itf.h
vec_len
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
Definition: vec_bootstrap.h:142
vl_api_gbp_route_domain_add_t::rd
vl_api_gbp_route_domain_t rd
Definition: gbp.api:86
vl_api_gbp_endpoint_dump_t::context
u32 context
Definition: gbp.api:167
vl_api_gbp_route_domain_details_t
Definition: gbp.api:101
GBP_API_HASH_MODE_SYMMETRIC
@ GBP_API_HASH_MODE_SYMMETRIC
Definition: gbp.api:306
gbp_walk_ctx_t_::reg
vl_api_registration_t * reg
Definition: gbp_api.c:164
vl_api_gbp_recirc_add_del_t_handler
static void vl_api_gbp_recirc_add_del_t_handler(vl_api_gbp_recirc_add_del_t *mp)
Definition: gbp_api.c:621
vl_api_gbp_subnet_details_t
Definition: gbp.api:287
gbp_endpoint_group_send_details
static int gbp_endpoint_group_send_details(gbp_endpoint_group_t *gg, void *args)
Definition: gbp_api.c:487
vl_api_gbp_contract_add_del_t_handler
static void vl_api_gbp_contract_add_del_t_handler(vl_api_gbp_contract_add_del_t *mp)
Definition: gbp_api.c:915
GBP_BD_FLAG_UCAST_ARP
@ GBP_BD_FLAG_UCAST_ARP
Definition: gbp_bridge_domain.h:34
vl_api_gbp_recirc_details_t
Definition: gbp.api:246
gbp_contract.h
gbp_vxlan_tunnel_layer_t
enum gbp_vxlan_tunnel_layer_t_ gbp_vxlan_tunnel_layer_t
vl_api_gbp_contract_details_t::context
u32 context
Definition: gbp.api:367
gbp_vxlan.h
gbp_contract_key_t_::gck_scope
gbp_scope_t gck_scope
Definition: gbp_contract.h:54
vl_api_gbp_bridge_domain_dump_t_handler
static void vl_api_gbp_bridge_domain_dump_t_handler(vl_api_gbp_bridge_domain_dump_t *mp)
Definition: gbp_api.c:561
vl_api_gbp_ext_itf_dump_t::context
u32 context
Definition: gbp.api:456
vl_api_gbp_endpoint_group_dump_t::context
u32 context
Definition: gbp.api:213
gbp_endpoint_loc_t_::gel_dst
ip46_address_t gel_dst
Definition: gbp_endpoint.h:150
gbp_main_t::gbp_acl_user_id
u32 gbp_acl_user_id
Definition: gbp.h:44
vl_api_registration_
An API client registration, only in vpp/vlib.
Definition: api_common.h:47
gbp_endpoint_loc_t_
Information about the location of the endpoint provided by a source of endpoints.
Definition: gbp_endpoint.h:116
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_gbp_endpoint_details_t::age
f64 age
Definition: gbp.api:174
gpb_route_domain_t_::grd_uu_sw_if_index
u32 grd_uu_sw_if_index[FIB_PROTOCOL_IP_MAX]
The interfaces on which to send packets to unnknown EPs.
Definition: gbp_route_domain.h:42
vl_api_gbp_endpoint_group_del_t::sclass
u16 sclass
Definition: gbp.api:206
GBP_API_ENDPOINT_FLAG_EXTERNAL
@ GBP_API_ENDPOINT_FLAG_EXTERNAL
Definition: gbp.api:119
vl_api_gbp_ext_itf_add_del_t_handler
static void vl_api_gbp_ext_itf_add_del_t_handler(vl_api_gbp_ext_itf_add_del_t *mp)
Definition: gbp_api.c:684
index_t
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
Definition: dpo.h:43
ip_prefix_decode
void ip_prefix_decode(const vl_api_prefix_t *in, fib_prefix_t *out)
Definition: ip_types_api.c:245
msg_id_base
static u16 msg_id_base
Definition: gbp_api.c:48
vec_foreach_index
#define vec_foreach_index(var, v)
Iterate over vector indices.
Definition: vec_bootstrap.h:220
gbp_recirc_delete
int gbp_recirc_delete(u32 sw_if_index)
Definition: gbp_recirc.c:175
gbp_itf_get_sw_if_index
u32 gbp_itf_get_sw_if_index(gbp_itf_hdl_t hdl)
Definition: gbp_itf.c:150
GBP_ENDPOINT_FLAG_BOUNCE
@ GBP_ENDPOINT_FLAG_BOUNCE
Definition: gbp_endpoint.h:45
gbp_route_domain_send_details
static int gbp_route_domain_send_details(gbp_route_domain_t *grd, void *args)
Definition: gbp_api.c:578
gpb_endpoint_group_t_
An Endpoint Group representation.
Definition: gbp_endpoint_group.h:36
vl_api_gbp_route_domain_dump_t_handler
static void vl_api_gbp_route_domain_dump_t_handler(vl_api_gbp_route_domain_dump_t *mp)
Definition: gbp_api.c:604
gpb_ext_itf_t_::gx_rd
index_t gx_rd
The RD this external interface is a member of.
Definition: gbp_ext_itf.h:48
interface.h
gbp_subnet_del
int gbp_subnet_del(u32 rd_id, const fib_prefix_t *pfx)
Definition: gbp_subnet.c:230
vl_api_gbp_contract_dump_t::client_index
u32 client_index
Definition: gbp.api:360
vl_api_gbp_endpoint_dump_t_handler
static void vl_api_gbp_endpoint_dump_t_handler(vl_api_gbp_endpoint_dump_t *mp)
Definition: gbp_api.c:227
gbp_contract_key_t_::gck_src
sclass_t gck_src
source and destination EPGs for which the ACL applies
Definition: gbp_contract.h:58
gbp_itf.h
retention
vl_api_gbp_endpoint_retention_t retention
Definition: gbp.api:191
GBP_ENDPOINT_FLAG_EXTERNAL
@ GBP_ENDPOINT_FLAG_EXTERNAL
Definition: gbp_endpoint.h:48
vec_validate
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
Definition: vec.h:523
vl_api_gbp_route_domain_add_t
Definition: gbp.api:81
gbp_endpoint_fwd_t_::gef_itf
gbp_itf_hdl_t gef_itf
The interface on which the EP is connected.
Definition: gbp_endpoint.h:162
vl_api_gbp_ext_itf_dump_t_handler
static void vl_api_gbp_ext_itf_dump_t_handler(vl_api_gbp_ext_itf_dump_t *mp)
Definition: gbp_api.c:736
gub_subnet_type_to_api
static vl_api_gbp_subnet_type_t gub_subnet_type_to_api(gbp_subnet_type_t t)
Definition: gbp_api.c:412
src
vl_api_address_t src
Definition: gre.api:54
vl_api_gbp_endpoint_dump_t::client_index
u32 client_index
Definition: gbp.api:166
vl_api_gbp_vxlan_tunnel_details_t::tunnel
vl_api_gbp_vxlan_tunnel_t tunnel
Definition: gbp.api:426
ge
u8 ge
Definition: ip_types.api:160
gbp_vxlan_tunnel_t_::gt_vni
u32 gt_vni
Definition: gbp_vxlan.h:43
GBP_SUBNET_ANON_L3_OUT
@ GBP_SUBNET_ANON_L3_OUT
Definition: gbp_subnet.h:27
vl_api_gbp_bridge_domain_dump_t::context
u32 context
Definition: gbp.api:60
sclass
u16 sclass
Definition: gbp.api:131
ip4_address_t
Definition: ip4_packet.h:50
vl_api_gbp_contract_add_del_reply_t
Definition: gbp.api:349
FIB_PROTOCOL_IP4
@ FIB_PROTOCOL_IP4
Definition: fib_types.h:36
gbp_vxlan_tunnel_t_::gt_layer
gbp_vxlan_tunnel_layer_t gt_layer
Definition: gbp_vxlan.h:49
vl_api_gbp_ext_itf_add_del_t::is_add
bool is_add
Definition: gbp.api:448
gbp_walk_ctx_t_::context
u32 context
Definition: gbp_api.c:165
gbp_subnet_type_t
enum gbp_subnet_type_t_ gbp_subnet_type_t
gbp_ext_itf_delete
int gbp_ext_itf_delete(u32 sw_if_index)
Definition: gbp_ext_itf.c:122
gbp_bridge_domain_t_::gb_bm_flood_itf
gbp_itf_hdl_t gb_bm_flood_itf
The BD's interface to sned Broadcast and multicast packets.
Definition: gbp_bridge_domain.h:74
gbp_bridge_domain.h
GBP_API_SUBNET_STITCHED_EXTERNAL
@ GBP_API_SUBNET_STITCHED_EXTERNAL
Definition: gbp.api:257
vl_api_gbp_recirc_add_del_t
Definition: gbp.api:230
vl_api_gbp_contract_add_del_reply_t::stats_index
u32 stats_index
Definition: gbp.api:354
vl_api_gbp_subnet_dump_t_handler
static void vl_api_gbp_subnet_dump_t_handler(vl_api_gbp_subnet_dump_t *mp)
Definition: gbp_api.c:470
GBP_API_RULE_PERMIT
@ GBP_API_RULE_PERMIT
Definition: gbp.api:318
gbp_subnet_send_details
static walk_rc_t gbp_subnet_send_details(u32 rd_id, const fib_prefix_t *pfx, gbp_subnet_type_t type, u32 sw_if_index, sclass_t sclass, void *args)
Definition: gbp_api.c:441
gbp_recirc_send_details
static walk_rc_t gbp_recirc_send_details(gbp_recirc_t *gr, void *args)
Definition: gbp_api.c:643
BAD_SW_IF_INDEX_LABEL
#define BAD_SW_IF_INDEX_LABEL
Definition: api_helper_macros.h:289
plugin.h
gbp_next_hop_decode
static int gbp_next_hop_decode(const vl_api_gbp_next_hop_t *in, index_t *gnhi)
Definition: gbp_api.c:796
vl_api_gbp_ext_itf_add_del_t::ext_itf
vl_api_gbp_ext_itf_t ext_itf
Definition: gbp.api:449
vnet_sw_if_index_is_api_valid
static uword vnet_sw_if_index_is_api_valid(u32 sw_if_index)
Definition: api_helper_macros.h:276
gbp_endpoint_send_details
static walk_rc_t gbp_endpoint_send_details(index_t gei, void *args)
Definition: gbp_api.c:169
gbp_vxlan_tunnel_t_
GBP VXLAN (template) tunnel.
Definition: gbp_vxlan.h:39
gbp_route_domain_delete
int gbp_route_domain_delete(u32 rd_id)
Definition: gbp_route_domain.c:256
vl_api_gbp_endpoint_details_t::handle
u32 handle
Definition: gbp.api:175
vl_api_gbp_route_domain_dump_t::client_index
u32 client_index
Definition: gbp.api:98
gbp_endpoint_loc_t_::gel_parent_sw_if_index
u32 gel_parent_sw_if_index
Definition: gbp_endpoint.h:148
vl_api_gbp_ext_itf_dump_t::client_index
u32 client_index
Definition: gbp.api:455
vec_free
#define vec_free(V)
Free vector's memory (no header).
Definition: vec.h:395
gbp_bridge_domain_add_and_lock
int gbp_bridge_domain_add_and_lock(u32 bd_id, u32 rd_id, gbp_bridge_domain_flags_t flags, u32 bvi_sw_if_index, u32 uu_fwd_sw_if_index, u32 bm_flood_sw_if_index)
Definition: gbp_bridge_domain.c:180
rd_id
u32 rd_id
Definition: gbp.api:35
gbp_contract_update
int gbp_contract_update(gbp_scope_t scope, sclass_t sclass, sclass_t dclass, u32 acl_index, index_t *rules, u16 *allowed_ethertypes, u32 *stats_index)
Definition: gbp_contract.c:465
gpb_ext_itf_t_::gx_bd
index_t gx_bd
The BD this external interface is a member of.
Definition: gbp_ext_itf.h:43
vl_api_gbp_endpoint_group_dump_t
Definition: gbp.api:209
gbp_rule_action_t
enum gbp_rule_action_t_ gbp_rule_action_t
vl_api_gbp_vxlan_tunnel_add_t::tunnel
vl_api_gbp_vxlan_tunnel_t tunnel
Definition: gbp.api:396
vl_api_gbp_endpoint_add_t::endpoint
vl_api_gbp_endpoint_t endpoint
Definition: gbp.api:144
sclass_t
u16 sclass_t
Definition: gbp_types.h:25
GBP_BD_API_FLAG_UU_FWD_DROP
@ GBP_BD_API_FLAG_UU_FWD_DROP
Definition: gbp.api:27
vl_api_gbp_contract_details_t
Definition: gbp.api:364
mac_address_encode
void mac_address_encode(const mac_address_t *in, u8 *out)
Definition: ethernet_types_api.c:26
format_fns.h
gbp_endpoint_update_and_lock
int gbp_endpoint_update_and_lock(gbp_endpoint_src_t src, u32 sw_if_index, const ip46_address_t *ips, const mac_address_t *mac, index_t gbdi, index_t grdi, sclass_t sclass, gbp_endpoint_flags_t flags, const ip46_address_t *tun_src, const ip46_address_t *tun_dst, u32 *handle)
Definition: gbp_endpoint.c:820
GBP_SUBNET_L3_OUT
@ GBP_SUBNET_L3_OUT
Definition: gbp_subnet.h:26
gbp_endpoint_group_get_bd_id
u32 gbp_endpoint_group_get_bd_id(const gbp_endpoint_group_t *gg)
Definition: gbp_endpoint_group.c:218
vl_api_gbp_recirc_dump_t::client_index
u32 client_index
Definition: gbp.api:242
vl_api_gbp_endpoint_group_dump_t::client_index
u32 client_index
Definition: gbp.api:212
u32
unsigned int u32
Definition: types.h:88
vl_api_gbp_vxlan_tunnel_dump_t
Definition: gbp.api:415
vl_api_gbp_subnet_details_t::context
u32 context
Definition: gbp.api:290
FIB_PROTOCOL_IP6
@ FIB_PROTOCOL_IP6
Definition: fib_types.h:37
ethernet_types_api.h
ctx
long ctx[MAX_CONNS]
Definition: main.c:144
vl_api_gbp_ext_itf_add_del_t
Definition: gbp.api:443
vl_api_gbp_contract_details_t::contract
vl_api_gbp_contract_t contract
Definition: gbp.api:368
GBP_BD_FLAG_MCAST_DROP
@ GBP_BD_FLAG_MCAST_DROP
Definition: gbp_bridge_domain.h:33
rules
vl_api_gbp_rule_t rules[n_rules]
Definition: gbp.api:338
gbp_endpoint_walk
void gbp_endpoint_walk(gbp_endpoint_cb_t cb, void *ctx)
Definition: gbp_endpoint.c:1061
api_helper_macros.h
vec_foreach
#define vec_foreach(var, vec)
Vector iterator.
Definition: vec_bootstrap.h:213
gbp_route_domain_get
gbp_route_domain_t * gbp_route_domain_get(index_t i)
Definition: gbp_route_domain.c:72
GBP_MSG_BASE
#define GBP_MSG_BASE
Definition: gbp_api.c:50
gbp_walk_ctx_t_
Definition: gbp_api.c:162
GBP_BD_FLAG_UU_FWD_DROP
@ GBP_BD_FLAG_UU_FWD_DROP
Definition: gbp_bridge_domain.h:32
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
gbp_bridge_domain_find_and_lock
index_t gbp_bridge_domain_find_and_lock(u32 bd_id)
Definition: gbp_bridge_domain.c:91
vl_api_gbp_route_domain_del_t
Definition: gbp.api:88
gbp_bridge_domain_t_
A bridge Domain Representation.
Definition: gbp_bridge_domain.h:42
gbp_route_domain_find_and_lock
index_t gbp_route_domain_find_and_lock(u32 rd_id)
Definition: gbp_route_domain.c:100
vl_api_gbp_bridge_domain_del_t
Definition: gbp.api:49
mac_address_t_
Definition: mac_address.h:21
GBP_BD_API_FLAG_UCAST_ARP
@ GBP_BD_API_FLAG_UCAST_ARP
Definition: gbp.api:29
vl_api_gbp_subnet_dump_t
Definition: gbp.api:280
VLIB_API_INIT_FUNCTION
VLIB_API_INIT_FUNCTION(gbp_init)
gbp_rule_alloc
index_t gbp_rule_alloc(gbp_rule_action_t action, gbp_hash_mode_t hash_mode, index_t *nhs)
Definition: gbp_contract.c:62
vl_api_gbp_route_domain_del_t::rd_id
u32 rd_id
Definition: gbp.api:93
clib_memset
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
vlib_main_t
Definition: main.h:102
GBP_BD_API_FLAG_MCAST_DROP
@ GBP_BD_API_FLAG_MCAST_DROP
Definition: gbp.api:28
vl_api_gbp_endpoint_details_t::endpoint
vl_api_gbp_endpoint_t endpoint
Definition: gbp.api:176
gbp_bridge_domain_t_::gb_uu_fwd_sw_if_index
u32 gb_uu_fwd_sw_if_index
The BD's MAC spine-proxy interface (optional)
Definition: gbp_bridge_domain.h:69
ip_address_encode
void ip_address_encode(const ip46_address_t *in, ip46_type_t type, vl_api_address_t *out)
Definition: ip_types_api.c:206
vl_api_gbp_route_domain_dump_t
Definition: gbp.api:95
vlib_get_main
static vlib_main_t * vlib_get_main(void)
Definition: global_funcs.h:38
gbp_endpoint_retention_t_
Endpoint Retnetion Policy.
Definition: gbp_endpoint_group.h:27
u8
unsigned char u8
Definition: types.h:56
clib_error_t
Definition: clib_error.h:21
a
a
Definition: bitmap.h:525
gbp_vxlan_tunnel_send_details
static walk_rc_t gbp_vxlan_tunnel_send_details(gbp_vxlan_tunnel_t *gt, void *args)
Definition: gbp_api.c:1084
vl_api_gbp_route_domain_dump_t::context
u32 context
Definition: gbp.api:99
gpb_endpoint_group_t_::gg_rd
index_t gg_rd
route-domain/IP-table ID the EPG is in
Definition: gbp_endpoint_group.h:56
vl_api_gbp_subnet_add_del_t_handler
static void vl_api_gbp_subnet_add_del_t_handler(vl_api_gbp_subnet_add_del_t *mp)
Definition: gbp_api.c:385
gbp_contract_walk
void gbp_contract_walk(gbp_contract_cb_t cb, void *ctx)
Definition: gbp_contract.c:565
ip
vl_api_address_t ip
Definition: l2.api:558
gpb_recirc_t_::gr_sw_if_index
u32 gr_sw_if_index
Definition: gbp_recirc.h:54
vl_api_gbp_bridge_domain_del_t::bd_id
u32 bd_id
Definition: gbp.api:54
gbp_bridge_domain_delete
int gbp_bridge_domain_delete(u32 bd_id)
Definition: gbp_bridge_domain.c:343
vl_api_gbp_contract_add_del_t
Definition: gbp.api:341
gbp_contract_t_
A Group Based Policy Contract.
Definition: gbp_contract.h:134
vl_api_gbp_ext_itf_details_t::context
u32 context
Definition: gbp.api:462
vl_api_gbp_route_domain_details_t::context
u32 context
Definition: gbp.api:104
GBP_API_RULE_DENY
@ GBP_API_RULE_DENY
Definition: gbp.api:319
vl_api_gbp_recirc_dump_t
Definition: gbp.api:239
gbp_contract_send_details
static int gbp_contract_send_details(gbp_contract_t *gbpc, void *args)
Definition: gbp_api.c:966
gpb_ext_itf_t_::gx_itf
gbp_itf_hdl_t gx_itf
The interface.
Definition: gbp_ext_itf.h:38
VLIB_PLUGIN_REGISTER
VLIB_PLUGIN_REGISTER()
GBP_BD_FLAG_NONE
@ GBP_BD_FLAG_NONE
Definition: gbp_bridge_domain.h:30
gbp_bridge_domain_flags_t
enum gbp_bridge_domain_flags_t_ gbp_bridge_domain_flags_t
Bridge Domain Flags.
gbp_init
static clib_error_t * gbp_init(vlib_main_t *vm)
Definition: gbp_api.c:1126
gpb_ext_itf_t_
An external interface maps directly to an oflex L3ExternalInterface.
Definition: gbp_ext_itf.h:33
gbp_vxlan_tunnel_add
int gbp_vxlan_tunnel_add(u32 vni, gbp_vxlan_tunnel_layer_t layer, u32 bd_rd_id, const ip4_address_t *src, u32 *sw_if_indexp)
Definition: gbp_vxlan.c:439
n_rules
u8 n_rules
Definition: gbp.api:337
gbp_main
gbp_main_t gbp_main
Definition: gbp_api.c:46
rv
int __clib_unused rv
Definition: application.c:491
gbp_recirc_walk
void gbp_recirc_walk(gbp_recirc_cb_t cb, void *ctx)
Definition: gbp_recirc.c:225
gbp_route_domain.h
IP46_TYPE_ANY
@ IP46_TYPE_ANY
Definition: ip46_address.h:24
gbp_contract_key_t_::gck_dst
sclass_t gck_dst
Definition: gbp_contract.h:59
gbp_endpoint_t_
A Group Based Policy Endpoint.
Definition: gbp_endpoint.h:190
vl_api_gbp_vxlan_tunnel_dump_t_handler
static void vl_api_gbp_vxlan_tunnel_dump_t_handler(vl_api_gbp_vxlan_tunnel_dump_t *mp)
Definition: gbp_api.c:1108
vlib_time_now
static f64 vlib_time_now(vlib_main_t *vm)
Definition: main.h:327
vl_api_gbp_endpoint_group_dump_t_handler
static void vl_api_gbp_endpoint_group_dump_t_handler(vl_api_gbp_endpoint_group_dump_t *mp)
Definition: gbp_api.c:513
vnet.h
api_errno.h
gbp_next_hop_alloc
index_t gbp_next_hop_alloc(const ip46_address_t *ip, index_t grd, const mac_address_t *mac, index_t gbd)
Definition: gbp_contract.c:83
vl_api_gbp_bridge_domain_details_t::context
u32 context
Definition: gbp.api:65
vl_api_gbp_contract_add_del_t::is_add
bool is_add
Definition: gbp.api:346
gbp_contract_rules_decode
static int gbp_contract_rules_decode(u8 n_rules, const vl_api_gbp_rule_t *rules, index_t **out)
Definition: gbp_api.c:882
GBP_VXLAN_TUNNEL_MODE_L3
@ GBP_VXLAN_TUNNEL_MODE_L3
Definition: gbp.api:380
vl_api_gbp_vxlan_tunnel_details_t::context
u32 context
Definition: gbp.api:425
gbp_endpoint_retention_t_::remote_ep_timeout
u32 remote_ep_timeout
Aging timeout for remote endpoints.
Definition: gbp_endpoint_group.h:30
gbp_endpoint_flags_decode
static gbp_endpoint_flags_t gbp_endpoint_flags_decode(vl_api_gbp_endpoint_flags_t v)
Definition: gbp_api.c:53
INDEX_INVALID
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
Definition: dpo.h:49
action
vl_api_mac_event_action_t action
Definition: l2.api:211
vl_api_gbp_endpoint_details_t::context
u32 context
Definition: gbp.api:173
sw_if_index
vl_api_interface_index_t sw_if_index
Definition: wireguard.api:34
gbp_main_t
Group Base Policy (GBP) defines:
Definition: gbp.h:42
gbp_vxlan_walk
void gbp_vxlan_walk(gbp_vxlan_cb_t cb, void *ctx)
Definition: gbp_vxlan.c:304
ip_types_api.h
vl_api_gbp_recirc_details_t::context
u32 context
Definition: gbp.api:249
vl_api_gbp_endpoint_group_details_t
Definition: gbp.api:216
walk_rc_t
enum walk_rc_t_ walk_rc_t
Walk return code.
vl_api_gbp_subnet_dump_t::context
u32 context
Definition: gbp.api:284
vl_api_gbp_vxlan_tunnel_add_t
Definition: gbp.api:391
WALK_STOP
@ WALK_STOP
Definition: interface_funcs.h:173
fib_prefix_t_
Aggregate type for a prefix.
Definition: fib_types.h:202
type
vl_api_fib_path_type_t type
Definition: fib_types.api:123
gbp_vxlan_tunnel_del
int gbp_vxlan_tunnel_del(u32 vni)
Definition: gbp_vxlan.c:550
GBP_API_SUBNET_TRANSPORT
@ GBP_API_SUBNET_TRANSPORT
Definition: gbp.api:255
vl_api_gbp_endpoint_dump_t
Definition: gbp.api:163
GBP_BD_API_FLAG_DO_NOT_LEARN
@ GBP_BD_API_FLAG_DO_NOT_LEARN
Definition: gbp.api:26
vl_api_gbp_endpoint_del_t_handler
static void vl_api_gbp_endpoint_del_t_handler(vl_api_gbp_endpoint_del_t *mp)
Definition: gbp_api.c:152
vl_api_gbp_vxlan_tunnel_add_reply_t
Definition: gbp.api:399
gbp_route_domain_get_rd_id
u32 gbp_route_domain_get_rd_id(index_t grdi)
Definition: gbp_route_domain.c:236
vl_api_gbp_route_domain_add_t_handler
static void vl_api_gbp_route_domain_add_t_handler(vl_api_gbp_route_domain_add_t *mp)
Definition: gbp_api.c:331
vl_msg_api_alloc
void * vl_msg_api_alloc(int nbytes)
Definition: memory_shared.c:199
gbp_vxlan_tunnel_t_::gt_bd_rd_id
u32 gt_bd_rd_id
The BD or RD value (depending on the layer) that the tunnel is bound to.
Definition: gbp_vxlan.h:48
vl_api_gbp_subnet_add_del_t::subnet
vl_api_gbp_subnet_t subnet
Definition: gbp.api:277
vl_api_gbp_endpoint_group_add_t::epg
vl_api_gbp_endpoint_group_t epg
Definition: gbp.api:199