|
INET Framework for OMNeT++/OMNEST
|
Class represents Reliable Transport Protocol for reliable transmission of EIGRP messages.
More...
#include <EigrpRtp.h>
template<typename IPAddress>
class inet::eigrp::EigrpRtpT< IPAddress >
Class represents Reliable Transport Protocol for reliable transmission of EIGRP messages.
◆ MessageQueue
template<typename IPAddress >
◆ EigrpRtpT()
template<typename IPAddress >
◆ ~EigrpRtpT()
template<typename IPAddress >
◆ acknowledgeMsg()
template<typename IPAddress >
Send message with specified acknowledge number to neighbor.
342 EigrpMsgReq *msgReq =
nullptr;
351 msgReq =
new EigrpMsgReq(
"Ack");
353 msgReq->setDestNeighbor(neighId);
354 msgReq->setDestInterface(ifaceId);
355 msgReq->setAckNumber(ackNum);
◆ discardMsg()
template<typename IPAddress >
Delete request.
421 EV_DEBUG <<
"EIGRP RTP: discard message " <<
eigrpRtp::UserMsgs[msgReq->getOpcode()] << endl;
◆ getNeighborId() [1/3]
template<typename IPAddress >
Return informations about neighbor.
◆ getNeighborId() [2/3]
363 Packet *packet = check_and_cast<Packet *>(msg);
364 Ipv4Address srcAddr = packet->getTag<
L3AddressInd>()->getSrcAddress().toIpv4();
366 return eigrpNt->findNeighbor(srcAddr);
◆ getNeighborId() [3/3]
373 Packet *packet = check_and_cast<Packet *>(msg);
374 Ipv6Address srcAddr = packet->getTag<
L3AddressInd>()->getSrcAddress().toIpv6();
376 return eigrpNt->findNeighbor(srcAddr);
◆ handleMessage()
template<typename IPAddress >
266 if (msg->isSelfMessage()) {
269 if (
dynamic_cast<EigrpMsgReq *
>(msg) !=
nullptr) {
◆ initialize() [1/3]
template<typename IPAddress >
◆ initialize() [2/3]
227 cSimpleModule::initialize(stage);
233 eigrpIft = check_and_cast<EigrpInterfaceTable *>(getModuleByPath(
"^.eigrpInterfaceTable"));
234 eigrpNt = check_and_cast<EigrpIpv4NeighborTable *>(getModuleByPath(
"^.eigrpIpv4NeighborTable"));
◆ initialize() [3/3]
246 cSimpleModule::initialize(stage);
252 eigrpIft = check_and_cast<EigrpInterfaceTable *>(getModuleByPath(
"^.eigrpInterfaceTable6"));
253 eigrpNt = check_and_cast<EigrpIpv6NeighborTable *>(getModuleByPath(
"^.eigrpIpv6NeighborTable"));
◆ numInitStages()
template<typename IPAddress >
◆ processHeader()
template<typename IPAddress >
Process message header for ensuring reliable transmission.
293 Packet *pk = check_and_cast<Packet *>(msg);
294 const auto& header = pk->peekAtFront<EigrpMessage>();
295 uint32_t seqNumNeigh;
297 EigrpMsgReq *msgReq =
nullptr;
299 EigrpNeighbor<IPAddress> *neigh =
nullptr;
300 EigrpInterface *eigrpIface =
nullptr;
307 seqNumNeigh = header->getSeqNum();
308 ackNum = header->getAckNum();
313 numOfAck = msgReq->getNumOfAck();
314 msgReq->setNumOfAck(--numOfAck);
331 if (seqNumNeigh != 0) {
333 neigh->setSeqNumber(seqNumNeigh);
335 acknowledgeMsg(neigh->getNeighborId(), neigh->getIfaceId(), seqNumNeigh);
◆ processRequest()
template<typename IPAddress >
Process request for message sending.
285 EigrpMsgReq *msgReq = check_and_cast<EigrpMsgReq *>(msg);
◆ scheduleNewMsg()
template<typename IPAddress >
Schedule new request for sending message.
387 if (msgReq->getOpcode() ==
EIGRP_HELLO_MSG && msgReq->getAckNumber() != 0)
388 EV_DEBUG <<
" (ack) ";
389 EV_DEBUG <<
" on IF: " << msgReq->getDestInterface() << endl;
◆ scheduleNextMsg()
template<typename IPAddress >
Schedule sending next reliable/unreliable message in transmission queue.
397 EigrpMsgReq *msgReq =
nullptr;
400 if (eigrpIface ==
nullptr) {
405 if (eigrpIface->getPendingMsgs() == 0) {
407 ASSERT(msgReq->getNumOfAck() == 0);
◆ sendMsg()
template<typename IPAddress >
Send reliable/unreliable message.
442 if (msgReq->isMsgReliable()) {
◆ sendRelMsg()
template<typename IPAddress >
Send reliable message.
454 EigrpMsgReq *msgToSend =
nullptr;
455 EigrpNeighbor<IPAddress> *neigh =
nullptr;
456 EigrpInterface *eigrpIface =
nullptr;
458 info.neighborId = msgReq->getDestNeighbor();
459 info.neighborIfaceId = msgReq->getDestInterface();
461 if (msgReq->getSeqNumber() == 0) {
466 if (info.neighborId != 0) {
467 if ((neigh =
eigrpNt->findNeighborById(info.neighborId)) ==
nullptr) {
473 neigh->setAck(msgReq->getSeqNumber());
474 info.lastSeqNum = neigh->getSeqNumber();
477 info.numOfAck =
eigrpNt->setAckOnIface(info.neighborIfaceId, msgReq->getSeqNumber());
485 msgReq->setAckNumber(info.lastSeqNum);
486 msgReq->setNumOfAck(info.numOfAck);
489 msgToSend = msgReq->dup();
◆ sendUnrelMsg()
template<typename IPAddress >
Send unreliable message.
431 int ifaceId = msgReq->getDestInterface();
◆ eigrpIft
template<typename IPAddress >
◆ eigrpNt
template<typename IPAddress >
◆ requestQ
template<typename IPAddress >
◆ RTP_OUTPUT_GW
template<typename IPAddress >
◆ seqNumber
template<typename IPAddress >
Sequence number for reliable transport of messages.
The documentation for this class was generated from the following files:
void sendRelMsg(EigrpMsgReq *msgReq)
Send reliable message.
Definition: EigrpRtp.cc:451
void decPendingMsgs()
Definition: EigrpInterfaceTable.h:117
EigrpNeighbor< IPAddress > * getNeighborId(cMessage *msg)
Return informations about neighbor.
EigrpMsgReq * findReqByIf(int ifaceId, bool sent=true)
Get first rel/unrel message with given interface ID from request Queue.
Definition: EigrpRtp.cc:105
void sendUnrelMsg(EigrpMsgReq *msgReq)
Send unreliable message.
Definition: EigrpRtp.cc:429
EigrpMsgReq * findUnrelReqByIf(int ifaceId)
Get first unrel message with given interface ID from request Queue.
Definition: EigrpRtp.cc:136
EigrpMsgReq * findReqBySeq(uint32_t seqNumber)
Definition: EigrpRtp.cc:147
void processHeader(cMessage *msg)
Process message header for ensuring reliable transmission.
Definition: EigrpRtp.cc:291
const char * RTP_OUTPUT_GW
Definition: EigrpRtp.h:72
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd L3AddressInd
Definition: IUdp-gates.txt:20
@ EIGRP_HELLO_MSG
Definition: EigrpMessage_m.h:93
void acknowledgeMsg(int neighId, int ifaceId, uint32_t ackNum)
Send message with specified acknowledge number to neighbor.
Definition: EigrpRtp.cc:340
void scheduleNextMsg(int ifaceId)
Schedule sending next reliable/unreliable message in transmission queue.
Definition: EigrpRtp.cc:395
EigrpInterface * findInterfaceById(int ifaceId)
Gets interface from table by interface ID.
Definition: EigrpInterfaceTable.cc:155
void processRequest(cMessage *msg)
Process request for message sending.
Definition: EigrpRtp.cc:283
void pushReq(EigrpMsgReq *req)
Definition: EigrpRtp.cc:157
void incPendingMsgs()
Definition: EigrpInterfaceTable.h:116
void removeAllMsgsToIf(int ifaceId)
Delete all messages with given destination interface ID (fall of interface,...).
Definition: EigrpRtp.cc:183
void discardMsg(EigrpMsgReq *msgReq)
Delete request.
Definition: EigrpRtp.cc:419
const char * UserMsgs[]
Definition: EigrpRtp.cc:48
void removeAllMsgsToNeigh(int ifaceId)
Delete all messages with given destination neighbor ID (end of neighborship,...).
Definition: EigrpRtp.cc:199
EigrpInterfaceTable * eigrpIft
Definition: EigrpRtp.h:78
#define NUM_INIT_STAGES
Definition: InitStageRegistry.h:73
void sendMsg(EigrpMsgReq *msgReq)
Send reliable/unreliable message.
Definition: EigrpRtp.cc:440
void scheduleNewMsg(EigrpMsgReq *msgReq)
Schedule new request for sending message.
Definition: EigrpRtp.cc:382
EigrpMsgReq * removeReq(EigrpMsgReq *msgReq)
Definition: EigrpRtp.cc:165
uint32_t seqNumber
Sequence number for reliable transport of messages.
Definition: EigrpRtp.h:74
EigrpRequestQueue * requestQ
Definition: EigrpRtp.h:76
INET_API InitStage INITSTAGE_ROUTING_PROTOCOLS
Initialization of routing protocols.
EigrpNeighborTable< IPAddress > * eigrpNt
Definition: EigrpRtp.h:79