FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
fib_entry.h
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 #ifndef __FIB_ENTRY_H__
17 #define __FIB_ENTRY_H__
18 
19 #include <vnet/fib/fib_node.h>
20 #include <vnet/fib/fib_source.h>
21 #include <vnet/adj/adj.h>
22 #include <vnet/ip/ip.h>
23 #include <vnet/dpo/dpo.h>
24 
25 /**
26  * The different sources that can create a route.
27  * The sources are defined here with their relative priority order.
28  * The lower the value the higher the priority
29  */
30 typedef enum fib_entry_attribute_t_ {
31  /**
32  * Marker. Add new values after this one.
33  */
35  /**
36  * Connected. The prefix is configured on an interface.
37  */
39  /**
40  * Attached. The prefix is attached to an interface.
41  */
43  /**
44  * The route is an explicit drop.
45  */
47  /**
48  * The route is exclusive. The client creating the route is
49  * providing an exclusive adjacency.
50  */
52  /**
53  * The route is attached cross tables and thus imports covered
54  * prefixes from the other table.
55  */
57  /**
58  * The prefix/address is local to this device
59  */
61  /**
62  * The prefix/address is a multicast prefix.
63  * this aplies only to MPLS. IP multicast is handled by mfib
64  */
66  /**
67  * The prefix/address exempted from loose uRPF check
68  * To be used with caution
69  */
71  /**
72  * The prefix/address exempted from attached export
73  */
75  /**
76  * This FIB entry imposes its source information on all prefixes
77  * that is covers
78  */
80  /**
81  * The interpose attribute.
82  * place the forwarding provided by the source infront of the forwarding
83  * provided by the best source, or failing that, by the cover.
84  */
86  /**
87  * Marker. add new entries before this one.
88  */
91 
92 #define FIB_ENTRY_ATTRIBUTES { \
93  [FIB_ENTRY_ATTRIBUTE_CONNECTED] = "connected", \
94  [FIB_ENTRY_ATTRIBUTE_ATTACHED] = "attached", \
95  [FIB_ENTRY_ATTRIBUTE_IMPORT] = "import", \
96  [FIB_ENTRY_ATTRIBUTE_DROP] = "drop", \
97  [FIB_ENTRY_ATTRIBUTE_EXCLUSIVE] = "exclusive", \
98  [FIB_ENTRY_ATTRIBUTE_LOCAL] = "local", \
99  [FIB_ENTRY_ATTRIBUTE_URPF_EXEMPT] = "uRPF-exempt", \
100  [FIB_ENTRY_ATTRIBUTE_MULTICAST] = "multicast", \
101  [FIB_ENTRY_ATTRIBUTE_NO_ATTACHED_EXPORT] = "no-attached-export", \
102  [FIB_ENTRY_ATTRIBUTE_COVERED_INHERIT] = "covered-inherit", \
103  [FIB_ENTRY_ATTRIBUTE_INTERPOSE] = "interpose", \
104 }
105 
106 #define FOR_EACH_FIB_ATTRIBUTE(_item) \
107  for (_item = FIB_ENTRY_ATTRIBUTE_FIRST; \
108  _item <= FIB_ENTRY_ATTRIBUTE_LAST; \
109  _item++)
110 
111 typedef enum fib_entry_flag_t_ {
124 } __attribute__((packed)) fib_entry_flag_t;
125 
126 extern u8 * format_fib_entry_flags(u8 *s, va_list *args);
127 
128 /**
129  * Flags for the source data
130  */
132  /**
133  * Marker. Add new values after this one.
134  */
136  /**
137  * the source has been added to the entry
138  */
140  /**
141  * the source is contributing forwarding
142  */
144  /**
145  * the source is active/best
146  */
148  /**
149  * the source is stale
150  */
152  /**
153  * the source is inherited from its cover
154  */
156  /**
157  * Marker. add new entries before this one.
158  */
161 
162 
163 #define FIB_ENTRY_SRC_ATTRIBUTES { \
164  [FIB_ENTRY_SRC_ATTRIBUTE_ADDED] = "added", \
165  [FIB_ENTRY_SRC_ATTRIBUTE_CONTRIBUTING] = "contributing", \
166  [FIB_ENTRY_SRC_ATTRIBUTE_ACTIVE] = "active", \
167  [FIB_ENTRY_SRC_ATTRIBUTE_STALE] = "stale", \
168  [FIB_ENTRY_SRC_ATTRIBUTE_INHERITED] = "inherited", \
169 }
170 
171 #define FOR_EACH_FIB_SRC_ATTRIBUTE(_item) \
172  for (_item = FIB_ENTRY_SRC_ATTRIBUTE_FIRST; \
173  _item <= FIB_ENTRY_SRC_ATTRIBUTE_LAST; \
174  _item++)
175 
176 typedef enum fib_entry_src_flag_t_ {
183 } __attribute__ ((packed)) fib_entry_src_flag_t;
184 
185 extern u8 * format_fib_entry_src_flags(u8 *s, va_list *args);
186 
187 /*
188  * Keep the size of the flags field to 2 bytes, so it
189  * can be placed next to the 2 bytes reference count
190  */
191 STATIC_ASSERT (sizeof(fib_entry_src_flag_t) <= 2,
192  "FIB entry flags field size too big");
193 
194 /**
195  * Information related to the source of a FIB entry
196  */
197 typedef struct fib_entry_src_t_ {
198  /**
199  * A vector of path extensions
200  */
202 
203  /**
204  * The path-list created by the source
205  */
207 
208  /**
209  * Flags the source contributes to the entry
210  */
212 
213  /**
214  * Which source this info block is for
215  */
217 
218  /**
219  * Flags on the source
220  */
222 
223  /**
224  * 1 bytes ref count. This is not the number of users of the Entry
225  * (which is itself not large, due to path-list sharing), but the number
226  * of times a given source has been added. Which is even fewer
227  */
229 
230  /**
231  * Source specific info
232  */
233  union {
234  struct {
235  /**
236  * the index of the FIB entry that is the covering entry
237  */
239  /**
240  * This source's index in the cover's list
241  */
243  } rr;
244  struct {
245  /**
246  * the index of the FIB entry that is the covering entry
247  */
249  /**
250  * This source's index in the cover's list
251  */
253  /**
254  * DPO type to interpose. The dpo type needs to have registered
255  * it's 'contribute interpose' callback function.
256  */
258  } interpose;
259  struct {
260  /**
261  * the index of the FIB entry that is the covering entry
262  */
264  /**
265  * This source's index in the cover's list
266  */
268  } adj;
269  struct {
270  /**
271  * the index of the FIB entry that is the covering entry
272  */
274  /**
275  * This source's index in the cover's list
276  */
278  } interface;
279  struct {
280  /**
281  * This MPLS local label associated with the prefix.
282  */
284 
285  /**
286  * the indicies of the LFIB entries created
287  */
289  } mpls;
290  struct {
291  /**
292  * The source FIB index.
293  */
295  } lisp;
296  } u;
298 
299 /**
300  * An entry in a FIB table.
301  *
302  * This entry represents a route added to the FIB that is stored
303  * in one of the FIB tables.
304  */
305 typedef struct fib_entry_t_ {
306  /**
307  * Base class. The entry's node representation in the graph.
308  */
310  /**
311  * The prefix of the route. this is const just to be sure.
312  * It is the entry's key/identity and so should never change.
313  */
315  /**
316  * The index of the FIB table this entry is in
317  */
319  /**
320  * The load-balance used for forwarding.
321  *
322  * We don't share the EOS and non-EOS even in case when they could be
323  * because:
324  * - complexity & reliability v. memory
325  * determining the conditions where sharing is possible is non-trivial.
326  * - separate LBs means we can get the EOS bit right in the MPLS label DPO
327  * and so save a few clock cycles in the DP imposition node since we can
328  * paint the header straight on without the need to check the packet
329  * type to derive the EOS bit value.
330  */
332  /**
333  * Vector of source infos.
334  * Most entries will only have 1 source. So we optimise for memory usage,
335  * which is preferable since we have many entries.
336  */
338  /**
339  * the path-list for which this entry is a child. This is also the path-list
340  * that is contributing forwarding for this entry.
341  */
343  /**
344  * index of this entry in the parent's child list.
345  * This is set when this entry is added as a child, but can also
346  * be changed by the parent as it manages its list.
347  */
349 
350  /**
351  * A vector of delegate indices.
352  */
354 } fib_entry_t;
355 
356 #define FOR_EACH_FIB_ENTRY_FLAG(_item) \
357  for (_item = FIB_ENTRY_FLAG_FIRST; _item < FIB_ENTRY_FLAG_MAX; _item++)
358 
359 #define FIB_ENTRY_FORMAT_BRIEF (0x0)
360 #define FIB_ENTRY_FORMAT_DETAIL (0x1)
361 #define FIB_ENTRY_FORMAT_DETAIL2 (0x2)
362 
363 extern u8 *format_fib_entry (u8 * s, va_list * args);
364 extern u8 *format_fib_source (u8 * s, va_list * args);
365 
367  const fib_prefix_t *prefix,
368  fib_source_t source,
370  const dpo_id_t *dpo);
371 
372 extern fib_node_index_t fib_entry_create (u32 fib_index,
373  const fib_prefix_t *prefix,
374  fib_source_t source,
376  const fib_route_path_t *paths);
377 extern void fib_entry_update (fib_node_index_t fib_entry_index,
378  fib_source_t source,
380  const fib_route_path_t *paths);
381 
382 extern void fib_entry_path_add(fib_node_index_t fib_entry_index,
383  fib_source_t source,
385  const fib_route_path_t *rpaths);
386 extern void fib_entry_special_add(fib_node_index_t fib_entry_index,
387  fib_source_t source,
389  const dpo_id_t *dpo);
390 extern void fib_entry_special_update(fib_node_index_t fib_entry_index,
391  fib_source_t source,
393  const dpo_id_t *dpo);
395  fib_source_t source);
396 
398  fib_source_t source,
399  const fib_route_path_t *rpaths);
400 
401 extern void fib_entry_inherit(fib_node_index_t cover,
402  fib_node_index_t covered);
403 
405  fib_source_t source);
406 
408  fib_node_index_t fib_entry_index);
409 extern void fib_entry_contribute_urpf(fib_node_index_t path_index,
410  index_t urpf);
412  fib_node_index_t fib_entry_index,
414  dpo_id_t *dpo);
416  fib_node_index_t fib_entry_index);
418  fib_node_index_t fib_entry_index,
419  fib_source_t source);
420 extern const int fib_entry_get_dpo_for_source (
421  fib_node_index_t fib_entry_index,
422  fib_source_t source,
423  dpo_id_t *dpo);
424 
425 extern adj_index_t fib_entry_get_adj(fib_node_index_t fib_entry_index);
426 
427 extern int fib_entry_cmp_for_sort(void *i1, void *i2);
428 
429 extern void fib_entry_cover_changed(fib_node_index_t fib_entry);
430 extern void fib_entry_cover_updated(fib_node_index_t fib_entry);
432  fib_node_index_t **entry_indicies);
433 
434 extern void fib_entry_lock(fib_node_index_t fib_entry_index);
435 extern void fib_entry_unlock(fib_node_index_t fib_entry_index);
436 
437 extern u32 fib_entry_child_add(fib_node_index_t fib_entry_index,
439  fib_node_index_t child_index);
440 extern void fib_entry_child_remove(fib_node_index_t fib_entry_index,
441  u32 sibling_index);
445  fib_node_index_t fib_entry_index,
446  fib_source_t source);
447 
448 extern fib_route_path_t* fib_entry_encode(fib_node_index_t fib_entry_index);
449 extern const fib_prefix_t* fib_entry_get_prefix(fib_node_index_t fib_entry_index);
450 extern u32 fib_entry_get_fib_index(fib_node_index_t fib_entry_index);
451 extern void fib_entry_set_source_data(fib_node_index_t fib_entry_index,
452  fib_source_t source,
453  const void *data);
454 extern const void* fib_entry_get_source_data(fib_node_index_t fib_entry_index,
455  fib_source_t source);
456 
459  fib_node_index_t fib_entry_index,
460  fib_source_t source);
462 extern int fib_entry_is_sourced(fib_node_index_t fib_entry_index,
463  fib_source_t source);
464 
466 extern int fib_entry_is_resolved(fib_node_index_t fib_entry_index);
467 extern int fib_entry_is_host(fib_node_index_t fib_entry_index);
468 extern int fib_entry_is_marked(fib_node_index_t fib_entry_index, fib_source_t source);
469 extern void fib_entry_mark(fib_node_index_t fib_entry_index, fib_source_t source);
470 extern void fib_entry_set_flow_hash_config(fib_node_index_t fib_entry_index,
471  flow_hash_config_t hash_config);
472 
473 extern void fib_entry_module_init(void);
474 
475 extern u32 fib_entry_get_stats_index(fib_node_index_t fib_entry_index);
476 
477 /*
478  * unsafe... beware the raw pointer.
479  */
480 extern fib_node_index_t fib_entry_get_index(const fib_entry_t * fib_entry);
481 extern fib_entry_t * fib_entry_get(fib_node_index_t fib_entry_index);
482 
483 /*
484  * for testing purposes.
485  */
486 extern u32 fib_entry_pool_size(void);
487 
488 #endif
fib_source.h
fib_entry_mark
void fib_entry_mark(fib_node_index_t fib_entry_index, fib_source_t source)
Definition: fib_entry_src.c:171
fib_entry_src_t_::u
union fib_entry_src_t_::@292 u
Source specific info.
adj.h
fib_entry_child_remove
void fib_entry_child_remove(fib_node_index_t fib_entry_index, u32 sibling_index)
Definition: fib_entry.c:566
fib_entry_module_init
void fib_entry_module_init(void)
Definition: fib_entry.c:1689
format_fib_entry_src_flags
u8 * format_fib_entry_src_flags(u8 *s, va_list *args)
Definition: fib_entry.c:115
fib_entry_src_t_::fesa_sibling
u32 fesa_sibling
This source's index in the cover's list.
Definition: fib_entry.h:267
fib_entry_cmp_for_sort
int fib_entry_cmp_for_sort(void *i1, void *i2)
Definition: fib_entry.c:1660
fib_entry_path_add
void fib_entry_path_add(fib_node_index_t fib_entry_index, fib_source_t source, fib_entry_flag_t flags, const fib_route_path_t *rpaths)
Definition: fib_entry.c:911
fib_entry_src_t_::interface
struct fib_entry_src_t_::@292::@296 interface
fib_entry_cover_updated
void fib_entry_cover_updated(fib_node_index_t fib_entry)
Definition: fib_entry.c:1337
fib_entry_src_attribute_t
enum fib_entry_src_attribute_t_ fib_entry_src_attribute_t
Flags for the source data.
fib_entry_t_
An entry in a FIB table.
Definition: fib_entry.h:305
fib_entry_get_best_source
fib_source_t fib_entry_get_best_source(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:1505
fib_entry_special_add
void fib_entry_special_add(fib_node_index_t fib_entry_index, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
Definition: fib_entry.c:875
FIB_ENTRY_ATTRIBUTE_LOCAL
@ FIB_ENTRY_ATTRIBUTE_LOCAL
The prefix/address is local to this device.
Definition: fib_entry.h:60
FIB_ENTRY_ATTRIBUTE_URPF_EXEMPT
@ FIB_ENTRY_ATTRIBUTE_URPF_EXEMPT
The prefix/address exempted from loose uRPF check To be used with caution.
Definition: fib_entry.h:70
fib_entry_attribute_t
enum fib_entry_attribute_t_ fib_entry_attribute_t
The different sources that can create a route.
fib_entry_src_flag_t_
fib_entry_src_flag_t_
Definition: fib_entry.h:176
FIB_ENTRY_SRC_FLAG_ACTIVE
@ FIB_ENTRY_SRC_FLAG_ACTIVE
Definition: fib_entry.h:180
FIB_ENTRY_SRC_FLAG_STALE
@ FIB_ENTRY_SRC_FLAG_STALE
Definition: fib_entry.h:181
FIB_ENTRY_FLAG_ATTACHED
@ FIB_ENTRY_FLAG_ATTACHED
Definition: fib_entry.h:114
fib_entry_pool_size
u32 fib_entry_pool_size(void)
Definition: fib_entry.c:1748
FIB_ENTRY_ATTRIBUTE_COVERED_INHERIT
@ FIB_ENTRY_ATTRIBUTE_COVERED_INHERIT
This FIB entry imposes its source information on all prefixes that is covers.
Definition: fib_entry.h:79
fib_entry_src_t_
Information related to the source of a FIB entry.
Definition: fib_entry.h:197
paths
paths
Definition: map.api:460
fib_entry_t_::fe_parent
fib_node_index_t fe_parent
the path-list for which this entry is a child.
Definition: fib_entry.h:342
fib_entry_is_host
int fib_entry_is_host(fib_node_index_t fib_entry_index)
Return !0 is the entry represents a host prefix.
Definition: fib_entry.c:1520
FIB_ENTRY_SRC_ATTRIBUTE_LAST
@ FIB_ENTRY_SRC_ATTRIBUTE_LAST
Marker.
Definition: fib_entry.h:159
fib_entry_set_flow_hash_config
void fib_entry_set_flow_hash_config(fib_node_index_t fib_entry_index, flow_hash_config_t hash_config)
Definition: fib_entry.c:1556
FIB_ENTRY_FLAG_EXCLUSIVE
@ FIB_ENTRY_FLAG_EXCLUSIVE
Definition: fib_entry.h:116
fib_node.h
fib_entry_src_t_::interpose
struct fib_entry_src_t_::@292::@294 interpose
FIB_ENTRY_FLAG_INTERPOSE
@ FIB_ENTRY_FLAG_INTERPOSE
Definition: fib_entry.h:123
fib_node_type_t
enum fib_node_type_t_ fib_node_type_t
The types of nodes in a FIB graph.
FIB_ENTRY_ATTRIBUTE_LAST
@ FIB_ENTRY_ATTRIBUTE_LAST
Marker.
Definition: fib_entry.h:89
fib_entry_child_add
u32 fib_entry_child_add(fib_node_index_t fib_entry_index, fib_node_type_t type, fib_node_index_t child_index)
Definition: fib_entry.c:555
FIB_ENTRY_SRC_FLAG_INHERITED
@ FIB_ENTRY_SRC_FLAG_INHERITED
Definition: fib_entry.h:182
fib_entry_src_t_::fes_path_exts
fib_path_ext_list_t fes_path_exts
A vector of path extensions.
Definition: fib_entry.h:201
fib_entry_src_t_::fesi_dpo
dpo_id_t fesi_dpo
DPO type to interpose.
Definition: fib_entry.h:257
FIB_ENTRY_ATTRIBUTE_CONNECTED
@ FIB_ENTRY_ATTRIBUTE_CONNECTED
Connected.
Definition: fib_entry.h:38
FIB_ENTRY_FLAG_LOOSE_URPF_EXEMPT
@ FIB_ENTRY_FLAG_LOOSE_URPF_EXEMPT
Definition: fib_entry.h:120
fib_entry_src_t_::fesm_lfes
fib_node_index_t fesm_lfes[2]
the indicies of the LFIB entries created
Definition: fib_entry.h:288
fib_entry_t_::fe_sibling
u32 fe_sibling
index of this entry in the parent's child list.
Definition: fib_entry.h:348
STATIC_ASSERT
STATIC_ASSERT(sizeof(fib_entry_src_flag_t)<=2, "FIB entry flags field size too big")
fib_entry_flag_t
enum fib_entry_flag_t_ fib_entry_flag_t
FIB_ENTRY_FLAG_MULTICAST
@ FIB_ENTRY_FLAG_MULTICAST
Definition: fib_entry.h:121
fib_entry_get_path_list
fib_node_index_t fib_entry_get_path_list(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:545
fib_entry_t_::fe_fib_index
u32 fe_fib_index
The index of the FIB table this entry is in.
Definition: fib_entry.h:318
dpo.h
FIB_ENTRY_ATTRIBUTE_IMPORT
@ FIB_ENTRY_ATTRIBUTE_IMPORT
The route is attached cross tables and thus imports covered prefixes from the other table.
Definition: fib_entry.h:56
fib_entry_t_::fe_srcs
fib_entry_src_t * fe_srcs
Vector of source infos.
Definition: fib_entry.h:337
fib_forward_chain_type_t
enum fib_forward_chain_type_t_ fib_forward_chain_type_t
FIB output chain type.
fib_entry_inherit
void fib_entry_inherit(fib_node_index_t cover, fib_node_index_t covered)
fib_entry_inherit
Definition: fib_entry.c:1203
fib_entry_get_adj
adj_index_t fib_entry_get_adj(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:526
fib_entry_get_dpo_for_source
const int fib_entry_get_dpo_for_source(fib_node_index_t fib_entry_index, fib_source_t source, dpo_id_t *dpo)
Definition: fib_entry_src.c:1826
fib_entry_src_t_::fesa_cover
fib_node_index_t fesa_cover
the index of the FIB entry that is the covering entry
Definition: fib_entry.h:263
FIB_ENTRY_SRC_FLAG_NONE
@ FIB_ENTRY_SRC_FLAG_NONE
Definition: fib_entry.h:177
fib_entry_unlock
void fib_entry_unlock(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:1679
flow_hash_config_t
enum flow_hash_config_t_ flow_hash_config_t
A flow hash configuration is a mask of the flow hash options.
fib_entry_is_marked
int fib_entry_is_marked(fib_node_index_t fib_entry_index, fib_source_t source)
Definition: fib_entry_src.c:150
fib_path_ext_list_t_
A list of path-extensions.
Definition: fib_types.h:639
FIB_ENTRY_FLAG_NONE
@ FIB_ENTRY_FLAG_NONE
Definition: fib_entry.h:112
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
format_fib_source
u8 * format_fib_source(u8 *s, va_list *args)
Definition: fib_source.c:66
fib_node_index_t
u32 fib_node_index_t
A typedef of a node index.
Definition: fib_types.h:29
fib_entry_src_t_::fes_ref_count
u8 fes_ref_count
1 bytes ref count.
Definition: fib_entry.h:228
fib_entry_update
void fib_entry_update(fib_node_index_t fib_entry_index, fib_source_t source, fib_entry_flag_t flags, const fib_route_path_t *paths)
fib_entry_update
Definition: fib_entry.c:1228
fib_entry_t_::fe_delegates
index_t * fe_delegates
A vector of delegate indices.
Definition: fib_entry.h:353
fib_entry_contribute_forwarding
void fib_entry_contribute_forwarding(fib_node_index_t fib_entry_index, fib_forward_chain_type_t type, dpo_id_t *dpo)
Definition: fib_entry.c:437
fib_entry_create_special
fib_node_index_t fib_entry_create_special(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
Definition: fib_entry.c:757
fib_entry_src_t_::fesl_fib_index
fib_node_index_t fesl_fib_index
The source FIB index.
Definition: fib_entry.h:294
fib_entry_get_source_data
const void * fib_entry_get_source_data(fib_node_index_t fib_entry_index, fib_source_t source)
Definition: fib_entry_src.c:1932
fib_entry_src_flag_t
enum fib_entry_src_flag_t_ fib_entry_src_flag_t
fib_entry_src_t_::mpls
struct fib_entry_src_t_::@292::@297 mpls
fib_entry_get_resolving_interface
u32 fib_entry_get_resolving_interface(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:1474
fib_entry_get_flags_for_source
fib_entry_flag_t fib_entry_get_flags_for_source(fib_node_index_t fib_entry_index, fib_source_t source)
Definition: fib_entry_src.c:1877
fib_entry_cover_changed
void fib_entry_cover_changed(fib_node_index_t fib_entry)
Definition: fib_entry.c:1261
FIB_ENTRY_SRC_ATTRIBUTE_STALE
@ FIB_ENTRY_SRC_ATTRIBUTE_STALE
the source is stale
Definition: fib_entry.h:151
FIB_ENTRY_FLAG_DROP
@ FIB_ENTRY_FLAG_DROP
Definition: fib_entry.h:115
fib_entry_src_t_::fesi_sibling
u32 fesi_sibling
This source's index in the cover's list.
Definition: fib_entry.h:252
fib_entry_encode
fib_route_path_t * fib_entry_encode(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:1698
FIB_ENTRY_FLAG_LOCAL
@ FIB_ENTRY_FLAG_LOCAL
Definition: fib_entry.h:117
FIB_ENTRY_ATTRIBUTE_NO_ATTACHED_EXPORT
@ FIB_ENTRY_ATTRIBUTE_NO_ATTACHED_EXPORT
The prefix/address exempted from attached export.
Definition: fib_entry.h:74
FIB_ENTRY_SRC_ATTRIBUTE_INHERITED
@ FIB_ENTRY_SRC_ATTRIBUTE_INHERITED
the source is inherited from its cover
Definition: fib_entry.h:155
fib_entry_src_t_::lisp
struct fib_entry_src_t_::@292::@298 lisp
FIB_ENTRY_ATTRIBUTE_FIRST
@ FIB_ENTRY_ATTRIBUTE_FIRST
Marker.
Definition: fib_entry.h:34
fib_entry_create
fib_node_index_t fib_entry_create(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, const fib_route_path_t *paths)
Definition: fib_entry.c:717
fib_entry_get_stats_index
u32 fib_entry_get_stats_index(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:1585
fib_entry_get_index
fib_node_index_t fib_entry_get_index(const fib_entry_t *fib_entry)
Definition: fib_entry.c:63
fib_entry_flag_t_
fib_entry_flag_t_
Definition: fib_entry.h:111
fib_entry_attribute_t_
fib_entry_attribute_t_
The different sources that can create a route.
Definition: fib_entry.h:30
fib_entry_src_t_::rr
struct fib_entry_src_t_::@292::@293 rr
data
u8 data[128]
Definition: ipsec_types.api:92
fib_entry_lock
void fib_entry_lock(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:1669
fib_entry_contribute_ip_forwarding
const dpo_id_t * fib_entry_contribute_ip_forwarding(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:506
FIB_ENTRY_SRC_ATTRIBUTE_CONTRIBUTING
@ FIB_ENTRY_SRC_ATTRIBUTE_CONTRIBUTING
the source is contributing forwarding
Definition: fib_entry.h:143
fib_entry_src_t_::fesm_label
mpls_label_t fesm_label
This MPLS local label associated with the prefix.
Definition: fib_entry.h:283
FIB_ENTRY_FLAG_COVERED_INHERIT
@ FIB_ENTRY_FLAG_COVERED_INHERIT
Definition: fib_entry.h:122
FIB_ENTRY_SRC_ATTRIBUTE_ADDED
@ FIB_ENTRY_SRC_ATTRIBUTE_ADDED
the source has been added to the entry
Definition: fib_entry.h:139
FIB_ENTRY_FLAG_CONNECTED
@ FIB_ENTRY_FLAG_CONNECTED
Definition: fib_entry.h:113
fib_entry_recursive_loop_detect
int fib_entry_recursive_loop_detect(fib_node_index_t entry_index, fib_node_index_t **entry_indicies)
Definition: fib_entry.c:1423
fib_entry_is_sourced
int fib_entry_is_sourced(fib_node_index_t fib_entry_index, fib_source_t source)
Definition: fib_entry_src.c:139
fib_entry_t_::fe_lb
dpo_id_t fe_lb
The load-balance used for forwarding.
Definition: fib_entry.h:331
ip.h
fib_entry_get_flags
fib_entry_flag_t fib_entry_get_flags(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:291
FIB_ENTRY_ATTRIBUTE_ATTACHED
@ FIB_ENTRY_ATTRIBUTE_ATTACHED
Attached.
Definition: fib_entry.h:42
u32
unsigned int u32
Definition: types.h:88
fib_entry_src_t_::fesr_sibling
u32 fesr_sibling
This source's index in the cover's list.
Definition: fib_entry.h:242
fib_entry_src_t_::fes_src
fib_source_t fes_src
Which source this info block is for.
Definition: fib_entry.h:216
fib_entry_get_fib_index
u32 fib_entry_get_fib_index(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:1738
fib_route_path_t_
A representation of a path as described by a route producer.
Definition: fib_types.h:500
fib_entry_recalculate_forwarding
void fib_entry_recalculate_forwarding(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:808
fib_entry_t_::fe_node
fib_node_t fe_node
Base class.
Definition: fib_entry.h:309
fib_entry_is_resolved
int fib_entry_is_resolved(fib_node_index_t fib_entry_index)
Return !0 is the entry is resolved, i.e.
Definition: fib_entry.c:1530
fib_entry_src_t_::fesi_cover
fib_node_index_t fesi_cover
the index of the FIB entry that is the covering entry
Definition: fib_entry.h:248
fib_entry_src_t_::fesr_cover
fib_node_index_t fesr_cover
the index of the FIB entry that is the covering entry
Definition: fib_entry.h:238
fib_entry_src_t_::adj
struct fib_entry_src_t_::@292::@295 adj
FIB_ENTRY_ATTRIBUTE_EXCLUSIVE
@ FIB_ENTRY_ATTRIBUTE_EXCLUSIVE
The route is exclusive.
Definition: fib_entry.h:51
fib_node_t_
An node in the FIB graph.
Definition: fib_node.h:301
adj_index_t
u32 adj_index_t
An index for adjacencies.
Definition: adj_types.h:30
fib_entry_contribute_urpf
void fib_entry_contribute_urpf(fib_node_index_t path_index, index_t urpf)
Contribute the set of Adjacencies that this entry forwards with to build the uRPF list of its childre...
Definition: fib_entry.c:391
fib_entry_get_adj_for_source
adj_index_t fib_entry_get_adj_for_source(fib_node_index_t fib_entry_index, fib_source_t source)
Definition: fib_entry_src.c:1801
FIB_ENTRY_SRC_ATTRIBUTE_FIRST
@ FIB_ENTRY_SRC_ATTRIBUTE_FIRST
Marker.
Definition: fib_entry.h:135
fib_entry_t_::fe_prefix
const fib_prefix_t fe_prefix
The prefix of the route.
Definition: fib_entry.h:314
u8
unsigned char u8
Definition: types.h:56
fib_entry_src_t_::fes_entry_flags
fib_entry_flag_t fes_entry_flags
Flags the source contributes to the entry.
Definition: fib_entry.h:211
fib_entry_special_update
void fib_entry_special_update(fib_node_index_t fib_entry_index, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
Definition: fib_entry.c:892
fib_entry_src_attribute_t_
fib_entry_src_attribute_t_
Flags for the source data.
Definition: fib_entry.h:131
fib_entry_src_t_::fes_flags
fib_entry_src_flag_t fes_flags
Flags on the source.
Definition: fib_entry.h:221
format_fib_entry_flags
u8 * format_fib_entry_flags(u8 *s, va_list *args)
Definition: fib_entry.c:100
FIB_ENTRY_ATTRIBUTE_DROP
@ FIB_ENTRY_ATTRIBUTE_DROP
The route is an explicit drop.
Definition: fib_entry.h:46
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
fib_source_t
enum fib_source_t_ fib_source_t
The different sources that can create a route.
mpls_label_t
u32 mpls_label_t
A label value only, i.e.
Definition: packet.h:26
format_fib_entry
u8 * format_fib_entry(u8 *s, va_list *args)
Definition: fib_entry.c:130
fib_entry_delete
fib_entry_src_flag_t fib_entry_delete(fib_node_index_t fib_entry_index, fib_source_t source)
fib_entry_delete
Definition: fib_entry.c:1216
fib_entry_t
struct fib_entry_t_ fib_entry_t
An entry in a FIB table.
FIB_ENTRY_SRC_FLAG_ADDED
@ FIB_ENTRY_SRC_FLAG_ADDED
Definition: fib_entry.h:178
fib_entry_get
fib_entry_t * fib_entry_get(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:51
fib_entry_src_t
struct fib_entry_src_t_ fib_entry_src_t
Information related to the source of a FIB entry.
FIB_ENTRY_ATTRIBUTE_INTERPOSE
@ FIB_ENTRY_ATTRIBUTE_INTERPOSE
The interpose attribute.
Definition: fib_entry.h:85
fib_entry_path_remove
fib_entry_src_flag_t fib_entry_path_remove(fib_node_index_t fib_entry_index, fib_source_t source, const fib_route_path_t *rpaths)
Definition: fib_entry.c:1007
fib_entry_src_t_::fes_pl
fib_node_index_t fes_pl
The path-list created by the source.
Definition: fib_entry.h:206
FIB_ENTRY_ATTRIBUTE_MULTICAST
@ FIB_ENTRY_ATTRIBUTE_MULTICAST
The prefix/address is a multicast prefix.
Definition: fib_entry.h:65
fib_entry_get_prefix
const fib_prefix_t * fib_entry_get_prefix(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:1728
fib_entry_get_resolving_interface_for_source
u32 fib_entry_get_resolving_interface_for_source(fib_node_index_t fib_entry_index, fib_source_t source)
Definition: fib_entry_src.c:1856
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
FIB_ENTRY_SRC_FLAG_CONTRIBUTING
@ FIB_ENTRY_SRC_FLAG_CONTRIBUTING
Definition: fib_entry.h:179
fib_entry_set_source_data
void fib_entry_set_source_data(fib_node_index_t fib_entry_index, fib_source_t source, const void *data)
Definition: fib_entry_src.c:1914
FIB_ENTRY_SRC_ATTRIBUTE_ACTIVE
@ FIB_ENTRY_SRC_ATTRIBUTE_ACTIVE
the source is active/best
Definition: fib_entry.h:147
prefix
vl_api_prefix_t prefix
Definition: ip.api:146
FIB_ENTRY_FLAG_IMPORT
@ FIB_ENTRY_FLAG_IMPORT
Definition: fib_entry.h:118
fib_entry_get_any_resolving_interface
u32 fib_entry_get_any_resolving_interface(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:1484
fib_entry_special_remove
fib_entry_src_flag_t fib_entry_special_remove(fib_node_index_t fib_entry_index, fib_source_t source)
Definition: fib_entry.c:1099
flags
vl_api_wireguard_peer_flags_t flags
Definition: wireguard.api:105
FIB_ENTRY_FLAG_NO_ATTACHED_EXPORT
@ FIB_ENTRY_FLAG_NO_ATTACHED_EXPORT
Definition: fib_entry.h:119