Peer
NAME
Net::BGP::Peer - BGP Server Peer Class
SYNOPSIS
use Net::BGP::Peer;
my $peer = Net::BGP::Peer.new(:peer-ip('192.0.2.1'), :peer-asn(65001));
$peer.set-channel($channel);
$peer.remove-peer;
DESCRIPTION
This keeps track of a peer's state and configuration.
ATTRIBUTES
state
The current state of the connection.
passive
If true, this peer is "passive" - meaning that we will not initiate an outbound connection to this peer.
peer-ip
The IP address for the peer (String).
peer-port
The port of the peer (passive side).
peer-asn
The ASN belonging to the peer.
peer-af
The AFI/SAFI combinations supported by the peer.
peer-supports-asn32
True if the peer sent an ASN32 capability.
supports-capabilities
True if the peer has sent a capability in the open message to us.
last-message-received
The monotonic time stamp of the last message received.
my-asn
The ASN belonging to the server process.
my-af
The AFI/SAFI combinations supported by us.
supports-capabilities
Set to True
if a connection has been established where the peer sent a
capability parameter. Set to False
if the peer didn't send a capability
parameter in the last OPEN they sent. Not defined if the peer has not yet
connected.
METHODS
set-channel
$peer.set-channel($channel);
Sets the channel that is connected to the BGP server component.
remove-peer
$peer.remove-peer
Does an ungraceful shutdown of the peer (if open).
supports-afi-safi($afi, $safi)
Returns true if the peer has indicated support for this AFI/SAFI address family specification.
do-asn32
Returns True
if we have negotiated 4 byte (32 bit) ASNs with the peer.
Otherwise returns False
.
is-ibgp
Return True
if this peer is an iBGP peer, False
otherwise.
AUTHOR
Joelle Maslak <[email protected]>
COPYRIGHT AND LICENSE
Copyright © 2018-2019 Joelle Maslak
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.