FD.io VPP  v17.01.1-3-gc6833f8
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  * Route added as a result of interface configuration.
47  * this will also come from the API/CLI, but the distinction is
48  * that is from confiiguration on an interface, not a 'ip route' command
49  */
51  /**
52  * A high priority source a plugin can use
53  */
55  /**
56  * From the control plane API
57  */
59  /**
60  * From the CLI.
61  */
63  /**
64  * LISP
65  */
67  /**
68  * SRv6
69  */
71  /**
72  * IPv[46] Mapping
73  */
75  /**
76  * SIXRD
77  */
79  /**
80  * DHCP
81  */
83  /**
84  * Adjacency source.
85  * routes created as a result of ARP/ND entries. This is lower priority
86  * then the API/CLI. This is on purpose. trust me.
87  */
89  /**
90  * MPLS label. The prefix has been assigned a local label. This source
91  * never provides forwarding information, instead it acts as a place-holder
92  * so the association of label to prefix can be maintained
93  */
95  /**
96  * Attached Export source.
97  * routes created as a result of attahced export. routes thus sourced
98  * will be present in the export tables
99  */
101  /**
102  * Recursive resolution source.
103  * Used to install an entry that is the resolution traget of another.
104  */
106  /**
107  * uRPF bypass/exemption.
108  * Used to install an entry that is exempt from the loose uRPF check
109  */
111  /**
112  * The default route source.
113  * The default route is always added to the FIB table (like the
114  * special sources) but we need to be able to over-ride it with
115  * 'ip route' sources when provided
116  */
118  /**
119  * Marker. add new entries before this one.
120  */
122 } __attribute__ ((packed)) fib_source_t;
123 
124 STATIC_ASSERT (sizeof(fib_source_t) == 1,
125  "FIB too many sources");
126 
127 /**
128  * The maximum number of sources
129  */
130 #define FIB_SOURCE_MAX (FIB_SOURCE_LAST+1)
131 
132 #define FIB_SOURCES { \
133  [FIB_SOURCE_SPECIAL] = "special", \
134  [FIB_SOURCE_INTERFACE] = "interface", \
135  [FIB_SOURCE_API] = "API", \
136  [FIB_SOURCE_CLI] = "CLI", \
137  [FIB_SOURCE_ADJ] = "adjacency", \
138  [FIB_SOURCE_MAP] = "MAP", \
139  [FIB_SOURCE_SR] = "SR", \
140  [FIB_SOURCE_SIXRD] = "SixRD", \
141  [FIB_SOURCE_LISP] = "LISP", \
142  [FIB_SOURCE_CLASSIFY] = "classify", \
143  [FIB_SOURCE_DHCP] = "DHCP", \
144  [FIB_SOURCE_RR] = "recursive-resolution", \
145  [FIB_SOURCE_AE] = "attached_export", \
146  [FIB_SOURCE_MPLS] = "mpls", \
147  [FIB_SOURCE_URPF_EXEMPT] = "urpf-exempt", \
148  [FIB_SOURCE_DEFAULT_ROUTE] = "default-route", \
149 }
150 
151 #define FOR_EACH_FIB_SOURCE(_item) \
152  for (_item = FIB_SOURCE_FIRST; _item < FIB_SOURCE_MAX; _item++)
153 
154 /**
155  * The different sources that can create a route.
156  * The sources are defined here the thier relative priority order.
157  * The lower the value the higher the priority
158  */
160  /**
161  * Marker. Add new values after this one.
162  */
164  /**
165  * Connected. The prefix is configured on an interface.
166  */
168  /**
169  * Attached. The prefix is attached to an interface.
170  */
172  /**
173  * The route is an explicit drop.
174  */
176  /**
177  * The route is exclusive. The client creating the route is
178  * providing an exclusive adjacency.
179  */
181  /**
182  * The route is attached cross tables and thus imports covered
183  * prefixes from the other table.
184  */
186  /**
187  * The prefix/address is local to this device
188  */
190  /**
191  * Marker. add new entries before this one.
192  */
195 
196 /**
197  * The maximum number of sources
198  */
199 #define FIB_ENTRY_ATTRIBUTE_MAX (FIB_ENTRY_ATTRIBUTE_LAST+1)
200 
201 #define FIB_ENTRY_ATTRIBUTES { \
202  [FIB_ENTRY_ATTRIBUTE_CONNECTED] = "connected", \
203  [FIB_ENTRY_ATTRIBUTE_ATTACHED] = "attached", \
204  [FIB_ENTRY_ATTRIBUTE_IMPORT] = "import", \
205  [FIB_ENTRY_ATTRIBUTE_DROP] = "drop", \
206  [FIB_ENTRY_ATTRIBUTE_EXCLUSIVE] = "exclusive", \
207  [FIB_ENTRY_ATTRIBUTE_LOCAL] = "local", \
208 }
209 
210 #define FOR_EACH_FIB_ATTRIBUTE(_item) \
211  for (_item = FIB_ENTRY_ATTRIBUTE_FIRST; \
212  _item < FIB_ENTRY_ATTRIBUTE_MAX; \
213  _item++)
214 
215 typedef enum fib_entry_flag_t_ {
224 
225 /**
226  * Flags for the source data
227  */
229  /**
230  * Marker. Add new values after this one.
231  */
233  /**
234  * the source has been added to the entry
235  */
237  /**
238  * the source is active/best
239  */
241  /**
242  * Marker. add new entries before this one.
243  */
246 
247 #define FIB_ENTRY_SRC_ATTRIBUTE_MAX (FIB_ENTRY_SRC_ATTRIBUTE_LAST+1)
248 
249 #define FIB_ENTRY_SRC_ATTRIBUTES { \
250  [FIB_ENTRY_SRC_ATTRIBUTE_ADDED] = "added", \
251  [FIB_ENTRY_SRC_ATTRIBUTE_ACTIVE] = "active", \
252 }
253 
254 typedef enum fib_entry_src_flag_t_ {
258 } __attribute__ ((packed)) fib_entry_src_flag_t;
259 
260 /*
261  * Keep the size of the flags field to 2 bytes, so it
262  * can be placed next to the 2 bytes reference count
263  */
264 STATIC_ASSERT (sizeof(fib_entry_src_flag_t) <= 2,
265  "FIB entry flags field size too big");
266 
267 /**
268  * Information related to the source of a FIB entry
269  */
270 typedef struct fib_entry_src_t_ {
271  /**
272  * A vector of path extensions
273  */
275 
276  /**
277  * The path-list created by the source
278  */
280  /**
281  * Which source this info block is for
282  */
283  fib_source_t fes_src;
284  /**
285  * Flags on the source
286  */
287  fib_entry_src_flag_t fes_flags;
288 
289  /**
290  * 1 bytes ref count. This is not the number of users of the Entry
291  * (which is itself not large, due to path-list sharing), but the number
292  * of times a given source has been added. Which is even fewer
293  */
295 
296  /**
297  * Flags the source contributes to the entry
298  */
300 
301  /**
302  * Source specific info
303  */
304  union {
305  struct {
306  /**
307  * the index of the FIB entry that is the covering entry
308  */
310  /**
311  * This source's index in the cover's list
312  */
314  } rr;
315  struct {
316  /**
317  * the index of the FIB entry that is the covering entry
318  */
320  /**
321  * This source's index in the cover's list
322  */
324  } adj;
325  struct {
326  /**
327  * the index of the FIB entry that is the covering entry
328  */
330  /**
331  * This source's index in the cover's list
332  */
334  } interface;
335  struct {
336  /**
337  * This MPLS local label associated with the prefix.
338  */
340 
341  /**
342  * the indicies of the LFIB entries created
343  */
344  fib_node_index_t fesm_lfes[2];
345  } mpls;
346  struct {
347  /**
348  * The source FIB index.
349  */
351  } lisp;
352  };
354 
355 /**
356  * An entry in a FIB table.
357  *
358  * This entry represents a route added to the FIB that is stored
359  * in one of the FIB tables.
360  */
361 typedef struct fib_entry_t_ {
362  /**
363  * Base class. The entry's node representation in the graph.
364  */
366  /**
367  * The prefix of the route. this is const just to be sure.
368  * It is the entry's key/identity and so should never change.
369  */
371  /**
372  * The index of the FIB table this entry is in
373  */
375  /**
376  * The load-balance used for forwarding.
377  *
378  * We don't share the EOS and non-EOS even in case when they could be
379  * because:
380  * - complexity & reliability v. memory
381  * determining the conditions where sharing is possible is non-trivial.
382  * - separate LBs means we can get the EOS bit right in the MPLS label DPO
383  * and so save a few clock cycles in the DP imposition node since we can
384  * paint the header straight on without the need to check the packet
385  * type to derive the EOS bit value.
386  */
387  dpo_id_t fe_lb; // [FIB_FORW_CHAIN_MPLS_NUM];
388  /**
389  * Vector of source infos.
390  * Most entries will only have 1 source. So we optimise for memory usage,
391  * which is preferable since we have many entries.
392  */
394  /**
395  * the path-list for which this entry is a child. This is also the path-list
396  * that is contributing forwarding for this entry.
397  */
399  /**
400  * index of this entry in the parent's child list.
401  * This is set when this entry is added as a child, but can also
402  * be changed by the parent as it manages its list.
403  */
405 
406  /**
407  * A vector of delegates.
408  */
410 } fib_entry_t;
411 
412 #define FOR_EACH_FIB_ENTRY_FLAG(_item) \
413  for (_item = FIB_ENTRY_FLAG_FIRST; _item < FIB_ENTRY_FLAG_MAX; _item++)
414 
415 #define FIB_ENTRY_FORMAT_BRIEF (0x0)
416 #define FIB_ENTRY_FORMAT_DETAIL (0x1)
417 #define FIB_ENTRY_FORMAT_DETAIL2 (0x2)
418 
419 extern u8 *format_fib_entry (u8 * s, va_list * args);
420 
422  const fib_prefix_t *prefix,
423  fib_source_t source,
425  const dpo_id_t *dpo);
426 
427 extern fib_node_index_t fib_entry_create (u32 fib_index,
428  const fib_prefix_t *prefix,
429  fib_source_t source,
431  const fib_route_path_t *paths);
432 extern void fib_entry_update (fib_node_index_t fib_entry_index,
433  fib_source_t source,
435  const fib_route_path_t *paths);
436 
437 extern void fib_entry_path_add(fib_node_index_t fib_entry_index,
438  fib_source_t source,
440  const fib_route_path_t *rpath);
441 extern void fib_entry_special_add(fib_node_index_t fib_entry_index,
442  fib_source_t source,
444  const dpo_id_t *dpo);
445 extern void fib_entry_special_update(fib_node_index_t fib_entry_index,
446  fib_source_t source,
448  const dpo_id_t *dpo);
450  fib_source_t source);
451 
453  fib_source_t source,
454  const fib_route_path_t *rpath);
456  fib_source_t source);
457 
458 extern void fib_entry_contribute_urpf(fib_node_index_t path_index,
459  index_t urpf);
461  fib_node_index_t fib_entry_index,
463  dpo_id_t *dpo);
465  fib_node_index_t fib_entry_index);
467  fib_node_index_t fib_entry_index,
468  fib_source_t source);
469 extern const int fib_entry_get_dpo_for_source (
470  fib_node_index_t fib_entry_index,
471  fib_source_t source,
472  dpo_id_t *dpo);
473 
474 extern adj_index_t fib_entry_get_adj(fib_node_index_t fib_entry_index);
475 
476 extern int fib_entry_cmp_for_sort(void *i1, void *i2);
477 
478 extern void fib_entry_cover_changed(fib_node_index_t fib_entry);
479 extern void fib_entry_cover_updated(fib_node_index_t fib_entry);
481  fib_node_index_t **entry_indicies);
482 
483 extern void fib_entry_lock(fib_node_index_t fib_entry_index);
484 extern void fib_entry_unlock(fib_node_index_t fib_entry_index);
485 
486 extern u32 fib_entry_child_add(fib_node_index_t fib_entry_index,
488  fib_node_index_t child_index);
489 extern void fib_entry_child_remove(fib_node_index_t fib_entry_index,
490  u32 sibling_index);
493  fib_node_index_t fib_entry_index,
494  fib_source_t source);
495 
496 extern void fib_entry_encode(fib_node_index_t fib_entry_index,
497  fib_route_path_encode_t **api_rpaths);
498 extern void fib_entry_get_prefix(fib_node_index_t fib_entry_index,
499  fib_prefix_t *pfx);
500 extern u32 fib_entry_get_fib_index(fib_node_index_t fib_entry_index);
501 extern void fib_entry_set_source_data(fib_node_index_t fib_entry_index,
502  fib_source_t source,
503  const void *data);
504 extern const void* fib_entry_get_source_data(fib_node_index_t fib_entry_index,
505  fib_source_t source);
506 
509  fib_node_index_t fib_entry_index,
510  fib_source_t source);
511 extern fib_source_t fib_entry_get_best_source(fib_node_index_t fib_entry_index);
512 extern int fib_entry_is_sourced(fib_node_index_t fib_entry_index,
513  fib_source_t source);
514 
516 
517 extern void fib_entry_module_init(void);
518 
519 /*
520  * unsafe... beware the raw pointer.
521  */
522 extern fib_node_index_t fib_entry_get_index(const fib_entry_t * fib_entry);
523 extern fib_entry_t * fib_entry_get(fib_node_index_t fib_entry_index);
524 
525 /*
526  * for testing purposes.
527  */
528 extern u32 fib_entry_pool_size(void);
529 
530 #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:746
the source is active/best
Definition: fib_entry.h:240
Recursive resolution source.
Definition: fib_entry.h:105
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:375
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:472
An entry in a FIB table.
Definition: fib_entry.h:361
A representation of a fib path for fib_path_encode to convey the information to the caller...
Definition: fib_types.h:335
enum fib_node_type_t_ fib_node_type_t
The types of nodes in a FIB graph.
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:285
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
fib_entry_src_flag_t fib_entry_special_remove(fib_node_index_t fib_entry_index, fib_source_t source)
Definition: fib_entry.c:947
Definition: fib_entry.h:257
void fib_entry_cover_updated(fib_node_index_t fib_entry)
Definition: fib_entry.c:1184
fib_source_t fib_entry_get_best_source(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:1311
Information related to the source of a FIB entry.
Definition: fib_entry.h:270
Definition: fib_entry.h:222
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:852
From the CLI.
Definition: fib_entry.h:62
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:167
Marker.
Definition: fib_entry.h:244
The prefix/address is local to this device.
Definition: fib_entry.h:189
Attached Export source.
Definition: fib_entry.h:100
fib_source_t_
The different sources that can create a route.
Definition: fib_entry.h:30
u32 fe_fib_index
The index of the FIB table this entry is in.
Definition: fib_entry.h:374
uRPF bypass/exemption.
Definition: fib_entry.h:110
mpls_label_t fesm_label
This MPLS local label associated with the prefix.
Definition: fib_entry.h:339
Definition: fib_entry.h:218
fib_entry_src_t * fe_srcs
Vector of source infos.
Definition: fib_entry.h:393
Marker.
Definition: fib_entry.h:193
fib_node_index_t fe_parent
the path-list for which this entry is a child.
Definition: fib_entry.h:398
SIXRD.
Definition: fib_entry.h:78
u32 fib_entry_get_resolving_interface(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:1301
IPv[46] Mapping.
Definition: fib_entry.h:74
u32 fesi_sibling
This source&#39;s index in the cover&#39;s list.
Definition: fib_entry.h:333
u32 fe_sibling
index of this entry in the parent&#39;s child list.
Definition: fib_entry.h:404
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:483
Marker.
Definition: fib_entry.h:121
A high priority source a plugin can use.
Definition: fib_entry.h:54
u32 fib_entry_pool_size(void)
Definition: fib_entry.c:1453
int fib_entry_cmp_for_sort(void *i1, void *i2)
Definition: fib_entry.c:1388
The route is attached cross tables and thus imports covered prefixes from the other table...
Definition: fib_entry.h:185
Aggregrate type for a prefix.
Definition: fib_types.h:145
void fib_entry_get_prefix(fib_node_index_t fib_entry_index, fib_prefix_t *pfx)
Definition: fib_entry.c:1433
fib_entry_flag_t_
Definition: fib_entry.h:215
u32 fesa_sibling
This source&#39;s index in the cover&#39;s list.
Definition: fib_entry.h:323
const dpo_id_t * fib_entry_contribute_ip_forwarding(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:432
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:391
Definition: fib_entry.h:216
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:94
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
Definition: dpo.h:138
Definition: fib_entry.h:221
Definition: fib_entry.h:220
struct fib_path_ext_t_ * fes_path_exts
A vector of path extensions.
Definition: fib_entry.h:274
u32 fesr_sibling
This source&#39;s index in the cover&#39;s list.
Definition: fib_entry.h:313
Adjacency source.
Definition: fib_entry.h:88
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:1407
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:1045
fib_node_index_t fib_entry_get_index(const fib_entry_t *fib_entry)
Definition: fib_entry.c:56
fib_node_index_t fesl_fib_index
The source FIB index.
Definition: fib_entry.h:350
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:1112
An node in the FIB graph.
Definition: fib_node.h:273
struct fib_entry_t_ fib_entry_t
An entry in a FIB table.
adj_index_t fib_entry_get_adj(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:447
void fib_entry_encode(fib_node_index_t fib_entry_index, fib_route_path_encode_t **api_rpaths)
Definition: fib_entry.c:1423
fib_node_index_t fib_entry_get_path_list(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:462
Attached.
Definition: fib_entry.h:171
int fib_entry_is_sourced(fib_node_index_t fib_entry_index, fib_source_t source)
Definition: fib_entry.h:255
fib_entry_attribute_t_
The different sources that can create a route.
Definition: fib_entry.h:159
Definition: fib_entry.h:219
u32 fib_node_index_t
A typedef of a node index.
Definition: fib_types.h:28
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:657
Marker.
Definition: fib_entry.h:163
int fib_entry_recursive_loop_detect(fib_node_index_t entry_index, fib_node_index_t **entry_indicies)
Definition: fib_entry.c:1250
enum fib_entry_flag_t_ fib_entry_flag_t
fib_entry_flag_t fes_entry_flags
Flags the source contributes to the entry.
Definition: fib_entry.h:299
fib_source_t fes_src
Which source this info block is for.
Definition: fib_entry.h:283
fib_entry_src_flag_t fes_flags
Flags on the source.
Definition: fib_entry.h:287
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:117
Classify.
Definition: fib_entry.h:44
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:767
fib_node_t fe_node
Base class.
Definition: fib_entry.h:365
u64 size
Definition: vhost-user.h:74
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:1033
enum fib_forward_chain_type_t_ fib_forward_chain_type_t
FIB output chain type.
Definition: fib_entry.h:256
fib_node_index_t fesr_cover
the index of the FIB entry that is the covering entry
Definition: fib_entry.h:309
From the control plane API.
Definition: fib_entry.h:58
enum fib_entry_src_flag_t_ fib_entry_src_flag_t
Route added as a result of interface configuration.
Definition: fib_entry.h:50
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:620
Marker.
Definition: fib_entry.h:232
dpo_id_t fe_lb
The load-balance used for forwarding.
Definition: fib_entry.h:387
fib_entry_delegate_t * fe_delegates
A vector of delegates.
Definition: fib_entry.h:409
fib_node_index_t fes_pl
The path-list created by the source.
Definition: fib_entry.h:279
fib_entry_t * fib_entry_get(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:44
fib_entry_flag_t fib_entry_get_flags_for_source(fib_node_index_t fib_entry_index, fib_source_t source)
SRv6.
Definition: fib_entry.h:70
Marker.
Definition: fib_entry.h:34
void fib_entry_module_init(void)
Definition: fib_entry.c:1417
fib_entry_src_attribute_t_
Flags for the source data.
Definition: fib_entry.h:228
unsigned char u8
Definition: types.h:56
DHCP.
Definition: fib_entry.h:82
the source has been added to the entry
Definition: fib_entry.h:236
Definition: fib_entry.h:217
STATIC_ASSERT(sizeof(fib_source_t)==1,"FIB too many sources")
Special sources.
Definition: fib_entry.h:40
LISP.
Definition: fib_entry.h:66
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:789
void fib_entry_lock(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:1397
u8 * format_fib_entry(u8 *s, va_list *args)
Definition: fib_entry.c:93
fib_node_index_t fesa_cover
the index of the FIB entry that is the covering entry
Definition: fib_entry.h:319
A path extension is a per-entry addition to the forwarding information when packets are sent for that...
Definition: fib_path_ext.h:32
fib_node_index_t fesi_cover
the index of the FIB entry that is the covering entry
Definition: fib_entry.h:329
u8 fes_ref_count
1 bytes ref count.
Definition: fib_entry.h:294
The route is an explicit drop.
Definition: fib_entry.h:175
The route is exclusive.
Definition: fib_entry.h:180
A Delagate is a means to implmenet the Delagation design pattern; the extension of an objects functio...
u32 flags
Definition: vhost-user.h:75
fib_entry_flag_t fib_entry_get_flags(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:278
void fib_entry_set_source_data(fib_node_index_t fib_entry_index, fib_source_t source, const void *data)
const fib_prefix_t fe_prefix
The prefix of the route.
Definition: fib_entry.h:370
u32 fib_entry_get_fib_index(fib_node_index_t fib_entry_index)
Definition: fib_entry.c:1443
fib_entry_src_flag_t_
Definition: fib_entry.h:254