TRIP Routing Daemon
TRIP (RFC 3219) Location Server Implementation
Loading...
Searching...
No Matches
pib.h File Reference

Policy Information Base. More...

#include <stddef.h>
#include <stdint.h>
Include dependency graph for pib.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  acl_entry_t
 Access Control List entry. More...
struct  acl_t
 Access Control List. More...
struct  routemap_matcher_t
 Route map ACL matcher. More...
struct  routemap_action_t
 Route map Action. More...
struct  routemap_statement_t
 Route map statement. More...
struct  routemap_t
 Route map. More...
struct  pib_t
 Policy Information Base. More...

Enumerations

enum  routemap_set_attr_t { ROUTEMAP_SET_LOCALPREF , ROUTEMAP_SET_METRIC , ROUTEMAP_SET_NEXTHOP , ROUTEMAP_SET_ITADPATH_PREPEND }
 Attributes that can be set. More...

Functions

pib_tpib_new ()
 Initialize PIB.
void pib_destroy (pib_t *pib)
 Deinitialize PIB.
acl_tpib_acl_new (pib_t *pib, const char *name)
 Create and insert ACL into PIB.
routemap_tpib_routemap_new (pib_t *pib, const char *name, int deny)
 Create and insert route map into PIB.
acl_tpib_acl_find (const pib_t *pib, const char *name)
 Find an ACL by name.
routemap_tpib_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_tacl_find (const acl_t *acl, const char *expression)
 Find entry in ACL.
routemap_matcher_troutemap_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_troutemap_statement_action_find (const routemap_statement_t *statement, routemap_set_attr_t attribute)
 Find action by attribute.
routemap_statement_troutemap_statement_new (routemap_t *routemap, uint32_t seq, int deny)
 Allocate statement in route map.
routemap_statement_troutemap_statement_find (routemap_t *routemap, uint32_t seq)
 Find statement in route map by sequence number.
const routemap_statement_troutemap_match (const routemap_t *routemap, const char *route)
 Match route against route map matchers.

Detailed Description

Policy Information Base.

Enumeration Type Documentation

◆ routemap_set_attr_t

Attributes that can be set.

Enumerator
ROUTEMAP_SET_LOCALPREF 

int value

ROUTEMAP_SET_METRIC 

int value

ROUTEMAP_SET_NEXTHOP 

string valstr1 af, valstr2 nexthop

ROUTEMAP_SET_ITADPATH_PREPEND 

int value

Function Documentation

◆ routemap_match()

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

Here is the call graph for this function: