Public Member Functions |
|
| PeerHandler (const string &peername, BGPPeer *peer, BGPPlumbing *plumbing_unicast, BGPPlumbing *plumbing_multicast) |
|
void | stop () |
|
void | peering_went_down () |
|
void | peering_came_up () |
|
bool | peering_is_up () const |
|
int | process_update_packet (UpdatePacket *p) |
| | process_update_packet is called when an update packet has been received by this peer
|
| template<typename A > |
| bool | add (const UpdatePacket *p, ref_ptr< FastPathAttributeList< IPv4 > > &original_pa_list, ref_ptr< FastPathAttributeList< A > > &pa_list, Safi safi) |
| | Given an update packet find all the NLRIs with <AFI,SAFI> specified and inject one by one into the plumbing.
|
| template<typename A > |
| bool | withdraw (const UpdatePacket *p, ref_ptr< FastPathAttributeList< IPv4 > > &original_pa_list, Safi safi) |
| | Given an update packet find all the WITHDRAWs with <AFI,SAFI> specified and inject one by on into the plumbing.
|
|
template<typename A > |
| bool | multiprotocol (Safi safi, BGPPeerData::Direction d) const |
|
virtual int | start_packet () |
| | add_route and delete_route are called by the plumbing to propagate a route *to* the peer.
|
|
virtual int | add_route (const SubnetRoute< IPv4 > &rt, FPAList4Ref &pa_list, bool ibgp, Safi safi) |
|
virtual int | replace_route (const SubnetRoute< IPv4 > &old_rt, bool old_ibgp, const SubnetRoute< IPv4 > &new_rt, bool new_ibgp, FPAList4Ref &pa_list, Safi safi) |
|
virtual int | delete_route (const SubnetRoute< IPv4 > &rt, FPAList4Ref &pa_list, bool new_ibgp, Safi safi) |
|
virtual PeerOutputState | push_packet () |
|
virtual void | output_no_longer_busy () |
|
AsNum | my_AS_number () const |
| | The AS number of this router.
|
|
AsNum | AS_number () const |
| | The AS number of the peer router.
|
|
bool | use_4byte_asnums () const |
| | Do we use 4-byte AS numbers with this peer?
|
|
virtual PeerType | get_peer_type () const |
|
const string & | peername () const |
|
bool | ibgp () const |
| virtual bool | originate_route_handler () const |
| virtual uint32_t | get_unique_id () const |
| virtual const IPv4 & | id () const |
| uint32_t | neighbour_address () const |
|
const IPv4 & | my_v4_nexthop () const |
|
string | get_local_addr () const |
| | Get the local address as a string in numeric form.
|
|
string | get_peer_addr () const |
| | Get the peer address as a string in numeric form.
|
| bool | get_peer_addr (IPv4 &addr) const |
| uint32_t | get_prefix_count () const |
|
virtual EventLoop & | eventloop () const |
|
template<> |
| bool | add (const UpdatePacket *p, ref_ptr< FastPathAttributeList< IPv4 > > &original_pa_list, ref_ptr< FastPathAttributeList< IPv4 > > &pa_list, Safi safi) |
Protected Attributes |
|
BGPPlumbing * | _plumbing_unicast |
|
BGPPlumbing * | _plumbing_multicast |
Private Attributes |
|
string | _peername |
|
BGPPeer * | _peer |
|
bool | _peering_is_up |
|
UpdatePacket * | _packet |
|
uint32_t | _nlri_total |
|
uint32_t | _packets |
PeerHandler's job is primarily format conversion.
But it also servers as a handle to tie together the input and output sides of a RIB.