libbgp  0.6
A C++ BGP Library.
Public Member Functions | Public Attributes | List of all members
libbgp::BgpRib4Entry Class Reference

The BgpRib4Entry class. More...

#include <bgp-rib4.h>

Inheritance diagram for libbgp::BgpRib4Entry:
Inheritance graph
[legend]
Collaboration diagram for libbgp::BgpRib4Entry:
Collaboration graph
[legend]

Public Member Functions

 BgpRib4Entry (Prefix4 r, uint32_t src, const std::vector< std::shared_ptr< BgpPathAttrib >> attribs)
 Construct a new Bgp Rib Entry:: Bgp Rib Entry object. More...
 
uint32_t getNexthop () const
 Get nexthop for this entry. More...
 
- Public Member Functions inherited from libbgp::BgpRibEntry< BgpRib4Entry >
 BgpRibEntry ()
 Construct a new BgpRibEntry. More...
 
bool operator> (const BgpRib4Entry &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

Prefix4 route
 The prefix of this entry.
 
- Public Attributes inherited from libbgp::BgpRibEntry< BgpRib4Entry >
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...
 

Detailed Description

The BgpRib4Entry class.

Examples:
route-event-bus.cc.

Definition at line 66 of file bgp-rib4.h.

Constructor & Destructor Documentation

◆ BgpRib4Entry()

libbgp::BgpRib4Entry::BgpRib4Entry ( Prefix4  r,
uint32_t  src,
const std::vector< std::shared_ptr< BgpPathAttrib >>  as 
)

Construct a new Bgp Rib Entry:: Bgp Rib Entry object.

Parameters
rPrefix of the entry.
srcOriginating BGP speaker's ID in network bytes order.
asPath attributes for this entry.

Definition at line 28 of file bgp-rib4.cc.

References libbgp::BgpRibEntry< BgpRib4Entry >::attribs, libbgp::BgpRibEntry< BgpRib4Entry >::src, and libbgp::BgpRibEntry< BgpRib4Entry >::src_router_id.

Member Function Documentation

◆ getNexthop()

uint32_t libbgp::BgpRib4Entry::getNexthop ( ) const

Get nexthop for this entry.

Returns
uint32_t nexthop in network byte order.
Exceptions
no_nexthopnexthop attribute does not exist.

Definition at line 39 of file bgp-rib4.cc.

References libbgp::BgpRibEntry< BgpRib4Entry >::attribs.


The documentation for this class was generated from the following files: