|
|
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.
PeerHandler (const string &peername, BGPPeer *peer,
BGPPlumbing *plumbing_unicast,
BGPPlumbing *plumbing_multicast)
| PeerHandler |
~PeerHandler ()
| ~PeerHandler |
[virtual]
void stop ()
| stop |
void peering_went_down ()
| peering_went_down |
void peering_came_up ()
| peering_came_up |
bool peering_is_up ()
| peering_is_up |
[const]
int process_update_packet (const UpdatePacket *p)
| process_update_packet |
process_update_packet is called when an update packet has been received by this peer
template <typename A> bool add (const UpdatePacket *p,
PathAttributeList<A>& pa_list,Safi safi)
| add |
Given an update packet find all the NLRIs with <AFI,SAFI> specified and inject one by one into the plumbing.
Parameters:
p | - packet to tease apart |
safi | - Subsequent address family identifier |
Returns: true if an <AFI,SAFI> was found.
template <typename A> bool withdraw (const UpdatePacket *p, Safi safi)
| withdraw |
Given an update packet find all the WITHDRAWs with <AFI,SAFI> specified and inject one by on into the plumbing.
Parameters:
p | - packet to tease apart |
safi | - Subsequent address family identifier |
Returns: true if an <AFI,SAFI> was found.
template <typename A> bool multiprotocol (Safi safi,
BGPPeerData::Direction d)
| multiprotocol |
[const]
int start_packet ()
| start_packet |
[virtual]
add_route and delete_route are called by the plumbing to propagate a route *to* the peer.
int add_route (const SubnetRoute<IPv4> &rt, bool ibgp, Safi safi)
| add_route |
[virtual]
int add_route (const SubnetRoute<IPv6> &rt, bool ibgp, Safi safi)
| add_route |
[virtual]
int replace_route (const SubnetRoute<IPv4> &old_rt, bool old_ibgp,
const SubnetRoute<IPv4> &new_rt, bool new_ibgp,
Safi safi)
| replace_route |
[virtual]
int replace_route (const SubnetRoute<IPv6> &old_rt, bool old_ibgp,
const SubnetRoute<IPv6> &new_rt, bool new_ibgp,
Safi safi)
| replace_route |
[virtual]
int delete_route (const SubnetRoute<IPv4> &rt,
bool new_ibgp,
Safi safi)
| delete_route |
[virtual]
int delete_route (const SubnetRoute<IPv6> &rt,
bool new_ibgp,
Safi safi)
| delete_route |
[virtual]
PeerOutputState push_packet ()
| push_packet |
[virtual]
void output_no_longer_busy ()
| output_no_longer_busy |
[virtual]
AsNum my_AS_number ()
| my_AS_number |
[const]
AsNum AS_number ()
| AS_number |
[const]
The AS number of the peer router.
bool use_4byte_asnums ()
| use_4byte_asnums |
[const]
Do we use 4-byte AS numbers with this peer?
PeerType get_peer_type ()
| get_peer_type |
[const virtual]
const string& peername ()
| peername |
[const]
bool ibgp ()
| ibgp |
[const]
bool originate_route_handler ()
| originate_route_handler |
[const virtual]
Returns: true if this is the originate route handler.
uint32_t get_unique_id ()
| get_unique_id |
[const virtual]
Returns: an ID that is unique per peer for use in decision.
const IPv4& id ()
| id |
[const virtual]
Returns: the neighbours BGP ID as an integer for use by decision.
uint32_t neighbour_address ()
| neighbour_address |
[const]
Returns: the neighbours IP address an as integer for use by decision.
const IPv4& my_v4_nexthop ()
| my_v4_nexthop |
[const]
const IPv6& my_v6_nexthop ()
| my_v6_nexthop |
[const]
string get_local_addr ()
| get_local_addr |
[const]
Get the local address as a string in numeric form.
string get_peer_addr ()
| get_peer_addr |
[const]
Get the peer address as a string in numeric form.
bool get_peer_addr (IPv4& addr)
| get_peer_addr |
[const]
Parameters:
addr | fill in the address if this is IPv4. |
Returns: true if the peer address is IPv4.
bool get_peer_addr (IPv6& addr)
| get_peer_addr |
[const]
Parameters:
addr | fill in the address if this is IPv6. |
Returns: true if the peer address is IPv6.
uint32_t get_prefix_count ()
| get_prefix_count |
[const]
Returns: the number of prefixes in the RIB-IN.
EventLoop& eventloop ()
| eventloop |
[const virtual]
BGPPlumbing * _plumbing_unicast | _plumbing_unicast |
[protected]
BGPPlumbing * _plumbing_multicast | _plumbing_multicast |
[protected]