|
INET Framework for OMNeT++/OMNEST
|
#include <EigrpIpv4Pdm.h>
|
| | EigrpIpv4Pdm () |
| |
| | ~EigrpIpv4Pdm () |
| |
| virtual void | updateInterface (int interfaceId) override |
| |
| void | addInterface (int ifaceId, int networkId, bool enabled) override |
| | Adds interface to EIGRP. More...
|
| |
| void | addInterface (int ifaceId, bool enabled) override |
| | Adds interface to EIGRP for IPv6. More...
|
| |
| EigrpNetwork< Ipv4Address > * | addNetwork (Ipv4Address address, Ipv4Address mask) override |
| | Adds new network to EigrpNetworkTable for routing. More...
|
| |
| void | setASNum (int asNum) override |
| |
| int | getASNum () override |
| |
| void | setKValues (const EigrpKValues &kValues) override |
| |
| void | setMaximumPath (int maximumPath) override |
| |
| void | setVariance (int variance) override |
| |
| void | setHelloInt (int interval, int ifaceId) override |
| |
| void | setHoldInt (int interval, int ifaceId) override |
| |
| void | setSplitHorizon (bool shenabled, int ifaceId) override |
| |
| void | setPassive (bool passive, int ifaceId) override |
| |
| void | setStub (const EigrpStub &stub) override |
| |
| void | setRouterId (Ipv4Address routerID) override |
| | Sets router ID. More...
|
| |
| bool | addNetPrefix (const Ipv4Address &network, const short int prefixLen, const int ifaceId) override |
| | Adds information about IPv6 network prefix. More...
|
| |
| void | setLoad (int load, int interfaceId) override |
| |
| void | setBandwidth (int bandwith, int interfaceId) override |
| |
| void | setDelay (int delay, int interfaceId) override |
| |
| void | setReliability (int reliability, int interfaceId) override |
| |
| void | sendUpdate (int destNeighbor, EigrpRoute< Ipv4Address > *route, EigrpRouteSource< Ipv4Address > *source, bool forcePoisonRev, const char *reason) override |
| | Sends update message to specified neighbor. More...
|
| |
| void | sendQuery (int destNeighbor, EigrpRoute< Ipv4Address > *route, EigrpRouteSource< Ipv4Address > *source, bool forcePoisonRev=false) override |
| | Sends query message to specified neighbor. More...
|
| |
| void | sendReply (EigrpRoute< Ipv4Address > *route, int destNeighbor, EigrpRouteSource< Ipv4Address > *source, bool forcePoisonRev=false, bool isUnreachable=false) override |
| | Sends reply message to specified neighbor. More...
|
| |
| EigrpRouteSource< Ipv4Address > * | updateRoute (EigrpRoute< Ipv4Address > *route, uint64_t dmin, bool *rtableChanged, bool removeUnreach=false) override |
| | Function finds successors to the destination network. More...
|
| |
| uint64_t | findRouteDMin (EigrpRoute< Ipv4Address > *route) override |
| | Returns minimal distance to destination network. More...
|
| |
| bool | hasFeasibleSuccessor (EigrpRoute< Ipv4Address > *route, uint64_t &resultDmin) override |
| | Determine whether there are Feasibles Successors for specified route. More...
|
| |
| EigrpRouteSource< Ipv4Address > * | getBestSuccessor (EigrpRoute< Ipv4Address > *route) override |
| | Returns best successor for specified network. More...
|
| |
| bool | setReplyStatusTable (EigrpRoute< Ipv4Address > *route, EigrpRouteSource< Ipv4Address > *source, bool forcePoisonRev, int *neighCount, int *stubCount) override |
| | Sets Reply Status Table for specified network. More...
|
| |
| bool | hasNeighborForUpdate (EigrpRouteSource< Ipv4Address > *source) override |
| | Returns tru if there are recipients for update message, else false. More...
|
| |
| void | setDelayedRemove (int neighId, EigrpRouteSource< Ipv4Address > *src) override |
| | After receiving Ack from neighbor with neighId will be route removed from TT. More...
|
| |
| void | sendUpdateToStubs (EigrpRouteSource< Ipv4Address > *succ, EigrpRouteSource< Ipv4Address > *oldSucc, EigrpRoute< Ipv4Address > *route) override |
| | Sends update message to all stub neighbors. More...
|
| |
| virtual | ~IEigrpModule () |
| |
|
| void | printSentMsg (int routeCnt, Ipv4Address &destAddress, EigrpMsgReq *msgReq) |
| |
| void | printRecvMsg (const EigrpMessage *msg, Ipv4Address &addr, int ifaceId) |
| |
| EigrpTimer * | createTimer (char timerKind, void *context) |
| | Creates timer of specified type. More...
|
| |
| void | resetTimer (EigrpTimer *timer, int interval) |
| | Sets specified timer to given interval. More...
|
| |
| void | startHelloTimer (EigrpInterface *eigrpIface, simtime_t interval) |
| | Schedule hello timer to the specified interval. More...
|
| |
| void | cancelHoldTimer (EigrpNeighbor< Ipv4Address > *neigh) |
| | Stops Hold timer. More...
|
| |
| void | cancelHelloTimers () |
| | Stops Hello Timers on all interfaces. More...
|
| |
| Packet * | createHelloPacket (int holdInt, EigrpKValues kValues, Ipv4Address &destAddress, EigrpMsgReq *msgReq) |
| |
| Packet * | createAckPacket (Ipv4Address &destAddress, EigrpMsgReq *msgReq) |
| |
| Packet * | createUpdatePacket (const Ipv4Address &destAddress, EigrpMsgReq *msgReq) |
| |
| Packet * | createQueryPacket (Ipv4Address &destAddress, EigrpMsgReq *msgReq) |
| |
| Packet * | createReplyPacket (Ipv4Address &destAddress, EigrpMsgReq *msgReq) |
| |
| void | addMessageHeader (const Ptr< EigrpMessage > &msg, int opcode, EigrpMsgReq *msgReq) |
| |
| void | unlockRoutes (const EigrpMsgReq *msgReq) |
| |
| void | createRouteTlv (EigrpMpIpv4Internal *routeTlv, EigrpRoute< Ipv4Address > *route, bool unreachable=false) |
| |
| void | addRoutesToMsg (const Ptr< EigrpIpv4Message > &msg, const EigrpMsgReq *msgReq) |
| | Add routes from request to the message. More...
|
| |
| void | setRouteTlvMetric (EigrpWideMetricPar *msgMetric, EigrpWideMetricPar *rtMetric) |
| |
| EigrpMsgReq * | createMsgReq (HeaderOpcode msgType, int destNeighbor, int destIface) |
| | Creates request for sending of EIGRP message for RTP. More...
|
| |
| void | processTimer (cMessage *msg) |
| |
| void | processMsgFromNetwork (cMessage *msg) |
| | Process message from network layer. More...
|
| |
| void | processMsgFromRtp (cMessage *msg) |
| | Process message request from RTP. More...
|
| |
| void | processAckPacket (Packet *pk, Ipv4Address &srcAddress, int ifaceId, EigrpNeighbor< Ipv4Address > *neigh) |
| |
| void | processHelloPacket (Packet *pk, Ipv4Address &srcAddress, int ifaceId, EigrpNeighbor< Ipv4Address > *neigh) |
| |
| void | processUpdatePacket (Packet *pk, Ipv4Address &srcAddress, int ifaceId, EigrpNeighbor< Ipv4Address > *neigh) |
| |
| void | processQueryPacket (Packet *pk, Ipv4Address &srcAddress, int ifaceId, EigrpNeighbor< Ipv4Address > *neigh) |
| |
| void | processReplyPacket (Packet *pk, Ipv4Address &srcAddress, int ifaceId, EigrpNeighbor< Ipv4Address > *neigh) |
| |
| EigrpRouteSource< Ipv4Address > * | processInterRoute (const EigrpMpIpv4Internal &tlv, Ipv4Address &nextHop, int sourceNeighId, EigrpInterface *eigrpIface, bool *notifyDual, bool *isSourceNew) |
| | Process route TLV. More...
|
| |
| void | sendAllEigrpPaths (EigrpInterface *eigrpIface, EigrpNeighbor< Ipv4Address > *neigh) |
| | Creates and sends message with all routes from routing table to specified neighbor. More...
|
| |
| void | processNewNeighbor (int ifaceId, Ipv4Address &srcAddress, const EigrpIpv4Hello *helloMessage) |
| | Creates relationship with neighbor. More...
|
| |
| int | checkNeighborshipRules (int ifaceId, int neighAsNum, Ipv4Address &neighAddr, const EigrpKValues &neighKValues) |
| | Checks neighborship rules. More...
|
| |
| EigrpNeighbor< Ipv4Address > * | createNeighbor (EigrpInterface *eigrpIface, Ipv4Address &address, uint16_t holdInt) |
| | Create record in the neighbor table and start hold timer. More...
|
| |
| void | removeNeighbor (EigrpNeighbor< Ipv4Address > *neigh) |
| | Removes neighbor from neighbor table and delete it. More...
|
| |
| void | disableInterface (NetworkInterface *iface, EigrpInterface *eigrpIface, Ipv4Address &ifAddress, Ipv4Address &ifMask) |
| | Remove interface from EIGRP interface table. More...
|
| |
| void | enableInterface (EigrpInterface *eigrpIface, Ipv4Address &ifAddress, Ipv4Address &ifMask, int networkId) |
| | Add interface to the EIGRP interface table and notifies DUAL. More...
|
| |
| EigrpInterface * | getInterfaceById (int ifaceId) |
| | Returns EIGRP interface (enabled or disabled) or nullptr. More...
|
| |
| EigrpInterface * | addInterfaceToEigrp (int ifaceId, int networkId, bool enabled) |
| | Creates interface and inserts it to the table. More...
|
| |
| void | processIfaceStateChange (NetworkInterface *iface) |
| |
| void | processIfaceConfigChange (EigrpInterface *eigrpIface) |
| |
| void | processRTRouteDel (const cObject *details) |
| |
| Ipv4Address | getNextHopAddr (const Ipv4Address &nextHopAddr, Ipv4Address &senderAddr) |
| | Returns next hop address. More...
|
| |
| bool | getDestIpAddress (int destNeigh, Ipv4Address *resultAddress) |
| | Returns IP address for sending EIGRP message. More...
|
| |
| bool | removeRouteFromRT (EigrpRouteSource< Ipv4Address > *successor, IRoute::SourceType *removedRtSrc) |
| |
| Ipv4Route * | createRTRoute (EigrpRouteSource< Ipv4Address > *successor) |
| |
| bool | installRouteToRT (EigrpRoute< Ipv4Address > *route, EigrpRouteSource< Ipv4Address > *source, uint64_t dmin, Ipv4Route *rtEntry) |
| | Updates existing route in the routing table or creates new one. More...
|
| |
| bool | isRTSafeForAdd (EigrpRoute< Ipv4Address > *route, unsigned int eigrpAd) |
| | Returns true, if routing table does not contain route with given address, mask and smaller administrative distance. More...
|
| |
| void | setRTRouteMetric (Ipv4Route *route, uint64_t metric) |
| | Changes metric of route in routing table. More...
|
| |
| bool | removeOldSuccessor (EigrpRouteSource< Ipv4Address > *source, EigrpRoute< Ipv4Address > *route) |
| | Removes route from routing table and changes old successor's record in topology table. More...
|
| |
| void | msgToAllIfaces (int destination, HeaderOpcode msgType, EigrpRouteSource< Ipv4Address > *source, bool forcePoisonRev, bool forceUnreachable) |
| | Records request to send message to all neighbors. More...
|
| |
| void | msgToIface (HeaderOpcode msgType, EigrpRouteSource< Ipv4Address > *source, EigrpInterface *eigrpIface, bool forcePoisonRev=false, bool forceUnreachable=false) |
| | Creates request for sending message on specified interface. More...
|
| |
| void | flushMsgRequests () |
| | Sends all message requests to RTP. More...
|
| |
| EigrpMsgReq * | pushMsgRouteToQueue (HeaderOpcode msgType, int ifaceId, int neighId, const EigrpMsgRoute &msgRt) |
| | Insert route into the queue with requests. More...
|
| |
| bool | applySplitHorizon (EigrpInterface *destInterface, EigrpRouteSource< Ipv4Address > *source, EigrpRoute< Ipv4Address > *route) |
| |
| bool | applyStubToUpdate (EigrpRouteSource< Ipv4Address > *src) |
| | Apply stub configuration to the route in outgoing Update message. More...
|
| |
| bool | applyStubToQuery (EigrpInterface *eigrpIface, int numOfNeigh) |
| | Apply stub configuration to the route in outgoing Query message. More...
|
| |
| Ipv4Route * | findRoute (const Ipv4Address &network, const Ipv4Address &netmask) |
| |
| Ipv4Route * | findRoute (const Ipv4Address &network, const Ipv4Address &netmask, const Ipv4Address &nexthop) |
| |
| virtual int | numInitStages () const override |
| |
| virtual void | initialize (int stage) override |
| |
| virtual void | preDelete (cComponent *root) override |
| |
| virtual void | handleMessage (cMessage *msg) override |
| |
| virtual void | receiveSignal (cComponent *source, simsignal_t signalID, cObject *obj, cObject *details) override |
| |
◆ RequestVector
◆ RouteVector
◆ EigrpIpv4Pdm()
| inet::eigrp::EigrpIpv4Pdm::EigrpIpv4Pdm |
( |
| ) |
|
◆ ~EigrpIpv4Pdm()
| inet::eigrp::EigrpIpv4Pdm::~EigrpIpv4Pdm |
( |
| ) |
|
◆ addInterface() [1/2]
| void inet::eigrp::EigrpIpv4Pdm::addInterface |
( |
int |
interfaceId, |
|
|
bool |
enabled |
|
) |
| |
|
inlineoverridevirtual |
◆ addInterface() [2/2]
| void inet::eigrp::EigrpIpv4Pdm::addInterface |
( |
int |
interfaceId, |
|
|
int |
networkId, |
|
|
bool |
enabled |
|
) |
| |
|
inlineoverridevirtual |
◆ addInterfaceToEigrp()
| EigrpInterface * inet::eigrp::EigrpIpv4Pdm::addInterfaceToEigrp |
( |
int |
ifaceId, |
|
|
int |
networkId, |
|
|
bool |
enabled |
|
) |
| |
|
protected |
Creates interface and inserts it to the table.
1508 NetworkInterface *iface =
ift->getInterfaceById(ifaceId);
1510 EigrpInterface *eigrpIface =
new EigrpInterface(iface, networkId,
false);
1511 Ipv4Address ifAddress, ifMask;
1515 ifMask = iface->getIpv4Netmask();
1516 ifAddress = iface->getIpv4Address().doAnd(ifMask);
Referenced by setHelloInt(), setHoldInt(), setPassive(), and setSplitHorizon().
◆ addMessageHeader()
| void inet::eigrp::EigrpIpv4Pdm::addMessageHeader |
( |
const Ptr< EigrpMessage > & |
msg, |
|
|
int |
opcode, |
|
|
EigrpMsgReq * |
msgReq |
|
) |
| |
|
protected |
◆ addNetPrefix()
| bool inet::eigrp::EigrpIpv4Pdm::addNetPrefix |
( |
const Ipv4Address & |
network, |
|
|
const short int |
prefixLen, |
|
|
const int |
ifaceId |
|
) |
| |
|
inlineoverridevirtual |
Adds information about IPv6 network prefix.
- Parameters
-
| network | network prefix |
| prefixLen | length of network prefix |
| ifaceId | ID of interface contains network prefix |
- Returns
- True if successfully added, otherwise false (e.g. same IPv6 prefix on different interfaces)
- Note
- Checks duplicates
Implements inet::eigrp::IEigrpModule< Ipv4Address >.
◆ addNetwork()
◆ addRoutesToMsg()
Add routes from request to the message.
906 int reqCnt = msgReq->getRoutesArraySize();
907 EigrpRouteSource<Ipv4Address> *source =
nullptr;
908 EigrpRoute<Ipv4Address> *route =
nullptr;
910 msg->setInterRoutesArraySize(reqCnt);
911 for (
int i = 0; i < reqCnt; i++) {
912 EigrpMpIpv4Internal routeTlv;
913 EigrpMsgRoute req = msgReq->getRoutes(i);
917 ASSERT(route !=
nullptr);
920 route = source->getRouteInfo();
922 routeTlv.routerID = req.originator;
925 msg->setInterRoutes(i, routeTlv);
928 EV_DEBUG <<
" route: " << routeTlv.destAddress <<
"/" << routeTlv.destMask.getNetmaskLength();
929 EV_DEBUG <<
" originator: " << routeTlv.routerID;
931 EV_DEBUG <<
", bw: " << routeTlv.metric.bandwidth;
932 EV_DEBUG <<
", dly: " << routeTlv.metric.delay;
933 EV_DEBUG <<
", hopcnt: " << (int)routeTlv.metric.hopCount;
Referenced by createQueryPacket(), createReplyPacket(), and createUpdatePacket().
◆ applySplitHorizon()
◆ applyStubToQuery()
| bool inet::eigrp::EigrpIpv4Pdm::applyStubToQuery |
( |
EigrpInterface * |
eigrpIface, |
|
|
int |
numOfNeigh |
|
) |
| |
|
protected |
Apply stub configuration to the route in outgoing Query message.
- Returns
- true, if stub setting limits sending of the route, otherwise false
1240 if (numOfNeigh == eigrpIface->getNumOfStubs())
Referenced by msgToAllIfaces().
◆ applyStubToUpdate()
Apply stub configuration to the route in outgoing Update message.
- Returns
- true, if stub setting limits sending of the route, otherwise false
Referenced by sendAllEigrpPaths(), and sendUpdate().
◆ cancelHelloTimers()
| void inet::eigrp::EigrpIpv4Pdm::cancelHelloTimers |
( |
| ) |
|
|
protected |
Stops Hello Timers on all interfaces.
1095 EigrpInterface *iface;
1099 for (
int i = 0; i < cnt; i++) {
1102 if ((timer = iface->getHelloTimer()) !=
nullptr) {
1103 if (timer->isScheduled()) {
1108 iface->setHelloTimerPtr(
nullptr);
1114 for (
int i = 0; i < cnt; i++) {
1117 if ((timer = iface->getHelloTimer()) !=
nullptr) {
1118 if (timer->isScheduled()) {
1123 iface->setHelloTimerPtr(
nullptr);
Referenced by preDelete().
◆ cancelHoldTimer()
Stops Hold timer.
1086 if ((timer = neigh->getHoldTimer()) !=
nullptr) {
1087 if (timer->isScheduled()) {
Referenced by removeNeighbor().
◆ checkNeighborshipRules()
| int inet::eigrp::EigrpIpv4Pdm::checkNeighborshipRules |
( |
int |
ifaceId, |
|
|
int |
neighAsNum, |
|
|
Ipv4Address & |
neighAddr, |
|
|
const EigrpKValues & |
neighKValues |
|
) |
| |
|
protected |
Checks neighborship rules.
- Parameters
-
| ifaceId | ID of interface where the neighbor is connected. |
- Returns
- returns code from enumeration eigrp::UserMsgCodes.
1039 Ipv4Address ifaceAddr, ifaceMask;
1044 else if (this->
asNum != neighAsNum) {
1047 else if (!(this->
kValues == neighKValues)) {
1052 NetworkInterface *iface =
ift->getInterfaceById(ifaceId);
1053 ifaceAddr.set(iface->getIpv4Address().getInt());
1054 ifaceMask.set(iface->getIpv4Netmask().getInt());
1057 if (!ifaceAddr.maskedAddrAreEqual(ifaceAddr, neighAddr, ifaceMask)) {
Referenced by processNewNeighbor().
◆ createAckPacket()
775 const auto& msg = makeShared<EigrpIpv4Ack>();
777 msg->setAckNum(msgReq->getAckNumber());
782 Packet *packet =
new Packet();
783 packet->insertAtBack(msg);
Referenced by processMsgFromRtp().
◆ createHelloPacket()
750 const auto& msg = makeShared<EigrpIpv4Hello>();
751 EigrpTlvParameter paramTlv;
756 paramTlv.holdTimer = holdInt;
758 msg->setParameterTlv(paramTlv);
761 EigrpTlvStub stubTlv;
763 msg->setStubTlv(stubTlv);
768 Packet *packet =
new Packet();
769 packet->insertAtBack(msg);
Referenced by processMsgFromRtp().
◆ createMsgReq()
◆ createNeighbor()
Create record in the neighbor table and start hold timer.
1068 EigrpNeighbor<Ipv4Address> *neigh =
new EigrpNeighbor<Ipv4Address>(eigrpIface->getInterfaceId(), eigrpIface->getInterfaceName(), address);
1070 neigh->setHoldTimer(holdt);
1071 neigh->setHoldInt(holdInt);
1074 scheduleAt(simTime() + holdInt, holdt);
1076 eigrpIface->incNumOfNeighbors();
Referenced by processNewNeighbor().
◆ createQueryPacket()
809 const auto& msg = makeShared<EigrpIpv4Query>();
810 int routeCnt = msgReq->getRoutesArraySize();
813 msg->setAckNum(msgReq->getAckNumber());
814 msg->setSeqNum(msgReq->getSeqNumber());
820 msg->setChunkLength(
B(
sizeOfMsg + routeCnt * 44));
822 Packet *packet =
new Packet();
823 packet->insertAtBack(msg);
Referenced by processMsgFromRtp().
◆ createReplyPacket()
829 const auto& msg = makeShared<EigrpIpv4Reply>();
830 int routeCnt = msgReq->getRoutesArraySize();
833 msg->setAckNum(msgReq->getAckNumber());
834 msg->setSeqNum(msgReq->getSeqNumber());
843 msg->setChunkLength(
B(
sizeOfMsg + routeCnt * 44));
845 Packet *packet =
new Packet();
846 packet->insertAtBack(msg);
Referenced by processMsgFromRtp().
◆ createRouteTlv()
862 EigrpWideMetricPar rtMetric = route->getRdPar();
863 routeTlv->destAddress = route->getRouteAddress();
864 routeTlv->destMask = route->getRouteMask();
Referenced by addRoutesToMsg().
◆ createRTRoute()
1186 EigrpRoute<Ipv4Address> *route = successor->getRouteInfo();
1188 Ipv4Route *rtEntry =
new Ipv4Route();
1189 rtEntry->setDestination(route->getRouteAddress());
1190 rtEntry->setNetmask(route->getRouteMask());
1192 rtEntry->setInterface(
ift->getInterfaceById(successor->getIfaceId()));
1193 rtEntry->setGateway(successor->getNextHop());
1196 if (successor->isInternal()) {
Referenced by installRouteToRT().
◆ createTimer()
| EigrpTimer * inet::eigrp::EigrpIpv4Pdm::createTimer |
( |
char |
timerKind, |
|
|
void * |
context |
|
) |
| |
|
protected |
◆ createUpdatePacket()
789 const auto& msg = makeShared<EigrpIpv4Update>();
790 int routeCnt = msgReq->getRoutesArraySize();
793 msg->setAckNum(msgReq->getAckNumber());
794 msg->setSeqNum(msgReq->getSeqNumber());
800 msg->setChunkLength(
B(
sizeOfMsg + routeCnt * 44));
802 Packet *packet =
new Packet();
803 packet->insertAtBack(msg);
Referenced by processMsgFromRtp().
◆ disableInterface()
Remove interface from EIGRP interface table.
Removes all neighbors on the interface.
1417 EigrpNeighbor<Ipv4Address> *neigh =
nullptr;
1418 EigrpRouteSource<Ipv4Address> *source =
nullptr;
1420 int ifaceId = eigrpIface->getInterfaceId();
1422 EV_DEBUG <<
"EIGRP disabled on interface " << eigrpIface->getName() <<
"(" << ifaceId <<
")" << endl;
1424 if (!eigrpIface->isPassive()) {
1426 Ipv4InterfaceData *idata = iface->getProtocolDataForUpdate<Ipv4InterfaceData>();
1431 if ((hellot = eigrpIface->getHelloTimer()) !=
nullptr)
1432 cancelEvent(hellot);
1434 Ipv4Address ifNetwork = ifAddress.doAnd(ifMask);
1437 ASSERT(source !=
nullptr);
1442 if (eigrpIface->isEnabled()) {
1445 eigrpIface->setEnabling(
false);
1450 for (
int i = 0; i < neighCount; i++) {
1452 if (neigh->getIfaceId() == ifaceId) {
Referenced by processIfaceStateChange().
◆ enableInterface()
Add interface to the EIGRP interface table and notifies DUAL.
1463 int ifaceId = eigrpIface->getInterfaceId();
1464 EigrpRouteSource<Ipv4Address> *src;
1465 EigrpWideMetricPar metricPar;
1468 EV_DEBUG <<
"EIGRP enabled on interface " << eigrpIface->getName() <<
"(" << ifaceId <<
")" << endl;
1471 if (!eigrpIface->isEnabled()) {
1474 eigrpIface->setEnabling(
true);
1481 NetworkInterface *ie =
ift->getInterfaceById(ifaceId);
1482 Ipv4InterfaceData *idata = ie->getProtocolDataForUpdate<Ipv4InterfaceData>();
1485 eigrpIface->setNetworkId(networkId);
1489 ASSERT(isSourceNew ==
true);
1494 src->setMetricParams(metricPar);
1497 src->setMetric(metric);
Referenced by addInterfaceToEigrp(), and processIfaceStateChange().
◆ findRoute() [1/2]
1913 Ipv4Route *route =
nullptr;
1914 for (
int i = 0; i <
rt->getNumRoutes(); i++) {
1915 auto it =
rt->getRoute(i);
1916 if (it->getDestination() == network && it->getNetmask() == netmask) {
Referenced by isRTSafeForAdd(), removeRouteFromRT(), and updateRoute().
◆ findRoute() [2/2]
1927 Ipv4Route *route =
nullptr;
1928 for (
int i = 0; i <
rt->getNumRoutes(); i++) {
1929 auto it =
rt->getRoute(i);
1930 if (it->getDestination() == network && it->getNetmask() == netmask && it->getGateway() == nexthop) {
◆ findRouteDMin()
◆ flushMsgRequests()
| void inet::eigrp::EigrpIpv4Pdm::flushMsgRequests |
( |
| ) |
|
|
protected |
◆ getASNum()
| int inet::eigrp::EigrpIpv4Pdm::getASNum |
( |
| ) |
|
|
inlineoverridevirtual |
◆ getBestSuccessor()
◆ getDestIpAddress()
| bool inet::eigrp::EigrpIpv4Pdm::getDestIpAddress |
( |
int |
destNeigh, |
|
|
Ipv4Address * |
resultAddress |
|
) |
| |
|
protected |
Returns IP address for sending EIGRP message.
418 EigrpNeighbor<Ipv4Address> *neigh =
nullptr;
425 resultAddress->set(neigh->getIPAddress().getInt());
Referenced by processMsgFromRtp().
◆ getInterfaceById()
| EigrpInterface * inet::eigrp::EigrpIpv4Pdm::getInterfaceById |
( |
int |
ifaceId | ) |
|
|
protected |
◆ getNextHopAddr()
Returns next hop address.
If next hop in message is 0.0.0.0, then next hop must be replaced by IP address of sender.
211 {
return (nextHopAddr.isUnspecified()) ? senderAddr : nextHopAddr; }
Referenced by processInterRoute(), and processUpdatePacket().
◆ handleMessage()
| void inet::eigrp::EigrpIpv4Pdm::handleMessage |
( |
cMessage * |
msg | ) |
|
|
overrideprotectedvirtual |
157 if (msg->isSelfMessage()) {
162 if (strcmp(msg->getArrivalGate()->getBaseName(),
"splitterIn") == 0) {
167 else if (strcmp(msg->getArrivalGate()->getBaseName(),
"rtpIn") == 0) {
◆ hasFeasibleSuccessor()
| bool inet::eigrp::EigrpIpv4Pdm::hasFeasibleSuccessor |
( |
EigrpRoute< Ipv4Address > * |
route, |
|
|
uint64_t & |
resultDmin |
|
) |
| |
|
inlineoverridevirtual |
Determine whether there are Feasibles Successors for specified route.
- Parameters
-
| resultDmin | return parameter with minimal distance to the destination. |
Implements inet::eigrp::IEigrpPdm< Ipv4Address >.
◆ hasNeighborForUpdate()
Returns tru if there are recipients for update message, else false.
Implements inet::eigrp::IEigrpPdm< Ipv4Address >.
1883 EigrpInterface *eigrpIface;
1885 for (
int i = 0; i < ifaceCnt; i++) {
1889 if (eigrpIface !=
nullptr && eigrpIface->getNumOfNeighbors() > 0) {
◆ initialize()
| void inet::eigrp::EigrpIpv4Pdm::initialize |
( |
int |
stage | ) |
|
|
overrideprotectedvirtual |
67 cSimpleModule::initialize(stage);
72 ift.reference(
this,
"interfaceTableModule",
true);
73 rt.reference(
this,
"routingTableModule",
true);
77 eigrpIft = check_and_cast<EigrpInterfaceTable *>(getModuleByPath(
"^.eigrpInterfaceTable"));
78 eigrpNt = check_and_cast<EigrpIpv4NeighborTable *>(getModuleByPath(
"^.eigrpIpv4NeighborTable"));
79 eigrpTt = check_and_cast<EigrpIpv4TopologyTable *>(getModuleByPath(
"^.eigrpIpv4TopologyTable"));
83 this->
eigrpDual =
new EigrpDual<Ipv4Address>(
this);
86 Ipv4Address rid =
rt->getRouterId();
92 EigrpDeviceConfigurator conf(par(
"configData"),
ift);
93 conf.loadEigrpIPv4Config(
this);
◆ installRouteToRT()
Updates existing route in the routing table or creates new one.
1814 Ipv4Route *ansaRtEntry = rtEntry;
1815 bool rtableChanged =
false;
1818 if (ansaRtEntry !=
nullptr) {
1821 return rtableChanged;
1822 else if ((
unsigned int)ansaRtEntry->getMetric() != source->getMetric()) {
1823 EV_DEBUG <<
"EIGRP: Update EIGRP route " << route->getRouteAddress() <<
" via " << source->getNextHop() <<
" in RT" << endl;
1828 EV_DEBUG <<
"EIGRP: add EIGRP route " << route->getRouteAddress() <<
" via " << source->getNextHop() <<
" to RT" << endl;
1831 rt->addRoute(ansaRtEntry);
1833 rtableChanged =
true;
1836 return rtableChanged;
Referenced by updateRoute().
◆ isRTSafeForAdd()
| bool inet::eigrp::EigrpIpv4Pdm::isRTSafeForAdd |
( |
EigrpRoute< Ipv4Address > * |
route, |
|
|
unsigned int |
eigrpAd |
|
) |
| |
|
protected |
Returns true, if routing table does not contain route with given address, mask and smaller administrative distance.
1701 Ipv4Route *routeInTable =
findRoute(route->getRouteAddress(), route->getRouteMask());
1702 Ipv4Route *ansaRoute =
nullptr;
1704 if (routeInTable ==
nullptr)
1707 ansaRoute = routeInTable;
1708 if (ansaRoute !=
nullptr) {
1709 if (ansaRoute->getAdminDist() < eigrpAd)
1715 if (routeInTable !=
nullptr && routeInTable->getAdminDist() < eigrpAd)
Referenced by updateRoute().
◆ msgToAllIfaces()
Records request to send message to all neighbors.
1213 EigrpInterface *eigrpIface;
1217 for (
int i = 0; i < ifCount; i++) {
1224 if ((numOfNeigh = eigrpIface->getNumOfNeighbors()) > 0) {
1227 msgToIface(msgType, source, eigrpIface, forcePoisonRev);
1231 msgToIface(msgType, source, eigrpIface, forcePoisonRev, forceUnreachable);
Referenced by sendQuery(), and sendUpdate().
◆ msgToIface()
Creates request for sending message on specified interface.
1247 EigrpNeighbor<Ipv4Address> *neigh =
nullptr;
1248 EigrpMsgRoute msgRt;
1249 int ifaceId, destNeigh = 0;
1251 if (eigrpIface->isSplitHorizonEn() &&
applySplitHorizon(eigrpIface, source, source->getRouteInfo())) {
1252 if (forcePoisonRev) {
1253 msgRt.unreachable =
true;
1259 msgRt.sourceId = source->getSourceId();
1260 msgRt.routeId = source->getRouteId();
1261 msgRt.originator = source->getOriginator();
1262 msgRt.invalid =
false;
1265 ifaceId = eigrpIface->getInterfaceId();
1266 if (
ift->getInterfaceById(ifaceId)->isMulticast()) {
1270 if (neigh ==
nullptr)
1272 destNeigh = neigh->getNeighborId();
Referenced by msgToAllIfaces().
◆ numInitStages()
| virtual int inet::eigrp::EigrpIpv4Pdm::numInitStages |
( |
| ) |
const |
|
inlineoverrideprotectedvirtual |
◆ preDelete()
| void inet::eigrp::EigrpIpv4Pdm::preDelete |
( |
cComponent * |
root | ) |
|
|
overrideprotectedvirtual |
◆ printRecvMsg()
463 EV_DEBUG <<
" (ack) ";
464 EV_DEBUG <<
" message from " << addr <<
" on IF " << ifaceId;
466 EV_DEBUG <<
", flags: ";
467 if (msg->getInit()) EV_DEBUG <<
"init";
468 else if (msg->getEot()) EV_DEBUG <<
"eot";
469 else if (msg->getCr()) EV_DEBUG <<
"cr";
470 else if (msg->getRs()) EV_DEBUG <<
"rs";
472 EV_DEBUG <<
", seq num:" << msg->getSeqNum();
473 EV_DEBUG <<
", ack num:" << msg->getAckNum();
Referenced by processAckPacket(), processHelloPacket(), processQueryPacket(), processReplyPacket(), and processUpdatePacket().
◆ printSentMsg()
| void inet::eigrp::EigrpIpv4Pdm::printSentMsg |
( |
int |
routeCnt, |
|
|
Ipv4Address & |
destAddress, |
|
|
EigrpMsgReq * |
msgReq |
|
) |
| |
|
protected |
433 int type = msgReq->getOpcode();
438 if (msgReq->getAckNumber() > 0)
439 EV_DEBUG <<
" (ack) ";
440 else if (msgReq->getGoodbyeMsg() ==
true)
441 EV_DEBUG <<
" (goodbye) ";
444 EV_DEBUG <<
" message to " << destAddress <<
" on IF " << msgReq->getDestInterface();
447 EV_DEBUG <<
", flags: ";
448 if (msgReq->getInit()) EV_DEBUG <<
"init";
449 else if (msgReq->getEot()) EV_DEBUG <<
"eot";
450 else if (msgReq->getCr()) EV_DEBUG <<
"cr";
451 else if (msgReq->getRs()) EV_DEBUG <<
"rs";
454 EV_DEBUG <<
", seq num:" << msgReq->getSeqNumber();
455 EV_DEBUG <<
", ack num:" << msgReq->getAckNumber();
Referenced by processMsgFromRtp().
◆ processAckPacket()
531 const EigrpIpv4Ack *ack = staticPtrCast<const EigrpIpv4Ack>(pk->peekAtFront<EigrpIpv4Ack>()).get();
534 if (neigh->isStateUp() ==
false) {
536 neigh->setStateUp(
true);
541 if (neigh->getRoutesForDeletion()) {
543 neigh->setRoutesForDeletion(
false);
Referenced by processMsgFromNetwork().
◆ processHelloPacket()
552 const EigrpIpv4Hello *hello = staticPtrCast<const EigrpIpv4Hello>(pk->peekAtFront<EigrpIpv4Hello>()).get();
554 EigrpTlvParameter tlvParam = hello->getParameterTlv();
559 if (neigh !=
nullptr) {
560 EV_DEBUG <<
" interface goodbye received" << endl;
561 EV_DEBUG <<
"EIGRP neighbor " << srcAddress <<
" is down, interface goodbye received" << endl;
567 else if (neigh ==
nullptr) {
572 if (!(tlvParam.kValues == this->kValues)) {
580 resetTimer(iface->getHelloTimer(), iface->getHelloInt() - 0.5);
582 msgReq->setGoodbyeMsg(
true);
585 else if (tlvParam.holdTimer != neigh->getHoldInt())
586 neigh->setHoldInt(tlvParam.holdTimer);
Referenced by processMsgFromNetwork().
◆ processIfaceConfigChange()
| void inet::eigrp::EigrpIpv4Pdm::processIfaceConfigChange |
( |
EigrpInterface * |
eigrpIface | ) |
|
|
protected |
206 EigrpRouteSource<Ipv4Address> *source;
208 int ifaceId = eigrpIface->getInterfaceId();
210 EigrpWideMetricPar newParam;
214 for (
int i = 0; i < routeCount; i++) {
216 if (source->getIfaceId() == ifaceId && source->isValid()) {
219 source->setMetricParams(ifParam);
221 source->setMetric(metric);
225 source->setMetricParams(newParam);
227 source->setMetric(metric);
Referenced by receiveSignal().
◆ processIfaceStateChange()
| void inet::eigrp::EigrpIpv4Pdm::processIfaceStateChange |
( |
NetworkInterface * |
iface | ) |
|
|
protected |
177 EigrpInterface *eigrpIface;
178 int ifaceId = iface->getInterfaceId();
180 Ipv4Address ifMask = iface->getIpv4Netmask();
181 Ipv4Address ifAddress = iface->getIpv4Address().doAnd(ifMask);
187 eigrpIface =
new EigrpInterface(iface, networkId,
false);
189 if (!eigrpIface->isEnabled()) {
191 startHelloTimer(eigrpIface, simTime() + eigrpIface->getHelloInt() - 0.5);
195 else if (!iface->isUp() || !iface->hasCarrier()) {
198 if (eigrpIface !=
nullptr && eigrpIface->isEnabled()) {
Referenced by receiveSignal().
◆ processInterRoute()
Process route TLV.
- Parameters
-
| neigh | Neighbor which is next hop for a route in TLV. |
704 EigrpRouteSource<Ipv4Address> *src;
705 EigrpWideMetricPar newParam, oldParam, oldNeighParam;
709 src =
eigrpTt->
findOrCreateRoute(tlv.destAddress, tlv.destMask, tlv.routerID, eigrpIface, nextHopNeigh->getNeighborId(), isSourceNew);
712 oldNeighParam = src->getRdParams();
716 src->setRdParams(tlv.metric);
722 oldParam = src->getMetricParams();
727 src->setNextHop(nextHop);
728 src->setMetricParams(newParam);
731 src->setMetric(metric);
Referenced by processQueryPacket(), processReplyPacket(), and processUpdatePacket().
◆ processMsgFromNetwork()
| void inet::eigrp::EigrpIpv4Pdm::processMsgFromNetwork |
( |
cMessage * |
msg | ) |
|
|
protected |
Process message from network layer.
287 Packet *packet = check_and_cast<Packet *>(msg);
295 Ipv4Address srcAddr = packet->getTag<
L3AddressInd>()->getSrcAddress().toIpv4();
296 int ifaceId = packet->getTag<InterfaceInd>()->getInterfaceId();
298 cMessage *msgDup =
nullptr;
300 const auto& pk = packet->peekAtFront<EigrpMessage>();
301 int8_t opcode = pk->getOpcode();
305 ASSERT(eigrpIface !=
nullptr);
306 ASSERT(!eigrpIface->isPassive());
310 EigrpNeighbor<Ipv4Address> *neigh =
nullptr;
312 resetTimer(neigh->getHoldTimer(), neigh->getHoldInt());
321 if (pk->getAckNum() > 0)
336 if (neigh !=
nullptr)
337 EV_DEBUG <<
"EIGRP: Received message of unknown type, skipped" << endl;
339 EV_DEBUG <<
"EIGRP: Received message from " << srcAddr <<
" that is not neighbor, skipped" << endl;
Referenced by handleMessage().
◆ processMsgFromRtp()
| void inet::eigrp::EigrpIpv4Pdm::processMsgFromRtp |
( |
cMessage * |
msg | ) |
|
|
protected |
Process message request from RTP.
346 EigrpMsgReq *msgReq = check_and_cast<EigrpMsgReq *>(msg);
347 int routeCnt = msgReq->getRoutesArraySize();
348 Ipv4Address destAddress;
349 int destIface = msgReq->getDestInterface();
355 ASSERT(eigrpIface !=
nullptr && !eigrpIface->isPassive());
358 if (!
getDestIpAddress(msgReq->getDestNeighbor(), &destAddress) || eigrpIface ==
nullptr) {
366 switch (msgReq->getOpcode()) {
369 if (msgReq->getGoodbyeMsg() ==
true) {
370 pk =
createHelloPacket(eigrpIface->getHoldInt(), this->KVALUES_MAX, destAddress, msgReq);
371 pk->setName(
"EIGRP_HELLO_MSG");
373 else if (msgReq->getAckNumber() > 0) {
375 pk->setName(
"EIGRP_ACK_MSG");
378 pk =
createHelloPacket(eigrpIface->getHoldInt(), this->kValues, destAddress, msgReq);
379 pk->setName(
"EIGRP_HELLO_MSG");
386 pk->setName(
"EIGRP_UPDATE_MSG");
392 pk->setName(
"EIGRP_QUERY_MSG");
398 pk->setName(
"EIGRP_REPLY_MSG");
409 pk->addTagIfAbsent<
InterfaceReq>()->setInterfaceId(destIface);
410 pk->addTagIfAbsent<L3AddressReq>()->setDestAddress(destAddress);
Referenced by handleMessage().
◆ processNewNeighbor()
| void inet::eigrp::EigrpIpv4Pdm::processNewNeighbor |
( |
int |
ifaceId, |
|
|
Ipv4Address & |
srcAddress, |
|
|
const EigrpIpv4Hello * |
helloMessage |
|
) |
| |
|
protected |
Creates relationship with neighbor.
- Parameters
-
| srcAddress | address of the neighbor |
| ifaceId | ID of interface where the neighbor is connected |
992 EigrpMsgReq *msgReqUpdate =
nullptr, *msgReqHello =
nullptr;
993 EigrpNeighbor<Ipv4Address> *neigh =
nullptr;
995 EigrpTlvParameter paramTlv = rcvMsg->getParameterTlv();
996 EigrpStub stubConf = rcvMsg->getStubTlv().stub;
1003 EV_DEBUG <<
"EIGRP can't create neighborship with " << srcAddress <<
", " <<
eigrp::UserMsgs[ecode] << endl;
1006 resetTimer(iface->getHelloTimer(), iface->getHelloInt() - 0.5);
1008 msgReqHello->setGoodbyeMsg(
true);
1014 EV_DEBUG <<
"Neighbor " << srcAddress <<
" is up, new adjacency" << endl;
1018 if (stubConf.connectedRt || stubConf.leakMapRt || stubConf.recvOnlyRt || stubConf.redistributedRt || stubConf.staticRt || stubConf.summaryRt) {
1019 neigh->setStubEnable(
true);
1020 neigh->setStubConf(stubConf);
1021 iface->incNumOfStubs();
1026 resetTimer(iface->getHelloTimer(), iface->getHelloInt() - 0.5);
1032 msgReqUpdate->setInit(
true);
Referenced by processHelloPacket().
◆ processQueryPacket()
648 const EigrpIpv4Query *query = staticPtrCast<const EigrpIpv4Query>(pk->peekAtFront<EigrpIpv4Query>()).get();
651 EigrpRouteSource<Ipv4Address> *src =
nullptr;
652 bool notifyDual, isSourceNew;
656 int cnt = query->getInterRoutesArraySize();
658 EV_DEBUG <<
" Route count:" << cnt << endl;
661 for (
int i = 0; i < cnt; i++) {
662 src =
processInterRoute(query->getInterRoutes(i), srcAddress, neigh->getNeighborId(), eigrpIface, ¬ifyDual, &isSourceNew);
663 src->getRouteInfo()->incrementRefCnt();
Referenced by processMsgFromNetwork().
◆ processReplyPacket()
674 const EigrpIpv4Reply *reply = staticPtrCast<const EigrpIpv4Reply>(pk->peekAtFront<EigrpIpv4Reply>()).get();
677 EigrpRouteSource<Ipv4Address> *src;
678 bool notifyDual, isSourceNew;
682 int cnt = reply->getInterRoutesArraySize();
684 EV_DEBUG <<
" Route count:" << cnt << endl;
687 for (
int i = 0; i < cnt; i++) {
688 src =
processInterRoute(reply->getInterRoutes(i), srcAddress, neigh->getNeighborId(), eigrpIface, ¬ifyDual, &isSourceNew);
Referenced by processMsgFromNetwork().
◆ processRTRouteDel()
| void inet::eigrp::EigrpIpv4Pdm::processRTRouteDel |
( |
const cObject * |
details | ) |
|
|
protected |
241 if (
dynamic_cast<const Ipv4Route *
>(details) ==
nullptr) {
245 const Ipv4Route *changedRt = check_and_cast<const Ipv4Route *>(details);
247 const Ipv4Route *changedAnsaRt = changedRt;
249 EigrpRouteSource<Ipv4Address> *source =
nullptr;
251 if (changedAnsaRt !=
nullptr)
252 adminDist = changedAnsaRt->getAdminDist();
254 adminDist = changedRt->getAdminDist();
261 source =
eigrpTt->
findRoute(changedRt->getDestination(), changedRt->getNetmask(), changedRt->getGateway());
262 if (source ==
nullptr) {
264 EV_DEBUG <<
"EIGRP: removed EIGRP route from RT, not found corresponding route source in TT" << endl;
273 if (source->isSuccessor()) {
274 if (!source->getRouteInfo()->isActive()) {
Referenced by receiveSignal().
◆ processTimer()
| void inet::eigrp::EigrpIpv4Pdm::processTimer |
( |
cMessage * |
msg | ) |
|
|
protected |
479 EigrpTimer *timer = check_and_cast<EigrpTimer *>(msg);
480 EigrpInterface *eigrpIface =
nullptr;
481 EigrpNeighbor<Ipv4Address> *neigh =
nullptr;
482 cObject *contextBasePtr =
nullptr;
483 EigrpMsgReq *msgReq =
nullptr;
489 contextBasePtr = (cObject *)timer->getContextPointer();
490 eigrpIface = check_and_cast<EigrpInterface *>(contextBasePtr);
493 scheduleAt(simTime() + eigrpIface->getHelloInt() - 0.5, timer);
502 contextBasePtr = (cObject *)timer->getContextPointer();
503 neigh = check_and_cast<EigrpNeighbor<Ipv4Address> *>(contextBasePtr);
504 ifaceId = neigh->getIfaceId();
507 EV_DEBUG <<
"Neighbor " << neigh->getIPAddress() <<
" is down, holding time expired" << endl;
515 resetTimer(eigrpIface->getHelloTimer(), eigrpIface->getHelloInt() - 0.5);
517 msgReq->setGoodbyeMsg(
true);
522 EV_DEBUG <<
"Timer with unknown kind was skipped" << endl;
Referenced by handleMessage().
◆ processUpdatePacket()
592 const EigrpIpv4Update *update = staticPtrCast<const EigrpIpv4Update>(pk->peekAtFront<EigrpIpv4Update>()).get();
595 EigrpRouteSource<Ipv4Address> *src;
596 bool skipRoute, notifyDual, isSourceNew;
600 if (neigh->isStateUp() ==
false && update->getAckNum() != 0) {
602 neigh->setStateUp(
true);
607 if (update->getInit()) {
608 if (neigh->isStateUp() ==
true) {
612 else if (neigh->isStateUp()) {
613 int cnt = update->getInterRoutesArraySize();
615 EV_DEBUG <<
" Route count:" << cnt << endl;
618 for (
int i = 0; i < cnt; i++) {
621 EigrpMpIpv4Internal tlv = update->getInterRoutes(i);
630 EV_DEBUG <<
"EIGRP: discard route " << tlv.destAddress << endl;
633 src =
processInterRoute(tlv, srcAddress, neigh->getNeighborId(), eigrpIface, ¬ifyDual, &isSourceNew);
637 EV_DEBUG <<
"EIGRP: route " << tlv.destAddress <<
" is not processed by DUAL, no change of metric" << endl;
Referenced by processMsgFromNetwork().
◆ pushMsgRouteToQueue()
Insert route into the queue with requests.
1280 EigrpMsgReq *request =
nullptr;
1281 RequestVector::iterator it;
1285 if ((*it)->getDestInterface() == ifaceId && (*it)->getOpcode() == msgType) {
1290 if (request ==
nullptr) {
1292 request->setRoutesArraySize(1);
1293 request->setRoutes(0, msgRt);
1297 int rtSize = request->getRoutesArraySize();
1299 if ((index = request->findMsgRoute(msgRt.routeId)) >= 0) {
1300 if (msgRt.unreachable)
1301 request->getRoutesForUpdate(index).unreachable =
true;
1304 request->setRoutesArraySize(rtSize + 1);
1305 request->setRoutes(rtSize, msgRt);
Referenced by msgToIface(), and sendReply().
◆ receiveSignal()
| void inet::eigrp::EigrpIpv4Pdm::receiveSignal |
( |
cComponent * |
source, |
|
|
simsignal_t |
signalID, |
|
|
cObject * |
obj, |
|
|
cObject * |
details |
|
) |
| |
|
overrideprotectedvirtual |
129 Enter_Method(
"%s", cComponent::getSignalName(signalID));
132 NetworkInterfaceChangeDetails *ifcecd = check_and_cast<NetworkInterfaceChangeDetails *>(obj);
136 NetworkInterfaceChangeDetails *ifcecd = check_and_cast<NetworkInterfaceChangeDetails *>(obj);
137 NetworkInterface *iface = check_and_cast<NetworkInterface *>(ifcecd->getNetworkInterface());
141 if (eigrpIface ==
nullptr)
144 ifParam = iface->getDatarate();
145 if (ifParam != 0 && ifParam != eigrpIface->getInterfaceDatarate()) {
146 eigrpIface->setInterfaceDatarate(ifParam);
147 if (eigrpIface->isEnabled())
◆ removeNeighbor()
Removes neighbor from neighbor table and delete it.
Notifies DUAL about event.
1131 EigrpRouteSource<Ipv4Address> *source =
nullptr;
1132 EigrpRoute<Ipv4Address> *route =
nullptr;
1136 int nextHopId = neigh->getNeighborId();
1137 int ifaceId = neigh->getIfaceId();
1138 const char *ifaceName = neigh->getIfaceName();
1144 eigrpIface->decNumOfNeighbors();
1145 if (neigh->isStubEnabled()) {
1146 eigrpIface->decNumOfStubs();
1154 routeId = route->getRouteId();
1159 EV_DEBUG <<
"EIGRP: Destination: " << route->getRouteAddress() <<
"/" << route->getRouteMask().getNetmaskLength() <<
", active " << route->isActive() << endl;
1162 if (route->isActive()) {
1163 if (source ==
nullptr) {
1165 EV_DEBUG <<
" Create dummy route " << route->getRouteAddress() <<
" via <unspecified> for deletion of reply status handle" << endl;
1167 source =
new EigrpRouteSource<Ipv4Address>(ifaceId, ifaceName, nextHopId, routeId, route);
1175 if (source !=
nullptr)
Referenced by disableInterface(), processHelloPacket(), and processTimer().
◆ removeOldSuccessor()
Removes route from routing table and changes old successor's record in topology table.
1791 bool rtFound, rtableChanged =
false;
1794 source->setSuccessor(
false);
1802 if (route->getSuccessor() == source)
1803 route->setSuccessor(
nullptr);
1804 rtableChanged =
true;
1807 source->setSuccessor(
true);
1809 return rtableChanged;
Referenced by updateRoute().
◆ removeRouteFromRT()
- Returns
- if route is found in routing table then returns true.
1664 EigrpRoute<Ipv4Address> *route = source->getRouteInfo();
1665 Ipv4Route *rtEntry =
findRoute(route->getRouteAddress(), route->getRouteMask(), source->getNextHop());
1668 Ipv4Route *ansaRtEntry = rtEntry;
1669 if (ansaRtEntry !=
nullptr) {
1670 *removedRtSrc = ansaRtEntry->getSourceType();
1673 EV_DEBUG <<
"EIGRP: delete route " << route->getRouteAddress() <<
" via " << source->getNextHop() <<
" from RT" << endl;
1674 delete rt->removeRoute(rtEntry);
1679 EV_DEBUG <<
"EIGRP: EIGRP route " << route->getRouteAddress() <<
" via " << source->getNextHop() <<
" can not be removed, not found in RT" << endl;
1682 return rtEntry !=
nullptr;
Referenced by removeOldSuccessor().
◆ resetTimer()
| void inet::eigrp::EigrpIpv4Pdm::resetTimer |
( |
EigrpTimer * |
timer, |
|
|
int |
interval |
|
) |
| |
|
inlineprotected |
◆ sendAllEigrpPaths()
Creates and sends message with all routes from routing table to specified neighbor.
955 EigrpRoute<Ipv4Address> *route;
956 EigrpRouteSource<Ipv4Address> *source;
959 msgReq->setRoutesArraySize(routeCnt);
961 for (
int i = 0; i < routeCnt; i++) {
963 if (route->isActive())
969 if (eigrpIface->isSplitHorizonEn() &&
applySplitHorizon(eigrpIface, source, route))
972 EigrpMsgRoute routeReq;
973 routeReq.sourceId = source->getSourceId();
974 routeReq.routeId = source->getRouteId();
975 routeReq.originator = source->getOriginator();
976 routeReq.invalid =
false;
977 msgReq->setRoutes(addedRoutes , routeReq);
982 if (addedRoutes < routeCnt)
983 msgReq->setRoutesArraySize(addedRoutes);
985 msgReq->setEot(
true);
Referenced by processAckPacket(), and processUpdatePacket().
◆ sendQuery()
Sends query message to specified neighbor.
- Parameters
-
| destNeighbor | ID of destination neighbor. If parameter is set to 0 then sends message to all neighbors. |
| route | route network |
| source | route |
| forcePoisonRev | apply Poison Reverse instead of Split Horizon to the route. |
Implements inet::eigrp::IEigrpPdm< Ipv4Address >.
1616 bool forceUnreachable =
false;
1618 EV_DEBUG <<
"DUAL: send Query message about " << route->getRouteAddress() <<
" to all neighbors" << endl;
1621 forceUnreachable =
true;
1624 forcePoisonRev =
true;
◆ sendReply()
Sends reply message to specified neighbor.
- Parameters
-
| route | route network |
| destNeighbor | ID of destination neighbor. |
| source | route |
| forcePoisonRev | apply Poison Reverse rule to the route |
| isUnreachable | route in message will have inf metric (regardless of Poisson Reverse) |
Implements inet::eigrp::IEigrpPdm< Ipv4Address >.
1633 EigrpMsgRoute msgRt;
1636 EV_DEBUG <<
"DUAL: send Reply message about " << route->getRouteAddress() << endl;
1637 if (neigh ==
nullptr)
1640 msgRt.invalid =
false;
1641 msgRt.sourceId = source->getSourceId();
1642 msgRt.routeId = source->getRouteId();
1643 msgRt.originator = source->getOriginator();
1644 msgRt.unreachable = isUnreachable;
1647 msgRt.unreachable =
true;
1653 msgRt.unreachable =
true;
◆ sendUpdate()
Sends update message to specified neighbor.
- Parameters
-
| destNeighbor | ID of destination neighbor. If parameter is set to 0 then sends message to all neighbors. |
| route | route network |
| source | route |
| forcePoisonRev | force poison reverse rule instead of split horizon |
| reason | text description for user. |
Implements inet::eigrp::IEigrpPdm< Ipv4Address >.
1606 EV_DEBUG <<
"DUAL: send Update message about " << route->getRouteAddress() <<
" to all neighbors, " << reason << endl;
1608 EV_DEBUG <<
" Stub routing applied, message will not be sent" << endl;
Referenced by sendUpdateToStubs().
◆ sendUpdateToStubs()
Sends update message to all stub neighbors.
Implements inet::eigrp::IEigrpPdm< Ipv4Address >.
1941 if (succ ==
nullptr) {
1943 if (oldSucc->isUnreachable()) {
1944 route->setUpdateSent(
true);
1945 route->setNumSentMsgs(route->getNumSentMsgs() + 1);
◆ setASNum()
| void inet::eigrp::EigrpIpv4Pdm::setASNum |
( |
int |
asNum | ) |
|
|
inlineoverridevirtual |
◆ setBandwidth()
| void inet::eigrp::EigrpIpv4Pdm::setBandwidth |
( |
int |
bandwith, |
|
|
int |
interfaceId |
|
) |
| |
|
inlineoverridevirtual |
◆ setDelay()
| void inet::eigrp::EigrpIpv4Pdm::setDelay |
( |
int |
delay, |
|
|
int |
interfaceId |
|
) |
| |
|
inlineoverridevirtual |
◆ setDelayedRemove()
After receiving Ack from neighbor with neighId will be route removed from TT.
- Parameters
-
| neighId | ID of neighbor |
| src | route |
Implements inet::eigrp::IEigrpPdm< Ipv4Address >.
1901 ASSERT(neigh !=
nullptr);
1902 neigh->setRoutesForDeletion(
true);
1903 src->setDelayedRemove(neighId);
1904 src->setValid(
true);
1907 EV_DEBUG <<
"DUAL: route via " << src->getNextHop() <<
" will be removed from TT after receiving Ack from neighbor" << endl;
◆ setHelloInt()
| void inet::eigrp::EigrpIpv4Pdm::setHelloInt |
( |
int |
interval, |
|
|
int |
ifaceId |
|
) |
| |
|
overridevirtual |
◆ setHoldInt()
| void inet::eigrp::EigrpIpv4Pdm::setHoldInt |
( |
int |
interval, |
|
|
int |
ifaceId |
|
) |
| |
|
overridevirtual |
◆ setKValues()
| void inet::eigrp::EigrpIpv4Pdm::setKValues |
( |
const EigrpKValues & |
kValues | ) |
|
|
inlineoverridevirtual |
◆ setLoad()
| void inet::eigrp::EigrpIpv4Pdm::setLoad |
( |
int |
load, |
|
|
int |
interfaceId |
|
) |
| |
|
inlineoverridevirtual |
◆ setMaximumPath()
| void inet::eigrp::EigrpIpv4Pdm::setMaximumPath |
( |
int |
maximumPath | ) |
|
|
inlineoverridevirtual |
◆ setPassive()
| void inet::eigrp::EigrpIpv4Pdm::setPassive |
( |
bool |
passive, |
|
|
int |
ifaceId |
|
) |
| |
|
overridevirtual |
Implements inet::eigrp::IEigrpModule< Ipv4Address >.
1579 if (eigrpIface ==
nullptr)
1581 else if (eigrpIface->isEnabled()) {
1582 NetworkInterface *iface =
ift->getInterfaceById(ifaceId);
1583 Ipv4InterfaceData *idata = iface->getProtocolDataForUpdate<Ipv4InterfaceData>();
1588 EigrpTimer *hellot = eigrpIface->getHelloTimer();
1589 if (hellot !=
nullptr) {
1590 cancelEvent(hellot);
1592 eigrpIface->setHelloTimerPtr(
nullptr);
1597 eigrpIface->setPassive(passive);
◆ setReliability()
| void inet::eigrp::EigrpIpv4Pdm::setReliability |
( |
int |
reliability, |
|
|
int |
interfaceId |
|
) |
| |
|
inlineoverridevirtual |
◆ setReplyStatusTable()
Sets Reply Status Table for specified network.
- Parameters
-
| route | route network |
| forcePoisonRev | use Poison Reverse instead of Split Horizon |
| neighCount | number of all neighbors. |
| stubCount | number of stub neighbors. |
Implements inet::eigrp::IEigrpPdm< Ipv4Address >.
1842 EigrpNeighbor<Ipv4Address> *neigh =
nullptr;
1843 EigrpInterface *eigrpIface =
nullptr;
1845 for (
int i = 0; i < neighTotalCount; i++) {
1852 if (neigh->isStubEnabled()) {
1859 forcePoisonRev =
true;
1864 if (eigrpIface->isSplitHorizonEn() &&
applySplitHorizon(eigrpIface, source, route)) {
1865 if (forcePoisonRev) {
1866 route->setReplyStatus(neigh->getNeighborId());
1872 route->setReplyStatus(neigh->getNeighborId());
1877 return route->getReplyStatusSum() > 0;
◆ setRouterId()
| void inet::eigrp::EigrpIpv4Pdm::setRouterId |
( |
Ipv4Address |
routerID | ) |
|
|
inlineoverridevirtual |
◆ setRouteTlvMetric()
875 msgMetric->bandwidth = rtMetric->bandwidth;
876 msgMetric->delay = rtMetric->delay;
877 msgMetric->hopCount = rtMetric->hopCount;
878 msgMetric->load = rtMetric->load;
879 msgMetric->mtu = rtMetric->mtu;
880 msgMetric->offset = 0;
881 msgMetric->priority = 0;
882 msgMetric->reliability = rtMetric->reliability;
Referenced by createRouteTlv().
◆ setRTRouteMetric()
| void inet::eigrp::EigrpIpv4Pdm::setRTRouteMetric |
( |
Ipv4Route * |
route, |
|
|
uint64_t |
metric |
|
) |
| |
|
inlineprotected |
◆ setSplitHorizon()
| void inet::eigrp::EigrpIpv4Pdm::setSplitHorizon |
( |
bool |
shenabled, |
|
|
int |
ifaceId |
|
) |
| |
|
overridevirtual |
◆ setStub()
| void inet::eigrp::EigrpIpv4Pdm::setStub |
( |
const EigrpStub & |
stub | ) |
|
|
inlineoverridevirtual |
◆ setVariance()
| void inet::eigrp::EigrpIpv4Pdm::setVariance |
( |
int |
variance | ) |
|
|
inlineoverridevirtual |
◆ startHelloTimer()
| void inet::eigrp::EigrpIpv4Pdm::startHelloTimer |
( |
EigrpInterface * |
eigrpIface, |
|
|
simtime_t |
interval |
|
) |
| |
|
protected |
Schedule hello timer to the specified interval.
1533 if (!eigrpIface->isPassive()) {
1534 if ((hellot = eigrpIface->getHelloTimer()) ==
nullptr) {
1536 eigrpIface->setHelloTimerPtr(hellot);
1538 scheduleAt(interval, hellot);
Referenced by addInterfaceToEigrp(), and processIfaceStateChange().
◆ unlockRoutes()
| void inet::eigrp::EigrpIpv4Pdm::unlockRoutes |
( |
const EigrpMsgReq * |
msgReq | ) |
|
|
protected |
887 int reqCnt = msgReq->getRoutesArraySize();
888 EigrpRoute<Ipv4Address> *route =
nullptr;
890 for (
int i = 0; i < reqCnt; i++) {
891 EigrpMsgRoute req = msgReq->getRoutes(i);
894 ASSERT(route !=
nullptr);
895 route->decrementRefCnt();
897 if (route->getRefCnt() < 1) {
Referenced by createReplyPacket().
◆ updateInterface()
| virtual void inet::eigrp::EigrpIpv4Pdm::updateInterface |
( |
int |
interfaceId | ) |
|
|
inlineoverridevirtual |
◆ updateRoute()
Function finds successors to the destination network.
- Parameters
-
| route | destination network |
| dmin | minimal distance to the destination |
| rtableChanged | return parameter, true if occurs change in the routing table |
| removeUnreach | invalidate unreachable sources of the route. |
- Returns
- pointer to successor or nullptr.
Implements inet::eigrp::IEigrpPdm< Ipv4Address >.
1722 EigrpRouteSource<Ipv4Address> *source =
nullptr, *bestSuccessor =
nullptr;
1723 Ipv4Route *rtEntry =
nullptr;
1725 int routeId = route->getRouteId();
1727 int sourceCounter = 0;
1728 uint64_t routeFd = route->getFd();
1730 EV_DEBUG <<
"EIGRP: Search successor for route " << route->getRouteAddress() <<
", FD is " << route->getFd() << endl;
1732 for (
int i = 0; i < routeNum; i++) {
1734 if (source->getRouteId() != routeId || !source->isValid())
1739 if (source->getRd() < routeFd &&
1740 source->getMetric() <= dmin * this->variance && pathsInRT < this->
maximumPath)
1742 EV_DEBUG <<
" successor " << source->getNextHop() <<
" (" << source->getMetric() <<
"/" << source->getRd() <<
")" << endl;
1744 if ((rtEntry =
findRoute(route->getRouteAddress(), route->getRouteMask(), source->getNextHop())) ==
nullptr)
1746 source->setSuccessor(
false);
1747 EV_DEBUG <<
" route can not be added into RT, there is route with smaller AD" << endl;
1752 *rtableChanged =
true;
1755 source->setSuccessor(
true);
1757 else if (source->isSuccessor()) {
1759 *rtableChanged =
true;
1762 if (removeUnreach && source->isUnreachable() && source->getDelayedRemove() == 0 && source->isValid()) {
1763 source->setValid(
false);
1764 EV_DEBUG <<
" invalidate route via " << source->getNextHop() <<
" in TT" << endl;
1768 route->setNumSucc(pathsInRT);
1773 route->setDij(dmin);
1774 route->setRdPar(bestSuccessor->getMetricParams());
1775 route->setSuccessor(bestSuccessor);
1777 if (sourceCounter == 1) {
1778 route->setFd(bestSuccessor->getMetric());
1782 route->setSuccessor(
nullptr);
1784 return bestSuccessor;
◆ adminDistInt
| unsigned int inet::eigrp::EigrpIpv4Pdm::adminDistInt |
|
protected |
◆ asNum
| int inet::eigrp::EigrpIpv4Pdm::asNum |
|
protected |
◆ EIGRP_IPV4_MULT
| const Ipv4Address inet::eigrp::EigrpIpv4Pdm::EIGRP_IPV4_MULT |
|
protected |
◆ EIGRP_SELF_ADDR
| const Ipv4Address inet::eigrp::EigrpIpv4Pdm::EIGRP_SELF_ADDR |
|
protected |
Next hop address 0.0.0.0 (self address)
◆ eigrpDual
◆ eigrpIft
Table with enabled EIGRP interfaces.
Referenced by cancelHelloTimers(), checkNeighborshipRules(), disableInterface(), enableInterface(), flushMsgRequests(), getInterfaceById(), hasNeighborForUpdate(), initialize(), msgToAllIfaces(), processAckPacket(), processHelloPacket(), processIfaceStateChange(), processMsgFromNetwork(), processMsgFromRtp(), processNewNeighbor(), processQueryPacket(), processReplyPacket(), processTimer(), processUpdatePacket(), sendReply(), and setReplyStatusTable().
◆ eigrpIftDisabled
◆ eigrpMetric
◆ eigrpNt
Table with EIGRP neighbors.
Referenced by createNeighbor(), disableInterface(), getDestIpAddress(), initialize(), msgToIface(), processInterRoute(), processMsgFromNetwork(), processNewNeighbor(), removeNeighbor(), sendQuery(), sendReply(), sendUpdateToStubs(), setDelayedRemove(), and setReplyStatusTable().
◆ eigrpStub
| EigrpStub inet::eigrp::EigrpIpv4Pdm::eigrpStub |
|
protected |
◆ eigrpStubEnabled
| bool inet::eigrp::EigrpIpv4Pdm::eigrpStubEnabled |
|
protected |
◆ eigrpTt
Topology table.
Referenced by addRoutesToMsg(), applySplitHorizon(), disableInterface(), enableInterface(), initialize(), processAckPacket(), processHelloPacket(), processIfaceConfigChange(), processInterRoute(), processQueryPacket(), processReplyPacket(), processRTRouteDel(), processTimer(), processUpdatePacket(), removeNeighbor(), sendAllEigrpPaths(), unlockRoutes(), and updateRoute().
◆ host
| cModule* inet::eigrp::EigrpIpv4Pdm::host = nullptr |
|
protected |
◆ ift
◆ kValues
◆ KVALUES_MAX
◆ maximumPath
| int inet::eigrp::EigrpIpv4Pdm::maximumPath |
|
protected |
◆ oldsource
◆ reqQueue
◆ ribScale
| int inet::eigrp::EigrpIpv4Pdm::ribScale |
|
protected |
◆ routingForNetworks
◆ rt
◆ RTP_OUTGW
| const char* inet::eigrp::EigrpIpv4Pdm::RTP_OUTGW |
|
protected |
◆ sizeOfMsg
| const int64_t inet::eigrp::EigrpIpv4Pdm::sizeOfMsg = 20 |
|
protected |
◆ SPLITTER_OUTGW
| const char* inet::eigrp::EigrpIpv4Pdm::SPLITTER_OUTGW |
|
protected |
◆ useClassicMetric
| bool inet::eigrp::EigrpIpv4Pdm::useClassicMetric |
|
protected |
Use classic metric computation or wide metric computation.
Referenced by EigrpIpv4Pdm().
◆ variance
| int inet::eigrp::EigrpIpv4Pdm::variance |
|
protected |
The documentation for this class was generated from the following files:
Packet * createUpdatePacket(const Ipv4Address &destAddress, EigrpMsgReq *msgReq)
Definition: EigrpIpv4Pdm.cc:787
@ dEIGRPExternal
Definition: IRoute.h:72
static const int UNSPEC_ID
Definition: EigrpNeighbor.h:50
bool redistributedRt
Definition: EigrpMessage_m.h:192
EigrpIpv4TopologyTable * eigrpTt
Topology table.
Definition: EigrpIpv4Pdm.h:86
EigrpRouteSource< IPAddress > * findRoute(const IPAddress &routeAddr, const IPAddress &routeMask, const IPAddress &nextHop)
Definition: EigrpTopologyTable.cc:115
int asNum
Autonomous system number.
Definition: EigrpIpv4Pdm.h:68
RequestVector reqQueue
Requests for sending EIGRP messages from DUAL.
Definition: EigrpIpv4Pdm.h:88
@ EIGRP_UPDATE_MSG
Definition: EigrpMessage_m.h:89
uint32_t getInt() const
Returns the address as an uint32_t in host byte order (e.g.
Definition: Ipv4Address.h:186
EigrpInterface * getInterface(int k) const
Returns interface by its position in the table.
Definition: EigrpInterfaceTable.h:180
@ INTERFACE_UP
EIGRP enabled on interface.
Definition: EigrpDual.h:39
const char * SPLITTER_OUTGW
Output gateway to the EIGRP Splitter module.
Definition: EigrpIpv4Pdm.h:61
void msgToIface(HeaderOpcode msgType, EigrpRouteSource< Ipv4Address > *source, EigrpInterface *eigrpIface, bool forcePoisonRev=false, bool forceUnreachable=false)
Creates request for sending message on specified interface.
Definition: EigrpIpv4Pdm.cc:1245
bool staticRt
Definition: EigrpMessage_m.h:190
EigrpRouteSource< IPAddress > * getBestSuccessorByIf(EigrpRoute< IPAddress > *route, int ifaceId)
Returns first successor on specified interface.
Definition: EigrpTopologyTable.cc:216
@ EIGRP_HOLD_TIMER
Definition: EigrpTimer_m.h:44
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down protocol
Definition: IUdp-gates.txt:25
void resetTimer(EigrpTimer *timer, int interval)
Sets specified timer to given interval.
Definition: EigrpIpv4Pdm.h:101
void setBandwidth(uint64_t bw)
Definition: EigrpInterfaceTable.h:88
bool compareParameters(const EigrpWideMetricPar &par1, const EigrpWideMetricPar &par2, EigrpKValues &kValues)
Compares metric enabled parameters.
Definition: EigrpMetricHelper.cc:114
EigrpInterface * getInterfaceById(int ifaceId)
Returns EIGRP interface (enabled or disabled) or nullptr.
Definition: EigrpIpv4Pdm.cc:1404
EigrpNetworkTable< Ipv4Address > * routingForNetworks
Networks included in EIGRP.
Definition: EigrpIpv4Pdm.h:87
static const Protocol ipv4
Definition: Protocol.h:93
EigrpDisabledInterfaces * eigrpIftDisabled
Disabled EIGRP interfaces.
Definition: EigrpIpv4Pdm.h:84
uint16_t K1
Definition: EigrpMessage_m.h:127
void cancelHelloTimers()
Stops Hello Timers on all interfaces.
Definition: EigrpIpv4Pdm.cc:1093
void msgToAllIfaces(int destination, HeaderOpcode msgType, EigrpRouteSource< Ipv4Address > *source, bool forcePoisonRev, bool forceUnreachable)
Records request to send message to all neighbors.
Definition: EigrpIpv4Pdm.cc:1211
const Ipv4Address EIGRP_IPV4_MULT
Multicast address for EIGRP messages.
Definition: EigrpIpv4Pdm.h:63
void decStubCount()
Definition: EigrpNeighborTable.h:67
void processHelloPacket(Packet *pk, Ipv4Address &srcAddress, int ifaceId, EigrpNeighbor< Ipv4Address > *neigh)
Definition: EigrpIpv4Pdm.cc:547
cModule * getContainingNode(const cModule *from)
Find the node containing the given module.
Definition: ModuleAccess.cc:40
void processNewNeighbor(int ifaceId, Ipv4Address &srcAddress, const EigrpIpv4Hello *helloMessage)
Creates relationship with neighbor.
Definition: EigrpIpv4Pdm.cc:990
uint64_t computeClassicMetric(const EigrpWideMetricPar &par, const EigrpKValues &kValues)
Computes classic metric.
Definition: EigrpMetricHelper.cc:69
EigrpRouteSource< IPAddress > * findOrCreateRoute(const IPAddress &routeAddr, const IPAddress &routeMask, const Ipv4Address &routerId, eigrp::EigrpInterface *eigrpIface, int nextHopId, bool *sourceNew)
Finds and returns source with given address or create one.
Definition: EigrpTopologyTable.cc:458
removed InterfaceReq
Definition: IUdp-gates.txt:11
void processUpdatePacket(Packet *pk, Ipv4Address &srcAddress, int ifaceId, EigrpNeighbor< Ipv4Address > *neigh)
Definition: EigrpIpv4Pdm.cc:590
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down DispatchProtocolReq
Definition: IUdp-gates.txt:25
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd L3AddressInd
Definition: IUdp-gates.txt:20
@ EIGRP_HELLO_MSG
Definition: EigrpMessage_m.h:93
bool applyStubToUpdate(EigrpRouteSource< Ipv4Address > *src)
Apply stub configuration to the route in outgoing Update message.
Definition: EigrpIpv4Pdm.cc:1320
virtual void setTimerKind(char timerKind)
@ EIGRP
Definition: IRoute.h:42
EigrpKValues kValues
K-values for calculation of metric.
Definition: EigrpIpv4Pdm.h:69
void processQueryPacket(Packet *pk, Ipv4Address &srcAddress, int ifaceId, EigrpNeighbor< Ipv4Address > *neigh)
Definition: EigrpIpv4Pdm.cc:646
uint16_t K6
Definition: EigrpMessage_m.h:132
EigrpMsgReq * pushMsgRouteToQueue(HeaderOpcode msgType, int ifaceId, int neighId, const EigrpMsgRoute &msgRt)
Insert route into the queue with requests.
Definition: EigrpIpv4Pdm.cc:1278
bool isParamMaximal(const EigrpWideMetricPar &par)
Returns true, if parameters are set to infinite, otherwise false.
Definition: EigrpMetricHelper.h:78
EigrpRoute< IPAddress > * findRouteInfoById(int routeId)
Definition: EigrpTopologyTable.cc:509
static const Protocol eigrp
Definition: Protocol.h:63
void processMsgFromNetwork(cMessage *msg)
Process message from network layer.
Definition: EigrpIpv4Pdm.cc:285
Ipv4Route * findRoute(const Ipv4Address &network, const Ipv4Address &netmask)
Definition: EigrpIpv4Pdm.cc:1911
EigrpInterface * findInterfaceById(int ifaceId)
Gets interface from table by interface ID.
Definition: EigrpInterfaceTable.cc:155
@ dEIGRPInternal
Definition: IRoute.h:65
EigrpNeighbor< IPAddress > * getFirstNeighborOnIf(int ifaceId)
Returns first neighbor that resides on specified interface.
Definition: EigrpNeighborTable.cc:144
void printRecvMsg(const EigrpMessage *msg, Ipv4Address &addr, int ifaceId)
Definition: EigrpIpv4Pdm.cc:459
bool connectedRt
Definition: EigrpMessage_m.h:189
void purgeTable()
Deletes unreachable routes from the topology table.
Definition: EigrpTopologyTable.cc:397
bool hasFeasibleSuccessor(EigrpRoute< IPAddress > *route, uint64_t &resultDmin)
Finds feasible successor and minimal distance to the destination.
Definition: EigrpTopologyTable.cc:238
bool leakMapRt
Definition: EigrpMessage_m.h:193
uint16_t K3
Definition: EigrpMessage_m.h:129
void incStubCount()
Definition: EigrpNeighborTable.h:66
bool applyStubToQuery(EigrpInterface *eigrpIface, int numOfNeigh)
Apply stub configuration to the route in outgoing Query message.
Definition: EigrpIpv4Pdm.cc:1236
int maximumPath
Maximum number of parallel routes that EIGRP will support.
Definition: EigrpIpv4Pdm.h:70
@ LOST_ROUTE
Route in RT deleted, but not by EIGRP.
Definition: EigrpDual.h:40
Ipv4Address getNextHopAddr(const Ipv4Address &nextHopAddr, Ipv4Address &senderAddr)
Returns next hop address.
Definition: EigrpIpv4Pdm.h:210
Ipv4Address & getRouterId()
Definition: EigrpTopologyTable.h:95
@ RECV_QUERY
Received query message.
Definition: EigrpDual.h:35
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down PacketProtocolTag
Definition: IUdp-gates.txt:25
static const int UNSPEC_RECEIVER
Unspecified address of receiver - all neighbors.
Definition: IEigrpPdm.h:29
@ EIGRP_HELLO_TIMER
Definition: EigrpTimer_m.h:43
@ RECV_UPDATE
Change of route distance in received update message or on interface.
Definition: EigrpDual.h:34
bool recvOnlyRt
Definition: EigrpMessage_m.h:194
@ M_DISABLED_ON_IF
Definition: EigrpPrint.h:41
EigrpRouteSource< IPAddress > * getBestSuccessor(EigrpRoute< IPAddress > *route)
Returns best successor to the destination.
Definition: EigrpTopologyTable.cc:175
void processMsgFromRtp(cMessage *msg)
Process message request from RTP.
Definition: EigrpIpv4Pdm.cc:344
EigrpInterface * removeInterface(EigrpInterface *iface)
Removes interface from table.
Definition: EigrpInterfaceTable.cc:143
void sendAllEigrpPaths(EigrpInterface *eigrpIface, EigrpNeighbor< Ipv4Address > *neigh)
Creates and sends message with all routes from routing table to specified neighbor.
Definition: EigrpIpv4Pdm.cc:951
intscale< b, 1, 8 > B
Definition: Units.h:1168
cModule * host
Definition: EigrpIpv4Pdm.h:58
unsigned int adminDistInt
Administrative distance.
Definition: EigrpIpv4Pdm.h:72
Packet * createAckPacket(Ipv4Address &destAddress, EigrpMsgReq *msgReq)
Definition: EigrpIpv4Pdm.cc:773
void processIfaceConfigChange(EigrpInterface *eigrpIface)
Definition: EigrpIpv4Pdm.cc:204
bool isSplitHorizonEn() const
Definition: EigrpInterfaceTable.h:109
EigrpRoute< IPAddress > * removeRouteInfo(EigrpRoute< IPAddress > *route)
Definition: EigrpTopologyTable.cc:483
void cancelHoldTimer(EigrpNeighbor< Ipv4Address > *neigh)
Stops Hold timer.
Definition: EigrpIpv4Pdm.cc:1082
int variance
Parameter for unequal cost load balancing.
Definition: EigrpIpv4Pdm.h:71
static const uint64_t BANDWIDTH_INF
Definition: EigrpMetricHelper.h:49
EigrpNeighbor< IPAddress > * getNeighbor(int k) const
Definition: EigrpNeighborTable.h:63
@ NEIGHBOR_DOWN
Neighbor went down.
Definition: EigrpDual.h:37
removed HopLimitReq
Definition: IUdp-gates.txt:11
EigrpInterface * addInterfaceToEigrp(int ifaceId, int networkId, bool enabled)
Creates interface and inserts it to the table.
Definition: EigrpIpv4Pdm.cc:1505
void createRouteTlv(EigrpMpIpv4Internal *routeTlv, EigrpRoute< Ipv4Address > *route, bool unreachable=false)
Definition: EigrpIpv4Pdm.cc:860
void processRTRouteDel(const cObject *details)
Definition: EigrpIpv4Pdm.cc:239
int getNumRoutes() const
Definition: EigrpTopologyTable.h:60
int getStubCount() const
Definition: EigrpNeighborTable.h:65
static const int STUB_RECEIVER
All stub neighbors.
Definition: IEigrpPdm.h:30
removed type
Definition: IUdp-gates.txt:7
void delayedRemove(int neighId)
Definition: EigrpTopologyTable.cc:381
static const int UNSPEC_SENDER
Unspecified address of sender - input event source.
Definition: IEigrpPdm.h:33
uint16_t K5
Definition: EigrpMessage_m.h:131
void setRouterId(Ipv4Address &routerID)
Definition: EigrpTopologyTable.h:96
int getNumRouteInfo() const
Definition: EigrpTopologyTable.h:88
Packet * createReplyPacket(Ipv4Address &destAddress, EigrpMsgReq *msgReq)
Definition: EigrpIpv4Pdm.cc:827
EigrpTimer * createTimer(char timerKind, void *context)
Creates timer of specified type.
Definition: EigrpIpv4Pdm.cc:739
simsignal_t interfaceStateChangedSignal
Definition: Simsignals.cc:32
INET_API InitStage INITSTAGE_LOCAL
Initialization of local state that don't use or affect other modules includes:
void setLoad(int load)
Definition: EigrpInterfaceTable.h:100
int getNumInterfaces() const
Returns number of interfaces in the table.
Definition: EigrpInterfaceTable.h:176
void addMessageHeader(const Ptr< EigrpMessage > &msg, int opcode, EigrpMsgReq *msgReq)
Definition: EigrpIpv4Pdm.cc:850
int checkNeighborshipRules(int ifaceId, int neighAsNum, Ipv4Address &neighAddr, const EigrpKValues &neighKValues)
Checks neighborship rules.
Definition: EigrpIpv4Pdm.cc:1036
bool applySplitHorizon(EigrpInterface *destInterface, EigrpRouteSource< Ipv4Address > *source, EigrpRoute< Ipv4Address > *route)
Definition: EigrpIpv4Pdm.cc:1312
const int64_t sizeOfMsg
Definition: EigrpIpv4Pdm.h:60
EigrpStub eigrpStub
EIGRP stub configuration.
Definition: EigrpIpv4Pdm.h:76
void removeNeighbor(EigrpNeighbor< Ipv4Address > *neigh)
Removes neighbor from neighbor table and delete it.
Definition: EigrpIpv4Pdm.cc:1129
#define NUM_INIT_STAGES
Definition: InitStageRegistry.h:73
bool isRTSafeForAdd(EigrpRoute< Ipv4Address > *route, unsigned int eigrpAd)
Returns true, if routing table does not contain route with given address, mask and smaller administra...
Definition: EigrpIpv4Pdm.cc:1699
void addInterface(EigrpInterface *interface)
Adds interface to the table.
Definition: EigrpDisabledInterfaces.cc:40
EigrpNeighbor< Ipv4Address > * createNeighbor(EigrpInterface *eigrpIface, Ipv4Address &address, uint16_t holdInt)
Create record in the neighbor table and start hold timer.
Definition: EigrpIpv4Pdm.cc:1065
bool eigrpStubEnabled
True when EIGRP stub is on.
Definition: EigrpIpv4Pdm.h:75
uint64_t findRouteDMin(EigrpRoute< IPAddress > *route)
Definition: EigrpTopologyTable.cc:152
@ M_OK
Definition: EigrpPrint.h:35
Packet * createQueryPacket(Ipv4Address &destAddress, EigrpMsgReq *msgReq)
Definition: EigrpIpv4Pdm.cc:807
EigrpRouteSource< Ipv4Address > * oldsource
Latest route change.
Definition: EigrpIpv4Pdm.h:66
@ EIGRP_REPLY_MSG
Definition: EigrpMessage_m.h:92
bool removeOldSuccessor(EigrpRouteSource< Ipv4Address > *source, EigrpRoute< Ipv4Address > *route)
Removes route from routing table and changes old successor's record in topology table.
Definition: EigrpIpv4Pdm.cc:1787
EigrpInterface * findInterface(int ifaceId)
Finds interface by ID in table and returns it.
Definition: EigrpDisabledInterfaces.cc:58
EigrpInterfaceTable * eigrpIft
Table with enabled EIGRP interfaces.
Definition: EigrpIpv4Pdm.h:83
const char * UserMsgs[]
Definition: EigrpPrint.cc:23
void processTimer(cMessage *msg)
Definition: EigrpIpv4Pdm.cc:477
bool getDestIpAddress(int destNeigh, Ipv4Address *resultAddress)
Returns IP address for sending EIGRP message.
Definition: EigrpIpv4Pdm.cc:416
static const int UNSPEC_NETID
Definition: EigrpNetworkTable.h:71
void setReliability(int rel)
Definition: EigrpInterfaceTable.h:97
void enableInterface(EigrpInterface *eigrpIface, Ipv4Address &ifAddress, Ipv4Address &ifMask, int networkId)
Add interface to the EIGRP interface table and notifies DUAL.
Definition: EigrpIpv4Pdm.cc:1461
EigrpWideMetricPar getParam(EigrpInterface *eigrpIface)
Sets parameters from interface for metric computation.
Definition: EigrpMetricHelper.cc:34
Ipv4Route * createRTRoute(EigrpRouteSource< Ipv4Address > *successor)
Definition: EigrpIpv4Pdm.cc:1183
void processAckPacket(Packet *pk, Ipv4Address &srcAddress, int ifaceId, EigrpNeighbor< Ipv4Address > *neigh)
Definition: EigrpIpv4Pdm.cc:529
int addNeighbor(EigrpNeighbor< IPAddress > *neighbor)
Adds neighbor to the table.
Definition: EigrpNeighborTable.cc:118
void setDelay(uint64_t dly)
Definition: EigrpInterfaceTable.h:94
void addRoutesToMsg(const Ptr< EigrpIpv4Message > &msg, const EigrpMsgReq *msgReq)
Add routes from request to the message.
Definition: EigrpIpv4Pdm.cc:903
bool summaryRt
Definition: EigrpMessage_m.h:191
ModuleRefByPar< IInterfaceTable > ift
Definition: EigrpIpv4Pdm.h:78
static const Ipv4Address UNSPECIFIED_ADDRESS
0.0.0.0
Definition: Ipv4Address.h:91
void startHelloTimer(EigrpInterface *eigrpIface, simtime_t interval)
Schedule hello timer to the specified interval.
Definition: EigrpIpv4Pdm.cc:1528
#define Enter_Method(...)
Definition: SelfDoc.h:71
simsignal_t routeDeletedSignal
Definition: Simsignals.cc:42
bool removeRouteFromRT(EigrpRouteSource< Ipv4Address > *successor, IRoute::SourceType *removedRtSrc)
Definition: EigrpIpv4Pdm.cc:1662
EigrpKValues KVALUES_MAX
K-values (from K1 to K5) are set to max.
Definition: EigrpIpv4Pdm.h:64
Packet * createHelloPacket(int holdInt, EigrpKValues kValues, Ipv4Address &destAddress, EigrpMsgReq *msgReq)
Definition: EigrpIpv4Pdm.cc:748
virtual char getTimerKind() const
uint16_t K4
Definition: EigrpMessage_m.h:130
bool useClassicMetric
Use classic metric computation or wide metric computation.
Definition: EigrpIpv4Pdm.h:73
int ribScale
Scaling factor for Wide metric.
Definition: EigrpIpv4Pdm.h:74
EigrpRoute< IPAddress > * getRouteInfo(int k)
Definition: EigrpTopologyTable.h:89
@ dUnknown
Definition: IRoute.h:77
EigrpInterface * getInterface(int k) const
Returns interface by its position in the table.
Definition: EigrpDisabledInterfaces.h:52
int getNumInterfaces() const
Returns number of interfaces in the table.
Definition: EigrpDisabledInterfaces.h:36
EigrpNeighbor< IPAddress > * findNeighborById(int id)
Finds neighbor by ID.
Definition: EigrpNeighborTable.cc:104
void setRTRouteMetric(Ipv4Route *route, uint64_t metric)
Changes metric of route in routing table.
Definition: EigrpIpv4Pdm.h:232
const char * RTP_OUTGW
Output gateway to the RTP module.
Definition: EigrpIpv4Pdm.h:62
EigrpWideMetricPar adjustParam(const EigrpWideMetricPar &ifParam, const EigrpWideMetricPar &neighParam)
Adjust parameters of metric by interface parameters.
Definition: EigrpMetricHelper.cc:48
void setRouteTlvMetric(EigrpWideMetricPar *msgMetric, EigrpWideMetricPar *rtMetric)
Definition: EigrpIpv4Pdm.cc:873
Class generated from inet/routing/eigrp/EigrpTimer.msg:22 by opp_msgtool.
Definition: EigrpTimer_m.h:60
void unlockRoutes(const EigrpMsgReq *msgReq)
Definition: EigrpIpv4Pdm.cc:885
EigrpInterface * removeInterface(EigrpInterface *iface)
Removes specified interface from table and returns it.
Definition: EigrpDisabledInterfaces.cc:46
void processReplyPacket(Packet *pk, Ipv4Address &srcAddress, int ifaceId, EigrpNeighbor< Ipv4Address > *neigh)
Definition: EigrpIpv4Pdm.cc:672
void addInterface(EigrpInterface *interface)
Adds interface to table.
Definition: EigrpInterfaceTable.cc:137
EigrpRouteSource< IPAddress > * findRouteByNextHop(int routeId, int nextHopId)
Definition: EigrpTopologyTable.cc:447
@ M_NEIGH_BAD_SUBNET
Definition: EigrpPrint.h:44
@ INTERFACE_DOWN
EIGRP disabled on interface - only for connected route.
Definition: EigrpDual.h:38
void addRoute(EigrpRouteSource< IPAddress > *source)
Definition: EigrpTopologyTable.cc:277
simsignal_t interfaceConfigChangedSignal
Definition: Simsignals.cc:33
EigrpMetricHelper * eigrpMetric
Definition: EigrpIpv4Pdm.h:82
static const uint64_t DELAY_INF
Definition: EigrpMetricHelper.h:48
@ RECV_REPLY
Received reply message.
Definition: EigrpDual.h:36
@ M_NEIGH_BAD_AS
Definition: EigrpPrint.h:42
EigrpDual< Ipv4Address > * eigrpDual
Definition: EigrpIpv4Pdm.h:81
void flushMsgRequests()
Sends all message requests to RTP.
Definition: EigrpIpv4Pdm.cc:1340
EigrpIpv4NeighborTable * eigrpNt
Table with EIGRP neighbors.
Definition: EigrpIpv4Pdm.h:85
EigrpRouteSource< IPAddress > * findRouteById(int sourceId)
Definition: EigrpTopologyTable.cc:436
void disableInterface(NetworkInterface *iface, EigrpInterface *eigrpIface, Ipv4Address &ifAddress, Ipv4Address &ifMask)
Remove interface from EIGRP interface table.
Definition: EigrpIpv4Pdm.cc:1414
bool installRouteToRT(EigrpRoute< Ipv4Address > *route, EigrpRouteSource< Ipv4Address > *source, uint64_t dmin, Ipv4Route *rtEntry)
Updates existing route in the routing table or creates new one.
Definition: EigrpIpv4Pdm.cc:1812
void processIfaceStateChange(NetworkInterface *iface)
Definition: EigrpIpv4Pdm.cc:175
void printSentMsg(int routeCnt, Ipv4Address &destAddress, EigrpMsgReq *msgReq)
Definition: EigrpIpv4Pdm.cc:431
@ M_NEIGH_BAD_KVALUES
Definition: EigrpPrint.h:43
SourceType
Specifies where the route comes from.
Definition: IRoute.h:28
uint16_t K2
Definition: EigrpMessage_m.h:128
ModuleRefByPar< IIpv4RoutingTable > rt
Definition: EigrpIpv4Pdm.h:79
EigrpRouteSource< Ipv4Address > * processInterRoute(const EigrpMpIpv4Internal &tlv, Ipv4Address &nextHop, int sourceNeighId, EigrpInterface *eigrpIface, bool *notifyDual, bool *isSourceNew)
Process route TLV.
Definition: EigrpIpv4Pdm.cc:699
int getNumNeighbors() const
Definition: EigrpNeighborTable.h:62
INET_API InitStage INITSTAGE_ROUTING_PROTOCOLS
Initialization of routing protocols.
EigrpMsgReq * createMsgReq(HeaderOpcode msgType, int destNeighbor, int destIface)
Creates request for sending of EIGRP message for RTP.
Definition: EigrpIpv4Pdm.cc:940
EigrpNeighbor< IPAddress > * findNeighbor(const IPAddress &ipAddress)
Finds neighbor by IP address.
Definition: EigrpNeighborTable.cc:88
EigrpNeighbor< IPAddress > * removeNeighbor(EigrpNeighbor< IPAddress > *neighbor)
Removes neighbor form the table, but the record still exists.
Definition: EigrpNeighborTable.cc:129
void sendUpdate(int destNeighbor, EigrpRoute< Ipv4Address > *route, EigrpRouteSource< Ipv4Address > *source, bool forcePoisonRev, const char *reason) override
Sends update message to specified neighbor.
Definition: EigrpIpv4Pdm.cc:1604
@ UNKNOWN
Definition: IRoute.h:42
EigrpRouteSource< IPAddress > * getRoute(int k)
Definition: EigrpTopologyTable.h:61
@ EIGRP_QUERY_MSG
Definition: EigrpMessage_m.h:91