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 Net::BGP::Process
22       object which monitors each peer's transport-layer connection and timers
23       and signals the peer whenever messages are available for processing or
24       timers expire.  A Net::BGP::Process object must be instantiated, even
25       if a program only intends to establish a session with a single peer.
26

METHODS

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

SEE ALSO

86       Net::BGP, Net::BGP::Peer, Net::BGP::Update, Net::BGP::Notification
87

AUTHOR

89       Stephen J. Scheck <sscheck@cpan.org>
90
91
92
93perl v5.30.1                      2020-01-30              Net::BGP::Process(3)
Impressum