...
The BgpSessionManager is responsible for interfacing with the BGP speakers. It listens for incoming iBGP connections, and creates a BgpSession instance per-session. The BgpSession instance is responsible for the following:
Receiving and decoding the BGP protocol messages.
Generating and transmitting the necessary BGP control messages (BGP Open and the periodic BGP Keepalive messages) that are needed to establish and maintain the BGP session.
Generating BGP notifications if a BGP error is detected (as defined by the BGP protocol specification).
Translating the BGP Update control messages into BGP routing updates that are submitted to the BgpSessionManager.
...