How to merge routing table entries.
More...
Go to the source code of this file.
|
#define | FULL 0xffffffff |
| the ful key
|
|
#define | EMPTY 0x00000000 |
| the empty mask
|
|
#define | INIT_SOURCE 0x0 |
| the init for sources of entries
|
|
#define | INIT_ROUTE 0x0 |
| the init for routes of entries
|
|
How to merge routing table entries.
Definition in file merge.h.
◆ merge_t
merge struct. entries which can be merged
Definition at line 26 of file merge.h.
Data Fields |
bit_set_t |
entries |
Set of entries included in the merge. |
key_mask_t |
key_mask |
key_mask resulting from the merge |
uint32_t |
route |
Route taken by entries in the merge. |
uint32_t |
source |
Collective source of entries in the route. |
◆ FULL
the ful key
Definition at line 41 of file merge.h.
◆ EMPTY
the empty mask
Definition at line 44 of file merge.h.
◆ INIT_SOURCE
the init for sources of entries
Definition at line 47 of file merge.h.
◆ INIT_ROUTE
the init for routes of entries
Definition at line 50 of file merge.h.
◆ merge_goodness()
static int merge_goodness |
( |
merge_t * | merge | ) |
|
|
static |
Get the goodness for a merge.
- Parameters
-
- Returns
- the goodness of the merge.
Definition at line 55 of file merge.h.
◆ merge_clear()
static void merge_clear |
( |
merge_t * | m | ) |
|
|
inlinestatic |
Clear a merge.
- Parameters
-
Definition at line 61 of file merge.h.
◆ merge_init()
static bool merge_init |
( |
merge_t * | m, |
|
|
uint32_t | n_entries_in_table ) |
|
inlinestatic |
Initialise a merge.
- Parameters
-
[in] | m | the merge pointer to init |
[in] | n_entries_in_table | the possible number of entries in the merge |
- Returns
- whether the merge was initialised
Definition at line 76 of file merge.h.
◆ merge_delete()
static void merge_delete |
( |
merge_t * | m | ) |
|
|
inlinestatic |
Destroy a merge.
- Parameters
-
Definition at line 88 of file merge.h.
◆ merge_add()
static void merge_add |
( |
merge_t * | m, |
|
|
unsigned int | i ) |
|
inlinestatic |
Add an entry to the merge.
- Parameters
-
[in] | m | the merge to add to |
[in] | i | the entry bit to flag as potential merge-able entry |
Definition at line 96 of file merge.h.
◆ merge_contains()
static bool merge_contains |
( |
merge_t * | m, |
|
|
unsigned int | i ) |
|
inlinestatic |
See if an entry is contained within a merge.
- Parameters
-
[in] | m | the merge to check if a bit is set |
[in] | i | the bit to check |
- Returns
- true if the bit is set false otherwise.
Definition at line 121 of file merge.h.
◆ merge_remove()
static void merge_remove |
( |
merge_t * | m, |
|
|
unsigned int | i ) |
|
inlinestatic |
Remove an entry from the merge.
- Parameters
-
[in] | m | the merge to unset a bit from |
[in] | i | the entry id to unset |
Definition at line 129 of file merge.h.