FD.io VPP  v18.10-34-gcce845e
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 
29 #include <vlibapi/api.h>
30 #include <vlibmemory/api.h>
31 
32 /* define message IDs */
33 #include <gbp/gbp_msg_enum.h>
34 
35 #define vl_typedefs /* define message structures */
36 #include <gbp/gbp_all_api_h.h>
37 #undef vl_typedefs
38 
39 #define vl_endianfun /* define message structures */
40 #include <gbp/gbp_all_api_h.h>
41 #undef vl_endianfun
42 
43 /* instantiate all the print functions we know about */
44 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
45 #define vl_printfun
46 #include <gbp/gbp_all_api_h.h>
47 #undef vl_printfun
48 
49 /* Get the API version number */
50 #define vl_api_version(n,v) static u32 api_version=(v);
51 #include <gbp/gbp_all_api_h.h>
52 #undef vl_api_version
53 
55 
56 #define foreach_gbp_api_msg \
57  _(GBP_ENDPOINT_ADD, gbp_endpoint_add) \
58  _(GBP_ENDPOINT_DEL, gbp_endpoint_del) \
59  _(GBP_ENDPOINT_DUMP, gbp_endpoint_dump) \
60  _(GBP_SUBNET_ADD_DEL, gbp_subnet_add_del) \
61  _(GBP_SUBNET_DUMP, gbp_subnet_dump) \
62  _(GBP_ENDPOINT_GROUP_ADD_DEL, gbp_endpoint_group_add_del) \
63  _(GBP_ENDPOINT_GROUP_DUMP, gbp_endpoint_group_dump) \
64  _(GBP_RECIRC_ADD_DEL, gbp_recirc_add_del) \
65  _(GBP_RECIRC_DUMP, gbp_recirc_dump) \
66  _(GBP_CONTRACT_ADD_DEL, gbp_contract_add_del) \
67  _(GBP_CONTRACT_DUMP, gbp_contract_dump)
68 
70 
72 
73 #define GBP_MSG_BASE msg_id_base
74 
75 static void
77 {
79  u32 sw_if_index, handle;
80  ip46_address_t *ips;
82  int rv = 0, ii;
83 
85 
86  sw_if_index = ntohl (mp->endpoint.sw_if_index);
87 
88  ips = NULL;
89 
90  if (mp->endpoint.n_ips)
91  {
92  vec_validate (ips, mp->endpoint.n_ips - 1);
93 
94  vec_foreach_index (ii, ips)
95  {
96  ip_address_decode (&mp->endpoint.ips[ii], &ips[ii]);
97  }
98  }
99  mac_address_decode (&mp->endpoint.mac, &mac);
100 
101  rv = gbp_endpoint_update (sw_if_index, ips, &mac,
102  ntohs (mp->endpoint.epg_id), &handle);
103 
104  vec_free (ips);
105 
107 
108  /* *INDENT-OFF* */
109  REPLY_MACRO2 (VL_API_GBP_ENDPOINT_ADD_REPLY + GBP_MSG_BASE,
110  ({
111  rmp->handle = htonl (handle);
112  }));
113  /* *INDENT-ON* */
114 }
115 
116 static void
118 {
119  vl_api_gbp_endpoint_del_reply_t *rmp;
120  int rv = 0;
121 
122  gbp_endpoint_delete (ntohl (mp->handle));
123 
124  REPLY_MACRO (VL_API_GBP_ENDPOINT_DEL_REPLY + GBP_MSG_BASE);
125 }
126 
127 typedef struct gbp_walk_ctx_t_
128 {
132 
133 static walk_rc_t
135 {
138  u8 n_ips, ii;
139 
140  ctx = args;
141  n_ips = vec_len (gbpe->ge_ips);
142  mp = vl_msg_api_alloc (sizeof (*mp) + (sizeof (*mp->endpoint.ips) * n_ips));
143  if (!mp)
144  return 1;
145 
146  memset (mp, 0, sizeof (*mp));
147  mp->_vl_msg_id = ntohs (VL_API_GBP_ENDPOINT_DETAILS + GBP_MSG_BASE);
148  mp->context = ctx->context;
149 
150  mp->endpoint.sw_if_index = ntohl (gbpe->ge_sw_if_index);
151  mp->endpoint.epg_id = ntohs (gbpe->ge_epg_id);
152  mp->endpoint.n_ips = n_ips;
153  mac_address_encode (&gbpe->ge_mac, &mp->endpoint.mac);
154 
155  vec_foreach_index (ii, gbpe->ge_ips)
156  {
158  &mp->endpoint.ips[ii]);
159  }
160 
161  vl_api_send_msg (ctx->reg, (u8 *) mp);
162 
163  return (WALK_CONTINUE);
164 }
165 
166 static void
168 {
170 
172  if (!reg)
173  return;
174 
175  gbp_walk_ctx_t ctx = {
176  .reg = reg,
177  .context = mp->context,
178  };
179 
181 }
182 
183 static void
186 {
187  vl_api_gbp_endpoint_group_add_del_reply_t *rmp;
188  u32 uplink_sw_if_index;
189  int rv = 0;
190 
191  uplink_sw_if_index = ntohl (mp->epg.uplink_sw_if_index);
192  if (!vnet_sw_if_index_is_api_valid (uplink_sw_if_index))
193  goto bad_sw_if_index;
194 
195  if (mp->is_add)
196  {
197  rv = gbp_endpoint_group_add (ntohs (mp->epg.epg_id),
198  ntohl (mp->epg.bd_id),
199  ntohl (mp->epg.ip4_table_id),
200  ntohl (mp->epg.ip6_table_id),
201  uplink_sw_if_index);
202  }
203  else
204  {
205  gbp_endpoint_group_delete (ntohs (mp->epg.epg_id));
206  }
207 
209 
210  REPLY_MACRO (VL_API_GBP_ENDPOINT_GROUP_ADD_DEL_REPLY + GBP_MSG_BASE);
211 }
212 
213 static void
215 {
216  vl_api_gbp_subnet_add_del_reply_t *rmp;
217  fib_prefix_t pfx;
218  int rv = 0;
219 
220  ip_prefix_decode (&mp->subnet.prefix, &pfx);
221 
222  rv = gbp_subnet_add_del (ntohl (mp->subnet.table_id),
223  &pfx,
224  ntohl (mp->subnet.sw_if_index),
225  ntohs (mp->subnet.epg_id),
226  mp->is_add, mp->subnet.is_internal);
227 
228  REPLY_MACRO (VL_API_GBP_SUBNET_ADD_DEL_REPLY + GBP_MSG_BASE);
229 }
230 
231 static int
233  const fib_prefix_t * pfx,
235  epg_id_t epg, u8 is_internal, void *args)
236 {
239 
240  ctx = args;
241  mp = vl_msg_api_alloc (sizeof (*mp));
242  if (!mp)
243  return 1;
244 
245  memset (mp, 0, sizeof (*mp));
246  mp->_vl_msg_id = ntohs (VL_API_GBP_SUBNET_DETAILS + GBP_MSG_BASE);
247  mp->context = ctx->context;
248 
249  mp->subnet.is_internal = is_internal;
250  mp->subnet.sw_if_index = ntohl (sw_if_index);
251  mp->subnet.epg_id = ntohs (epg);
252  mp->subnet.table_id = ntohl (table_id);
253  ip_prefix_encode (pfx, &mp->subnet.prefix);
254 
255  vl_api_send_msg (ctx->reg, (u8 *) mp);
256 
257  return (1);
258 }
259 
260 static void
262 {
264 
266  if (!reg)
267  return;
268 
269  gbp_walk_ctx_t ctx = {
270  .reg = reg,
271  .context = mp->context,
272  };
273 
275 }
276 
277 static int
279 {
282 
283  ctx = args;
284  mp = vl_msg_api_alloc (sizeof (*mp));
285  if (!mp)
286  return 1;
287 
288  memset (mp, 0, sizeof (*mp));
289  mp->_vl_msg_id = ntohs (VL_API_GBP_ENDPOINT_GROUP_DETAILS + GBP_MSG_BASE);
290  mp->context = ctx->context;
291 
292  mp->epg.uplink_sw_if_index = ntohl (gepg->gepg_uplink_sw_if_index);
293  mp->epg.epg_id = ntohs (gepg->gepg_id);
294  mp->epg.bd_id = ntohl (gepg->gepg_bd);
295  mp->epg.ip4_table_id = ntohl (gepg->gepg_rd[FIB_PROTOCOL_IP4]);
296  mp->epg.ip6_table_id = ntohl (gepg->gepg_rd[FIB_PROTOCOL_IP6]);
297 
298  vl_api_send_msg (ctx->reg, (u8 *) mp);
299 
300  return (1);
301 }
302 
303 static void
305  mp)
306 {
308 
310  if (!reg)
311  return;
312 
313  gbp_walk_ctx_t ctx = {
314  .reg = reg,
315  .context = mp->context,
316  };
317 
319 }
320 
321 static void
323 {
324  vl_api_gbp_recirc_add_del_reply_t *rmp;
326  int rv = 0;
327 
328  sw_if_index = ntohl (mp->recirc.sw_if_index);
329  if (!vnet_sw_if_index_is_api_valid (sw_if_index))
330  goto bad_sw_if_index;
331 
332  if (mp->is_add)
333  gbp_recirc_add (sw_if_index,
334  ntohs (mp->recirc.epg_id), mp->recirc.is_ext);
335  else
336  gbp_recirc_delete (sw_if_index);
337 
339 
340  REPLY_MACRO (VL_API_GBP_RECIRC_ADD_DEL_REPLY + GBP_MSG_BASE);
341 }
342 
343 static int
345 {
348 
349  ctx = args;
350  mp = vl_msg_api_alloc (sizeof (*mp));
351  if (!mp)
352  return 1;
353 
354  memset (mp, 0, sizeof (*mp));
355  mp->_vl_msg_id = ntohs (VL_API_GBP_RECIRC_DETAILS + GBP_MSG_BASE);
356  mp->context = ctx->context;
357 
358  mp->recirc.epg_id = ntohs (gr->gr_epg);
359  mp->recirc.sw_if_index = ntohl (gr->gr_sw_if_index);
360  mp->recirc.is_ext = ntohl (gr->gr_is_ext);
361 
362  vl_api_send_msg (ctx->reg, (u8 *) mp);
363 
364  return (1);
365 }
366 
367 static void
369 {
371 
373  if (!reg)
374  return;
375 
376  gbp_walk_ctx_t ctx = {
377  .reg = reg,
378  .context = mp->context,
379  };
380 
382 }
383 
384 static void
386 {
387  vl_api_gbp_contract_add_del_reply_t *rmp;
388  int rv = 0;
389 
390  if (mp->is_add)
391  gbp_contract_update (ntohs (mp->contract.src_epg),
392  ntohs (mp->contract.dst_epg),
393  ntohl (mp->contract.acl_index));
394  else
395  gbp_contract_delete (ntohs (mp->contract.src_epg),
396  ntohs (mp->contract.dst_epg));
397 
398  REPLY_MACRO (VL_API_GBP_CONTRACT_ADD_DEL_REPLY + GBP_MSG_BASE);
399 }
400 
401 static int
403 {
406 
407  ctx = args;
408  mp = vl_msg_api_alloc (sizeof (*mp));
409  if (!mp)
410  return 1;
411 
412  memset (mp, 0, sizeof (*mp));
413  mp->_vl_msg_id = ntohs (VL_API_GBP_CONTRACT_DETAILS + GBP_MSG_BASE);
414  mp->context = ctx->context;
415 
416  mp->contract.src_epg = ntohs (gbpc->gc_key.gck_src);
417  mp->contract.dst_epg = ntohs (gbpc->gc_key.gck_dst);
418  mp->contract.acl_index = ntohl (gbpc->gc_value.gc_acl_index);
419 
420  vl_api_send_msg (ctx->reg, (u8 *) mp);
421 
422  return (1);
423 }
424 
425 static void
427 {
429 
431  if (!reg)
432  return;
433 
434  gbp_walk_ctx_t ctx = {
435  .reg = reg,
436  .context = mp->context,
437  };
438 
440 }
441 
442 /*
443  * gbp_api_hookup
444  * Add vpe's API message handlers to the table.
445  * vlib has already mapped shared memory and
446  * added the client registration handlers.
447  * See .../vlib-api/vlibmemory/memclnt_vlib.c:memclnt_process()
448  */
449 #define vl_msg_name_crc_list
450 #include <gbp/gbp_all_api_h.h>
451 #undef vl_msg_name_crc_list
452 
453 static void
455 {
456 #define _(id,n,crc) \
457  vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id + GBP_MSG_BASE);
458  foreach_vl_msg_name_crc_gbp;
459 #undef _
460 }
461 
462 static void
464 {
465 #define _(N,n) \
466  vl_msg_api_set_handlers(VL_API_##N + GBP_MSG_BASE, \
467  #n, \
468  vl_api_##n##_t_handler, \
469  vl_noop_handler, \
470  vl_api_##n##_t_endian, \
471  vl_api_##n##_t_print, \
472  sizeof(vl_api_##n##_t), 1);
474 #undef _
475 }
476 
477 static clib_error_t *
479 {
480  api_main_t *am = &api_main;
481  gbp_main_t *gbpm = &gbp_main;
482  u8 *name = format (0, "gbp_%08x%c", api_version, 0);
483 
484  gbpm->gbp_acl_user_id = ~0;
485 
486  /* Ask for a correctly-sized block of API message decode slots */
487  msg_id_base = vl_msg_api_get_msg_ids ((char *) name,
489  gbp_api_hookup (vm);
490 
491  /* Add our API messages to the global name_crc hash table */
493 
494  vec_free (name);
495  return (NULL);
496 }
497 
499 
500 /* *INDENT-OFF* */
502  .version = VPP_BUILD_VER,
503  .description = "Group Based Policy",
504 };
505 /* *INDENT-ON* */
506 
507 
508 /*
509  * fd.io coding-style-patch-verification: ON
510  *
511  * Local Variables:
512  * eval: (c-set-style "gnu")
513  * End:
514  */
u32 ge_sw_if_index
The interface on which the EP is connected.
Definition: gbp_endpoint.h:51
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
Definition: vec.h:437
VLIB_PLUGIN_REGISTER()
#define vec_foreach_index(var, v)
Iterate over vector indices.
void gbp_subnet_walk(gbp_subnet_cb_t cb, void *ctx)
Definition: gbp_subnet.c:143
u16 epg_id_t
Definition: gbp_types.h:21
static int gbp_contract_send_details(gbp_contract_t *gbpc, void *args)
Definition: gbp_api.c:402
A Group Based Policy Endpoint.
Definition: gbp_endpoint.h:46
static void vl_api_gbp_endpoint_add_t_handler(vl_api_gbp_endpoint_add_t *mp)
Definition: gbp_api.c:76
gbp_contract_key_t gc_key
source and destination EPGs
Definition: gbp_contract.h:68
vl_api_gbp_endpoint_t endpoint
Definition: gbp.api:40
gbp_main_t gbp_main
Definition: gbp_api.c:69
vl_api_gbp_subnet_t subnet
Definition: gbp.api:151
void ip_prefix_decode(const vl_api_prefix_t *in, fib_prefix_t *out)
Definition: ip_types_api.c:98
static int gbp_subnet_send_details(u32 table_id, const fib_prefix_t *pfx, u32 sw_if_index, epg_id_t epg, u8 is_internal, void *args)
Definition: gbp_api.c:232
#define REPLY_MACRO2(t, body)
#define NULL
Definition: clib.h:57
void gbp_endpoint_delete(u32 handle)
Definition: gbp_endpoint.c:334
u32 gepg_bd
Bridge-domain ID the EPG is in.
static void vl_api_gbp_recirc_dump_t_handler(vl_api_gbp_recirc_dump_t *mp)
Definition: gbp_api.c:368
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
Definition: api.h:34
u32 gbp_acl_user_id
Definition: gbp.h:45
mac_address_t ge_mac
MAC address of the endpoint.
Definition: gbp_endpoint.h:61
static int gbp_recirc_send_details(gbp_recirc_t *gr, void *args)
Definition: gbp_api.c:344
u8 * format(u8 *s, const char *fmt,...)
Definition: format.c:419
void * vl_msg_api_alloc(int nbytes)
void mac_address_decode(const vl_api_mac_address_t *in, mac_address_t *out)
static void vl_api_gbp_contract_add_del_t_handler(vl_api_gbp_contract_add_del_t *mp)
Definition: gbp_api.c:385
unsigned char u8
Definition: types.h:56
static u16 msg_id_base
Definition: gbp_api.c:71
enum walk_rc_t_ walk_rc_t
Walk return code.
memset(h->entries, 0, sizeof(h->entries[0])*entries)
u8 gr_is_ext
Is the interface for packets post-NAT translation (i.e.
Definition: gbp_recirc.h:41
u32 sw_if_index
Definition: vxlan_gbp.api:39
void mac_address_encode(const mac_address_t *in, vl_api_mac_address_t *out)
int gbp_subnet_add_del(u32 table_id, const fib_prefix_t *pfx, u32 sw_if_index, epg_id_t epg, u8 is_add, u8 is_internal)
Definition: gbp_subnet.c:71
Aggregrate type for a prefix.
Definition: fib_types.h:203
static void setup_message_id_table(api_main_t *am)
Definition: gbp_api.c:454
u8 n_ips
Definition: gbp.api:32
An Endpoint Group representation.
Definition: gbp_recirc.h:25
unsigned int u32
Definition: types.h:88
ip46_type_t ip_address_decode(const vl_api_address_t *in, ip46_address_t *out)
Definition: ip_types_api.c:59
gbp_contract_value_t gc_value
The ACL to apply for packets from the source to the destination EPG.
Definition: gbp_contract.h:73
epg_id_t gr_epg
EPG ID that packets will classify to when they arrive on this recirc.
Definition: gbp_recirc.h:30
static void vl_api_gbp_contract_dump_t_handler(vl_api_gbp_contract_dump_t *mp)
Definition: gbp_api.c:426
long ctx[MAX_CONNS]
Definition: main.c:144
unsigned short u16
Definition: types.h:57
#define REPLY_MACRO(t)
void gbp_endpoint_group_delete(epg_id_t epg_id)
vl_api_gbp_endpoint_group_t epg
Definition: gbp.api:83
u8 name[64]
Definition: memclnt.api:151
An Endpoint Group representation.
void gbp_contract_delete(epg_id_t src_epg, epg_id_t dst_epg)
Definition: gbp_contract.c:70
API main structure, used by both vpp and binary API clients.
Definition: api_common.h:201
static void vl_api_gbp_recirc_add_del_t_handler(vl_api_gbp_recirc_add_del_t *mp)
Definition: gbp_api.c:322
An API client registration, only in vpp/vlib.
Definition: api_common.h:44
#define BAD_SW_IF_INDEX_LABEL
static uword vnet_sw_if_index_is_api_valid(u32 sw_if_index)
static int gbp_endpoint_group_send_details(gbp_endpoint_group_t *gepg, void *args)
Definition: gbp_api.c:278
vlib_main_t * vm
Definition: buffer.c:294
void gbp_endpoint_walk(gbp_endpoint_cb_t cb, void *ctx)
Definition: gbp_endpoint.c:363
#define vec_free(V)
Free vector&#39;s memory (no header).
Definition: vec.h:339
ip46_address_t * ge_ips
A vector of ip addresses that below to the endpoint.
Definition: gbp_endpoint.h:56
int gbp_endpoint_group_add(epg_id_t epg_id, u32 bd_id, u32 ip4_table_id, u32 ip6_table_id, u32 uplink_sw_if_index)
vl_api_prefix_t prefix
Definition: gbp.api:131
int gbp_endpoint_update(u32 sw_if_index, const ip46_address_t *ips, const mac_address_t *mac, epg_id_t epg_id, u32 *handle)
Definition: gbp_endpoint.c:236
static void vl_api_gbp_subnet_add_del_t_handler(vl_api_gbp_subnet_add_del_t *mp)
Definition: gbp_api.c:214
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
Definition: api.h:56
epg_id_t gck_src
source and destination EPGs for which the ACL applies
Definition: gbp_contract.h:33
vl_api_gbp_endpoint_group_t epg
Definition: gbp.api:95
vl_api_gbp_subnet_t subnet
Definition: gbp.api:139
u32 gr_sw_if_index
Definition: gbp_recirc.h:45
static void vl_api_gbp_endpoint_dump_t_handler(vl_api_gbp_endpoint_dump_t *mp)
Definition: gbp_api.c:167
vl_api_gbp_contract_t contract
Definition: gbp.api:166
static void vl_api_gbp_endpoint_group_dump_t_handler(vl_api_gbp_endpoint_group_dump_t *mp)
Definition: gbp_api.c:304
static void vl_api_gbp_endpoint_group_add_del_t_handler(vl_api_gbp_endpoint_group_add_del_t *mp)
Definition: gbp_api.c:185
vl_api_gbp_recirc_t recirc
Definition: gbp.api:110
static clib_error_t * gbp_init(vlib_main_t *vm)
Definition: gbp_api.c:478
static void gbp_api_hookup(vlib_main_t *vm)
Definition: gbp_api.c:463
u32 gepg_uplink_sw_if_index
the uplink interface dedicated to the EPG
void gbp_contract_update(epg_id_t src_epg, epg_id_t dst_epg, u32 acl_index)
Definition: gbp_contract.c:26
static walk_rc_t gbp_endpoint_send_details(gbp_endpoint_t *gbpe, void *args)
Definition: gbp_api.c:134
static void vl_api_gbp_subnet_dump_t_handler(vl_api_gbp_subnet_dump_t *mp)
Definition: gbp_api.c:261
vl_api_gbp_contract_t contract
Definition: gbp.api:178
void gbp_recirc_walk(gbp_recirc_cb_t cb, void *ctx)
Definition: gbp_recirc.c:159
void ip_prefix_encode(const fib_prefix_t *in, vl_api_prefix_t *out)
Definition: ip_types_api.c:114
static void vl_api_gbp_endpoint_del_t_handler(vl_api_gbp_endpoint_del_t *mp)
Definition: gbp_api.c:117
void gbp_recirc_delete(u32 sw_if_index)
Definition: gbp_recirc.c:119
vl_api_gbp_endpoint_t endpoint
Definition: gbp.api:66
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
epg_id_t ge_epg_id
The endpoint&#39;s designated EPG.
Definition: gbp_endpoint.h:66
vl_api_registration_t * reg
Definition: gbp_api.c:129
Group Base Policy (GBP) defines:
Definition: gbp.h:43
void ip_address_encode(const ip46_address_t *in, ip46_type_t type, vl_api_address_t *out)
Definition: ip_types_api.c:76
int gbp_recirc_add(u32 sw_if_index, epg_id_t epg_id, u8 is_ext)
Definition: gbp_recirc.c:34
vl_api_address_t ips[n_ips]
Definition: gbp.api:33
#define GBP_MSG_BASE
Definition: gbp_api.c:73
VLIB_API_INIT_FUNCTION(gbp_init)
void gbp_contract_walk(gbp_contract_cb_t cb, void *ctx)
Definition: gbp_contract.c:90
struct gbp_walk_ctx_t_ gbp_walk_ctx_t
api_main_t api_main
Definition: api_shared.c:35
vl_api_mac_address_t mac
Definition: gbp.api:31
vl_api_gbp_recirc_t recirc
Definition: gbp.api:122
u32 gepg_rd[FIB_PROTOCOL_IP_MAX]
route-domain/IP-table ID the EPG is in
A Group Based Policy Contract.
Definition: gbp_contract.h:63
#define VALIDATE_SW_IF_INDEX(mp)
u16 vl_msg_api_get_msg_ids(const char *name, int n)
Definition: api_shared.c:865
void gbp_endpoint_group_walk(gbp_endpoint_group_cb_t cb, void *ctx)
#define foreach_gbp_api_msg
Definition: gbp_api.c:56