libbgp
0.6
A C++ BGP Library.
|
The RouteEventBus class. More...
#include <route-event-bus.h>
Public Member Functions | |
int | publish (RouteEventReceiver *recv, const RouteEvent &ev) |
Publish a route event. More... | |
bool | subscribe (RouteEventReceiver *recv) |
Subscribe from this event bus. More... | |
bool | unsubscribe (RouteEventReceiver *recv) |
Unsubscribe to this event bus. More... | |
The RouteEventBus class.
The route event bus is used to share information and communicate with other BGP FSMs. For example, route add/withdrawn events are sent to other FSMs with route event bus. Collision resolution also depends on the route event bus.
Definition at line 27 of file route-event-bus.h.
int libbgp::RouteEventBus::publish | ( | RouteEventReceiver * | recv, |
const RouteEvent & | ev | ||
) |
Publish a route event.
recv | Pointer to the RouteEventReceiver object that published the event. It is for ensuring publisher of the event does not receive the event it published itself. Can be NULL. |
ev | The event to publish; |
Definition at line 28 of file route-event-bus.cc.
bool libbgp::RouteEventBus::subscribe | ( | RouteEventReceiver * | recv | ) |
Subscribe from this event bus.
recv | The receiver. |
Definition at line 47 of file route-event-bus.cc.
bool libbgp::RouteEventBus::unsubscribe | ( | RouteEventReceiver * | recv | ) |
Unsubscribe to this event bus.
recv | The receiver. |
Definition at line 60 of file route-event-bus.cc.