1Net::BGP::Process(3)  User Contributed Perl Documentation Net::BGP::Process(3)
2
3
4

NAME

6       "Net::BGP::Process" - Class encapsulating BGP session multiplexing
7       functionality
8

SYNOPSIS

10           use Net::BGP::Process;
11
12           $bgp = Net::BGP::Process->new( Port => $port );
13
14           $bgp->add_peer($peer);
15           $bgp->remove_peer($peer);
16           $bgp->event_loop();
17

DESCRIPTION

19       This module encapsulates the functionality necessary to multiplex
20       multiple BGP peering sessions. While individual Net::BGP::Peer objects
21       contain the state of each peering session, it is the
22       "Net::BGP::Process" object which monitors each peer's transport-layer
23       connection and timers and signals the peer whenever messages are
24       available for processing or timers expire.  A "Net::BGP::Process"
25       object must be instantiated, even if a program only intends to
26       establish a session with a single peer.
27

METHODS

29       new() - create a new "Net::BGP::Process" object
30
31           $bgp = Net::BGP::Process->new( Port => $port, ListenAddr => '1.2.3.4' );
32
33       This is the constructor for "Net::BGP::Process" objects. It returns a
34       reference to the newly created object. The following named parameters
35       may be passed to the constructor.
36
37   Port
38       This parameter sets the TCP port the BGP process listens on. It may be
39       omitted, in which case it defaults to the well-known BGP port TCP/179.
40       If the program cannot run with root priviliges, it is necessary to set
41       this parameter to a value greater than or equal to 1024. Note that some
42       BGP implementations may not allow the specification of an alternate
43       port and may be unable to establish a connection to the
44       "Net::BGP::Process".
45
46   ListenAddr
47       This parameter sets the IP address the BGP process listens on.
48       Defaults to INADDR_ANY.
49
50       add_peer() - add a new peer to the BGP process
51
52           $bgp->add_peer($peer);
53
54       Each Net::BGP::Peer object, which corresponds to a distinct peering
55       session, must be registered with the "Net::BGP::Process" object via
56       this method. It is typically called immediately after a new peer object
57       is created to add the peer to the BGP process. The method accepts a
58       single parameter, which is a reference to a Net::BGP::Peer object.
59
60       remove_peer() - remove a peer from the BGP process
61
62           $bgp->remove_peer($peer);
63
64       This method should be called if a peer should no longer be managed by
65       the BGP process, for example, if the session is broken or closed and
66       will not be re-established. The method accepts a single parameter,
67       which is a reference to a Net::BGP::Peer object which has previously
68       been registered with the process object with the add_peer() method.
69
70       event_loop() - start the process event loop
71
72           $bgp->event_loop();
73
74       This method must called after all peers are instantiated and added to
75       the BGP process and any other necessary initialization has occured.
76       Once it is called, it takes over program control flow, and control will
77       only return to user code when one of the event callback functions is
78       invoked upon receipt of a BGP protocol message or a user established
79       timer expires (see Net::BGP::Peer for details on how to establish
80       timers and callback functions). The method takes no parameters. It will
81       only return when there are no Net::BGP::Peer objects remaining under
82       its management, which can only occur if they are explicitly removed
83       with the remove_peer() method (perhaps called in one of the callback or
84       timer functions).
85

SEE ALSO

87       Net::BGP
88       Net::BGP::Peer
89       Net::BGP::Update
90       Net::BGP::Refresh
91       Net::BGP::ASPath
92       Net::BGP::NLRI
93       Net::BGP::Notification
94

AUTHOR

96       Stephen J. Scheck <sscheck@cpan.org>
97
98
99
100perl v5.36.0                      2022-07-22              Net::BGP::Process(3)
Impressum