libbgp
0.6
A C++ BGP Library.
|
The base of BGP RIB entry. More...
#include <bgp-rib.h>
Public Member Functions | |
BgpRibEntry () | |
Construct a new BgpRibEntry. More... | |
bool | operator> (const T &other) const |
Test if this entry has greater weight then anoter entry. Please note that weight are only calculated based on path attribues. (i.e., you need to compare route prefix first) More... | |
Public Attributes | |
uint32_t | src_router_id |
The originating BGP speaker's ID of this entry. (network bytes order) | |
uint64_t | update_id |
The update ID. More... | |
int32_t | weight |
Weight of this entry. More... | |
std::vector< std::shared_ptr< BgpPathAttrib > > | attribs |
Path attributes for this entry. | |
BgpRouteSource | src |
Source of this entry. More... | |
BgpRouteStatus | status |
Status of this entry. More... | |
uint32_t | ibgp_peer_asn |
ASN of the IBGP peer. (Valid iff src == SRC_IBGP) More... | |
The base of BGP RIB entry.
T | Type of BgpRibEntry |
|
inline |
|
inline |
Test if this entry has greater weight then anoter entry. Please note that weight are only calculated based on path attribues. (i.e., you need to compare route prefix first)
other | The other entry. |
uint32_t libbgp::BgpRibEntry< T >::ibgp_peer_asn |
ASN of the IBGP peer. (Valid iff src == SRC_IBGP)
The ibgp_peer_asn field can be used to identify which IBGP session does this route belongs to. This is needed since a BGP speaker can have multiple IBGP sessions with different ASNS.
Definition at line 100 of file bgp-rib.h.
Referenced by libbgp::BgpRib4::BgpRib4(), and libbgp::BgpRib6::BgpRib6().
BgpRouteSource libbgp::BgpRibEntry< T >::src |
Source of this entry.
If the route is from an IBGP peer, the nexthop might not be reachable directly. You may need recursive nexthop or info from other routing protocols.
Definition at line 83 of file bgp-rib.h.
Referenced by libbgp::BgpRib4::BgpRib4(), libbgp::BgpRib6::BgpRib6(), and libbgp::BgpRibEntry< BgpRib6Entry >::BgpRibEntry().
BgpRouteStatus libbgp::BgpRibEntry< T >::status |
Status of this entry.
Active routes are routes currently picked as best routes.
Definition at line 91 of file bgp-rib.h.
Referenced by libbgp::BgpRib4::BgpRib4(), libbgp::BgpRib6::BgpRib6(), libbgp::BgpRibEntry< BgpRib6Entry >::BgpRibEntry(), libbgp::BgpRib4::withdraw(), and libbgp::BgpRib6::withdraw().
uint64_t libbgp::BgpRibEntry< T >::update_id |
The update ID.
BgpRib4Entry with same update ID are received from the same update and their path attributes are therefore same. Note that entries with different update_id may still have same path attributes.
Definition at line 59 of file bgp-rib.h.
Referenced by libbgp::BgpRib4::BgpRib4(), and libbgp::BgpRib6::BgpRib6().
int32_t libbgp::BgpRibEntry< T >::weight |
Weight of this entry.
Entry with higher weight will be prefered. Weight is only compared when selecting entry with equal routes.
Definition at line 68 of file bgp-rib.h.
Referenced by libbgp::BgpRib4::BgpRib4(), and libbgp::BgpRib6::BgpRib6().