mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-14 15:18:44 +00:00
210dbc16c2
The patch implements optional internal import table to a channel and hooks it to BGP so it can be used as Adj-RIB-In. When enabled, all received (pre-filtered) routes are stored there and import filters can be re-evaluated without explicit route refresh. An import table can be examined using e.g. 'show route import table bgp1.ipv4'.
50 lines
855 B
C
50 lines
855 B
C
/*
|
|
* BIRD Library -- Event Processing
|
|
*
|
|
* (c) 1999 Martin Mares <mj@ucw.cz>
|
|
*
|
|
* Can be freely distributed and used under the terms of the GNU GPL.
|
|
*/
|
|
|
|
#ifndef _BIRD_EVENT_H_
|
|
#define _BIRD_EVENT_H_
|
|
|
|
#include "lib/resource.h"
|
|
|
|
typedef struct event {
|
|
resource r;
|
|
void (*hook)(void *);
|
|
void *data;
|
|
node n; /* Internal link */
|
|
} event;
|
|
|
|
typedef list event_list;
|
|
|
|
extern event_list global_event_list;
|
|
|
|
event *ev_new(pool *);
|
|
void ev_run(event *);
|
|
#define ev_init_list(el) init_list(el)
|
|
void ev_enqueue(event_list *, event *);
|
|
void ev_schedule(event *);
|
|
void ev_postpone(event *);
|
|
int ev_run_list(event_list *);
|
|
|
|
static inline int
|
|
ev_active(event *e)
|
|
{
|
|
return e->n.next != NULL;
|
|
}
|
|
|
|
static inline event*
|
|
ev_new_init(pool *p, void (*hook)(void *), void *data)
|
|
{
|
|
event *e = ev_new(p);
|
|
e->hook = hook;
|
|
e->data = data;
|
|
return e;
|
|
}
|
|
|
|
|
|
#endif
|