![]() |
TRIP Routing Daemon
TRIP (RFC 3219) Location Server Implementation
|
#include "trib.h"#include "db/pib.h"#include "protocol/protocol.h"#include <logging/logging.h>#include <stdlib.h>#include <string.h>
Go to the source code of this file.
Macros | |
| #define | _COMPONENT_ "db" |
| #define | INIT_TABLE_CAPACITY 256 |
| #define | INIT_ADJ_TRIBS_CAPACITY 32 |
Functions | |
| entry_t * | entry_clone (const entry_t *entry) |
| void | entry_destroy (entry_t *entry) |
| Destroy entry. | |
| void | trib_table_deinit (table_t *t) |
| Deinitialize table. | |
| trib_t * | trib_new (uint32_t local_itad) |
| Initialize TRIB structure. | |
| void | trib_adj_pair_add (trib_t *trib, table_t *in, table_t *out) |
| Add and init pair of tables owned by caller. | |
| void | trib_adj_pair_remove (trib_t *trib, table_t *in, table_t *out) |
| void | trib_destroy (trib_t *trib) |
| Deinit TRIB structure. | |
| void | trib_table_insert (table_t *table, entry_t *entry) |
| Add route to table. | |
| void | trib_table_clear (table_t *table) |
| Destroy all entries and clear table. | |
| void | trib_update_local (trib_t *trib) |
| Update local routes when ITAD is defined. | |
| void | trib_update_adj_out (trib_t *trib, table_t *adj_trib_out) |
| Update an Adj-TRIB-Out. | |
| void | trib_update_full (trib_t *trib) |
| Execute route selection. | |
| size_t | get_new_entries (const table_t *table, entry_t ***new_ents_out) |
| Return array of new entry references to new. | |
| size_t | group_entries_by_attrs (entry_t **entries, size_t entry_size, entry_group_t **groups_out) |
| Group array of entry references by attributes. | |
Telephony Routing Information Base, singleton
Return array of new entry references to new.
Allocates array of references and assigns it to new_ents_out
| table | Table with new entries |
| new_ents_out | Where to put entry references |

| size_t group_entries_by_attrs | ( | entry_t ** | entries, |
| size_t | entries_size, | ||
| entry_group_t ** | groups_out ) |
Group array of entry references by attributes.
| entries | Input array |
| entries_size | Input array size |
| groups_out | Output entry reference groups |

Update an Adj-TRIB-Out.
For use when a new peer connets and we have to UPDATE it without triggering a full update


| void trib_update_full | ( | trib_t * | trib | ) |
Execute route selection.
Takes Ext-TRIBs-in and locala routes Updates Ext-TRIB, Loc-TRIB, optimized Loc-TRIB and Ext-TRIBs-out

