|
INET Framework for OMNeT++/OMNEST
|
#include <EigrpIpv6Pdm.h>
|
| | EigrpIpv6Pdm () |
| |
| | ~EigrpIpv6Pdm () |
| |
| 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< Ipv6Address > * | addNetwork (Ipv6Address address, Ipv6Address 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...
|
| |
| 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< Ipv6Address > *route, EigrpRouteSource< Ipv6Address > *source, bool forcePoisonRev, const char *reason) override |
| | Sends update message to specified neighbor. More...
|
| |
| void | sendQuery (int destNeighbor, EigrpRoute< Ipv6Address > *route, EigrpRouteSource< Ipv6Address > *source, bool forcePoisonRev=false) override |
| | Sends query message to specified neighbor. More...
|
| |
| void | sendReply (EigrpRoute< Ipv6Address > *route, int destNeighbor, EigrpRouteSource< Ipv6Address > *source, bool forcePoisonRev=false, bool isUnreachable=false) override |
| | Sends reply message to specified neighbor. More...
|
| |
| EigrpRouteSource< Ipv6Address > * | updateRoute (EigrpRoute< Ipv6Address > *route, uint64_t dmin, bool *rtableChanged, bool removeUnreach=false) override |
| | Function finds successors to the destination network. More...
|
| |
| uint64_t | findRouteDMin (EigrpRoute< Ipv6Address > *route) override |
| | Returns minimal distance to destination network. More...
|
| |
| bool | hasFeasibleSuccessor (EigrpRoute< Ipv6Address > *route, uint64_t &resultDmin) override |
| | Determine whether there are Feasibles Successors for specified route. More...
|
| |
| EigrpRouteSource< Ipv6Address > * | getBestSuccessor (EigrpRoute< Ipv6Address > *route) override |
| | Returns best successor for specified network. More...
|
| |
| bool | setReplyStatusTable (EigrpRoute< Ipv6Address > *route, EigrpRouteSource< Ipv6Address > *source, bool forcePoisonRev, int *neighCount, int *stubCount) override |
| | Sets Reply Status Table for specified network. More...
|
| |
| bool | hasNeighborForUpdate (EigrpRouteSource< Ipv6Address > *source) override |
| | Returns tru if there are recipients for update message, else false. More...
|
| |
| void | setDelayedRemove (int neighId, EigrpRouteSource< Ipv6Address > *src) override |
| | After receiving Ack from neighbor with neighId will be route removed from TT. More...
|
| |
| void | sendUpdateToStubs (EigrpRouteSource< Ipv6Address > *succ, EigrpRouteSource< Ipv6Address > *oldSucc, EigrpRoute< Ipv6Address > *route) override |
| | Sends update message to all stub neighbors. More...
|
| |
| bool | addNetPrefix (const Ipv6Address &network, const short int prefixLen, const int ifaceId) override |
| | Adds information about IPv6 network prefix. More...
|
| |
| virtual | ~IEigrpModule () |
| |
|
| virtual void | initialize (int stage) override |
| |
| virtual void | preDelete (cComponent *root) override |
| |
| virtual void | handleMessage (cMessage *msg) override |
| | Multi-stage initialization. More...
|
| |
| virtual int | numInitStages () const override |
| |
| virtual void | receiveSignal (cComponent *source, simsignal_t signalID, cObject *obj, cObject *details) override |
| |
| void | printSentMsg (int routeCnt, Ipv6Address &destAddress, EigrpMsgReq *msgReq) |
| |
| void | printRecvMsg (const EigrpMessage *msg, Ipv6Address &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< Ipv6Address > *neigh) |
| | Stops Hold timer. More...
|
| |
| void | cancelHelloTimers () |
| | Stops Hello Timers on all interfaces. More...
|
| |
| Packet * | createHelloPacket (int holdInt, EigrpKValues kValues, Ipv6Address &destAddress, EigrpMsgReq *msgReq) |
| |
| Packet * | createAckPacket (Ipv6Address &destAddress, EigrpMsgReq *msgReq) |
| |
| Packet * | createUpdatePacket (const Ipv6Address &destAddress, EigrpMsgReq *msgReq) |
| |
| Packet * | createQueryPacket (Ipv6Address &destAddress, EigrpMsgReq *msgReq) |
| |
| Packet * | createReplyPacket (Ipv6Address &destAddress, EigrpMsgReq *msgReq) |
| |
| void | addMessageHeader (const Ptr< EigrpMessage > &msg, int opcode, EigrpMsgReq *msgReq) |
| | Adds ControlInfo for network layer module. More...
|
| |
| void | unlockRoutes (const EigrpMsgReq *msgReq) |
| |
| void | createRouteTlv (EigrpMpIpv6Internal *routeTlv, EigrpRoute< Ipv6Address > *route, bool unreachable=false) |
| |
| void | addRoutesToMsg (const Ptr< EigrpIpv6Message > &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, Ipv6Address &srcAddress, int ifaceId, EigrpNeighbor< Ipv6Address > *neigh) |
| |
| void | processHelloPacket (Packet *pk, Ipv6Address &srcAddress, int ifaceId, EigrpNeighbor< Ipv6Address > *neigh) |
| |
| void | processUpdatePacket (Packet *pk, Ipv6Address &srcAddress, int ifaceId, EigrpNeighbor< Ipv6Address > *neigh) |
| |
| void | processQueryPacket (Packet *pk, Ipv6Address &srcAddress, int ifaceId, EigrpNeighbor< Ipv6Address > *neigh) |
| |
| void | processReplyPacket (Packet *pk, Ipv6Address &srcAddress, int ifaceId, EigrpNeighbor< Ipv6Address > *neigh) |
| |
| EigrpRouteSource< Ipv6Address > * | processInterRoute (const EigrpMpIpv6Internal &tlv, Ipv6Address &nextHop, int sourceNeighId, EigrpInterface *eigrpIface, bool *notifyDual, bool *isSourceNew) |
| | Process route TLV. More...
|
| |
| void | sendAllEigrpPaths (EigrpInterface *eigrpIface, EigrpNeighbor< Ipv6Address > *neigh) |
| | Creates and sends message with all routes from routing table to specified neighbor. More...
|
| |
| void | processNewNeighbor (int ifaceId, Ipv6Address &srcAddress, const EigrpIpv6Hello *helloMessage) |
| | Creates relationship with neighbor. More...
|
| |
| int | checkNeighborshipRules (int ifaceId, int neighAsNum, Ipv6Address &neighAddr, const EigrpKValues &neighKValues) |
| | Checks neighborship rules. More...
|
| |
| EigrpNeighbor< Ipv6Address > * | createNeighbor (EigrpInterface *eigrpIface, Ipv6Address &address, uint16_t holdInt) |
| | Create record in the neighbor table and start hold timer. More...
|
| |
| void | removeNeighbor (EigrpNeighbor< Ipv6Address > *neigh) |
| | Removes neighbor from neighbor table and delete it. More...
|
| |
| void | disableInterface (NetworkInterface *iface, EigrpInterface *eigrpIface) |
| | Remove interface from EIGRP interface table. More...
|
| |
| void | enableInterface (EigrpInterface *eigrpIface) |
| | 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, bool enabled) |
| | Creates interface and inserts it to the table. More...
|
| |
| void | processIfaceStateChange (NetworkInterface *iface) |
| |
| void | processIfaceConfigChange (EigrpInterface *eigrpIface) |
| |
| void | processRTRouteDel (const cObject *details) |
| |
| Ipv6Address | getNextHopAddr (const Ipv6Address &nextHopAddr, Ipv6Address &senderAddr) |
| | Returns next hop address. More...
|
| |
| bool | getDestIpAddress (int destNeigh, Ipv6Address *resultAddress) |
| | Returns IP address for sending EIGRP message. More...
|
| |
| bool | removeRouteFromRT (EigrpRouteSource< Ipv6Address > *successor, IRoute::SourceType *removedRtSrc) |
| |
| Ipv6Route * | createRTRoute (EigrpRouteSource< Ipv6Address > *successor) |
| |
| bool | installRouteToRT (EigrpRoute< Ipv6Address > *route, EigrpRouteSource< Ipv6Address > *source, uint64_t dmin, Ipv6Route *rtEntry) |
| | Updates existing route in the routing table or creates new one. More...
|
| |
| bool | isRTSafeForAdd (EigrpRoute< Ipv6Address > *route, unsigned int eigrpAd) |
| | Returns true, if routing table does not contain route with given address, mask and smaller administrative distance. More...
|
| |
| void | setRTRouteMetric (Ipv6Route *route, uint64_t metric) |
| | Changes metric of route in routing table. More...
|
| |
| bool | removeOldSuccessor (EigrpRouteSource< Ipv6Address > *source, EigrpRoute< Ipv6Address > *route) |
| | Removes route from routing table and changes old successor's record in topology table. More...
|
| |
| void | msgToAllIfaces (int destination, HeaderOpcode msgType, EigrpRouteSource< Ipv6Address > *source, bool forcePoisonRev, bool forceUnreachable) |
| | Records request to send message to all neighbors. More...
|
| |
| void | msgToIface (HeaderOpcode msgType, EigrpRouteSource< Ipv6Address > *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< Ipv6Address > *source, EigrpRoute< Ipv6Address > *route) |
| |
| bool | applyStubToUpdate (EigrpRouteSource< Ipv6Address > *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...
|
| |
| Ipv6Route * | findRoute (const Ipv6Address &prefix, int prefixLength) |
| |
| Ipv6Route * | findRoute (const Ipv6Address &prefix, int prefixLength, const Ipv6Address &nexthop) |
| |
◆ PrefixVector
◆ RequestVector
◆ RouteVector
◆ EigrpIpv6Pdm()
| inet::eigrp::EigrpIpv6Pdm::EigrpIpv6Pdm |
( |
| ) |
|
◆ ~EigrpIpv6Pdm()
| inet::eigrp::EigrpIpv6Pdm::~EigrpIpv6Pdm |
( |
| ) |
|
◆ addInterface() [1/2]
| void inet::eigrp::EigrpIpv6Pdm::addInterface |
( |
int |
interfaceId, |
|
|
bool |
enabled |
|
) |
| |
|
inlineoverridevirtual |
◆ addInterface() [2/2]
| void inet::eigrp::EigrpIpv6Pdm::addInterface |
( |
int |
interfaceId, |
|
|
int |
networkId, |
|
|
bool |
enabled |
|
) |
| |
|
inlineoverridevirtual |
◆ addInterfaceToEigrp()
| EigrpInterface * inet::eigrp::EigrpIpv6Pdm::addInterfaceToEigrp |
( |
int |
ifaceId, |
|
|
bool |
enabled |
|
) |
| |
|
protected |
◆ addMessageHeader()
| void inet::eigrp::EigrpIpv6Pdm::addMessageHeader |
( |
const Ptr< EigrpMessage > & |
msg, |
|
|
int |
opcode, |
|
|
EigrpMsgReq * |
msgReq |
|
) |
| |
|
protected |
◆ addNetPrefix()
| bool inet::eigrp::EigrpIpv6Pdm::addNetPrefix |
( |
const Ipv6Address & |
network, |
|
|
const short int |
prefixLen, |
|
|
const int |
ifaceId |
|
) |
| |
|
overridevirtual |
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< Ipv6Address >.
1952 PrefixVector::iterator it;
1955 if (it->network == network && it->prefixLength == prefixLen) {
1956 if (it->ifaceId == ifaceId) {
1966 IPv6netPrefix newprefix;
1967 newprefix.network = network;
1968 newprefix.prefixLength = prefixLen;
1969 newprefix.ifaceId = ifaceId;
◆ addNetwork()
◆ addRoutesToMsg()
Add routes from request to the message.
920 int reqCnt = msgReq->getRoutesArraySize();
921 EigrpRouteSource<Ipv6Address> *source =
nullptr;
922 EigrpRoute<Ipv6Address> *route =
nullptr;
924 msg->setInterRoutesArraySize(reqCnt);
925 for (
int i = 0; i < reqCnt; i++) {
926 EigrpMpIpv6Internal routeTlv;
927 EigrpMsgRoute req = msgReq->getRoutes(i);
931 ASSERT(route !=
nullptr);
934 route = source->getRouteInfo();
936 routeTlv.routerID = req.originator;
939 msg->setInterRoutes(i, routeTlv);
942 EV_DEBUG <<
" route: " << routeTlv.destAddress <<
"/" <<
getNetmaskLength(routeTlv.destMask);
943 EV_DEBUG <<
" originator: " << routeTlv.routerID;
945 EV_DEBUG <<
", bw: " << routeTlv.metric.bandwidth;
946 EV_DEBUG <<
", dly: " << routeTlv.metric.delay;
947 EV_DEBUG <<
", hopcnt: " << (int)routeTlv.metric.hopCount;
Referenced by createQueryPacket(), createReplyPacket(), and createUpdatePacket().
◆ applySplitHorizon()
◆ applyStubToQuery()
| bool inet::eigrp::EigrpIpv6Pdm::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
1242 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::EigrpIpv6Pdm::cancelHelloTimers |
( |
| ) |
|
|
protected |
Stops Hello Timers on all interfaces.
1104 EigrpInterface *iface;
1108 for (
int i = 0; i < cnt; i++) {
1111 if ((timer = iface->getHelloTimer()) !=
nullptr) {
1112 if (timer->isScheduled()) {
1117 iface->setHelloTimerPtr(
nullptr);
1123 for (
int i = 0; i < cnt; i++) {
1126 if ((timer = iface->getHelloTimer()) !=
nullptr) {
1127 if (timer->isScheduled()) {
1132 iface->setHelloTimerPtr(
nullptr);
Referenced by preDelete().
◆ cancelHoldTimer()
Stops Hold timer.
1094 if ((timer = neigh->getHoldTimer()) !=
nullptr) {
1095 if (timer->isScheduled()) {
Referenced by removeNeighbor().
◆ checkNeighborshipRules()
| int inet::eigrp::EigrpIpv6Pdm::checkNeighborshipRules |
( |
int |
ifaceId, |
|
|
int |
neighAsNum, |
|
|
Ipv6Address & |
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.
1052 Ipv6Address ifaceAddr, ifaceMask;
1057 else if (this->
asNum != neighAsNum) {
1060 else if (!(this->
kValues == neighKValues)) {
Referenced by processNewNeighbor().
◆ createAckPacket()
792 const auto& msg = makeShared<EigrpIpv6Ack>();
794 msg->setAckNum(msgReq->getAckNumber());
799 Packet *packet =
new Packet();
800 packet->insertAtBack(msg);
Referenced by processMsgFromRtp().
◆ createHelloPacket()
766 const auto& msg = makeShared<EigrpIpv6Hello>();
767 EigrpTlvParameter paramTlv;
772 paramTlv.holdTimer = holdInt;
774 msg->setParameterTlv(paramTlv);
778 EigrpTlvStub stubTlv;
780 msg->setStubTlv(stubTlv);
785 Packet *packet =
new Packet();
786 packet->insertAtBack(msg);
Referenced by processMsgFromRtp().
◆ createMsgReq()
◆ createNeighbor()
Create record in the neighbor table and start hold timer.
1076 EigrpNeighbor<Ipv6Address> *neigh =
new EigrpNeighbor<Ipv6Address>(eigrpIface->getInterfaceId(), eigrpIface->getInterfaceName(), address);
1078 neigh->setHoldTimer(holdt);
1079 neigh->setHoldInt(holdInt);
1082 scheduleAt(simTime() + holdInt, holdt);
1084 eigrpIface->incNumOfNeighbors();
Referenced by processNewNeighbor().
◆ createQueryPacket()
825 const auto& msg = makeShared<EigrpIpv6Query>();
826 int routeCnt = msgReq->getRoutesArraySize();
829 msg->setAckNum(msgReq->getAckNumber());
830 msg->setSeqNum(msgReq->getSeqNumber());
835 msg->setChunkLength(
B(
sizeOfMsg + routeCnt * 68));
837 Packet *packet =
new Packet();
838 packet->insertAtBack(msg);
Referenced by processMsgFromRtp().
◆ createReplyPacket()
844 const auto& msg = makeShared<EigrpIpv6Reply>();
845 int routeCnt = msgReq->getRoutesArraySize();
848 msg->setAckNum(msgReq->getAckNumber());
849 msg->setSeqNum(msgReq->getSeqNumber());
857 msg->setChunkLength(
B(
sizeOfMsg + routeCnt * 68));
859 Packet *packet =
new Packet();
860 packet->insertAtBack(msg);
Referenced by processMsgFromRtp().
◆ createRouteTlv()
876 EigrpWideMetricPar rtMetric = route->getRdPar();
877 routeTlv->destAddress = route->getRouteAddress();
878 routeTlv->destMask = route->getRouteMask();
Referenced by addRoutesToMsg().
◆ createRTRoute()
1194 EigrpRoute<Ipv6Address> *route = successor->getRouteInfo();
1197 rtEntry->setInterface(
ift->getInterfaceById(successor->getIfaceId()));
1198 rtEntry->setNextHop(successor->getNextHop());
1202 if (successor->isInternal()) {
Referenced by installRouteToRT().
◆ createTimer()
| EigrpTimer * inet::eigrp::EigrpIpv6Pdm::createTimer |
( |
char |
timerKind, |
|
|
void * |
context |
|
) |
| |
|
protected |
◆ createUpdatePacket()
806 const auto& msg = makeShared<EigrpIpv6Update>();
807 int routeCnt = msgReq->getRoutesArraySize();
810 msg->setAckNum(msgReq->getAckNumber());
811 msg->setSeqNum(msgReq->getSeqNumber());
816 msg->setChunkLength(
B(
sizeOfMsg + routeCnt * 68));
818 Packet *packet =
new Packet();
819 packet->insertAtBack(msg);
Referenced by processMsgFromRtp().
◆ disableInterface()
Remove interface from EIGRP interface table.
Removes all neighbors on the interface.
1386 EigrpNeighbor<Ipv6Address> *neigh;
1387 EigrpRouteSource<Ipv6Address> *source;
1389 int ifaceId = eigrpIface->getInterfaceId();
1391 EV_DEBUG <<
"EIGRP disabled on interface " << eigrpIface->getName() <<
"(" << ifaceId <<
")" << endl;
1393 if (!eigrpIface->isPassive()) {
1395 Ipv6InterfaceData *ipv6int = iface->getProtocolDataForUpdate<Ipv6InterfaceData>();
1404 if ((hellot = eigrpIface->getHelloTimer()) !=
nullptr)
1405 cancelEvent(hellot);
1407 std::set<int>::iterator it;
1408 EigrpNetwork<Ipv6Address> *eigrpnet =
nullptr;
1410 for (it = eigrpIface->getNetworksIdsBegin(); it != eigrpIface->getNetworksIdsEnd(); ++it) {
1413 ASSERT(source !=
nullptr);
1418 eigrpIface->clearNetworkIds();
1421 if (eigrpIface->isEnabled()) {
1424 eigrpIface->setEnabling(
false);
1429 for (
int i = 0; i < neighCount; i++) {
1431 if (neigh->getIfaceId() == ifaceId) {
Referenced by processIfaceStateChange().
◆ enableInterface()
| void inet::eigrp::EigrpIpv6Pdm::enableInterface |
( |
EigrpInterface * |
eigrpIface | ) |
|
|
protected |
Add interface to the EIGRP interface table and notifies DUAL.
1465 int ifaceId = eigrpIface->getInterfaceId();
1466 EigrpRouteSource<Ipv6Address> *src;
1467 EigrpWideMetricPar metricPar;
1470 EV_DEBUG <<
"EIGRP enabled on interface " << eigrpIface->getName() <<
"(" << ifaceId <<
")" << endl;
1473 if (!eigrpIface->isEnabled()) {
1476 eigrpIface->setEnabling(
true);
1484 Ipv6InterfaceData *ipv6int =
ift->getInterfaceById(ifaceId)->getProtocolDataForUpdate<Ipv6InterfaceData>();
1488 PrefixVector::iterator it;
1489 EigrpNetwork<Ipv6Address> *eigrpnet =
nullptr;
1490 Ipv6Address network;
1494 if (it->ifaceId == ifaceId) {
1495 network = it->network;
1496 mask = Ipv6Address(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff).getPrefix(it->prefixLength);
1501 eigrpIface->insertToNetworksIds(eigrpnet->getNetworkId());
1506 ASSERT(isSourceNew ==
true);
1509 src->setMetricParams(metricPar);
1511 src->setMetric(metric);
Referenced by addInterfaceToEigrp(), and processIfaceStateChange().
◆ findRoute() [1/2]
◆ findRoute() [2/2]
1939 Ipv6Route *route =
nullptr;
1940 for (
int i = 0; i <
rt->getNumRoutes(); i++) {
1941 auto it =
rt->getRoute(i);
1942 if (it->getDestPrefix() == prefix && it->getPrefixLength() == prefixLength && it->getNextHop() == nexthop) {
◆ findRouteDMin()
◆ flushMsgRequests()
| void inet::eigrp::EigrpIpv6Pdm::flushMsgRequests |
( |
| ) |
|
|
protected |
◆ getASNum()
| int inet::eigrp::EigrpIpv6Pdm::getASNum |
( |
| ) |
|
|
inlineoverridevirtual |
◆ getBestSuccessor()
◆ getDestIpAddress()
| bool inet::eigrp::EigrpIpv6Pdm::getDestIpAddress |
( |
int |
destNeigh, |
|
|
Ipv6Address * |
resultAddress |
|
) |
| |
|
protected |
Returns IP address for sending EIGRP message.
432 EigrpNeighbor<Ipv6Address> *neigh =
nullptr;
433 const uint32_t *addr =
nullptr;
437 resultAddress->set(addr[0], addr[1], addr[2], addr[3]);
442 addr = neigh->getIPAddress().words();
443 resultAddress->set(addr[0], addr[1], addr[2], addr[3]);
Referenced by processMsgFromRtp().
◆ getInterfaceById()
| EigrpInterface * inet::eigrp::EigrpIpv6Pdm::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.
227 {
return (nextHopAddr.isUnspecified()) ? senderAddr : nextHopAddr; }
Referenced by processInterRoute(), and processUpdatePacket().
◆ handleMessage()
| void inet::eigrp::EigrpIpv6Pdm::handleMessage |
( |
cMessage * |
msg | ) |
|
|
overrideprotectedvirtual |
Multi-stage initialization.
278 if (msg->isSelfMessage()) {
283 if (strcmp(msg->getArrivalGate()->getBaseName(),
"splitterIn") == 0) {
288 else if (strcmp(msg->getArrivalGate()->getBaseName(),
"rtpIn") == 0) {
◆ hasFeasibleSuccessor()
| bool inet::eigrp::EigrpIpv6Pdm::hasFeasibleSuccessor |
( |
EigrpRoute< Ipv6Address > * |
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< Ipv6Address >.
◆ hasNeighborForUpdate()
Returns tru if there are recipients for update message, else false.
Implements inet::eigrp::IEigrpPdm< Ipv6Address >.
1877 EigrpInterface *eigrpIface;
1879 for (
int i = 0; i < ifaceCnt; i++) {
1883 if (eigrpIface !=
nullptr && eigrpIface->getNumOfNeighbors() > 0) {
◆ initialize()
| void inet::eigrp::EigrpIpv6Pdm::initialize |
( |
int |
stage | ) |
|
|
overrideprotectedvirtual |
68 cSimpleModule::initialize(stage);
73 ift.reference(
this,
"interfaceTableModule",
true);
74 rt.reference(
this,
"routingTableModule",
true);
78 eigrpIft = check_and_cast<EigrpInterfaceTable *>(getModuleByPath(
"^.eigrpInterfaceTable6"));
79 eigrpNt = check_and_cast<EigrpIpv6NeighborTable *>(getModuleByPath(
"^.eigrpIpv6NeighborTable"));
80 eigrpTt = check_and_cast<EigrpIpv6TopologyTable *>(getModuleByPath(
"^.eigrpIpv6TopologyTable"));
84 this->
eigrpDual =
new EigrpDual<Ipv6Address>(
this);
87 EigrpDeviceConfigurator conf(par(
"configData"),
ift);
88 conf.loadEigrpIPv6Config(
this);
◆ installRouteToRT()
Updates existing route in the routing table or creates new one.
1808 Ipv6Route *ansaRtEntry = rtEntry;
1809 bool rtableChanged =
false;
1812 if (ansaRtEntry !=
nullptr) {
1815 return rtableChanged;
1816 else if ((
unsigned int)ansaRtEntry->getMetric() != source->getMetric()) {
1817 EV_DEBUG <<
"EIGRP: Update EIGRP route " << route->getRouteAddress() <<
" via " << source->getNextHop() <<
" in RT" << endl;
1822 EV_DEBUG <<
"EIGRP: add EIGRP route " << route->getRouteAddress() <<
" via " << source->getNextHop() <<
" to RT" << endl;
1825 rt->addRoutingProtocolRoute(ansaRtEntry);
1827 rtableChanged =
true;
1830 return rtableChanged;
Referenced by updateRoute().
◆ isRTSafeForAdd()
| bool inet::eigrp::EigrpIpv6Pdm::isRTSafeForAdd |
( |
EigrpRoute< Ipv6Address > * |
route, |
|
|
unsigned int |
eigrpAd |
|
) |
| |
|
protected |
Returns true, if routing table does not contain route with given address, mask and smaller administrative distance.
1695 Ipv6Route *ansaRoute =
nullptr;
1697 if (routeInTable ==
nullptr)
1700 ansaRoute = routeInTable;
1701 if (ansaRoute !=
nullptr) {
1702 if (ansaRoute->getAdminDist() < eigrpAd)
1708 if (routeInTable !=
nullptr && routeInTable->getAdminDist() < eigrpAd)
Referenced by updateRoute().
◆ msgToAllIfaces()
Records request to send message to all neighbors.
1215 EigrpInterface *eigrpIface;
1219 for (
int i = 0; i < ifCount; i++) {
1226 if ((numOfNeigh = eigrpIface->getNumOfNeighbors()) > 0) {
1229 msgToIface(msgType, source, eigrpIface, forcePoisonRev);
1233 msgToIface(msgType, source, eigrpIface, forcePoisonRev, forceUnreachable);
Referenced by sendQuery(), and sendUpdate().
◆ msgToIface()
Creates request for sending message on specified interface.
1249 EigrpNeighbor<Ipv6Address> *neigh =
nullptr;
1250 EigrpMsgRoute msgRt;
1251 int ifaceId, destNeigh = 0;
1253 if (eigrpIface->isSplitHorizonEn() &&
applySplitHorizon(eigrpIface, source, source->getRouteInfo())) {
1254 if (forcePoisonRev) {
1255 msgRt.unreachable =
true;
1261 msgRt.sourceId = source->getSourceId();
1262 msgRt.routeId = source->getRouteId();
1263 msgRt.originator = source->getOriginator();
1264 msgRt.invalid =
false;
1267 ifaceId = eigrpIface->getInterfaceId();
1268 if (
ift->getInterfaceById(ifaceId)->isMulticast()) {
1272 if (neigh ==
nullptr)
1274 destNeigh = neigh->getNeighborId();
Referenced by msgToAllIfaces().
◆ numInitStages()
| virtual int inet::eigrp::EigrpIpv6Pdm::numInitStages |
( |
| ) |
const |
|
inlineoverrideprotectedvirtual |
◆ preDelete()
| void inet::eigrp::EigrpIpv6Pdm::preDelete |
( |
cComponent * |
root | ) |
|
|
overrideprotectedvirtual |
◆ printRecvMsg()
480 EV_DEBUG <<
" (ack) ";
481 EV_DEBUG <<
" message from " << addr <<
" on IF " << ifaceId;
483 EV_DEBUG <<
", flags: ";
484 if (msg->getInit()) EV_DEBUG <<
"init";
485 else if (msg->getEot()) EV_DEBUG <<
"eot";
486 else if (msg->getCr()) EV_DEBUG <<
"cr";
487 else if (msg->getRs()) EV_DEBUG <<
"rs";
489 EV_DEBUG <<
", seq num:" << msg->getSeqNum();
490 EV_DEBUG <<
", ack num:" << msg->getAckNum();
Referenced by processAckPacket(), processHelloPacket(), processQueryPacket(), processReplyPacket(), and processUpdatePacket().
◆ printSentMsg()
| void inet::eigrp::EigrpIpv6Pdm::printSentMsg |
( |
int |
routeCnt, |
|
|
Ipv6Address & |
destAddress, |
|
|
EigrpMsgReq * |
msgReq |
|
) |
| |
|
protected |
451 int type = msgReq->getOpcode();
455 if (msgReq->getAckNumber() > 0)
456 EV_DEBUG <<
" (ack) ";
457 else if (msgReq->getGoodbyeMsg() ==
true)
458 EV_DEBUG <<
" (goodbye) ";
461 EV_DEBUG <<
" message to " << destAddress <<
" on IF " << msgReq->getDestInterface();
464 EV_DEBUG <<
", flags: ";
465 if (msgReq->getInit()) EV_DEBUG <<
"init";
466 else if (msgReq->getEot()) EV_DEBUG <<
"eot";
467 else if (msgReq->getCr()) EV_DEBUG <<
"cr";
468 else if (msgReq->getRs()) EV_DEBUG <<
"rs";
471 EV_DEBUG <<
", seq num:" << msgReq->getSeqNumber();
472 EV_DEBUG <<
", ack num:" << msgReq->getAckNumber();
Referenced by processMsgFromRtp().
◆ processAckPacket()
548 const EigrpIpv6Ack *ack = staticPtrCast<const EigrpIpv6Ack>(pk->peekAtFront<EigrpIpv6Ack>()).get();
550 if (neigh->isStateUp() ==
false) {
552 neigh->setStateUp(
true);
557 if (neigh->getRoutesForDeletion()) {
559 neigh->setRoutesForDeletion(
false);
Referenced by processMsgFromNetwork().
◆ processHelloPacket()
565 const EigrpIpv6Hello *hello = staticPtrCast<const EigrpIpv6Hello>(pk->peekAtFront<EigrpIpv6Hello>()).get();
568 EigrpTlvParameter tlvParam = hello->getParameterTlv();
573 if (neigh !=
nullptr) {
574 EV_DEBUG <<
" interface goodbye received" << endl;
575 EV_DEBUG <<
"EIGRP neighbor " << srcAddress <<
" is down, interface goodbye received" << endl;
581 else if (neigh ==
nullptr) {
586 if (!(tlvParam.kValues == this->kValues)) {
594 resetTimer(iface->getHelloTimer(), iface->getHelloInt() - 0.5);
596 msgReq->setGoodbyeMsg(
true);
599 else if (tlvParam.holdTimer != neigh->getHoldInt())
600 neigh->setHoldInt(tlvParam.holdTimer);
Referenced by processMsgFromNetwork().
◆ processIfaceConfigChange()
| void inet::eigrp::EigrpIpv6Pdm::processIfaceConfigChange |
( |
EigrpInterface * |
eigrpIface | ) |
|
|
protected |
198 EigrpRouteSource<Ipv6Address> *source;
200 int ifaceId = eigrpIface->getInterfaceId();
202 EigrpWideMetricPar newParam;
206 for (
int i = 0; i < routeCount; i++) {
208 if (source->getIfaceId() == ifaceId && source->isValid()) {
211 source->setMetricParams(ifParam);
213 source->setMetric(metric);
217 source->setMetricParams(newParam);
219 source->setMetric(metric);
Referenced by receiveSignal().
◆ processIfaceStateChange()
| void inet::eigrp::EigrpIpv6Pdm::processIfaceStateChange |
( |
NetworkInterface * |
iface | ) |
|
|
protected |
154 EigrpInterface *eigrpIface;
155 int ifaceId = iface->getInterfaceId();
160 PrefixVector::iterator it;
163 if (it->ifaceId == ifaceId) {
171 if (!eigrpIface->isEnabled()) {
173 startHelloTimer(eigrpIface, simTime() + eigrpIface->getHelloInt() - 0.5);
177 else if (!iface->isUp() || !iface->hasCarrier()) {
180 Ipv6Route *route =
nullptr;
181 for (
int i = 0; i <
rt->getNumRoutes(); ++i) {
182 route =
rt->getRoute(i);
185 rt->removeRoute(route);
190 if (eigrpIface !=
nullptr && eigrpIface->isEnabled()) {
Referenced by receiveSignal().
◆ processInterRoute()
Process route TLV.
- Parameters
-
| neigh | Neighbor which is next hop for a route in TLV. |
719 EigrpRouteSource<Ipv6Address> *src;
720 EigrpWideMetricPar newParam, oldParam, oldNeighParam;
724 src =
eigrpTt->
findOrCreateRoute(tlv.destAddress, tlv.destMask, tlv.routerID, eigrpIface, nextHopNeigh->getNeighborId(), isSourceNew);
727 oldNeighParam = src->getRdParams();
731 src->setRdParams(tlv.metric);
737 oldParam = src->getMetricParams();
742 src->setNextHop(nextHop);
743 src->setMetricParams(newParam);
746 src->setMetric(metric);
Referenced by processQueryPacket(), processReplyPacket(), and processUpdatePacket().
◆ processMsgFromNetwork()
| void inet::eigrp::EigrpIpv6Pdm::processMsgFromNetwork |
( |
cMessage * |
msg | ) |
|
|
protected |
Process message from network layer.
298 Packet *packet = check_and_cast<Packet *>(msg);
306 Ipv6Address srcAddr = packet->getTag<
L3AddressInd>()->getSrcAddress().toIpv6();
307 int ifaceId = packet->getTag<InterfaceInd>()->getInterfaceId();
308 cMessage *msgDup =
nullptr;
312 EV_DEBUG <<
"Received message on DOWN interface - message ignored" << endl;
316 const auto& pk = packet->peekAtFront<EigrpMessage>();
317 int8_t opcode = pk->getOpcode();
321 ASSERT(eigrpIface !=
nullptr);
322 ASSERT(!eigrpIface->isPassive());
326 EigrpNeighbor<Ipv6Address> *neigh;
328 resetTimer(neigh->getHoldTimer(), neigh->getHoldInt());
337 if (pk->getAckNum() > 0)
352 if (neigh !=
nullptr)
353 EV_DEBUG <<
"EIGRP: Received message of unknown type, skipped" << endl;
355 EV_DEBUG <<
"EIGRP: Received message from " << srcAddr <<
" that is not neighbor, skipped" << endl;
Referenced by handleMessage().
◆ processMsgFromRtp()
| void inet::eigrp::EigrpIpv6Pdm::processMsgFromRtp |
( |
cMessage * |
msg | ) |
|
|
protected |
Process message request from RTP.
362 EigrpMsgReq *msgReq = check_and_cast<EigrpMsgReq *>(msg);
363 int routeCnt = msgReq->getRoutesArraySize();
364 Ipv6Address destAddress;
365 int destIface = msgReq->getDestInterface();
371 ASSERT(eigrpIface !=
nullptr && !eigrpIface->isPassive());
374 if (!
getDestIpAddress(msgReq->getDestNeighbor(), &destAddress) || eigrpIface ==
nullptr) {
382 switch (msgReq->getOpcode()) {
384 if (msgReq->getGoodbyeMsg() ==
true) {
385 pk =
createHelloPacket(eigrpIface->getHoldInt(), this->KVALUES_MAX, destAddress, msgReq);
386 pk->setName(
"EIGRP_HELLO_MSG");
388 else if (msgReq->getAckNumber() > 0) {
390 pk->setName(
"EIGRP_ACK_MSG");
393 pk =
createHelloPacket(eigrpIface->getHoldInt(), this->kValues, destAddress, msgReq);
394 pk->setName(
"EIGRP_HELLO_MSG");
400 pk->setName(
"EIGRP_UPDATE_MSG");
406 pk->setName(
"EIGRP_QUERY_MSG");
411 pk->setName(
"EIGRP_REPLY_MSG");
422 pk->addTagIfAbsent<
InterfaceReq>()->setInterfaceId(destIface);
423 pk->addTagIfAbsent<L3AddressReq>()->setDestAddress(destAddress);
425 pk->addTagIfAbsent<L3AddressReq>()->setSrcAddress(
ift->getInterfaceById(destIface)->getProtocolData<Ipv6InterfaceData>()->getLinkLocalAddress());
Referenced by handleMessage().
◆ processNewNeighbor()
| void inet::eigrp::EigrpIpv6Pdm::processNewNeighbor |
( |
int |
ifaceId, |
|
|
Ipv6Address & |
srcAddress, |
|
|
const EigrpIpv6Hello * |
helloMessage |
|
) |
| |
|
protected |
Creates relationship with neighbor.
- Parameters
-
| srcAddress | address of the neighbor |
| ifaceId | ID of interface where the neighbor is connected |
1005 EigrpMsgReq *msgReqUpdate =
nullptr, *msgReqHello =
nullptr;
1006 EigrpNeighbor<Ipv6Address> *neigh;
1008 EigrpTlvParameter paramTlv = rcvMsg->getParameterTlv();
1009 EigrpStub stubConf = rcvMsg->getStubTlv().stub;
1016 EV_DEBUG <<
"EIGRP can't create neighborship with " << srcAddress <<
", " <<
eigrp::UserMsgs[ecode] << endl;
1019 resetTimer(iface->getHelloTimer(), iface->getHelloInt() - 0.5);
1021 msgReqHello->setGoodbyeMsg(
true);
1027 EV_DEBUG <<
"Neighbor " << srcAddress <<
" is up, new adjacency" << endl;
1031 if (stubConf.connectedRt || stubConf.leakMapRt || stubConf.recvOnlyRt || stubConf.redistributedRt || stubConf.staticRt || stubConf.summaryRt) {
1032 neigh->setStubEnable(
true);
1033 neigh->setStubConf(stubConf);
1034 iface->incNumOfStubs();
1039 resetTimer(iface->getHelloTimer(), iface->getHelloInt() - 0.5);
1045 msgReqUpdate->setInit(
true);
Referenced by processHelloPacket().
◆ processQueryPacket()
663 const EigrpIpv6Query *query = staticPtrCast<const EigrpIpv6Query>(pk->peekAtFront<EigrpIpv6Query>()).get();
666 EigrpRouteSource<Ipv6Address> *src =
nullptr;
667 bool notifyDual, isSourceNew;
671 int cnt = query->getInterRoutesArraySize();
673 EV_DEBUG <<
" Route count:" << cnt << endl;
676 for (
int i = 0; i < cnt; i++) {
677 src =
processInterRoute(query->getInterRoutes(i), srcAddress, neigh->getNeighborId(), eigrpIface, ¬ifyDual, &isSourceNew);
678 src->getRouteInfo()->incrementRefCnt();
Referenced by processMsgFromNetwork().
◆ processReplyPacket()
689 const EigrpIpv6Reply *reply = staticPtrCast<const EigrpIpv6Reply>(pk->peekAtFront<EigrpIpv6Reply>()).get();
692 EigrpRouteSource<Ipv6Address> *src;
693 bool notifyDual, isSourceNew;
697 int cnt = reply->getInterRoutesArraySize();
699 EV_DEBUG <<
" Route count:" << cnt << endl;
702 for (
int i = 0; i < cnt; i++) {
703 src =
processInterRoute(reply->getInterRoutes(i), srcAddress, neigh->getNeighborId(), eigrpIface, ¬ifyDual, &isSourceNew);
Referenced by processMsgFromNetwork().
◆ processRTRouteDel()
| void inet::eigrp::EigrpIpv6Pdm::processRTRouteDel |
( |
const cObject * |
details | ) |
|
|
protected |
233 if (
dynamic_cast<const Ipv6Route *
>(details) ==
nullptr) {
236 const Ipv6Route *changedRt = check_and_cast<const Ipv6Route *>(details);
238 const Ipv6Route *changedAnsaRt = changedRt;
240 EigrpRouteSource<Ipv6Address> *source =
nullptr;
242 if (changedAnsaRt !=
nullptr)
243 adminDist = changedAnsaRt->getAdminDist();
245 adminDist = changedRt->getAdminDist();
253 if (source ==
nullptr) {
255 EV_DEBUG <<
"EIGRP: removed EIGRP route from RT, not found corresponding route source in TT" << endl;
264 if (source->isSuccessor()) {
265 if (!source->getRouteInfo()->isActive()) {
Referenced by receiveSignal().
◆ processTimer()
| void inet::eigrp::EigrpIpv6Pdm::processTimer |
( |
cMessage * |
msg | ) |
|
|
protected |
496 EigrpTimer *timer = check_and_cast<EigrpTimer *>(msg);
497 EigrpInterface *eigrpIface =
nullptr;
498 EigrpNeighbor<Ipv6Address> *neigh =
nullptr;
499 cObject *contextBasePtr =
nullptr;
500 EigrpMsgReq *msgReq =
nullptr;
506 contextBasePtr = (cObject *)timer->getContextPointer();
507 eigrpIface = check_and_cast<EigrpInterface *>(contextBasePtr);
510 scheduleAt(simTime() + eigrpIface->getHelloInt() - 0.5, timer);
519 contextBasePtr = (cObject *)timer->getContextPointer();
520 neigh = check_and_cast<EigrpNeighbor<Ipv6Address> *>(contextBasePtr);
521 ifaceId = neigh->getIfaceId();
524 EV_DEBUG <<
"Neighbor " << neigh->getIPAddress() <<
" is down, holding time expired" << endl;
532 resetTimer(eigrpIface->getHelloTimer(), eigrpIface->getHelloInt() - 0.5);
534 msgReq->setGoodbyeMsg(
true);
539 EV_DEBUG <<
"Timer with unknown kind was skipped" << endl;
Referenced by handleMessage().
◆ processUpdatePacket()
606 const EigrpIpv6Update *update = staticPtrCast<const EigrpIpv6Update>(pk->peekAtFront<EigrpIpv6Update>()).get();
609 EigrpRouteSource<Ipv6Address> *src;
610 bool skipRoute, notifyDual, isSourceNew;
614 if (neigh->isStateUp() ==
false && update->getAckNum() != 0) {
616 neigh->setStateUp(
true);
621 if (update->getInit()) {
622 if (neigh->isStateUp() ==
true) {
626 else if (neigh->isStateUp()) {
627 int cnt = update->getInterRoutesArraySize();
629 EV_DEBUG <<
" Route count:" << cnt << endl;
632 for (
int i = 0; i < cnt; i++) {
635 EigrpMpIpv6Internal tlv = update->getInterRoutes(i);
644 EV_DEBUG <<
"EIGRP: discard route " << tlv.destAddress << endl;
647 src =
processInterRoute(tlv, srcAddress, neigh->getNeighborId(), eigrpIface, ¬ifyDual, &isSourceNew);
651 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.
1282 EigrpMsgReq *request =
nullptr;
1283 RequestVector::iterator it;
1287 if ((*it)->getDestInterface() == ifaceId && (*it)->getOpcode() == msgType) {
1292 if (request ==
nullptr) {
1294 request->setRoutesArraySize(1);
1295 request->setRoutes(0, msgRt);
1299 int rtSize = request->getRoutesArraySize();
1301 if ((index = request->findMsgRoute(msgRt.routeId)) >= 0) {
1302 if (msgRt.unreachable)
1303 request->getRoutesForUpdate(index).unreachable =
true;
1306 request->setRoutesArraySize(rtSize + 1);
1307 request->setRoutes(rtSize, msgRt);
Referenced by msgToIface(), and sendReply().
◆ receiveSignal()
| void inet::eigrp::EigrpIpv6Pdm::receiveSignal |
( |
cComponent * |
source, |
|
|
simsignal_t |
signalID, |
|
|
cObject * |
obj, |
|
|
cObject * |
details |
|
) |
| |
|
overrideprotectedvirtual |
125 Enter_Method(
"%s", cComponent::getSignalName(signalID));
128 NetworkInterfaceChangeDetails *ifcecd = check_and_cast<NetworkInterfaceChangeDetails *>(obj);
132 NetworkInterfaceChangeDetails *ifcecd = check_and_cast<NetworkInterfaceChangeDetails *>(obj);
133 NetworkInterface *iface = ifcecd->getNetworkInterface();
137 if (eigrpIface ==
nullptr)
140 ifParam = iface->getDatarate();
141 if (ifParam != 0 && ifParam != eigrpIface->getInterfaceDatarate()) {
142 eigrpIface->setInterfaceDatarate(ifParam);
143 if (eigrpIface->isEnabled())
◆ removeNeighbor()
Removes neighbor from neighbor table and delete it.
Notifies DUAL about event.
1140 EigrpRouteSource<Ipv6Address> *source =
nullptr;
1141 EigrpRoute<Ipv6Address> *route =
nullptr;
1145 int nextHopId = neigh->getNeighborId();
1146 int ifaceId = neigh->getIfaceId();
1147 const char *ifaceName = neigh->getIfaceName();
1153 eigrpIface->decNumOfNeighbors();
1154 if (neigh->isStubEnabled()) {
1155 eigrpIface->decNumOfStubs();
1163 routeId = route->getRouteId();
1168 EV_DEBUG <<
"EIGRP: Destination: " << route->getRouteAddress() <<
"/" <<
getNetmaskLength(route->getRouteMask()) <<
", active " << route->isActive() << endl;
1171 if (route->isActive()) {
1172 if (source ==
nullptr) {
1174 EV_DEBUG <<
" Create dummy route " << route->getRouteAddress() <<
" via <unspecified> for deletion of reply status handle" << endl;
1176 source =
new EigrpRouteSource<Ipv6Address>(ifaceId, ifaceName, nextHopId, routeId, route);
1184 if (source !=
nullptr)
Referenced by disableInterface(), processHelloPacket(), and processTimer().
◆ removeOldSuccessor()
Removes route from routing table and changes old successor's record in topology table.
1784 bool rtFound, rtableChanged =
false;
1787 source->setSuccessor(
false);
1796 if (route->getSuccessor() == source)
1797 route->setSuccessor(
nullptr);
1798 rtableChanged =
true;
1801 source->setSuccessor(
true);
1803 return rtableChanged;
Referenced by updateRoute().
◆ removeRouteFromRT()
- Returns
- if route is found in routing table then returns true.
1672 EigrpRoute<Ipv6Address> *route = source->getRouteInfo();
1673 Ipv6Route *rtEntry =
findRoute(route->getRouteAddress(),
getNetmaskLength(route->getRouteMask()), source->getNextHop());
1675 Ipv6Route *ansaRtEntry = rtEntry;
1676 if (ansaRtEntry !=
nullptr) {
1677 *removedRtSrc = ansaRtEntry->getSourceType();
1680 EV_DEBUG <<
"EIGRP: delete route " << route->getRouteAddress() <<
" via " << source->getNextHop() <<
" from RT" << endl;
1681 delete rt->removeRoute(rtEntry);
1686 EV_DEBUG <<
"EIGRP: EIGRP route " << route->getRouteAddress() <<
" via " << source->getNextHop() <<
" can not be removed, not found in RT" << endl;
1689 return rtEntry !=
nullptr;
Referenced by removeOldSuccessor().
◆ resetTimer()
| void inet::eigrp::EigrpIpv6Pdm::resetTimer |
( |
EigrpTimer * |
timer, |
|
|
int |
interval |
|
) |
| |
|
inlineprotected |
◆ sendAllEigrpPaths()
Creates and sends message with all routes from routing table to specified neighbor.
968 EigrpRoute<Ipv6Address> *route;
969 EigrpRouteSource<Ipv6Address> *source;
972 msgReq->setRoutesArraySize(routeCnt);
974 for (
int i = 0; i < routeCnt; i++) {
976 if (route->isActive())
982 if (eigrpIface->isSplitHorizonEn() &&
applySplitHorizon(eigrpIface, source, route))
985 EigrpMsgRoute routeReq;
986 routeReq.sourceId = source->getSourceId();
987 routeReq.routeId = source->getRouteId();
988 routeReq.originator = source->getOriginator();
989 routeReq.invalid =
false;
990 msgReq->setRoutes(addedRoutes , routeReq);
995 if (addedRoutes < routeCnt)
996 msgReq->setRoutesArraySize(addedRoutes);
998 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< Ipv6Address >.
1624 bool forceUnreachable =
false;
1626 EV_DEBUG <<
"DUAL: send Query message about " << route->getRouteAddress() <<
" to all neighbors" << endl;
1629 forceUnreachable =
true;
1632 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< Ipv6Address >.
1641 EigrpMsgRoute msgRt;
1644 EV_DEBUG <<
"DUAL: send Reply message about " << route->getRouteAddress() << endl;
1645 if (neigh ==
nullptr)
1648 msgRt.invalid =
false;
1649 msgRt.sourceId = source->getSourceId();
1650 msgRt.routeId = source->getRouteId();
1651 msgRt.originator = source->getOriginator();
1652 msgRt.unreachable = isUnreachable;
1655 msgRt.unreachable =
true;
1661 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< Ipv6Address >.
1614 EV_DEBUG <<
"DUAL: send Update message about " << route->getRouteAddress() <<
" to all neighbors, " << reason << endl;
1616 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< Ipv6Address >.
1908 if (succ ==
nullptr) {
1910 if (oldSucc->isUnreachable()) {
1911 route->setUpdateSent(
true);
1912 route->setNumSentMsgs(route->getNumSentMsgs() + 1);
◆ setASNum()
| void inet::eigrp::EigrpIpv6Pdm::setASNum |
( |
int |
asNum | ) |
|
|
inlineoverridevirtual |
◆ setBandwidth()
| void inet::eigrp::EigrpIpv6Pdm::setBandwidth |
( |
int |
bandwith, |
|
|
int |
interfaceId |
|
) |
| |
|
inlineoverridevirtual |
◆ setDelay()
| void inet::eigrp::EigrpIpv6Pdm::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< Ipv6Address >.
1895 ASSERT(neigh !=
nullptr);
1896 neigh->setRoutesForDeletion(
true);
1897 src->setDelayedRemove(neighId);
1898 src->setValid(
true);
1901 EV_DEBUG <<
"DUAL: route via " << src->getNextHop() <<
" will be removed from TT after receiving Ack from neighbor" << endl;
◆ setHelloInt()
| void inet::eigrp::EigrpIpv6Pdm::setHelloInt |
( |
int |
interval, |
|
|
int |
ifaceId |
|
) |
| |
|
overridevirtual |
◆ setHoldInt()
| void inet::eigrp::EigrpIpv6Pdm::setHoldInt |
( |
int |
interval, |
|
|
int |
ifaceId |
|
) |
| |
|
overridevirtual |
◆ setKValues()
| void inet::eigrp::EigrpIpv6Pdm::setKValues |
( |
const EigrpKValues & |
kValues | ) |
|
|
inlineoverridevirtual |
◆ setLoad()
| void inet::eigrp::EigrpIpv6Pdm::setLoad |
( |
int |
load, |
|
|
int |
interfaceId |
|
) |
| |
|
inlineoverridevirtual |
◆ setMaximumPath()
| void inet::eigrp::EigrpIpv6Pdm::setMaximumPath |
( |
int |
maximumPath | ) |
|
|
inlineoverridevirtual |
◆ setPassive()
| void inet::eigrp::EigrpIpv6Pdm::setPassive |
( |
bool |
passive, |
|
|
int |
ifaceId |
|
) |
| |
|
overridevirtual |
Implements inet::eigrp::IEigrpModule< Ipv6Address >.
1574 if (eigrpIface ==
nullptr)
1576 else if (eigrpIface->isEnabled()) {
1577 NetworkInterface *iface =
ift->getInterfaceById(ifaceId);
1579 Ipv6InterfaceData *ipv6int = iface->getProtocolDataForUpdate<Ipv6InterfaceData>();
1596 EigrpTimer *hellot = eigrpIface->getHelloTimer();
1597 if (hellot !=
nullptr) {
1598 cancelEvent(hellot);
1600 eigrpIface->setHelloTimerPtr(
nullptr);
1605 eigrpIface->setPassive(passive);
◆ setReliability()
| void inet::eigrp::EigrpIpv6Pdm::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< Ipv6Address >.
1836 EigrpNeighbor<Ipv6Address> *neigh;
1837 EigrpInterface *eigrpIface =
nullptr;
1839 for (
int i = 0; i < neighTotalCount; i++) {
1846 if (neigh->isStubEnabled()) {
1853 forcePoisonRev =
true;
1858 if (eigrpIface->isSplitHorizonEn() &&
applySplitHorizon(eigrpIface, source, route)) {
1859 if (forcePoisonRev) {
1860 route->setReplyStatus(neigh->getNeighborId());
1866 route->setReplyStatus(neigh->getNeighborId());
1871 return route->getReplyStatusSum() > 0;
◆ setRouterId()
| void inet::eigrp::EigrpIpv6Pdm::setRouterId |
( |
Ipv4Address |
routerID | ) |
|
|
inlineoverridevirtual |
◆ setRouteTlvMetric()
889 msgMetric->bandwidth = rtMetric->bandwidth;
890 msgMetric->delay = rtMetric->delay;
891 msgMetric->hopCount = rtMetric->hopCount;
892 msgMetric->load = rtMetric->load;
893 msgMetric->mtu = rtMetric->mtu;
894 msgMetric->offset = 0;
895 msgMetric->priority = 0;
896 msgMetric->reliability = rtMetric->reliability;
Referenced by createRouteTlv().
◆ setRTRouteMetric()
| void inet::eigrp::EigrpIpv6Pdm::setRTRouteMetric |
( |
Ipv6Route * |
route, |
|
|
uint64_t |
metric |
|
) |
| |
|
inlineprotected |
◆ setSplitHorizon()
| void inet::eigrp::EigrpIpv6Pdm::setSplitHorizon |
( |
bool |
shenabled, |
|
|
int |
ifaceId |
|
) |
| |
|
overridevirtual |
◆ setStub()
| void inet::eigrp::EigrpIpv6Pdm::setStub |
( |
const EigrpStub & |
stub | ) |
|
|
inlineoverridevirtual |
◆ setVariance()
| void inet::eigrp::EigrpIpv6Pdm::setVariance |
( |
int |
variance | ) |
|
|
inlineoverridevirtual |
◆ startHelloTimer()
| void inet::eigrp::EigrpIpv6Pdm::startHelloTimer |
( |
EigrpInterface * |
eigrpIface, |
|
|
simtime_t |
interval |
|
) |
| |
|
protected |
Schedule hello timer to the specified interval.
1527 if (!eigrpIface->isPassive()) {
1528 if ((hellot = eigrpIface->getHelloTimer()) ==
nullptr) {
1530 eigrpIface->setHelloTimerPtr(hellot);
1533 scheduleAt(interval, hellot);
Referenced by addInterfaceToEigrp(), and processIfaceStateChange().
◆ unlockRoutes()
| void inet::eigrp::EigrpIpv6Pdm::unlockRoutes |
( |
const EigrpMsgReq * |
msgReq | ) |
|
|
protected |
901 int reqCnt = msgReq->getRoutesArraySize();
902 EigrpRoute<Ipv6Address> *route =
nullptr;
904 for (
int i = 0; i < reqCnt; i++) {
905 EigrpMsgRoute req = msgReq->getRoutes(i);
908 ASSERT(route !=
nullptr);
909 route->decrementRefCnt();
911 if (route->getRefCnt() < 1) {
Referenced by createReplyPacket().
◆ updateInterface()
| virtual void inet::eigrp::EigrpIpv6Pdm::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< Ipv6Address >.
1715 EigrpRouteSource<Ipv6Address> *source =
nullptr, *bestSuccessor =
nullptr;
1716 Ipv6Route *rtEntry =
nullptr;
1718 int routeId = route->getRouteId();
1720 int sourceCounter = 0;
1721 uint64_t routeFd = route->getFd();
1723 EV_DEBUG <<
"EIGRP: Search successor for route " << route->getRouteAddress() <<
", FD is " << route->getFd() << endl;
1725 for (
int i = 0; i < routeNum; i++) {
1727 if (source->getRouteId() != routeId || !source->isValid())
1732 if (source->getRd() < routeFd &&
1733 source->getMetric() <= dmin * this->variance && pathsInRT < this->
maximumPath)
1735 EV_DEBUG <<
" successor " << source->getNextHop() <<
" (" << source->getMetric() <<
"/" << source->getRd() <<
")" << endl;
1737 if ((rtEntry =
findRoute(route->getRouteAddress(),
getNetmaskLength(route->getRouteMask()), source->getNextHop())) ==
nullptr)
1739 source->setSuccessor(
false);
1740 EV_DEBUG <<
" route can not be added into RT, there is route with smaller AD" << endl;
1745 *rtableChanged =
true;
1748 source->setSuccessor(
true);
1750 else if (source->isSuccessor()) {
1752 *rtableChanged =
true;
1755 if (removeUnreach && source->isUnreachable() && source->getDelayedRemove() == 0 && source->isValid()) {
1756 source->setValid(
false);
1757 EV_DEBUG <<
" invalidate route via " << source->getNextHop() <<
" in TT" << endl;
1761 route->setNumSucc(pathsInRT);
1766 route->setDij(dmin);
1767 route->setRdPar(bestSuccessor->getMetricParams());
1768 route->setSuccessor(bestSuccessor);
1770 if (sourceCounter == 1) {
1771 route->setFd(bestSuccessor->getMetric());
1775 route->setSuccessor(
nullptr);
1777 return bestSuccessor;
◆ adminDistInt
| unsigned int inet::eigrp::EigrpIpv6Pdm::adminDistInt |
|
protected |
◆ asNum
| int inet::eigrp::EigrpIpv6Pdm::asNum |
|
protected |
◆ EIGRP_IPV6_MULT
| const Ipv6Address inet::eigrp::EigrpIpv6Pdm::EIGRP_IPV6_MULT |
|
protected |
◆ EIGRP_SELF_ADDR
| const Ipv6Address inet::eigrp::EigrpIpv6Pdm::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::EigrpIpv6Pdm::eigrpStub |
|
protected |
◆ eigrpStubEnabled
| bool inet::eigrp::EigrpIpv6Pdm::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::EigrpIpv6Pdm::host = nullptr |
|
protected |
◆ ift
◆ kValues
◆ KVALUES_MAX
◆ maximumPath
| int inet::eigrp::EigrpIpv6Pdm::maximumPath |
|
protected |
◆ netPrefixes
◆ oldsource
◆ reqQueue
◆ ribScale
| int inet::eigrp::EigrpIpv6Pdm::ribScale |
|
protected |
◆ routingForNetworks
◆ rt
◆ RTP_OUTGW
| const char* inet::eigrp::EigrpIpv6Pdm::RTP_OUTGW |
|
protected |
◆ sizeOfMsg
| const int64_t inet::eigrp::EigrpIpv6Pdm::sizeOfMsg = 20 |
|
protected |
◆ SPLITTER_OUTGW
| const char* inet::eigrp::EigrpIpv6Pdm::SPLITTER_OUTGW |
|
protected |
◆ useClassicMetric
| bool inet::eigrp::EigrpIpv6Pdm::useClassicMetric |
|
protected |
Use classic metric computation or wide metric computation.
Referenced by EigrpIpv6Pdm().
◆ variance
| int inet::eigrp::EigrpIpv6Pdm::variance |
|
protected |
The documentation for this class was generated from the following files:
EigrpStub eigrpStub
EIGRP stub configuration.
Definition: EigrpIpv6Pdm.h:75
static const int UNSPEC_ID
Definition: EigrpNeighbor.h:50
bool redistributedRt
Definition: EigrpMessage_m.h:192
EigrpRouteSource< IPAddress > * findRoute(const IPAddress &routeAddr, const IPAddress &routeMask, const IPAddress &nextHop)
Definition: EigrpTopologyTable.cc:115
void sendUpdate(int destNeighbor, EigrpRoute< Ipv6Address > *route, EigrpRouteSource< Ipv6Address > *source, bool forcePoisonRev, const char *reason) override
Sends update message to specified neighbor.
Definition: EigrpIpv6Pdm.cc:1612
void cancelHoldTimer(EigrpNeighbor< Ipv6Address > *neigh)
Stops Hold timer.
Definition: EigrpIpv6Pdm.cc:1090
void processIfaceStateChange(NetworkInterface *iface)
Definition: EigrpIpv6Pdm.cc:152
@ EIGRP_UPDATE_MSG
Definition: EigrpMessage_m.h:89
EigrpInterface * getInterface(int k) const
Returns interface by its position in the table.
Definition: EigrpInterfaceTable.h:180
EigrpDual< Ipv6Address > * eigrpDual
Definition: EigrpIpv6Pdm.h:82
@ INTERFACE_UP
EIGRP enabled on interface.
Definition: EigrpDual.h:39
void processNewNeighbor(int ifaceId, Ipv6Address &srcAddress, const EigrpIpv6Hello *helloMessage)
Creates relationship with neighbor.
Definition: EigrpIpv6Pdm.cc:1003
Ipv6Route * findRoute(const Ipv6Address &prefix, int prefixLength)
Definition: EigrpIpv6Pdm.cc:1921
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
int maximumPath
Maximum number of parallel routes that EIGRP will support.
Definition: EigrpIpv6Pdm.h:69
ModuleRefByPar< IInterfaceTable > ift
Definition: EigrpIpv6Pdm.h:77
void setBandwidth(uint64_t bw)
Definition: EigrpInterfaceTable.h:88
EigrpInterface * addInterfaceToEigrp(int ifaceId, bool enabled)
Creates interface and inserts it to the table.
Definition: EigrpIpv6Pdm.cc:1440
int getNetmaskLength(const Ipv4Address &netmask)
Uses IPv4Address.getNetmaskLength() method.
Definition: EigrpDualStack.cc:22
bool compareParameters(const EigrpWideMetricPar &par1, const EigrpWideMetricPar &par2, EigrpKValues &kValues)
Compares metric enabled parameters.
Definition: EigrpMetricHelper.cc:114
@ LINK
Definition: Ipv6Address.h:46
void processQueryPacket(Packet *pk, Ipv6Address &srcAddress, int ifaceId, EigrpNeighbor< Ipv6Address > *neigh)
Definition: EigrpIpv6Pdm.cc:660
EigrpKValues KVALUES_MAX
K-values (from K1 to K5) are set to max.
Definition: EigrpIpv6Pdm.h:63
void processRTRouteDel(const cObject *details)
Definition: EigrpIpv6Pdm.cc:231
uint16_t K1
Definition: EigrpMessage_m.h:127
bool useClassicMetric
Use classic metric computation or wide metric computation.
Definition: EigrpIpv6Pdm.h:72
static const Protocol ipv6
Definition: Protocol.h:94
@ DOWN
Definition: NetworkInterface.h:92
const char * SPLITTER_OUTGW
Output gateway to the EIGRP Splitter module.
Definition: EigrpIpv6Pdm.h:60
bool isRTSafeForAdd(EigrpRoute< Ipv6Address > *route, unsigned int eigrpAd)
Returns true, if routing table does not contain route with given address, mask and smaller administra...
Definition: EigrpIpv6Pdm.cc:1692
void decStubCount()
Definition: EigrpNeighborTable.h:67
@ dEIGRPExternal
Definition: Ipv6Route.h:41
cModule * getContainingNode(const cModule *from)
Find the node containing the given module.
Definition: ModuleAccess.cc:40
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 unlockRoutes(const EigrpMsgReq *msgReq)
Definition: EigrpIpv6Pdm.cc:899
@ GOING_UP
Definition: NetworkInterface.h:92
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down DispatchProtocolReq
Definition: IUdp-gates.txt:25
EigrpDisabledInterfaces * eigrpIftDisabled
Disabled EIGRP interfaces.
Definition: EigrpIpv6Pdm.h:85
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd L3AddressInd
Definition: IUdp-gates.txt:20
@ EIGRP_HELLO_MSG
Definition: EigrpMessage_m.h:93
virtual void setTimerKind(char timerKind)
@ EIGRP
Definition: IRoute.h:42
void processMsgFromNetwork(cMessage *msg)
Process message from network layer.
Definition: EigrpIpv6Pdm.cc:296
void processIfaceConfigChange(EigrpInterface *eigrpIface)
Definition: EigrpIpv6Pdm.cc:196
uint16_t K6
Definition: EigrpMessage_m.h:132
bool isParamMaximal(const EigrpWideMetricPar &par)
Returns true, if parameters are set to infinite, otherwise false.
Definition: EigrpMetricHelper.h:78
bool removeOldSuccessor(EigrpRouteSource< Ipv6Address > *source, EigrpRoute< Ipv6Address > *route)
Removes route from routing table and changes old successor's record in topology table.
Definition: EigrpIpv6Pdm.cc:1780
void disableInterface(NetworkInterface *iface, EigrpInterface *eigrpIface)
Remove interface from EIGRP interface table.
Definition: EigrpIpv6Pdm.cc:1383
EigrpRoute< IPAddress > * findRouteInfoById(int routeId)
Definition: EigrpTopologyTable.cc:509
static const Protocol eigrp
Definition: Protocol.h:63
EigrpInterface * findInterfaceById(int ifaceId)
Gets interface from table by interface ID.
Definition: EigrpInterfaceTable.cc:155
EigrpNeighbor< IPAddress > * getFirstNeighborOnIf(int ifaceId)
Returns first neighbor that resides on specified interface.
Definition: EigrpNeighborTable.cc:144
State
Definition: NetworkInterface.h:92
bool connectedRt
Definition: EigrpMessage_m.h:189
void addRoutesToMsg(const Ptr< EigrpIpv6Message > &msg, const EigrpMsgReq *msgReq)
Add routes from request to the message.
Definition: EigrpIpv6Pdm.cc:917
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 applyStubToQuery(EigrpInterface *eigrpIface, int numOfNeigh)
Apply stub configuration to the route in outgoing Query message.
Definition: EigrpIpv6Pdm.cc:1238
bool leakMapRt
Definition: EigrpMessage_m.h:193
uint16_t K3
Definition: EigrpMessage_m.h:129
void incStubCount()
Definition: EigrpNeighborTable.h:66
bool applyStubToUpdate(EigrpRouteSource< Ipv6Address > *src)
Apply stub configuration to the route in outgoing Update message.
Definition: EigrpIpv6Pdm.cc:1322
@ LOST_ROUTE
Route in RT deleted, but not by EIGRP.
Definition: EigrpDual.h:40
EigrpMsgReq * pushMsgRouteToQueue(HeaderOpcode msgType, int ifaceId, int neighId, const EigrpMsgRoute &msgRt)
Insert route into the queue with requests.
Definition: EigrpIpv6Pdm.cc:1280
Ipv4Address & getRouterId()
Definition: EigrpTopologyTable.h:95
void processUpdatePacket(Packet *pk, Ipv6Address &srcAddress, int ifaceId, EigrpNeighbor< Ipv6Address > *neigh)
Definition: EigrpIpv6Pdm.cc:604
void removeNeighbor(EigrpNeighbor< Ipv6Address > *neigh)
Removes neighbor from neighbor table and delete it.
Definition: EigrpIpv6Pdm.cc:1138
@ 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
Ipv6Address getNextHopAddr(const Ipv6Address &nextHopAddr, Ipv6Address &senderAddr)
Returns next hop address.
Definition: EigrpIpv6Pdm.h:226
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
bool applySplitHorizon(EigrpInterface *destInterface, EigrpRouteSource< Ipv6Address > *source, EigrpRoute< Ipv6Address > *route)
Definition: EigrpIpv6Pdm.cc:1314
void cancelHelloTimers()
Stops Hello Timers on all interfaces.
Definition: EigrpIpv6Pdm.cc:1102
void resetTimer(EigrpTimer *timer, int interval)
Sets specified timer to given interval.
Definition: EigrpIpv6Pdm.h:111
EigrpInterface * removeInterface(EigrpInterface *iface)
Removes interface from table.
Definition: EigrpInterfaceTable.cc:143
void addMessageHeader(const Ptr< EigrpMessage > &msg, int opcode, EigrpMsgReq *msgReq)
Adds ControlInfo for network layer module.
Definition: EigrpIpv6Pdm.cc:864
intscale< b, 1, 8 > B
Definition: Units.h:1168
Packet * createQueryPacket(Ipv6Address &destAddress, EigrpMsgReq *msgReq)
Definition: EigrpIpv6Pdm.cc:823
void setRouteTlvMetric(EigrpWideMetricPar *msgMetric, EigrpWideMetricPar *rtMetric)
Definition: EigrpIpv6Pdm.cc:887
void printSentMsg(int routeCnt, Ipv6Address &destAddress, EigrpMsgReq *msgReq)
Definition: EigrpIpv6Pdm.cc:449
int asNum
Autonomous system number.
Definition: EigrpIpv6Pdm.h:67
void enableInterface(EigrpInterface *eigrpIface)
Add interface to the EIGRP interface table and notifies DUAL.
Definition: EigrpIpv6Pdm.cc:1463
static const Ipv6Address LINKLOCAL_PREFIX
The link-local prefix (fe80::)
Definition: Ipv6Address.h:78
void setRTRouteMetric(Ipv6Route *route, uint64_t metric)
Changes metric of route in routing table.
Definition: EigrpIpv6Pdm.h:248
bool isSplitHorizonEn() const
Definition: EigrpInterfaceTable.h:109
static const Ipv6Address UNSPECIFIED_ADDRESS
The unspecified address.
Definition: Ipv6Address.h:54
EigrpRoute< IPAddress > * removeRouteInfo(EigrpRoute< IPAddress > *route)
Definition: EigrpTopologyTable.cc:483
int ribScale
Scaling factor for Wide metric.
Definition: EigrpIpv6Pdm.h:73
static const uint64_t BANDWIDTH_INF
Definition: EigrpMetricHelper.h:49
void startHelloTimer(EigrpInterface *eigrpIface, simtime_t interval)
Schedule hello timer to the specified interval.
Definition: EigrpIpv6Pdm.cc:1522
EigrpNeighbor< IPAddress > * getNeighbor(int k) const
Definition: EigrpNeighborTable.h:63
@ NEIGHBOR_DOWN
Neighbor went down.
Definition: EigrpDual.h:37
unsigned int adminDistInt
Administrative distance.
Definition: EigrpIpv6Pdm.h:71
removed HopLimitReq
Definition: IUdp-gates.txt:11
void printRecvMsg(const EigrpMessage *msg, Ipv6Address &addr, int ifaceId)
Definition: EigrpIpv6Pdm.cc:476
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
void processMsgFromRtp(cMessage *msg)
Process message request from RTP.
Definition: EigrpIpv6Pdm.cc:360
static const int UNSPEC_SENDER
Unspecified address of sender - input event source.
Definition: IEigrpPdm.h:33
uint16_t K5
Definition: EigrpMessage_m.h:131
Packet * createUpdatePacket(const Ipv6Address &destAddress, EigrpMsgReq *msgReq)
Definition: EigrpIpv6Pdm.cc:804
void setRouterId(Ipv4Address &routerID)
Definition: EigrpTopologyTable.h:96
bool installRouteToRT(EigrpRoute< Ipv6Address > *route, EigrpRouteSource< Ipv6Address > *source, uint64_t dmin, Ipv6Route *rtEntry)
Updates existing route in the routing table or creates new one.
Definition: EigrpIpv6Pdm.cc:1806
EigrpNeighbor< Ipv6Address > * createNeighbor(EigrpInterface *eigrpIface, Ipv6Address &address, uint16_t holdInt)
Create record in the neighbor table and start hold timer.
Definition: EigrpIpv6Pdm.cc:1073
EigrpTimer * createTimer(char timerKind, void *context)
Creates timer of specified type.
Definition: EigrpIpv6Pdm.cc:754
int getNumRouteInfo() const
Definition: EigrpTopologyTable.h:88
Packet * createAckPacket(Ipv6Address &destAddress, EigrpMsgReq *msgReq)
Definition: EigrpIpv6Pdm.cc:790
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
bool removeRouteFromRT(EigrpRouteSource< Ipv6Address > *successor, IRoute::SourceType *removedRtSrc)
Definition: EigrpIpv6Pdm.cc:1670
cModule * host
Definition: EigrpIpv6Pdm.h:57
uint32_t * words()
Returns a pointer to the internal binary representation of the address: four 32-bit words,...
Definition: Ipv6Address.h:192
#define NUM_INIT_STAGES
Definition: InitStageRegistry.h:73
EigrpInterface * getInterfaceById(int ifaceId)
Returns EIGRP interface (enabled or disabled) or nullptr.
Definition: EigrpIpv6Pdm.cc:1373
void addInterface(EigrpInterface *interface)
Adds interface to the table.
Definition: EigrpDisabledInterfaces.cc:40
Packet * createReplyPacket(Ipv6Address &destAddress, EigrpMsgReq *msgReq)
Definition: EigrpIpv6Pdm.cc:842
EigrpRouteSource< Ipv6Address > * processInterRoute(const EigrpMpIpv6Internal &tlv, Ipv6Address &nextHop, int sourceNeighId, EigrpInterface *eigrpIface, bool *notifyDual, bool *isSourceNew)
Process route TLV.
Definition: EigrpIpv6Pdm.cc:714
uint64_t findRouteDMin(EigrpRoute< IPAddress > *route)
Definition: EigrpTopologyTable.cc:152
@ M_OK
Definition: EigrpPrint.h:35
@ EIGRP_REPLY_MSG
Definition: EigrpMessage_m.h:92
EigrpKValues kValues
K-values for calculation of metric.
Definition: EigrpIpv6Pdm.h:68
EigrpInterface * findInterface(int ifaceId)
Finds interface by ID in table and returns it.
Definition: EigrpDisabledInterfaces.cc:58
const char * UserMsgs[]
Definition: EigrpPrint.cc:23
int variance
Parameter for unequal cost load balancing.
Definition: EigrpIpv6Pdm.h:70
EigrpRouteSource< Ipv6Address > * oldsource
Latest route change.
Definition: EigrpIpv6Pdm.h:65
static const int UNSPEC_NETID
Definition: EigrpNetworkTable.h:71
void setReliability(int rel)
Definition: EigrpInterfaceTable.h:97
void createRouteTlv(EigrpMpIpv6Internal *routeTlv, EigrpRoute< Ipv6Address > *route, bool unreachable=false)
Definition: EigrpIpv6Pdm.cc:874
EigrpInterfaceTable * eigrpIft
Table with enabled EIGRP interfaces.
Definition: EigrpIpv6Pdm.h:84
int checkNeighborshipRules(int ifaceId, int neighAsNum, Ipv6Address &neighAddr, const EigrpKValues &neighKValues)
Checks neighborship rules.
Definition: EigrpIpv6Pdm.cc:1049
ModuleRefByPar< Ipv6RoutingTable > rt
Definition: EigrpIpv6Pdm.h:79
void sendAllEigrpPaths(EigrpInterface *eigrpIface, EigrpNeighbor< Ipv6Address > *neigh)
Creates and sends message with all routes from routing table to specified neighbor.
Definition: EigrpIpv6Pdm.cc:964
EigrpWideMetricPar getParam(EigrpInterface *eigrpIface)
Sets parameters from interface for metric computation.
Definition: EigrpMetricHelper.cc:34
const int64_t sizeOfMsg
Definition: EigrpIpv6Pdm.h:59
int addNeighbor(EigrpNeighbor< IPAddress > *neighbor)
Adds neighbor to the table.
Definition: EigrpNeighborTable.cc:118
void setDelay(uint64_t dly)
Definition: EigrpInterfaceTable.h:94
bool summaryRt
Definition: EigrpMessage_m.h:191
#define Enter_Method(...)
Definition: SelfDoc.h:71
simsignal_t routeDeletedSignal
Definition: Simsignals.cc:42
void msgToIface(HeaderOpcode msgType, EigrpRouteSource< Ipv6Address > *source, EigrpInterface *eigrpIface, bool forcePoisonRev=false, bool forceUnreachable=false)
Creates request for sending message on specified interface.
Definition: EigrpIpv6Pdm.cc:1247
@ dEIGRPInternal
Definition: Ipv6Route.h:34
virtual char getTimerKind() const
bool getDestIpAddress(int destNeigh, Ipv6Address *resultAddress)
Returns IP address for sending EIGRP message.
Definition: EigrpIpv6Pdm.cc:430
void flushMsgRequests()
Sends all message requests to RTP.
Definition: EigrpIpv6Pdm.cc:1342
uint16_t K4
Definition: EigrpMessage_m.h:130
EigrpRoute< IPAddress > * getRouteInfo(int k)
Definition: EigrpTopologyTable.h:89
EigrpMsgReq * createMsgReq(HeaderOpcode msgType, int destNeighbor, int destIface)
Creates request for sending of EIGRP message for RTP.
Definition: EigrpIpv6Pdm.cc:953
const Ipv6Address EIGRP_IPV6_MULT
Multicast address for EIGRP messages.
Definition: EigrpIpv6Pdm.h:62
EigrpInterface * getInterface(int k) const
Returns interface by its position in the table.
Definition: EigrpDisabledInterfaces.h:52
EigrpNetworkTable< Ipv6Address > * routingForNetworks
Networks included in EIGRP.
Definition: EigrpIpv6Pdm.h:88
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
Packet * createHelloPacket(int holdInt, EigrpKValues kValues, Ipv6Address &destAddress, EigrpMsgReq *msgReq)
Definition: EigrpIpv6Pdm.cc:763
EigrpWideMetricPar adjustParam(const EigrpWideMetricPar &ifParam, const EigrpWideMetricPar &neighParam)
Adjust parameters of metric by interface parameters.
Definition: EigrpMetricHelper.cc:48
void processHelloPacket(Packet *pk, Ipv6Address &srcAddress, int ifaceId, EigrpNeighbor< Ipv6Address > *neigh)
Definition: EigrpIpv6Pdm.cc:563
Class generated from inet/routing/eigrp/EigrpTimer.msg:22 by opp_msgtool.
Definition: EigrpTimer_m.h:60
EigrpInterface * removeInterface(EigrpInterface *iface)
Removes specified interface from table and returns it.
Definition: EigrpDisabledInterfaces.cc:46
void msgToAllIfaces(int destination, HeaderOpcode msgType, EigrpRouteSource< Ipv6Address > *source, bool forcePoisonRev, bool forceUnreachable)
Records request to send message to all neighbors.
Definition: EigrpIpv6Pdm.cc:1213
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
void processTimer(cMessage *msg)
Definition: EigrpIpv6Pdm.cc:494
bool eigrpStubEnabled
True when EIGRP stub is on.
Definition: EigrpIpv6Pdm.h:74
Ipv6Address makeNetmask(int length)
Make network mask represented as IPv6 address from netmask length.
Definition: EigrpDualStack.cc:72
simsignal_t interfaceConfigChangedSignal
Definition: Simsignals.cc:33
void processReplyPacket(Packet *pk, Ipv6Address &srcAddress, int ifaceId, EigrpNeighbor< Ipv6Address > *neigh)
Definition: EigrpIpv6Pdm.cc:687
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
EigrpTopologyTable< Ipv6Address > * eigrpTt
Topology table.
Definition: EigrpIpv6Pdm.h:87
EigrpMetricHelper * eigrpMetric
Definition: EigrpIpv6Pdm.h:83
EigrpRouteSource< IPAddress > * findRouteById(int sourceId)
Definition: EigrpTopologyTable.cc:436
RequestVector reqQueue
Requests for sending EIGRP messages from DUAL.
Definition: EigrpIpv6Pdm.h:89
@ 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
const char * RTP_OUTGW
Output gateway to the RTP module.
Definition: EigrpIpv6Pdm.h:61
PrefixVector netPrefixes
Definition: EigrpIpv6Pdm.h:90
int getNumNeighbors() const
Definition: EigrpNeighborTable.h:62
INET_API InitStage INITSTAGE_ROUTING_PROTOCOLS
Initialization of routing protocols.
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
Ipv6Route * createRTRoute(EigrpRouteSource< Ipv6Address > *successor)
Definition: EigrpIpv6Pdm.cc:1192
EigrpNeighborTable< Ipv6Address > * eigrpNt
Table with EIGRP neighbors.
Definition: EigrpIpv6Pdm.h:86
@ UNKNOWN
Definition: IRoute.h:42
EigrpRouteSource< IPAddress > * getRoute(int k)
Definition: EigrpTopologyTable.h:61
@ dUnknown
Definition: Ipv6Route.h:46
@ EIGRP_QUERY_MSG
Definition: EigrpMessage_m.h:91
void processAckPacket(Packet *pk, Ipv6Address &srcAddress, int ifaceId, EigrpNeighbor< Ipv6Address > *neigh)
Definition: EigrpIpv6Pdm.cc:546
EigrpNetwork< Ipv6Address > * addNetwork(Ipv6Address address, Ipv6Address mask) override
Adds new network to EigrpNetworkTable for routing.
Definition: EigrpIpv6Pdm.cc:1541