GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NET::BGP::PROCESS (3)

.ds Aq ’

NAME

Net::BGP::Process - Class encapsulating BGP session multiplexing functionality

CONTENTS

SYNOPSIS



    use Net::BGP::Process;

    $bgp = Net::BGP::Process->new( Port => $port );

    $bgp->add_peer($peer);
    $bgp->remove_peer($peer);
    $bgp->event_loop();



DESCRIPTION

This module encapsulates the functionality necessary to multiplex multiple BGP peering sessions. While individual <B>Net::BGP::PeerB> objects contain the state of each peering session, it is the <B>Net::BGP::ProcessB> object which monitors each peer’s transport-layer connection and timers and signals the peer whenever messages are available for processing or timers expire. A <B>Net::BGP::ProcessB> object must be instantiated, even if a program only intends to establish a session with a single peer.

METHODS

new() - create a new Net::BGP::Process object



    $bgp = Net::BGP::Process->new( Port => $port, ListenAddr => 1.2.3.4 );



This is the constructor for Net::BGP::Process objects. It returns a reference to the newly created object. The following named parameters may be passed to the constructor.

    Port

This parameter sets the TCP port the BGP process listens on. It may be omitted, in which case it defaults to the well-known BGP port TCP/179. If the program cannot run with root priviliges, it is necessary to set this parameter to a value greater than or equal to 1024. Note that some BGP implementations may not allow the specification of an alternate port and may be unable to establish a connection to the <B>Net::BGP::ProcessB>.

    ListenAddr

This parameter sets the IP address the BGP process listens on. Defaults to INADDR_ANY.

add_peer() - add a new peer to the BGP process



    $bgp->add_peer($peer);



Each <B>Net::BGP::PeerB> object, which corresponds to a distinct peering session, must be registered with the <B>Net::BGP::ProcessB> object via this method. It is typically called immediately after a new peer object is created to add the peer to the BGP process. The method accepts a single parameter, which is a reference to a <B>Net::BGP::PeerB> object.

remove_peer() - remove a peer from the BGP process



    $bgp->remove_peer($peer);



This method should be called if a peer should no longer be managed by the BGP process, for example, if the session is broken or closed and will not be re-established. The method accepts a single parameter, which is a reference to a Net::BGP::Peer object which has previously been registered with the process object with the add_peer() method.

event_loop() - start the process event loop



    $bgp->event_loop();



This method must called after all peers are instantiated and added to the BGP process and any other necessary initialization has occured. Once it is called, it takes over program control flow, and control will only return to user code when one of the event callback functions is invoked upon receipt of a BGP protocol message or a user established timer expires (see Net::BGP::Peer for details on how to establish timers and callback functions). The method takes no parameters. It will only return when there are no Net::BGP::Peer objects remaining under its management, which can only occur if they are explicitly removed with the remove_peer() method (perhaps called in one of the callback or timer functions).

SEE ALSO

Net::BGP, Net::BGP::Peer, Net::BGP::Update, Net::BGP::Notification

AUTHOR

Stephen J. Scheck <code@neurosphere.com>
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::BGP::PROCESS (3) 2015-01-27

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.