#include <LinkStateAcknowledgementHandler.h>
inet::ospf::LinkStateAcknowledgementHandler::LinkStateAcknowledgementHandler |
( |
Router * |
containingRouter | ) |
|
IMessageHandler(Router *containingRouter)
Definition: IMessageHandler.h:38
Implements inet::ospf::IMessageHandler.
Referenced by inet::ospf::MessageHandler::processPacket().
36 OSPFLinkStateAcknowledgementPacket *lsAckPacket = check_and_cast<OSPFLinkStateAcknowledgementPacket *>(packet);
38 int lsaCount = lsAckPacket->getLsaHeadersArraySize();
40 EV_DETAIL <<
" Processing packet contents:\n";
42 for (
int i = 0; i < lsaCount; i++) {
43 OSPFLSAHeader& lsaHeader = lsAckPacket->getLsaHeaders(i);
44 OSPFLSA *lsaOnRetransmissionList;
47 EV_DETAIL <<
" " << lsaHeader <<
"\n";
49 lsaKey.linkStateID = lsaHeader.getLinkStateID();
50 lsaKey.advertisingRouter = lsaHeader.getAdvertisingRouter();
52 if ((lsaOnRetransmissionList = neighbor->findOnRetransmissionList(lsaKey)) !=
nullptr) {
53 if (
operator==(lsaHeader, lsaOnRetransmissionList->getHeader())) {
54 neighbor->removeFromRetransmissionList(lsaKey);
57 EV_INFO <<
"Got an Acknowledgement packet for an unsent Update packet.\n";
61 if (neighbor->isLinkStateRetransmissionListEmpty()) {
62 neighbor->clearUpdateRetransmissionTimer();
void printEvent(const char *eventString, const Interface *onInterface=nullptr, const Neighbor *forNeighbor=nullptr) const
Definition: MessageHandler.cc:377
Router * router
Definition: IMessageHandler.h:35
MessageHandler * getMessageHandler()
Definition: OSPFRouter.h:77
Definition: OSPFNeighbor.h:67
The documentation for this class was generated from the following files: