class BGPPeerData
|
Data that applies to a specific peering. More... |
|
|
Public Types
- enum Direction { SENT = 0,
RECEIVED = 1,
NEGOTIATED = 2,
ARRAY_SIZE = 3
}
Public Methods
Data that applies to a specific peering.
BGPPeerData (const LocalData& local_data, const Iptuple& iptuple, AsNum as,
const IPv4& next_hop, const uint16_t holdtime)
| BGPPeerData |
~BGPPeerData ()
| ~BGPPeerData |
[const]
[const]
void set_as (const AsNum& a)
| set_as |
bool use_4byte_asnums ()
| use_4byte_asnums |
[const]
void set_use_4byte_asnums (bool use)
| set_use_4byte_asnums |
bool we_use_4byte_asnums ()
| we_use_4byte_asnums |
[const]
uint32_t get_hold_duration ()
| get_hold_duration |
[const]
void set_hold_duration (uint32_t d)
| set_hold_duration |
uint32_t get_retry_duration ()
| get_retry_duration |
[const]
void set_retry_duration (uint32_t d)
| set_retry_duration |
uint32_t get_keepalive_duration ()
| get_keepalive_duration |
[const]
void set_keepalive_duration (uint32_t d)
| set_keepalive_duration |
[const]
The peers BGP ID.
void set_id (const IPv4& i)
| set_id |
bool route_reflector ()
| route_reflector |
[const]
void set_route_reflector (bool rr)
| set_route_reflector |
bool confederation ()
| confederation |
[const]
void set_confederation (bool conf)
| set_confederation |
ConfigVar<uint32_t>& get_prefix_limit ()
| get_prefix_limit |
Returns: the prefix limit.
const AsNum my_AS_number ()
| my_AS_number |
[const]
Return this routers AS number. Normally this is simple, but if
this router is in a confederation then the AS number depends on
the the type of the peering.
void compute_peer_type ()
| compute_peer_type |
Compute the type of this peering.
string get_peer_type_str ()
| get_peer_type_str |
[const]
[const]
[const]
true if peer type is either PEER_TYPE_IBGP or PEER_TYPE_IBGP_CLIENT
bool ibgp_vanilla ()
| ibgp_vanilla |
[const]
true if peer type is PEER_TYPE_IEBGP
bool ibgp_client ()
| ibgp_client |
[const]
true if peer type is PEER_TYPE_IBGP_CLIENT
bool ebgp_vanilla ()
| ebgp_vanilla |
[const]
true if peer type is PEER_TYPE_EBGP
bool ebgp_confed ()
| ebgp_confed |
[const]
true if peer type is PEER_TYPE_EBGP_CONFED
void add_recv_parameter (const ParameterNode& p)
| add_recv_parameter |
void remove_recv_parameter (const ParameterNode& p)
| remove_recv_parameter |
void add_sent_parameter (const ParameterNode& p)
| add_sent_parameter |
void remove_sent_parameter (const ParameterNode& p)
| remove_sent_parameter |
void add_negotiated_parameter (const ParameterNode& p)
| add_negotiated_parameter |
void remove_negotiated_parameter (const ParameterNode& p)
| remove_negotiated_parameter |
[const]
[const]
const ParameterList& parameter_negotiated_list ()
| parameter_negotiated_list |
[const]
void save_parameters (const ParameterList& parameter_list)
| save_parameters |
Take the optional parameters out of an open packet and save
them in _recv_parameters. The list is accessible through the
parameter_recv_list method.
void open_negotiation ()
| open_negotiation |
Go through the parameters that we have sent and the ones that
our peer has sent us and drop state into the
_negotiated_parameters list.
enum Direction { SENT = 0,
RECEIVED = 1,
NEGOTIATED = 2,
ARRAY_SIZE = 3
}
| Direction |
Multiprotocol option negotiation.
template <class A> bool multiprotocol (Safi safi,
Direction d = NEGOTIATED)
| multiprotocol |
[const]
Which multiprotocol parameters did we send,receive and negotiate
Parameters:
safi | - Subsequent address family identifier
|
d | - direction, SENT, RECEIVED or NEGOTIATED
|
Returns: true if this parameter was set
template <class A> void set_multiprotocol (Safi safi,
Direction d = NEGOTIATED)
| set_multiprotocol |
bool ipv4_unicast (Direction d = NEGOTIATED)
| ipv4_unicast |
[const]
bool ipv6_unicast (Direction d = NEGOTIATED)
| ipv6_unicast |
[const]
bool ipv4_multicast (Direction d = NEGOTIATED)
| ipv4_multicast |
[const]
bool ipv6_multicast (Direction d = NEGOTIATED)
| ipv6_multicast |
[const]
void set_v4_local_addr (const IPv4& addr)
| set_v4_local_addr |
void set_v6_local_addr (const IPv6& addr)
| set_v6_local_addr |
const IPv4& get_v4_local_addr ()
| get_v4_local_addr |
[const]
const IPv6& get_v6_local_addr ()
| get_v6_local_addr |
[const]
void set_configured_hold_time (uint16_t hold)
| set_configured_hold_time |
uint16_t get_configured_hold_time ()
| get_configured_hold_time |
[const]
void set_delay_open_time (uint32_t delay_open_time)
| set_delay_open_time |
uint32_t get_delay_open_time ()
| get_delay_open_time |
[const]
void set_next_hop_rewrite (const IPv4& next_hop)
| set_next_hop_rewrite |
const IPv4 get_next_hop_rewrite ()
| get_next_hop_rewrite |
[const]
void set_md5_password (const string &password)
| set_md5_password |
const string& get_md5_password ()
| get_md5_password |
[const]
void dump_peer_data ()
| dump_peer_data |
[const]
Dump the state of the peer data (debugging).
Generated by: pavlin on kobe.xorp.net on Wed Jan 7 19:11:04 2009, using kdoc 2.0a54+XORP.