|
INET Framework for OMNeT++/OMNEST
|
#include <BgpSession.h>
◆ BgpSession()
| inet::bgp::BgpSession::BgpSession |
( |
BgpRouter & |
bgpRouter | ) |
|
18 _box =
new fsm::TopState::Box(*
this);
19 _fsm =
new Macho::Machine<fsm::TopState>(
_box);
◆ ~BgpSession()
| inet::bgp::BgpSession::~BgpSession |
( |
| ) |
|
|
virtual |
◆ findAndStartNextSession()
◆ getBGPRoutingTable()
◆ getCheckConnection()
| bool inet::bgp::BgpSession::getCheckConnection |
( |
| ) |
const |
|
inline |
◆ getConnectionRetryTime()
| simtime_t inet::bgp::BgpSession::getConnectionRetryTime |
( |
| ) |
const |
|
inline |
◆ getEbgpMultihop()
| int inet::bgp::BgpSession::getEbgpMultihop |
( |
| ) |
const |
|
inline |
◆ getFSM()
| Macho::Machine<fsm::TopState>& inet::bgp::BgpSession::getFSM |
( |
| ) |
const |
|
inline |
◆ getHoldTime()
| simtime_t inet::bgp::BgpSession::getHoldTime |
( |
| ) |
const |
|
inline |
◆ getIPRoutingTable()
◆ getKeepAliveTime()
| simtime_t inet::bgp::BgpSession::getKeepAliveTime |
( |
| ) |
const |
|
inline |
◆ getLinkIntf()
◆ getLocalPreference()
| int inet::bgp::BgpSession::getLocalPreference |
( |
| ) |
const |
|
inline |
◆ getNextHopSelf()
| bool inet::bgp::BgpSession::getNextHopSelf |
( |
| ) |
const |
|
inline |
◆ getPeerAddr()
| Ipv4Address inet::bgp::BgpSession::getPeerAddr |
( |
| ) |
const |
|
inline |
◆ getSessionID()
| SessionId inet::bgp::BgpSession::getSessionID |
( |
| ) |
const |
|
inline |
◆ getSocket()
| TcpSocket* inet::bgp::BgpSession::getSocket |
( |
| ) |
const |
|
inline |
◆ getSocketListen()
| TcpSocket* inet::bgp::BgpSession::getSocketListen |
( |
| ) |
const |
|
inline |
◆ getStartEventTime()
| simtime_t inet::bgp::BgpSession::getStartEventTime |
( |
| ) |
const |
|
inline |
◆ getStatistics()
| void inet::bgp::BgpSession::getStatistics |
( |
unsigned int * |
statTab | ) |
|
◆ getType()
◆ getTypeString()
| const std::string inet::bgp::BgpSession::getTypeString |
( |
BgpSessionType |
sessionType | ) |
|
|
static |
◆ isEstablished()
| bool inet::bgp::BgpSession::isEstablished |
( |
| ) |
const |
|
inline |
◆ isRouteExcluded()
| bool inet::bgp::BgpSession::isRouteExcluded |
( |
const Ipv4Route & |
rtEntry | ) |
const |
|
inline |
◆ listenConnectionFromPeer()
| void inet::bgp::BgpSession::listenConnectionFromPeer |
( |
| ) |
|
|
inline |
◆ openTCPConnectionToPeer()
| void inet::bgp::BgpSession::openTCPConnectionToPeer |
( |
| ) |
|
|
inline |
◆ restartsConnectRetryTimer()
| void inet::bgp::BgpSession::restartsConnectRetryTimer |
( |
bool |
start = true | ) |
|
◆ restartsHoldTimer()
| void inet::bgp::BgpSession::restartsHoldTimer |
( |
| ) |
|
◆ restartsKeepAliveTimer()
| void inet::bgp::BgpSession::restartsKeepAliveTimer |
( |
| ) |
|
◆ sendKeepAliveMessage()
| void inet::bgp::BgpSession::sendKeepAliveMessage |
( |
| ) |
|
181 const auto& keepAliveMsg = makeShared<BgpKeepAliveMessage>();
183 EV_INFO <<
"Sending BGP Keep-alive message to " <<
_info.
peerAddr.
str(
false)
188 Packet *pk =
new Packet(
"BgpKeepAlive");
189 pk->insertAtFront(keepAliveMsg);
◆ sendNotificationMessage()
| void inet::bgp::BgpSession::sendNotificationMessage |
( |
| ) |
|
◆ sendOpenMessage()
| void inet::bgp::BgpSession::sendOpenMessage |
( |
| ) |
|
113 const auto& openMsg = makeShared<BgpOpenMessage>();
123 Packet *pk =
new Packet(
"BgpOpen");
124 pk->insertAtFront(openMsg);
◆ sendUpdateMessage()
132 const auto& updateMsg = makeShared<BgpUpdateMessage>();
134 updateMsg->setWithDrawnRoutesLength(0);
136 size_t attrLength = 0;
137 updateMsg->setPathAttributesArraySize(content.size());
138 for (
size_t i = 0; i < content.size(); i++) {
140 updateMsg->setPathAttributes(i, content[i]);
142 updateMsg->setTotalPathAttributeLength(attrLength);
143 updateMsg->addChunkLength(
B(attrLength));
145 updateMsg->setNLRIArraySize(1);
146 updateMsg->setNLRI(0, NLRI);
147 updateMsg->addChunkLength(
B(1 + (NLRI.length + 7) / 8));
148 updateMsg->setTotalLength(
B(updateMsg->getChunkLength()).get());
155 Packet *pk =
new Packet(
"BgpUpdate");
156 pk->insertAtFront(updateMsg);
◆ setInfo()
| void inet::bgp::BgpSession::setInfo |
( |
SessionInfo |
info | ) |
|
◆ setlinkIntf()
◆ setLocalPreference()
| void inet::bgp::BgpSession::setLocalPreference |
( |
int |
localPreference | ) |
|
|
inline |
◆ setNextHopSelf()
| void inet::bgp::BgpSession::setNextHopSelf |
( |
bool |
nextHopSelf | ) |
|
|
inline |
◆ setSocket()
| void inet::bgp::BgpSession::setSocket |
( |
TcpSocket * |
socket | ) |
|
|
inline |
◆ setSocketListen()
| void inet::bgp::BgpSession::setSocketListen |
( |
TcpSocket * |
socket | ) |
|
|
inline |
◆ setTimers()
| void inet::bgp::BgpSession::setTimers |
( |
simtime_t * |
delayTab | ) |
|
60 else if (delayTab[3] != SIMTIME_ZERO) {
◆ startConnection()
| void inet::bgp::BgpSession::startConnection |
( |
| ) |
|
◆ updateSendProcess()
◆ fsm::Active
| friend struct fsm::Active |
|
friend |
◆ fsm::Connect
| friend struct fsm::Connect |
|
friend |
◆ fsm::Established
| friend struct fsm::Established |
|
friend |
◆ fsm::Idle
◆ fsm::OpenConfirm
| friend struct fsm::OpenConfirm |
|
friend |
◆ fsm::OpenSent
| friend struct fsm::OpenSent |
|
friend |
◆ _box
| fsm::TopState::Box* inet::bgp::BgpSession::_box |
|
private |
◆ _connectRetryCounter
| unsigned int inet::bgp::BgpSession::_connectRetryCounter = 0 |
|
private |
◆ _connectRetryTime
| simtime_t inet::bgp::BgpSession::_connectRetryTime = BGP_RETRY_TIME |
|
private |
◆ _fsm
◆ _holdTime
| simtime_t inet::bgp::BgpSession::_holdTime = BGP_HOLD_TIME |
|
private |
◆ _info
◆ _keepAliveMsgRcv
| unsigned int inet::bgp::BgpSession::_keepAliveMsgRcv = 0 |
|
private |
◆ _keepAliveMsgSent
| unsigned int inet::bgp::BgpSession::_keepAliveMsgSent = 0 |
|
private |
◆ _keepAliveTime
| simtime_t inet::bgp::BgpSession::_keepAliveTime = BGP_KEEP_ALIVE |
|
private |
◆ _notificationMsgRcv
| unsigned int inet::bgp::BgpSession::_notificationMsgRcv = 0 |
|
private |
◆ _notificationMsgSent
| unsigned int inet::bgp::BgpSession::_notificationMsgSent = 0 |
|
private |
◆ _openMsgRcv
| unsigned int inet::bgp::BgpSession::_openMsgRcv = 0 |
|
private |
◆ _openMsgSent
| unsigned int inet::bgp::BgpSession::_openMsgSent = 0 |
|
private |
◆ _ptrConnectRetryTimer
| cMessage* inet::bgp::BgpSession::_ptrConnectRetryTimer = nullptr |
|
private |
◆ _ptrHoldTimer
| cMessage* inet::bgp::BgpSession::_ptrHoldTimer = nullptr |
|
private |
◆ _ptrKeepAliveTimer
| cMessage* inet::bgp::BgpSession::_ptrKeepAliveTimer = nullptr |
|
private |
◆ _ptrStartEvent
| cMessage* inet::bgp::BgpSession::_ptrStartEvent = nullptr |
|
private |
◆ _StartEventTime
| simtime_t inet::bgp::BgpSession::_StartEventTime |
|
private |
◆ _updateMsgRcv
| unsigned int inet::bgp::BgpSession::_updateMsgRcv = 0 |
|
private |
◆ _updateMsgSent
| unsigned int inet::bgp::BgpSession::_updateMsgSent = 0 |
|
private |
◆ bgpRouter
The documentation for this class was generated from the following files:
@ EGP
Definition: BgpCommon_m.h:57
unsigned int _updateMsgSent
Definition: BgpSession.h:40
unsigned int _updateMsgRcv
Definition: BgpSession.h:41
bool nextHopSelf
Definition: BgpCommon.h:62
virtual void send(Packet *msg) override
Sends data packet.
Definition: TcpSocket.cc:147
bool checkConnection
Definition: BgpCommon.h:64
TcpSocket * socketListen
Definition: BgpCommon.h:68
simtime_t _connectRetryTime
Definition: BgpSession.h:30
const unsigned char CONNECT_RETRY_KIND
Definition: BgpCommon.h:24
simtime_t _StartEventTime
Definition: BgpSession.h:27
cMessage * _ptrHoldTimer
Definition: BgpSession.h:33
unsigned short computePathAttributeBytes(const BgpUpdatePathAttributes &pathAttr)
Definition: BgpUpdate.cc:12
int getNumEgpSessions()
Definition: BgpRouter.h:68
unsigned int _keepAliveMsgSent
Definition: BgpSession.h:44
fsm::TopState::Box * _box
Definition: BgpSession.h:48
const char * getInterfaceName() const
Definition: NetworkInterface.h:233
AsId ASValue
Definition: BgpCommon.h:58
BgpSessionType sessionType
Definition: BgpCommon.h:57
SessionId sessionID
Definition: BgpCommon.h:56
const unsigned char NEW_SESSION_ESTABLISHED
Definition: BgpCommon.h:34
Ipv4Address routerID
Definition: BgpCommon.h:59
bool sessionEstablished
Definition: BgpCommon.h:69
simtime_t _holdTime
Definition: BgpSession.h:32
int ebgpMultihop
Definition: BgpCommon.h:65
std::vector< BgpRoutingTableEntry * > getBGPRoutingTable()
Definition: BgpRouter.h:120
TcpSocket * socket
Definition: BgpCommon.h:67
void printUpdateMessage(const BgpUpdateMessage &msg)
Definition: BgpRouter.cc:907
BgpRouter & bgpRouter
Definition: BgpSession.h:24
void getScheduleAt(simtime_t t, cMessage *msg)
Definition: BgpRouter.h:116
L3Address getLocalAddress() const
Definition: TcpSocket.h:229
Ipv4Address peerAddr
Definition: BgpCommon.h:60
@ IGP
Definition: BgpCommon_m.h:56
intscale< b, 1, 8 > B
Definition: Units.h:1168
int getInterfaceId() const
Definition: NetworkInterface.h:232
unsigned int _openMsgSent
Definition: BgpSession.h:38
const unsigned char KEEP_ALIVE_KIND
Definition: BgpCommon.h:26
unsigned int _keepAliveMsgRcv
Definition: BgpSession.h:45
removed type
Definition: IUdp-gates.txt:7
SessionId findNextSession(BgpSessionType type, bool startSession=false)
find the next SessionId compared to his type and start this session if boolean is true
Definition: BgpRouter.cc:860
void openTCPConnectionToPeer(SessionId sessionID)
active TcpConnection for a given session (used by fsm)
Definition: BgpRouter.cc:337
std::string str(bool printUnspec=true) const
Returns the string representation of the address (e.g.
Definition: Ipv4Address.cc:98
simtime_t _keepAliveTime
Definition: BgpSession.h:34
int localPreference
Definition: BgpCommon.h:63
unsigned int _openMsgRcv
Definition: BgpSession.h:39
bool isRouteExcluded(const Ipv4Route &rtEntry)
Definition: BgpRouter.cc:986
cMessage * _ptrKeepAliveTimer
Definition: BgpSession.h:35
SessionInfo _info
Definition: BgpSession.h:23
NetworkInterface * linkIntf
Definition: BgpCommon.h:66
cMessage * _ptrConnectRetryTimer
Definition: BgpSession.h:31
Ipv4Address toIpv4() const
Definition: L3Address.h:70
void printOpenMessage(const BgpOpenMessage &msg)
Definition: BgpRouter.cc:891
cMessage * getCancelEvent(cMessage *msg)
Definition: BgpRouter.h:118
void updateSendProcess(const unsigned char decisionProcessResult, SessionId sessionIndex, BgpRoutingTableEntry *entry)
RFC 4271, 9.2 : Update-Send Process / Sent or not new UPDATE messages to its peers.
Definition: BgpRouter.cc:678
const unsigned char HOLD_TIME_KIND
Definition: BgpCommon.h:25
Macho::Machine< fsm::TopState > * _fsm
Definition: BgpSession.h:49
cMessage * _ptrStartEvent
Definition: BgpSession.h:28
void printKeepAliveMessage(const BgpKeepAliveMessage &msg)
Definition: BgpRouter.cc:981
void getCancelAndDelete(cMessage *msg)
Definition: BgpRouter.h:117
@ INCOMPLETE
Definition: BgpCommon_m.h:58
void listenConnectionFromPeer(SessionId sessionID)
active listenSocket for a given session (used by fsm)
Definition: BgpRouter.cc:307
IIpv4RoutingTable * getIPRoutingTable()
Definition: BgpRouter.h:119
const unsigned char START_EVENT_KIND
Definition: BgpCommon.h:23