![]() |
TRIP Routing Daemon
TRIP (RFC 3219) Location Server Implementation
|
#include "pib.h"#include <logging/logging.h>#include <stdlib.h>#include <string.h>#include <ctype.h>
Go to the source code of this file.
Macros | |
| #define | _COMPONENT_ "db" |
| #define | INIT_VEC_CAPACITY 16 |
| #define | VEC_ENSURE_CAPACITY(vec, size, capacity, type) |
| Ensure vector has at least 1 free slot for new element. | |
Functions | |
| pib_t * | pib_new () |
| Initialize PIB. | |
| void | pib_destroy (pib_t *pib) |
| Deinitialize PIB. | |
| acl_t * | pib_acl_new (pib_t *pib, const char *name) |
| Create and insert ACL into PIB. | |
| routemap_t * | pib_routemap_new (pib_t *pib, const char *name, int deny) |
| Create and insert route map into PIB. | |
| acl_t * | pib_acl_find (const pib_t *pib, const char *name) |
| Find an ACL by name. | |
| routemap_t * | pib_routemap_find (const pib_t *pib, const char *name) |
| Find a route map by name. | |
| void | acl_insert (acl_t *acl, int deny, const char *expression) |
| Create and insert entry into ACL. | |
| acl_entry_t * | acl_find (const acl_t *acl, const char *expression) |
| Find entry in ACL. | |
| int | acl_entry_match (const char *expr, const char *target) |
| Match target against ACL expression. | |
| int | acl_check (const acl_t *acl, const char *target) |
| Check target against ACL. | |
| routemap_matcher_t * | routemap_statement_matcher_new (routemap_statement_t *statement, int af) |
| Allocate a matcher in a route map statement. | |
| void | routemap_statement_insert_action (routemap_statement_t *statement, const routemap_action_t *action) |
| Insert action (copy) into route map. | |
| void | routemap_statement_action_deinit (routemap_action_t *action) |
| Deinit route map action. | |
| void | routemap_matcher_insert (routemap_matcher_t *matcher, const acl_t *acl) |
| Insert ACL into route map matcher. | |
| void | routemap_matcher_deinit (routemap_matcher_t *matcher) |
| Deinitialize a route map matcher. | |
| routemap_action_t * | routemap_statement_action_find (const routemap_statement_t *statement, routemap_set_attr_t attribute) |
| Find action by attribute. | |
| routemap_statement_t * | routemap_statement_new (routemap_t *routemap, uint32_t seq, int deny) |
| Allocate statement in route map. | |
| routemap_statement_t * | routemap_statement_find (routemap_t *routemap, uint32_t seq) |
| Find statement in route map by sequence number. | |
| const routemap_statement_t * | routemap_match (const routemap_t *routemap, const char *route) |
| Match route against route map matchers. | |
Policy Information Base, singleton
| #define VEC_ENSURE_CAPACITY | ( | vec, | |
| size, | |||
| capacity, | |||
| type ) |
Ensure vector has at least 1 free slot for new element.
| int acl_check | ( | const acl_t * | acl, |
| const char * | target ) |
Check target against ACL.


| int acl_entry_match | ( | const char * | expr, |
| const char * | target ) |
Match target against ACL expression.
Does not check correctness of ACL expression

| const routemap_statement_t * routemap_match | ( | const routemap_t * | routemap, |
| const char * | route ) |
Match route against route map matchers.
Matchers are OR'd together, ACL's inside a matcher are AND'd together
