FD.io VPP  v18.04-17-g3a0d853
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>
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 the thier relative priority order.
28  * The lower the value the higher the priority
29  */
30 typedef enum fib_source_t_ {
31  /**
32  * Marker. Add new values after this one.
33  */
35  /**
36  * Special sources. These are for entries that are added to all
37  * FIBs by default, and should never be over-ridden (hence they
38  * are the highest priority)
39  */
41  /**
42  * Classify. A route that links directly to a classify adj
43  */
45  /**
46  * A route the is being 'proxied' on behalf of another device
47  */
49  /**
50  * Route added as a result of interface configuration.
51  * this will also come from the API/CLI, but the distinction is
52  * that is from confiiguration on an interface, not a 'ip route' command
53  */
55  /**
56  * SRv6 and SR-MPLS
57  */
59  /**
60  * A high priority source a plugin can use
61  */
63  /**
64  * From the BIER subsystem
65  */
67  /**
68  * From the control plane API
69  */
71  /**
72  * From the CLI.
73  */
75  /**
76  * A low (below routing) priority source a plugin can use
77  */
79  /**
80  * LISP
81  */
83  /**
84  * IPv[46] Mapping
85  */
87  /**
88  * DHCP
89  */
91  /**
92  * IPv6 Proxy ND
93  */
95  /**
96  * IPv6 ND (seen in the link-local tables)
97  */
99  /**
100  * Adjacency source.
101  * routes created as a result of ARP/ND entries. This is lower priority
102  * then the API/CLI. This is on purpose. trust me.
103  */
105  /**
106  * MPLS label. The prefix has been assigned a local label. This source
107  * never provides forwarding information, instead it acts as a place-holder
108  * so the association of label to prefix can be maintained
109  */
111  /**
112  * Attached Export source.
113  * routes created as a result of attahced export. routes thus sourced
114  * will be present in the export tables
115  */
117  /**
118  * Recursive resolution source.
119  * Used to install an entry that is the resolution traget of another.
120  */
122  /**
123  * uRPF bypass/exemption.
124  * Used to install an entry that is exempt from the loose uRPF check
125  */
127  /**
128  * The default route source.
129  * The default route is always added to the FIB table (like the
130  * special sources) but we need to be able to over-ride it with
131  * 'ip route' sources when provided
132  */
134  /**
135  * The interpose source.
136  * This is not a real source, so don't use it to source a prefix.
137  * It exists here to provide a value against which to register to the
138  * VFT for providing the interpose actions to a real source.
139  */
141  /**
142  * Marker. add new entries before this one.
143  */
145 } __attribute__ ((packed)) fib_source_t;
146 
147 STATIC_ASSERT (sizeof(fib_source_t) == 1,
148  "FIB too many sources");
149 
150 /**
151  * The maximum number of sources
152  */
153 #define FIB_SOURCE_MAX (FIB_SOURCE_LAST+1)
154 
155 #define FIB_SOURCES { \
156  [FIB_SOURCE_SPECIAL] = "special", \
157  [FIB_SOURCE_INTERFACE] = "interface", \
158  [FIB_SOURCE_PROXY] = "proxy", \
159  [FIB_SOURCE_BIER] = "BIER", \
160  [FIB_SOURCE_API] = "API", \
161  [FIB_SOURCE_CLI] = "CLI", \
162  [FIB_SOURCE_ADJ] = "adjacency", \
163  [FIB_SOURCE_MAP] = "MAP", \
164  [FIB_SOURCE_SR] = "SR", \
165  [FIB_SOURCE_LISP] = "LISP", \
166  [FIB_SOURCE_CLASSIFY] = "classify", \
167  [FIB_SOURCE_DHCP] = "DHCP", \
168  [FIB_SOURCE_IP6_ND_PROXY] = "IPv6-proxy-nd", \
169  [FIB_SOURCE_IP6_ND] = "IPv6-nd", \
170  [FIB_SOURCE_RR] = "recursive-resolution", \
171  [FIB_SOURCE_AE] = "attached_export", \
172  [FIB_SOURCE_MPLS] = "mpls", \
173  [FIB_SOURCE_URPF_EXEMPT] = "urpf-exempt", \
174  [FIB_SOURCE_DEFAULT_ROUTE] = "default-route", \
175  [FIB_SOURCE_PLUGIN_HI] = "plugin-hi", \
176  [FIB_SOURCE_PLUGIN_LOW] = "plugin-low", \
177  [FIB_SOURCE_INTERPOSE] = "interpose", \
178 }
179 
180 #define FOR_EACH_FIB_SOURCE(_item) \
181  for (_item = FIB_SOURCE_FIRST; _item < FIB_SOURCE_MAX; _item++)
182 
183 /**
184  * The different sources that can create a route.
185  * The sources are defined here the thier relative priority order.
186  * The lower the value the higher the priority
187  */
189  /**
190  * Marker. Add new values after this one.
191  */
193  /**
194  * Connected. The prefix is configured on an interface.
195  */
197  /**
198  * Attached. The prefix is attached to an interface.
199  */
201  /**
202  * The route is an explicit drop.
203  */
205  /**
206  * The route is exclusive. The client creating the route is
207  * providing an exclusive adjacency.
208  */
210  /**
211  * The route is attached cross tables and thus imports covered
212  * prefixes from the other table.
213  */
215  /**
216  * The prefix/address is local to this device
217  */
219  /**
220  * The prefix/address is a multicast prefix.
221  * this aplies only to MPLS. IP multicast is handled by mfib
222  */
224  /**
225  * The prefix/address exempted from loose uRPF check
226  * To be used with caution
227  */
229  /**
230  * The prefix/address exempted from attached export
231  */
233  /**
234  * This FIB entry imposes its source information on all prefixes
235  * that is covers
236  */
238  /**
239  * The interpose attribute.
240  * place the forwarding provided by the source infront of the forwarding
241  * provided by the best source, or failing that, by the cover.
242  */
244  /**
245  * Marker. add new entries before this one.
246  */
249 
250 #define FIB_ENTRY_ATTRIBUTES { \
251  [FIB_ENTRY_ATTRIBUTE_CONNECTED] = "connected", \
252  [FIB_ENTRY_ATTRIBUTE_ATTACHED] = "attached", \
253  [FIB_ENTRY_ATTRIBUTE_IMPORT] = "import", \
254  [FIB_ENTRY_ATTRIBUTE_DROP] = "drop", \
255  [FIB_ENTRY_ATTRIBUTE_EXCLUSIVE] = "exclusive", \
256  [FIB_ENTRY_ATTRIBUTE_LOCAL] = "local", \
257  [FIB_ENTRY_ATTRIBUTE_URPF_EXEMPT] = "uRPF-exempt", \
258  [FIB_ENTRY_ATTRIBUTE_MULTICAST] = "multicast", \
259  [FIB_ENTRY_ATTRIBUTE_NO_ATTACHED_EXPORT] = "no-attached-export", \
260  [FIB_ENTRY_ATTRIBUTE_COVERED_INHERIT] = "covered-inherit", \
261  [FIB_ENTRY_ATTRIBUTE_INTERPOSE] = "interpose", \
262 }
263 
264 #define FOR_EACH_FIB_ATTRIBUTE(_item) \
265  for (_item = FIB_ENTRY_ATTRIBUTE_FIRST; \
266  _item <= FIB_ENTRY_ATTRIBUTE_LAST; \
267  _item++)
268 
269 typedef enum fib_entry_flag_t_ {
282 } __attribute__((packed)) fib_entry_flag_t;
283 
284 /**
285  * Flags for the source data
286  */
288  /**
289  * Marker. Add new values after this one.
290  */
292  /**
293  * the source has been added to the entry
294  */
296  /**
297  * the source is contributing forwarding
298  */
300  /**
301  * the source is active/best
302  */
304  /**
305  * the source is inherited from its cover
306  */
308  /**
309  * Marker. add new entries before this one.
310  */
313 
314 
315 #define FIB_ENTRY_SRC_ATTRIBUTES { \
316  [FIB_ENTRY_SRC_ATTRIBUTE_ADDED] = "added", \
317  [FIB_ENTRY_SRC_ATTRIBUTE_CONTRIBUTING] = "contributing", \
318  [FIB_ENTRY_SRC_ATTRIBUTE_ACTIVE] = "active", \
319  [FIB_ENTRY_SRC_ATTRIBUTE_INHERITED] = "inherited", \
320 }
321 
322 #define FOR_EACH_FIB_SRC_ATTRIBUTE(_item) \
323  for (_item = FIB_ENTRY_SRC_ATTRIBUTE_FIRST; \
324  _item <= FIB_ENTRY_SRC_ATTRIBUTE_LAST; \
325  _item++)
326 
327 typedef enum fib_entry_src_flag_t_ {
333 } __attribute__ ((packed)) fib_entry_src_flag_t;
334 
335 /*
336  * Keep the size of the flags field to 2 bytes, so it
337  * can be placed next to the 2 bytes reference count
338  */
339 STATIC_ASSERT (sizeof(fib_entry_src_flag_t) <= 2,
340  "FIB entry flags field size too big");
341 
342 /**
343  * Information related to the source of a FIB entry
344  */
345 typedef struct fib_entry_src_t_ {
346  /**
347  * A vector of path extensions
348  */
350 
351  /**
352  * The path-list created by the source
353  */
355 
356  /**
357  * Flags the source contributes to the entry
358  */
360 
361  /**
362  * Which source this info block is for
363  */
364  fib_source_t fes_src;
365 
366  /**
367  * Flags on the source
368  */
369  fib_entry_src_flag_t fes_flags;
370 
371  /**
372  * 1 bytes ref count. This is not the number of users of the Entry
373  * (which is itself not large, due to path-list sharing), but the number
374  * of times a given source has been added. Which is even fewer
375  */
377 
378  /**
379  * Source specific info
380  */
381  union {
382  struct {
383  /**
384  * the index of the FIB entry that is the covering entry
385  */
387  /**
388  * This source's index in the cover's list
389  */
391  } rr;
392  struct {
393  /**
394  * the index of the FIB entry that is the covering entry
395  */
397  /**
398  * This source's index in the cover's list
399  */
401  /**
402  * DPO type to interpose. The dpo type needs to have registered
403  * it's 'contribute interpose' callback function.
404  */
406  } interpose;
407  struct {
408  /**
409  * the index of the FIB entry that is the covering entry
410  */
412  /**
413  * This source's index in the cover's list
414  */
416  } adj;
417  struct {
418  /**
419  * the index of the FIB entry that is the covering entry
420  */
421  fib_node_index_t fesi_cover;
422  /**
423  * This source's index in the cover's list
424  */
425  u32 fesi_sibling;
426  } interface;
427  struct {
428  /**
429  * This MPLS local label associated with the prefix.
430  */
432 
433  /**
434  * the indicies of the LFIB entries created
435  */
436  fib_node_index_t fesm_lfes[2];
437  } mpls;
438  struct {
439  /**
440  * The source FIB index.
441  */
443  } lisp;
444  } u;
446 
447 /**
448  * An entry in a FIB table.
449  *
450  * This entry represents a route added to the FIB that is stored
451  * in one of the FIB tables.
452  */
453 typedef struct fib_entry_t_ {
454  /**
455  * Base class. The entry's node representation in the graph.
456  */
458  /**
459  * The prefix of the route. this is const just to be sure.
460  * It is the entry's key/identity and so should never change.
461  */
463  /**
464  * The index of the FIB table this entry is in
465  */
467  /**
468  * The load-balance used for forwarding.
469  *
470  * We don't share the EOS and non-EOS even in case when they could be
471  * because:
472  * - complexity & reliability v. memory
473  * determining the conditions where sharing is possible is non-trivial.
474  * - separate LBs means we can get the EOS bit right in the MPLS label DPO
475  * and so save a few clock cycles in the DP imposition node since we can
476  * paint the header straight on without the need to check the packet
477  * type to derive the EOS bit value.
478  */
480  /**
481  * Vector of source infos.
482  * Most entries will only have 1 source. So we optimise for memory usage,
483  * which is preferable since we have many entries.
484  */
486  /**
487  * the path-list for which this entry is a child. This is also the path-list
488  * that is contributing forwarding for this entry.
489  */
491  /**
492  * index of this entry in the parent's child list.
493  * This is set when this entry is added as a child, but can also
494  * be changed by the parent as it manages its list.
495  */
497 
498  /**
499  * A vector of delegates.
500  */
502 } fib_entry_t;
503 
504 #define FOR_EACH_FIB_ENTRY_FLAG(_item) \
505  for (_item = FIB_ENTRY_FLAG_FIRST; _item < FIB_ENTRY_FLAG_MAX; _item++)
506 
507 #define FIB_ENTRY_FORMAT_BRIEF (0x0)
508 #define FIB_ENTRY_FORMAT_DETAIL (0x1)
509 #define FIB_ENTRY_FORMAT_DETAIL2 (0x2)
510 
511 extern u8 *format_fib_entry (u8 * s, va_list * args);
512 extern u8 *format_fib_source (u8 * s, va_list * args);
513 
515  const fib_prefix_t *prefix,
516  fib_source_t source,
518  const dpo_id_t *dpo);
519 
520 extern fib_node_index_t fib_entry_create (u32 fib_index,
521  const fib_prefix_t *prefix,
522  fib_source_t source,
524  const fib_route_path_t *paths);
525 extern void fib_entry_update (fib_node_index_t fib_entry_index,
526  fib_source_t source,
528  const fib_route_path_t *paths);
529 
530 extern void fib_entry_path_add(fib_node_index_t fib_entry_index,
531  fib_source_t source,
533  const fib_route_path_t *rpath);
534 extern void fib_entry_special_add(fib_node_index_t fib_entry_index,
535  fib_source_t source,
537  const dpo_id_t *dpo);
538 extern void fib_entry_special_update(fib_node_index_t fib_entry_index,
539  fib_source_t source,
541  const dpo_id_t *dpo);
543  fib_source_t source);
544 
546  fib_source_t source,
547  const fib_route_path_t *rpath);
548 
549 extern void fib_entry_inherit(fib_node_index_t cover,
550  fib_node_index_t covered);
551 
553  fib_source_t source);
554 
556  fib_node_index_t fib_entry_index);
557 extern void fib_entry_contribute_urpf(fib_node_index_t path_index,
558  index_t urpf);
560  fib_node_index_t fib_entry_index,
562  dpo_id_t *dpo);
564  fib_node_index_t fib_entry_index);
566  fib_node_index_t fib_entry_index,
567  fib_source_t source);
568 extern const int fib_entry_get_dpo_for_source (
569  fib_node_index_t fib_entry_index,
570  fib_source_t source,
571  dpo_id_t *dpo);
572 
573 extern adj_index_t fib_entry_get_adj(fib_node_index_t fib_entry_index);
574 
575 extern int fib_entry_cmp_for_sort(void *i1, void *i2);
576 
577 extern void fib_entry_cover_changed(fib_node_index_t fib_entry);
578 extern void fib_entry_cover_updated(fib_node_index_t fib_entry);
580  fib_node_index_t **entry_indicies);
581 
582 extern void fib_entry_lock(fib_node_index_t fib_entry_index);
583 extern void fib_entry_unlock(fib_node_index_t fib_entry_index);
584 
585 extern u32 fib_entry_child_add(fib_node_index_t fib_entry_index,
586  fib_node_type_t type,
587  fib_node_index_t child_index);
588 extern void fib_entry_child_remove(fib_node_index_t fib_entry_index,
589  u32 sibling_index);
592  fib_node_index_t fib_entry_index,
593  fib_source_t source);
594 
595 extern void fib_entry_encode(fib_node_index_t fib_entry_index,
596  fib_route_path_encode_t **api_rpaths);
597 extern void fib_entry_get_prefix(fib_node_index_t fib_entry_index,
598  fib_prefix_t *pfx);
599 extern u32 fib_entry_get_fib_index(fib_node_index_t fib_entry_index);
600 extern void fib_entry_set_source_data(fib_node_index_t fib_entry_index,
601  fib_source_t source,
602  const void *data);
603 extern const void* fib_entry_get_source_data(fib_node_index_t fib_entry_index,
604  fib_source_t source);
605 
608  fib_node_index_t fib_entry_index,
609  fib_source_t source);
610 extern fib_source_t fib_entry_get_best_source(fib_node_index_t fib_entry_index);
611 extern int fib_entry_is_sourced(fib_node_index_t fib_entry_index,
612  fib_source_t source);
613 
615 extern int fib_entry_is_resolved(fib_node_index_t fib_entry_index);
616 extern void fib_entry_set_flow_hash_config(fib_node_index_t fib_entry_index,
617  flow_hash_config_t hash_config);
618 
619 extern void fib_entry_module_init(void);
620 
621 /*
622  * unsafe... beware the raw pointer.
623  */
624 extern fib_node_index_t fib_entry_get_index(const fib_entry_t * fib_entry);
625 extern fib_entry_t * fib_entry_get(fib_node_index_t fib_entry_index);
626 
627 /*
628  * for testing purposes.
629  */
630 extern u32 fib_entry_pool_size(void);
631 
632 #endif
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:840
the source is active/best
Definition: fib_entry.h:303
Recursive resolution source.
Definition: fib_entry.h:121
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:373
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:527
An entry in a FIB table.
Definition: fib_entry.h:453
A representation of a fib path for fib_path_encode to convey the information to the caller...
Definition: fib_types.h:564
u32 fib_entry_get_resolving_interface_for_source(fib_node_index_t fib_entry_index, fib_source_t source)
A representation of a path as described by a route producer.
Definition: fib_types.h:455
The prefix/address exempted from loose uRPF check To be used with caution.
Definition: fib_entry.h:228
fib_entry_src_flag_t fib_entry_special_remove(fib_node_index_t fib_entry_index, fib_source_t source)
Definition: fib_entry.c:1061
Definition: fib_entry.h:331
void fib_entry_cover_updated(fib_node_index_t fib_entry)
Definition: fib_entry.c:1291
Definition: fib_entry.h:330
fib_source_t fib_entry_get_best_source(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:1419
Definition: fib_entry.h:281
Information related to the source of a FIB entry.
Definition: fib_entry.h:345
Definition: fib_entry.h:276
u32 mpls_label_t
A label value only, i.e.
Definition: packet.h:24
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 *rpath)
Definition: fib_entry.c:969
From the CLI.
Definition: fib_entry.h:74
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:41
Connected.
Definition: fib_entry.h:196
Marker.
Definition: fib_entry.h:311
The prefix/address is local to this device.
Definition: fib_entry.h:218
Attached Export source.
Definition: fib_entry.h:116
fib_source_t_
The different sources that can create a route.
Definition: fib_entry.h:30
Definition: fib_entry.h:279
u32 fe_fib_index
The index of the FIB table this entry is in.
Definition: fib_entry.h:466
uRPF bypass/exemption.
Definition: fib_entry.h:126
mpls_label_t fesm_label
This MPLS local label associated with the prefix.
Definition: fib_entry.h:431
Definition: fib_entry.h:272
fib_entry_src_t * fe_srcs
Vector of source infos.
Definition: fib_entry.h:485
Marker.
Definition: fib_entry.h:247
void fib_entry_set_flow_hash_config(fib_node_index_t fib_entry_index, flow_hash_config_t hash_config)
Definition: fib_entry.c:1461
fib_node_index_t fe_parent
the path-list for which this entry is a child.
Definition: fib_entry.h:490
u32 fib_entry_get_resolving_interface(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:1409
IPv[46] Mapping.
Definition: fib_entry.h:86
u32 fesi_sibling
This source&#39;s index in the cover&#39;s list.
Definition: fib_entry.h:400
u32 fe_sibling
index of this entry in the parent&#39;s child list.
Definition: fib_entry.h:496
Definition: fib_entry.h:278
enum fib_entry_src_attribute_t_ fib_entry_src_attribute_t
Flags for the source data.
void fib_entry_child_remove(fib_node_index_t fib_entry_index, u32 sibling_index)
Definition: fib_entry.c:538
Marker.
Definition: fib_entry.h:144
A high priority source a plugin can use.
Definition: fib_entry.h:62
u32 fib_entry_pool_size(void)
Definition: fib_entry.c:1623
int fib_entry_cmp_for_sort(void *i1, void *i2)
Definition: fib_entry.c:1555
This FIB entry imposes its source information on all prefixes that is covers.
Definition: fib_entry.h:237
The route is attached cross tables and thus imports covered prefixes from the other table...
Definition: fib_entry.h:214
Aggregrate type for a prefix.
Definition: fib_types.h:188
void fib_entry_get_prefix(fib_node_index_t fib_entry_index, fib_prefix_t *pfx)
Definition: fib_entry.c:1603
fib_entry_flag_t_
Definition: fib_entry.h:269
u32 fesa_sibling
This source&#39;s index in the cover&#39;s list.
Definition: fib_entry.h:415
const dpo_id_t * fib_entry_contribute_ip_forwarding(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:478
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:419
Definition: fib_entry.h:270
const int fib_entry_get_dpo_for_source(fib_node_index_t fib_entry_index, fib_source_t source, dpo_id_t *dpo)
MPLS label.
Definition: fib_entry.h:110
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
Definition: dpo.h:168
Definition: fib_entry.h:275
IPv6 ND (seen in the link-local tables)
Definition: fib_entry.h:98
Definition: fib_entry.h:274
u32 size
u32 fesr_sibling
This source&#39;s index in the cover&#39;s list.
Definition: fib_entry.h:390
Adjacency source.
Definition: fib_entry.h:104
struct fib_entry_src_t_ fib_entry_src_t
Information related to the source of a FIB entry.
void fib_entry_unlock(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:1574
From the BIER subsystem.
Definition: fib_entry.h:66
Definition: fib_entry.h:332
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:1186
fib_node_index_t fib_entry_get_index(const fib_entry_t *fib_entry)
Definition: fib_entry.c:57
int fib_entry_is_resolved(fib_node_index_t fib_entry_index)
Return !0 is the entry is reoslved, i.e.
Definition: fib_entry.c:1435
fib_node_index_t fesl_fib_index
The source FIB index.
Definition: fib_entry.h:442
A list of path-extensions.
Definition: fib_types.h:581
enum fib_entry_attribute_t_ fib_entry_attribute_t
The different sources that can create a route.
void fib_entry_cover_changed(fib_node_index_t fib_entry)
Definition: fib_entry.c:1218
An node in the FIB graph.
Definition: fib_node.h:286
struct fib_entry_t_ fib_entry_t
An entry in a FIB table.
The prefix/address exempted from attached export.
Definition: fib_entry.h:232
adj_index_t fib_entry_get_adj(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:498
void fib_entry_encode(fib_node_index_t fib_entry_index, fib_route_path_encode_t **api_rpaths)
Definition: fib_entry.c:1590
fib_node_index_t fib_entry_get_path_list(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:517
Attached.
Definition: fib_entry.h:200
int fib_entry_is_sourced(fib_node_index_t fib_entry_index, fib_source_t source)
Definition: fib_entry.h:328
fib_entry_attribute_t_
The different sources that can create a route.
Definition: fib_entry.h:188
the source is contributing forwarding
Definition: fib_entry.h:299
Definition: fib_entry.h:280
Definition: fib_entry.h:273
u32 fib_node_index_t
A typedef of a node index.
Definition: fib_types.h:30
u32 adj_index_t
An index for adjacencies.
Definition: adj_types.h:30
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:726
Marker.
Definition: fib_entry.h:192
enum fib_entry_flag_t_ fib_entry_flag_t
int fib_entry_recursive_loop_detect(fib_node_index_t entry_index, fib_node_index_t **entry_indicies)
Definition: fib_entry.c:1358
void fib_entry_inherit(fib_node_index_t cover, fib_node_index_t covered)
fib_entry_inherit
Definition: fib_entry.c:1161
fib_entry_flag_t fes_entry_flags
Flags the source contributes to the entry.
Definition: fib_entry.h:359
fib_source_t fes_src
Which source this info block is for.
Definition: fib_entry.h:364
fib_entry_src_flag_t fes_flags
Flags on the source.
Definition: fib_entry.h:369
const void * fib_entry_get_source_data(fib_node_index_t fib_entry_index, fib_source_t source)
unsigned int u32
Definition: types.h:88
adj_index_t fib_entry_get_adj_for_source(fib_node_index_t fib_entry_index, fib_source_t source)
The default route source.
Definition: fib_entry.h:133
Classify.
Definition: fib_entry.h:44
u8 * format_fib_source(u8 *s, va_list *args)
Definition: fib_entry.c:94
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:856
fib_node_t fe_node
Base class.
Definition: fib_entry.h:457
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:1174
enum fib_forward_chain_type_t_ fib_forward_chain_type_t
FIB output chain type.
The interpose source.
Definition: fib_entry.h:140
Definition: fib_entry.h:329
the source is inherited from its cover
Definition: fib_entry.h:307
fib_node_index_t fesr_cover
the index of the FIB entry that is the covering entry
Definition: fib_entry.h:386
dpo_id_t fesi_dpo
DPO type to interpose.
Definition: fib_entry.h:405
From the control plane API.
Definition: fib_entry.h:70
enum fib_entry_src_flag_t_ fib_entry_src_flag_t
Route added as a result of interface configuration.
Definition: fib_entry.h:54
u32 flow_hash_config_t
A flow hash configuration is a mask of the flow hash options.
Definition: lookup.h:82
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:689
Marker.
Definition: fib_entry.h:291
dpo_id_t fe_lb
The load-balance used for forwarding.
Definition: fib_entry.h:479
The interpose attribute.
Definition: fib_entry.h:243
fib_entry_delegate_t * fe_delegates
A vector of delegates.
Definition: fib_entry.h:501
fib_node_index_t fes_pl
The path-list created by the source.
Definition: fib_entry.h:354
fib_entry_t * fib_entry_get(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:45
fib_entry_flag_t fib_entry_get_flags_for_source(fib_node_index_t fib_entry_index, fib_source_t source)
SRv6 and SR-MPLS.
Definition: fib_entry.h:58
Marker.
Definition: fib_entry.h:34
void fib_entry_module_init(void)
Definition: fib_entry.c:1584
fib_entry_src_attribute_t_
Flags for the source data.
Definition: fib_entry.h:287
unsigned char u8
Definition: types.h:56
DHCP.
Definition: fib_entry.h:90
the source has been added to the entry
Definition: fib_entry.h:295
Definition: fib_entry.h:271
A route the is being &#39;proxied&#39; on behalf of another device.
Definition: fib_entry.h:48
STATIC_ASSERT(sizeof(fib_source_t)==1,"FIB too many sources")
Special sources.
Definition: fib_entry.h:40
void fib_entry_recalculate_forwarding(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:774
enum fib_node_type_t_ fib_node_type_t
The types of nodes in a FIB graph.
LISP.
Definition: fib_entry.h:82
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 *rpath)
Definition: fib_entry.c:873
void fib_entry_lock(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:1564
u8 * format_fib_entry(u8 *s, va_list *args)
Definition: fib_entry.c:104
fib_node_index_t fesa_cover
the index of the FIB entry that is the covering entry
Definition: fib_entry.h:411
fib_node_index_t fesi_cover
the index of the FIB entry that is the covering entry
Definition: fib_entry.h:396
u8 fes_ref_count
1 bytes ref count.
Definition: fib_entry.h:376
fib_path_ext_list_t fes_path_exts
A vector of path extensions.
Definition: fib_entry.h:349
The route is an explicit drop.
Definition: fib_entry.h:204
The route is exclusive.
Definition: fib_entry.h:209
A Delagate is a means to implmenet the Delagation design pattern; the extension of an objects functio...
u32 flags
Definition: vhost-user.h:77
Definition: fib_entry.h:277
fib_entry_flag_t fib_entry_get_flags(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:276
void fib_entry_set_source_data(fib_node_index_t fib_entry_index, fib_source_t source, const void *data)
A low (below routing) priority source a plugin can use.
Definition: fib_entry.h:78
const fib_prefix_t fe_prefix
The prefix of the route.
Definition: fib_entry.h:462
u32 fib_entry_get_fib_index(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:1613
The prefix/address is a multicast prefix.
Definition: fib_entry.h:223
IPv6 Proxy ND.
Definition: fib_entry.h:94
fib_entry_src_flag_t_
Definition: fib_entry.h:327