FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
adj_mcast.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include <vnet/adj/adj_mcast.h>
17 #include <vnet/adj/adj_internal.h>
18 #include <vnet/fib/fib_walk.h>
19 #include <vnet/ip/ip.h>
20 
21 /*
22  * The 'DB' of all mcast adjs.
23  * There is only one mcast per-interface per-protocol, so this is a per-interface
24  * vector
25  */
27 
28 static u32
30 {
31  switch (proto) {
32  case FIB_PROTOCOL_IP4:
33  return (ip4_rewrite_mcast_node.index);
34  case FIB_PROTOCOL_IP6:
35  return (ip6_rewrite_mcast_node.index);
36  case FIB_PROTOCOL_MPLS:
37  break;
38  }
39  ASSERT(0);
40  return (0);
41 }
42 
43 /*
44  * adj_mcast_add_or_lock
45  *
46  * The next_hop address here is used for source address selection in the DP.
47  * The mcast adj is added to an interface's connected prefix, the next-hop
48  * passed here is the local prefix on the same interface.
49  */
52  vnet_link_t link_type,
54 {
55  ip_adjacency_t * adj;
56 
58 
60  {
61  vnet_main_t *vnm;
62 
63  vnm = vnet_get_main();
64  adj = adj_alloc(proto);
65 
67  adj->ia_nh_proto = proto;
68  adj->ia_link = link_type;
71  adj_lock(adj_get_index(adj));
72 
73  vnet_rewrite_init(vnm, sw_if_index, link_type,
74  adj->ia_node_index,
76  &adj->rewrite_header);
77 
78  /*
79  * we need a rewrite where the destination IP address is converted
80  * to the appropriate link-layer address. This is interface specific.
81  * So ask the interface to do it.
82  */
84  adj_get_index(adj));
85  }
86  else
87  {
89  adj_lock(adj_get_index(adj));
90  }
91 
93 
94  return (adj_get_index(adj));
95 }
96 
97 /**
98  * adj_mcast_update_rewrite
99  *
100  * Update the adjacency's rewrite string. A NULL string implies the
101  * rewrite is reset (i.e. when ARP/ND entry is gone).
102  * NB: the adj being updated may be handling traffic in the DP.
103  */
104 void
106  u8 *rewrite,
107  u8 offset)
108 {
109  ip_adjacency_t *adj;
110 
111  ASSERT(ADJ_INDEX_INVALID != adj_index);
112 
113  adj = adj_get(adj_index);
114 
115  /*
116  * update the adj's rewrite string and build the arc
117  * from the rewrite node to the interface's TX node
118  */
122  vnet_get_main(),
123  adj->rewrite_header.sw_if_index),
124  rewrite);
125  /*
126  * set the offset corresponding to the mcast IP address rewrite
127  */
128  adj->rewrite_header.dst_mcast_offset = offset;
129 }
130 
131 /**
132  * adj_mcast_midchain_update_rewrite
133  *
134  * Update the adjacency's rewrite string. A NULL string implies the
135  * rewrite is reset (i.e. when ARP/ND entry is gone).
136  * NB: the adj being updated may be handling traffic in the DP.
137  */
138 void
140  adj_midchain_fixup_t fixup,
141  const void *fixup_data,
143  u8 *rewrite,
144  u8 offset,
145  u32 mask)
146 {
147  ip_adjacency_t *adj;
148 
149  ASSERT(ADJ_INDEX_INVALID != adj_index);
150 
151  adj = adj_get(adj_index);
152 
153  /*
154  * one time only update. since we don't support changing the tunnel
155  * src,dst, this is all we need.
156  */
158  /*
159  * tunnels can always provide a rewrite.
160  */
161  ASSERT(NULL != rewrite);
162 
163  adj_midchain_setup(adj_index, fixup, fixup_data, flags);
164 
165  /*
166  * update the adj's rewrite string and build the arc
167  * from the rewrite node to the interface's TX node
168  */
172  vnet_get_main(),
173  adj->rewrite_header.sw_if_index),
174  rewrite);
175 
176  adj->rewrite_header.dst_mcast_offset = offset;
177 }
178 
179 void
182 {
184 
186 }
187 
188 static clib_error_t *
191  u32 flags)
192 {
193  /*
194  * for each mcast on the interface trigger a walk back to the children
195  */
197  ip_adjacency_t *adj;
198 
199 
201  {
202  if (sw_if_index >= vec_len(adj_mcasts[proto]) ||
204  continue;
205 
207 
208  fib_node_back_walk_ctx_t bw_ctx = {
212  };
213 
215  }
216 
217  return (NULL);
218 }
219 
221 
222 /**
223  * @brief Invoked on each SW interface of a HW interface when the
224  * HW interface state changes
225  */
226 static walk_rc_t
229  void *arg)
230 {
232 
233  return (WALK_CONTINUE);
234 }
235 
236 /**
237  * @brief Registered callback for HW interface state changes
238  */
239 static clib_error_t *
241  u32 hw_if_index,
242  u32 flags)
243 {
244  /*
245  * walk SW interfaces on the HW
246  */
247  uword sw_flags;
248 
249  sw_flags = ((flags & VNET_HW_INTERFACE_FLAG_LINK_UP) ?
251  0);
252 
253  vnet_hw_interface_walk_sw(vnm, hw_if_index,
255  (void*) sw_flags);
256 
257  return (NULL);
258 }
259 
262 
263 static clib_error_t *
266  u32 is_add)
267 {
268  /*
269  * for each mcast on the interface trigger a walk back to the children
270  */
272  ip_adjacency_t *adj;
273 
274  if (is_add)
275  {
276  /*
277  * not interested in interface additions. we will not back walk
278  * to resolve paths through newly added interfaces. Why? The control
279  * plane should have the brains to add interfaces first, then routes.
280  * So the case where there are paths with a interface that matches
281  * one just created is the case where the path resolved through an
282  * interface that was deleted, and still has not been removed. The
283  * new interface added, is NO GUARANTEE that the interface being
284  * added now, even though it may have the same sw_if_index, is the
285  * same interface that the path needs. So tough!
286  * If the control plane wants these routes to resolve it needs to
287  * remove and add them again.
288  */
289  return (NULL);
290  }
291 
293  {
294  if (sw_if_index >= vec_len(adj_mcasts[proto]) ||
296  continue;
297 
299 
300  fib_node_back_walk_ctx_t bw_ctx = {
302  };
303 
305  }
306 
307  return (NULL);
308 }
309 
311 
312 /**
313  * @brief Walk the multicast Adjacencies on a given interface
314  */
315 void
318  adj_walk_cb_t cb,
319  void *ctx)
320 {
322  {
324  {
326  }
327  }
328 }
329 
330 u8*
331 format_adj_mcast (u8* s, va_list *ap)
332 {
333  index_t index = va_arg(*ap, index_t);
334  CLIB_UNUSED(u32 indent) = va_arg(*ap, u32);
335  ip_adjacency_t * adj;
336 
337  if (!adj_is_valid(index))
338  return format(s, "<invalid adjacency>");
339 
340  adj = adj_get(index);
341 
342  s = format(s, "%U-mcast: ",
344  if (adj->rewrite_header.flags & VNET_REWRITE_HAS_FEATURES)
345  s = format(s, "[features] ");
346  s = format (s, "%U",
348  &adj->rewrite_header, sizeof (adj->rewrite_data), 0);
349 
350  return (s);
351 }
352 
353 u8*
354 format_adj_mcast_midchain (u8* s, va_list *ap)
355 {
356  index_t index = va_arg(*ap, index_t);
357  CLIB_UNUSED(u32 indent) = va_arg(*ap, u32);
358  ip_adjacency_t * adj = adj_get(index);
359 
360  s = format(s, "%U-mcast-midchain: ",
362  s = format (s, "%U",
364  &adj->rewrite_header,
365  sizeof (adj->rewrite_data), 0);
366  s = format (s, "\n%Ustacked-on:\n%U%U",
367  format_white_space, indent,
368  format_white_space, indent+2,
369  format_dpo_id, &adj->sub_type.midchain.next_dpo, indent+2);
370 
371  return (s);
372 }
373 
374 
375 static void
377 {
378  adj_lock(dpo->dpoi_index);
379 }
380 static void
382 {
383  adj_unlock(dpo->dpoi_index);
384 }
385 
386 const static dpo_vft_t adj_mcast_dpo_vft = {
388  .dv_unlock = adj_dpo_unlock,
389  .dv_format = format_adj_mcast,
390  .dv_get_urpf = adj_dpo_get_urpf,
391  .dv_get_mtu = adj_dpo_get_mtu,
392 };
395  .dv_unlock = adj_dpo_unlock,
396  .dv_format = format_adj_mcast_midchain,
397  .dv_get_urpf = adj_dpo_get_urpf,
398  .dv_get_mtu = adj_dpo_get_mtu,
399 };
400 
401 /**
402  * @brief The per-protocol VLIB graph nodes that are assigned to a mcast
403  * object.
404  *
405  * this means that these graph nodes are ones from which a mcast is the
406  * parent object in the DPO-graph.
407  */
408 const static char* const adj_mcast_ip4_nodes[] =
409 {
410  "ip4-rewrite-mcast",
411  NULL,
412 };
413 const static char* const adj_mcast_ip6_nodes[] =
414 {
415  "ip6-rewrite-mcast",
416  NULL,
417 };
418 
419 const static char* const * const adj_mcast_nodes[DPO_PROTO_NUM] =
420 {
423  [DPO_PROTO_MPLS] = NULL,
424 };
425 
426 /**
427  * @brief The per-protocol VLIB graph nodes that are assigned to a mcast
428  * object.
429  *
430  * this means that these graph nodes are ones from which a mcast is the
431  * parent object in the DPO-graph.
432  */
433 const static char* const adj_mcast_midchain_ip4_nodes[] =
434 {
435  "ip4-mcast-midchain",
436  NULL,
437 };
438 const static char* const adj_mcast_midchain_ip6_nodes[] =
439 {
440  "ip6-mcast-midchain",
441  NULL,
442 };
443 
444 const static char* const * const adj_mcast_midchain_nodes[DPO_PROTO_NUM] =
445 {
448  [DPO_PROTO_MPLS] = NULL,
449 };
450 
451 /**
452  * @brief Return the size of the adj DB.
453  * This is only for testing purposes so an efficient implementation is not needed
454  */
455 u32
457 {
458  u32 n_adjs, sw_if_index;
460 
461  n_adjs = 0;
463  {
464  for (sw_if_index = 0;
466  sw_if_index++)
467  {
469  {
470  n_adjs++;
471  }
472  }
473  }
474 
475  return (n_adjs);
476 }
477 
478 void
480 {
487 }
adj_dpo_get_urpf
u32 adj_dpo_get_urpf(const dpo_id_t *dpo)
Definition: adj.c:321
FIB_PROTOCOL_MAX
#define FIB_PROTOCOL_MAX
Definition outside of enum so it does not need to be included in non-defaulted switch statements.
Definition: fib_types.h:51
ip_adjacency_t_::ia_nh_proto
fib_protocol_t ia_nh_proto
The protocol of the neighbor/peer.
Definition: adj.h:350
dpo_id_t_::dpoi_index
index_t dpoi_index
the index of objects of that type
Definition: dpo.h:190
FIB_NODE_TYPE_ADJ
@ FIB_NODE_TYPE_ADJ
Definition: fib_node.h:37
adj_delegate_adj_created
void adj_delegate_adj_created(ip_adjacency_t *adj)
Definition: adj_delegate.c:158
FIB_NODE_BW_REASON_FLAG_INTERFACE_UP
@ FIB_NODE_BW_REASON_FLAG_INTERFACE_UP
Definition: fib_node.h:158
WALK_CONTINUE
@ WALK_CONTINUE
Definition: interface_funcs.h:174
adj_mcast_midchain_dpo_vft
const static dpo_vft_t adj_mcast_midchain_dpo_vft
Definition: adj_mcast.c:393
adj_mcast_walk
void adj_mcast_walk(u32 sw_if_index, fib_protocol_t proto, adj_walk_cb_t cb, void *ctx)
Walk the multicast Adjacencies on a given interface.
Definition: adj_mcast.c:316
ADJ_INDEX_INVALID
#define ADJ_INDEX_INVALID
Invalid ADJ index - used when no adj is known likewise blazoned capitals INVALID speak volumes where ...
Definition: adj_types.h:36
adj_midchain_fixup_t
void(* adj_midchain_fixup_t)(vlib_main_t *vm, const struct ip_adjacency_t_ *adj, vlib_buffer_t *b0, const void *data)
A function type for post-rewrite fixups on midchain adjacency.
Definition: adj.h:152
adj_mcast_interface_delete
static clib_error_t * adj_mcast_interface_delete(vnet_main_t *vnm, u32 sw_if_index, u32 is_add)
Definition: adj_mcast.c:264
VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION
VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION(adj_mcast_hw_interface_state_change)
adj_mcast_add_or_lock
adj_index_t adj_mcast_add_or_lock(fib_protocol_t proto, vnet_link_t link_type, u32 sw_if_index)
Mcast Adjacency.
Definition: adj_mcast.c:51
adj_mcast.h
adj_mcast_midchain_ip6_nodes
const static char *const adj_mcast_midchain_ip6_nodes[]
Definition: adj_mcast.c:438
adj_unlock
void adj_unlock(adj_index_t adj_index)
Release a reference counting lock on the adjacency.
Definition: adj.c:358
vnet_update_adjacency_for_sw_interface
void vnet_update_adjacency_for_sw_interface(vnet_main_t *vnm, u32 sw_if_index, u32 ai)
Definition: rewrite.c:195
VNET_REWRITE_HAS_FEATURES
@ VNET_REWRITE_HAS_FEATURES
This adjacency/interface has output features configured.
Definition: rewrite.h:57
VNET_SW_INTERFACE_FLAG_ADMIN_UP
@ VNET_SW_INTERFACE_FLAG_ADMIN_UP
Definition: interface.h:844
adj_dpo_get_mtu
u16 adj_dpo_get_mtu(const dpo_id_t *dpo)
Definition: adj.c:331
VNET_HW_INTERFACE_FLAG_LINK_UP
@ VNET_HW_INTERFACE_FLAG_LINK_UP
Definition: interface.h:509
adj_mcast_interface_state_change
static clib_error_t * adj_mcast_interface_state_change(vnet_main_t *vnm, u32 sw_if_index, u32 flags)
Definition: adj_mcast.c:189
adj_mcast_db_size
u32 adj_mcast_db_size(void)
Return the size of the adj DB.
Definition: adj_mcast.c:456
adj_mcast_midchain_update_rewrite
void adj_mcast_midchain_update_rewrite(adj_index_t adj_index, adj_midchain_fixup_t fixup, const void *fixup_data, adj_flags_t flags, u8 *rewrite, u8 offset, u32 mask)
adj_mcast_midchain_update_rewrite
Definition: adj_mcast.c:139
ip_adjacency_t_::ia_link
vnet_link_t ia_link
link/ether-type 1 bytes
Definition: adj.h:343
adj_nbr_update_rewrite_internal
void adj_nbr_update_rewrite_internal(ip_adjacency_t *adj, ip_lookup_next_t adj_next_index, u32 complete_next_index, u32 next_index, u8 *rewrite)
adj_nbr_update_rewrite_internal
Definition: adj_nbr.c:382
ip4_rewrite_mcast_node
vlib_node_registration_t ip4_rewrite_mcast_node
(constructor) VLIB_REGISTER_NODE (ip4_rewrite_mcast_node)
Definition: ip4_forward.c:2619
VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION
VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION(adj_mcast_interface_state_change)
adj_mcasts
static adj_index_t * adj_mcasts[FIB_PROTOCOL_MAX]
Definition: adj_mcast.c:26
adj_dpo_unlock
static void adj_dpo_unlock(dpo_id_t *dpo)
Definition: adj_mcast.c:381
adj_mcast_update_rewrite
void adj_mcast_update_rewrite(adj_index_t adj_index, u8 *rewrite, u8 offset)
adj_mcast_update_rewrite
Definition: adj_mcast.c:105
VNET_SW_INTERFACE_ADD_DEL_FUNCTION
VNET_SW_INTERFACE_ADD_DEL_FUNCTION(adj_mcast_interface_delete)
fib_node_back_walk_ctx_t_::fnbw_reason
fib_node_bw_reason_flag_t fnbw_reason
The reason/trigger for the backwalk.
Definition: fib_node.h:218
adj_is_valid
static int adj_is_valid(adj_index_t adj_index)
Definition: adj.h:476
adj_flags_t
enum adj_flags_t_ adj_flags_t
Flags on an IP adjacency.
IP_LOOKUP_NEXT_MCAST_MIDCHAIN
@ IP_LOOKUP_NEXT_MCAST_MIDCHAIN
Multicast Midchain Adjacency.
Definition: adj.h:89
adj_mcast_hw_interface_state_change
static clib_error_t * adj_mcast_hw_interface_state_change(vnet_main_t *vnm, u32 hw_if_index, u32 flags)
Registered callback for HW interface state changes.
Definition: adj_mcast.c:240
adj_mcast_hw_sw_interface_state_change
static walk_rc_t adj_mcast_hw_sw_interface_state_change(vnet_main_t *vnm, u32 sw_if_index, void *arg)
Invoked on each SW interface of a HW interface when the HW interface state changes.
Definition: adj_mcast.c:227
vec_len
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
Definition: vec_bootstrap.h:142
format_adj_mcast
u8 * format_adj_mcast(u8 *s, va_list *ap)
Format/display a mcast adjacency.
Definition: adj_mcast.c:331
ip_adjacency_t_::lookup_next_index
ip_lookup_next_t lookup_next_index
Next hop after ip4-lookup.
Definition: adj.h:337
adj_get_index
static adj_index_t adj_get_index(const ip_adjacency_t *adj)
Get a pointer to an adjacency object from its index.
Definition: adj_internal.h:109
CLIB_UNUSED
#define CLIB_UNUSED(x)
Definition: clib.h:90
fib_walk.h
vnet_get_main
vnet_main_t * vnet_get_main(void)
Definition: pnat_test_stubs.h:56
format_vnet_rewrite
format_function_t format_vnet_rewrite
Definition: rewrite.h:270
offset
struct clib_bihash_value offset
template key/value backing page structure
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
ip6_rewrite_mcast_node
vlib_node_registration_t ip6_rewrite_mcast_node
(constructor) VLIB_REGISTER_NODE (ip6_rewrite_mcast_node)
Definition: ip6_forward.c:2227
uword
u64 uword
Definition: types.h:112
adj_mcast_midchain_ip4_nodes
const static char *const adj_mcast_midchain_ip4_nodes[]
The per-protocol VLIB graph nodes that are assigned to a mcast object.
Definition: adj_mcast.c:433
mask
vl_api_pnat_mask_t mask
Definition: pnat.api:45
format_adj_mcast_midchain
u8 * format_adj_mcast_midchain(u8 *s, va_list *ap)
Definition: adj_mcast.c:354
fib_protocol_t
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
dpo_vft_t_::dv_lock
dpo_lock_fn_t dv_lock
A reference counting lock function.
Definition: dpo.h:428
ip_adjacency_t_
IP unicast adjacency.
Definition: adj.h:235
FIB_PROTOCOL_IP4
@ FIB_PROTOCOL_IP4
Definition: fib_types.h:36
adj_dpo_lock
static void adj_dpo_lock(dpo_id_t *dpo)
Definition: adj_mcast.c:376
DPO_ADJACENCY_MCAST_MIDCHAIN
@ DPO_ADJACENCY_MCAST_MIDCHAIN
Definition: dpo.h:111
format_dpo_id
u8 * format_dpo_id(u8 *s, va_list *args)
Format a DPO_id_t oject.
Definition: dpo.c:150
FIB_NODE_BW_REASON_FLAG_INTERFACE_DOWN
@ FIB_NODE_BW_REASON_FLAG_INTERFACE_DOWN
Definition: fib_node.h:159
adj_mcast_ip4_nodes
const static char *const adj_mcast_ip4_nodes[]
The per-protocol VLIB graph nodes that are assigned to a mcast object.
Definition: adj_mcast.c:408
DPO_ADJACENCY_MCAST
@ DPO_ADJACENCY_MCAST
Definition: dpo.h:110
fib_walk_sync
void fib_walk_sync(fib_node_type_t parent_type, fib_node_index_t parent_index, fib_node_back_walk_ctx_t *ctx)
Back walk all the children of a FIB node.
Definition: fib_walk.c:745
adj_get_mcast_node
static u32 adj_get_mcast_node(fib_protocol_t proto)
Definition: adj_mcast.c:29
vnet_rewrite_init
void vnet_rewrite_init(vnet_main_t *vnm, u32 sw_if_index, vnet_link_t linkt, u32 this_node, u32 next_node, vnet_rewrite_header_t *rw)
Definition: rewrite.c:96
vnet_main_t
Definition: vnet.h:76
vnet_tx_node_index_for_sw_interface
u32 vnet_tx_node_index_for_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
Definition: rewrite.c:89
ip_adjacency_t_::sub_type
union ip_adjacency_t_::@144 sub_type
index
u32 index
Definition: flow_types.api:221
format_fib_protocol
u8 * format_fib_protocol(u8 *s, va_list *ap)
Definition: fib_types.c:33
clib_bihash_value
template key/value backing page structure
Definition: bihash_doc.h:44
adj_mcast_remove
void adj_mcast_remove(fib_protocol_t proto, u32 sw_if_index)
Definition: adj_mcast.c:180
adj_mcast_ip6_nodes
const static char *const adj_mcast_ip6_nodes[]
Definition: adj_mcast.c:413
format
description fragment has unexpected format
Definition: map.api:433
ASSERT
#define ASSERT(truth)
Definition: error_bootstrap.h:69
vec_validate_init_empty
#define vec_validate_init_empty(V, I, INIT)
Make sure vector is long enough for given index and initialize empty space (no header,...
Definition: vec.h:570
FIB_PROTOCOL_MPLS
@ FIB_PROTOCOL_MPLS
Definition: fib_types.h:38
DPO_PROTO_IP6
@ DPO_PROTO_IP6
Definition: dpo.h:65
DPO_PROTO_MPLS
@ DPO_PROTO_MPLS
Definition: dpo.h:66
ip_adjacency_t_::ia_node_index
u32 ia_node_index
The VLIB node in which this adj is used to forward packets.
Definition: adj.h:330
ip.h
u32
unsigned int u32
Definition: types.h:88
FIB_PROTOCOL_IP6
@ FIB_PROTOCOL_IP6
Definition: fib_types.h:37
adj_internal.h
ctx
long ctx[MAX_CONNS]
Definition: main.c:144
FIB_NODE_BW_REASON_FLAG_INTERFACE_DELETE
@ FIB_NODE_BW_REASON_FLAG_INTERFACE_DELETE
Definition: fib_node.h:160
adj_mcast_module_init
void adj_mcast_module_init(void)
Module initialisation.
Definition: adj_mcast.c:479
adj_index_t
u32 adj_index_t
An index for adjacencies.
Definition: adj_types.h:30
vnet_link_t
enum vnet_link_t_ vnet_link_t
Link Type: A description of the protocol of packets on the link.
adj_lock
void adj_lock(adj_index_t adj_index)
Take a reference counting lock on the adjacency.
Definition: adj.c:341
dpo_vft_t_
A virtual function table regisitered for a DPO type.
Definition: dpo.h:423
adj_midchain_setup
void adj_midchain_setup(adj_index_t adj_index, adj_midchain_fixup_t fixup, const void *data, adj_flags_t flags)
adj_midchain_setup
Definition: adj_midchain.c:153
u8
unsigned char u8
Definition: types.h:56
clib_error_t
Definition: clib_error.h:21
adj_mcast_midchain_nodes
const static char *const *const adj_mcast_midchain_nodes[DPO_PROTO_NUM]
Definition: adj_mcast.c:444
IP_LOOKUP_NEXT_MCAST
@ IP_LOOKUP_NEXT_MCAST
Multicast Adjacency.
Definition: adj.h:82
DPO_PROTO_IP4
@ DPO_PROTO_IP4
Definition: dpo.h:64
fib_node_back_walk_ctx_t_
Context passed between object during a back walk.
Definition: fib_node.h:214
adj_alloc
ip_adjacency_t * adj_alloc(fib_protocol_t proto)
Definition: adj.c:64
adj_mcast_dpo_vft
const static dpo_vft_t adj_mcast_dpo_vft
Definition: adj_mcast.c:386
dpo_id_t_
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
Definition: dpo.h:172
vnet_hw_interface_walk_sw
void vnet_hw_interface_walk_sw(vnet_main_t *vnm, u32 hw_if_index, vnet_hw_sw_interface_walk_t fn, void *ctx)
Walk the SW interfaces on a HW interface - this is the super interface and any sub-interfaces.
Definition: interface.c:1122
adj_walk_cb_t
adj_walk_rc_t(* adj_walk_cb_t)(adj_index_t ai, void *ctx)
Call back function when walking adjacencies.
Definition: adj_types.h:50
proto
vl_api_ip_proto_t proto
Definition: acl_types.api:51
sw_if_index
vl_api_interface_index_t sw_if_index
Definition: wireguard.api:34
rewrite
rewrite
Definition: pnat.api:158
adj_mcast_nodes
const static char *const *const adj_mcast_nodes[DPO_PROTO_NUM]
Definition: adj_mcast.c:419
walk_rc_t
enum walk_rc_t_ walk_rc_t
Walk return code.
adj_get
static ip_adjacency_t * adj_get(adj_index_t adj_index)
Get a pointer to an adjacency object from its index.
Definition: adj.h:470
DPO_PROTO_NUM
#define DPO_PROTO_NUM
Definition: dpo.h:72
format_white_space
u8 * format_white_space(u8 *s, va_list *va)
Definition: std-formats.c:129
dpo_register
void dpo_register(dpo_type_t type, const dpo_vft_t *vft, const char *const *const *nodes)
For a given DPO type Register:
Definition: dpo.c:329
ip_adjacency_t_::midchain
struct ip_adjacency_t_::@144::@146 midchain
IP_LOOKUP_NEXT_MIDCHAIN.
flags
vl_api_wireguard_peer_flags_t flags
Definition: wireguard.api:105