Net::BGP::Process(3)
πΈ NAME πΈ
Net::BGP::Process π
β a class that encapsulates BGP session multiplexing functionality. This is the Net::BGP::Process(3) page from User Contributed Perl Documentation, bestie, and itβs lowkey the backstage pass to all the session juggling β¨
π¦ SYNOPSIS π¦
use Net::BGP::Process;
$bgp = Net::BGP::Process->new( Port => $port );
$bgp->add_peer($peer);
$bgp->remove_peer($peer);
$bgp->event_loop();
π DESCRIPTION π
Okay so this module is the friend group organizer for BGP π It encapsulates the functionality necessary to multiplex multiple BGP peering sessions. While individual Net::BGP::Peer objects contain the state of each peering session, it is the Net::BGP::Process object which monitors each peerβs transport-layer connection and timers and signals the peer whenever messages are available for processing or timers expire. The way that works is very main character energy, ngl.
π«Ά And yes, a Net::BGP::Process object must be instantiated, even if a program only intends to establish a session with a single peer. No cap.
π 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, and 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 privileges, 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 Net::BGP::Process. π
π 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 Net::BGP::Peer object, which corresponds to a distinct peering session, must be registered with the Net::BGP::Process 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 Net::BGP::Peer object. Slay β¨
π¦ 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. Not me keeping track of the roster, but yes π
π₯ 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 occurred. 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). Periodt π
π SEE ALSO π
Net::BGPNet::BGP::PeerNet::BGP::UpdateNet::BGP::RefreshNet::BGP::ASPathNet::BGP::NLRINet::BGP::Notification
π AUTHOR π
Stephen J. Scheck <sscheck@cpan.org>
π§ββοΈ okay bye bestie, this cute little sign-off is perl v5.32.1 Β· 2021-12-02 Β· Net::BGP::Process(3) β ily, stay multiplexed! π
π¦ where this page comes from
- epel 9: perl-Net-BGP 0.18-1.el9 Β· GPL+ or Artistic
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms