13 #define BGP_FSM_BUFFER_SIZE 4096 145 int run(
const uint8_t *buffer,
const size_t buffer_size);
203 int validateState(uint8_t type);
206 int fsmEvalOpenConfirm(
const BgpMessage *msg);
207 int fsmEvalEstablished(
const BgpMessage *msg);
211 void dropAllRoutes();
217 bool validAddr4(uint32_t addr)
const;
220 bool validAddr6(
const uint8_t addr[16])
const;
228 int resloveCollision(uint32_t peer_bgp_id,
bool is_new);
239 void alterNexthop6 (
const uint8_t* &nh_global,
const uint8_t* &nh_local);
253 std::recursive_mutex out_buffer_mutex;
259 uint32_t peer_bgp_id;
273 bool send_ipv4_routes;
274 bool send_ipv6_routes;
The BGP FSM configuration object.
int run(const uint8_t *buffer, const size_t buffer_size)
Run the FSM on buffer.
The BgpRib4 (IPv4 BGP Routing Information Base) class.
BgpRib4 & getRib4() const
Get the IPv4 Routing Information Base.
The BgpOpenMessage class.
int stop()
Stop the FSM. (Any -> Idle)
uint32_t getBgpId() const
Get local BGP ID.
uint32_t getPeerAsn() const
Get peer ASN.
void resetHard()
Perform a hard reset.
Probe for collision detection.
The libbgp clock interface.
BgpState
BGP Finite State Machine status.
uint32_t getPeerBgpId() const
Get peer BGP ID.
The BgpMessage base class.
The BgpRib6 (IPv6 BGP Routing Information Base) class.
The IPv4 BGP Routing Information Base.
The BGP FSM configuration object.
int start()
send OPEN message to peer. (IDLE -> OpenSent)
uint32_t getAsn() const
Get local ASN.
BgpState getState() const
Get current FSM state.
uint16_t getHoldTimer() const
Get the negotiated hold timer.
The RouteEventReceiver interface.
BgpRib6 & getRib6() const
Get the IPv6 Routing Information Base.
The BGP Routing Information Base for IPv6.
int resetSoft()
Perform a soft reset.
int tick()
Tick the clock (Check for time-based events)
BGP protocol serializers/deserializers.
The BgpUpdateMessage class.