INET Framework for OMNeT++/OMNEST
inet::eigrp::EigrpDeviceConfigurator Class Reference

#include <EigrpDeviceConfigurator.h>

Public Member Functions

 EigrpDeviceConfigurator ()
 
 EigrpDeviceConfigurator (cXMLElement *confFile, IInterfaceTable *intf)
 
virtual ~EigrpDeviceConfigurator ()
 
void loadEigrpIPv4Config (IEigrpModule< Ipv4Address > *eigrpModule)
 Loads configuration for EIGRP. More...
 
void loadEigrpIPv6Config (IEigrpModule< Ipv6Address > *eigrpModule)
 Loads configuration for EIGRP IPv6. More...
 

Static Public Member Functions

static bool Str2Int (int *retValue, const char *str)
 
static bool Str2Bool (bool *ret, const char *str)
 
static cXMLElement * GetInterface (cXMLElement *iface, cXMLElement *device)
 
static cXMLElement * GetIPv6Address (cXMLElement *addr, cXMLElement *iface)
 
static const char * GetNodeParamConfig (cXMLElement *node, const char *paramName, const char *defaultValue)
 
static const char * GetNodeAttrConfig (cXMLElement *node, const char *attrName, const char *defaultValue)
 
static cXMLElement * GetEigrpProcess (cXMLElement *process, cXMLElement *device)
 
static cXMLElement * GetEigrpIPv4Network (cXMLElement *network, cXMLElement *process)
 
static cXMLElement * GetEigrpProcess6 (cXMLElement *process, cXMLElement *device)
 

Protected Member Functions

EigrpNetwork< Ipv4Address > * isEigrpInterface (std::vector< EigrpNetwork< Ipv4Address > * > &networks, NetworkInterface *interface)
 < Gets interfaces that correspond to the IP address and mask More...
 
bool wildcardToMask (const char *wildcard, Ipv4Address &result)
 Loads configuration of EIGRP process. More...
 
void loadEigrpProcessesConfig (cXMLElement *device, IEigrpModule< Ipv4Address > *eigrpModule)
 Loads configuration of interfaces for EIGRP. More...
 
void loadEigrpInterfacesConfig (cXMLElement *device, IEigrpModule< Ipv4Address > *eigrpModule)
 Loads parameters of interfaces for EIGRP. More...
 
bool loadEigrpInterfaceParams (cXMLElement *eigrpIface, IEigrpModule< Ipv4Address > *eigrpModule, int ifaceId, const char *ifaceName)
 
void loadEigrpInterface (cXMLElement *eigrpIface, IEigrpModule< Ipv4Address > *eigrpModule, int ifaceId, const char *ifaceName)
 Loads networks added to EIGRP. More...
 
void loadEigrpIPv4Networks (cXMLElement *processElem, IEigrpModule< Ipv4Address > *eigrpModule)
 Loads K-value and converts it to number. More...
 
int loadEigrpKValue (cXMLElement *node, const char *attrName, const char *attrValue)
 Loads stub configuration. More...
 
bool loadEigrpStubConf (cXMLElement *node, const char *attrName)
 Loads configuration of EIGRP IPv6 process. More...
 
void loadEigrpProcesses6Config (cXMLElement *device, IEigrpModule< Ipv6Address > *eigrpModule)
 Loads configuration of interfaces for EIGRP IPv6. More...
 
void loadEigrpInterfaces6Config (cXMLElement *device, IEigrpModule< Ipv6Address > *eigrpModule)
 Loads parameters of interfaces for EIGRP. More...
 
bool loadEigrpInterfaceParams6 (cXMLElement *eigrpIface, IEigrpModule< Ipv6Address > *eigrpModule, int ifaceId, const char *ifaceName)
 Loads interfaces for EIGRP IPv6. More...
 
void loadEigrpInterface6 (cXMLElement *eigrpIface, IEigrpModule< Ipv6Address > *eigrpModule, int ifaceId, const char *ifaceName)
 

Protected Attributes

IInterfaceTableift = nullptr
 

Private Attributes

cXMLElement * configFile = nullptr
 
cXMLElement * device = nullptr
 

Constructor & Destructor Documentation

◆ EigrpDeviceConfigurator() [1/2]

inet::eigrp::EigrpDeviceConfigurator::EigrpDeviceConfigurator ( )
26  {
27 // deviceId = nullptr;
28 // deviceType = nullptr;
29  configFile = nullptr;
30 }

◆ EigrpDeviceConfigurator() [2/2]

inet::eigrp::EigrpDeviceConfigurator::EigrpDeviceConfigurator ( cXMLElement *  confFile,
IInterfaceTable intf 
)
33  : configFile(confFile), ift(intf)
34 {
35 }

◆ ~EigrpDeviceConfigurator()

inet::eigrp::EigrpDeviceConfigurator::~EigrpDeviceConfigurator ( )
virtual
37  {
38 // deviceId = nullptr;
39 // deviceType = nullptr;
40  configFile = nullptr;
41 }

Member Function Documentation

◆ GetEigrpIPv4Network()

cXMLElement * inet::eigrp::EigrpDeviceConfigurator::GetEigrpIPv4Network ( cXMLElement *  network,
cXMLElement *  process 
)
static
833 {
834  // initial call of the method - find first "Network" node in process
835  if (process != nullptr) {
836 
837  network = process->getFirstChildWithTag("Network");
838 
839  // repeated call - get another "Network" sibling node
840  }
841  else if (network != nullptr) {
842  network = network->getNextSiblingWithTag("Network");
843  }
844  else {
845  network = nullptr;
846  }
847 
848  return network;
849 }

Referenced by loadEigrpIPv4Networks().

◆ GetEigrpProcess()

cXMLElement * inet::eigrp::EigrpDeviceConfigurator::GetEigrpProcess ( cXMLElement *  process,
cXMLElement *  device 
)
static
805 {
806  // initial call of the method - get first "AS" child node in "EIGRP"
807  if (device != nullptr) {
808  cXMLElement *routing = device->getFirstChildWithTag("Routing");
809 
810  if (routing == nullptr) {
811  return nullptr;
812  }
813 
814  cXMLElement *eigrp = routing->getFirstChildWithTag("EIGRP");
815  if (eigrp == nullptr) {
816  return nullptr;
817  }
818 
819  process = eigrp->getFirstChildWithTag("ProcessIPv4");
820 
821  // repeated call - get another "AS" sibling node
822  }
823  else if (process != nullptr) {
824  process = process->getNextSiblingWithTag("ProcessIPv4");
825  }
826  else {
827  process = nullptr;
828  }
829  return process;
830 }

Referenced by loadEigrpProcessesConfig().

◆ GetEigrpProcess6()

cXMLElement * inet::eigrp::EigrpDeviceConfigurator::GetEigrpProcess6 ( cXMLElement *  process,
cXMLElement *  device 
)
static
751 {
752  // initial call of the method - get first "AS" child node in "EIGRP"
753  if (device != nullptr) {
754  cXMLElement *routing = device->getFirstChildWithTag("Routing6");
755  if (routing == nullptr) {
756  return nullptr;
757  }
758 
759  cXMLElement *eigrp = routing->getFirstChildWithTag("EIGRP");
760  if (eigrp == nullptr) {
761  return nullptr;
762  }
763 
764  process = eigrp->getFirstChildWithTag("ProcessIPv6");
765 
766  // repeated call - get another "AS" sibling node
767  }
768  else if (process != nullptr) {
769  process = process->getNextSiblingWithTag("ProcessIPv6");
770  }
771  else {
772  process = nullptr;
773  }
774 
775  return process;
776 }

Referenced by loadEigrpProcesses6Config().

◆ GetInterface()

cXMLElement * inet::eigrp::EigrpDeviceConfigurator::GetInterface ( cXMLElement *  iface,
cXMLElement *  device 
)
static
43  {
44 
45  // initial call of the method - find <Interfaces> and get first "Interface" node
46  if (device != nullptr) {
47 
48  cXMLElement *ifaces = device->getFirstChildWithTag("Interfaces");
49  if (ifaces == nullptr)
50  return nullptr;
51 
52  iface = ifaces->getFirstChildWithTag("Interface");
53 
54  // repeated call - get another "Interface" sibling node
55  }
56  else if (iface != nullptr) {
57  iface = iface->getNextSiblingWithTag("Interface");
58  }
59  else {
60  iface = nullptr;
61  }
62 
63  return iface;
64 }

Referenced by loadEigrpInterfaces6Config(), and loadEigrpInterfacesConfig().

◆ GetIPv6Address()

cXMLElement * inet::eigrp::EigrpDeviceConfigurator::GetIPv6Address ( cXMLElement *  addr,
cXMLElement *  iface 
)
static
66  {
67 
68  // initial call of the method - get first "Ipv6Address" child node
69  if (iface != nullptr) {
70  addr = iface->getFirstChildWithTag("IPv6Address");
71 
72  // repeated call - get another "Ipv6Address" sibling node
73  }
74  else if (addr != nullptr) {
75  addr = addr->getNextSiblingWithTag("IPv6Address");
76  }
77  else {
78  addr = nullptr;
79  }
80 
81  return addr;
82 }

Referenced by loadEigrpInterfaces6Config().

◆ GetNodeAttrConfig()

const char * inet::eigrp::EigrpDeviceConfigurator::GetNodeAttrConfig ( cXMLElement *  node,
const char *  attrName,
const char *  defaultValue 
)
static
794 {
795  ASSERT(node != nullptr);
796 
797  const char *attrValue = node->getAttribute(attrName);
798  if (attrValue == nullptr)
799  return defaultValue;
800 
801  return attrValue;
802 }

Referenced by loadEigrpKValue(), and loadEigrpStubConf().

◆ GetNodeParamConfig()

const char * inet::eigrp::EigrpDeviceConfigurator::GetNodeParamConfig ( cXMLElement *  node,
const char *  paramName,
const char *  defaultValue 
)
static
779 {
780  ASSERT(node != nullptr);
781 
782  cXMLElement *paramElem = node->getElementByPath(paramName);
783  if (paramElem == nullptr)
784  return defaultValue;
785 
786  const char *paramValue = paramElem->getNodeValue();
787  if (paramValue == nullptr)
788  return defaultValue;
789 
790  return paramValue;
791 }

Referenced by loadEigrpIPv4Networks().

◆ isEigrpInterface()

EigrpNetwork< Ipv4Address > * inet::eigrp::EigrpDeviceConfigurator::isEigrpInterface ( std::vector< EigrpNetwork< Ipv4Address > * > &  networks,
NetworkInterface interface 
)
protected

< Gets interfaces that correspond to the IP address and mask

Converts wildcard to netmask and check validity

161 {
162  Ipv4Address prefix;
163  Ipv4Address mask;
164  Ipv4Address ifAddress = interface->getProtocolData<Ipv4InterfaceData>()->getIPAddress();
165  Ipv4Address ifmask = interface->getProtocolData<Ipv4InterfaceData>()->getNetmask();
166  vector<int> resultIfs;
167  int maskLength, ifMaskLength;
168  std::vector<EigrpNetwork<Ipv4Address> *>::iterator it;
169 
170  if (ifAddress.isUnspecified())
171  return nullptr;
172 
173  for (it = networks.begin(); it != networks.end(); it++) {
174 
175  prefix = (*it)->getAddress();
176  mask = (*it)->getMask();
177 
178  maskLength = (mask.isUnspecified()) ? prefix.getNetworkMask().getNetmaskLength() : mask.getNetmaskLength();
179  ifMaskLength = ifmask.getNetmaskLength();
180 
181  // prefix isUnspecified -> network = 0.0.0.0 -> all interfaces, or
182  // mask is unspecified -> classful match or
183  // mask is specified -> classless match
184  if (prefix.isUnspecified() ||
185  (mask.isUnspecified() && prefix.isNetwork(ifAddress) && maskLength <= ifMaskLength) ||
186  (prefix.maskedAddrAreEqual(prefix, ifAddress, mask) && maskLength <= ifMaskLength))
187  {
188  return *it;
189  }
190  }
191 
192  return nullptr;
193 }

Referenced by loadEigrpIPv4Networks().

◆ loadEigrpInterface()

void inet::eigrp::EigrpDeviceConfigurator::loadEigrpInterface ( cXMLElement *  eigrpIface,
IEigrpModule< Ipv4Address > *  eigrpModule,
int  ifaceId,
const char *  ifaceName 
)
protected

Loads networks added to EIGRP.

462 {
463  int tempNumber;
464  bool tempBool, success;
465 
466  cXMLElementList ifDetails = eigrpIface->getChildren();
467  for (cXMLElementList::iterator ifElemIt = ifDetails.begin(); ifElemIt != ifDetails.end(); ifElemIt++) {
468  std::string nodeName = (*ifElemIt)->getTagName();
469 
470  if (nodeName == "HelloInterval") {
471  success = Str2Int(&tempNumber, (*ifElemIt)->getNodeValue());
472  if (!success || tempNumber < 1 || tempNumber > 65535)
473  throw cRuntimeError("Bad value for EIGRP Hello interval (<1, 65535>) on interface %s", ifaceName);
474  eigrpModule->setHelloInt(tempNumber, ifaceId);
475  }
476  else if (nodeName == "HoldInterval") {
477  success = Str2Int(&tempNumber, (*ifElemIt)->getNodeValue());
478  if (!success || tempNumber < 1 || tempNumber > 65535)
479  throw cRuntimeError("Bad value for EIGRP Hold interval (<1, 65535>) on interface %s", ifaceName);
480  eigrpModule->setHoldInt(tempNumber, ifaceId);
481  }
482  else if (nodeName == "SplitHorizon") {
483  if (!Str2Bool(&tempBool, (*ifElemIt)->getNodeValue()))
484  throw cRuntimeError("Bad value for EIGRP Split Horizon on interface %s", ifaceName);
485  eigrpModule->setSplitHorizon(tempBool, ifaceId);
486  }
487  }
488 }

Referenced by loadEigrpInterfacesConfig().

◆ loadEigrpInterface6()

void inet::eigrp::EigrpDeviceConfigurator::loadEigrpInterface6 ( cXMLElement *  eigrpIface,
IEigrpModule< Ipv6Address > *  eigrpModule,
int  ifaceId,
const char *  ifaceName 
)
protected
722 {
723  int tempNumber;
724  bool tempBool, success;
725 
726  cXMLElementList ifDetails = eigrpIface->getChildren();
727  for (cXMLElementList::iterator ifElemIt = ifDetails.begin(); ifElemIt != ifDetails.end(); ifElemIt++) {
728  std::string nodeName = (*ifElemIt)->getTagName();
729 
730  if (nodeName == "HelloInterval") {
731  success = Str2Int(&tempNumber, (*ifElemIt)->getNodeValue());
732  if (!success || tempNumber < 1 || tempNumber > 65535)
733  throw cRuntimeError("Bad value for EIGRP Hello interval (<1, 65535>) on interface %s", ifaceName);
734  eigrpModule->setHelloInt(tempNumber, ifaceId);
735  }
736  else if (nodeName == "HoldInterval") {
737  success = Str2Int(&tempNumber, (*ifElemIt)->getNodeValue());
738  if (!success || tempNumber < 1 || tempNumber > 65535)
739  throw cRuntimeError("Bad value for EIGRP Hold interval (<1, 65535>) on interface %s", ifaceName);
740  eigrpModule->setHoldInt(tempNumber, ifaceId);
741  }
742  else if (nodeName == "SplitHorizon") {
743  if (!Str2Bool(&tempBool, (*ifElemIt)->getNodeValue()))
744  throw cRuntimeError("Bad value for EIGRP Split Horizon on interface %s", ifaceName);
745  eigrpModule->setSplitHorizon(tempBool, ifaceId);
746  }
747  }
748 }

Referenced by loadEigrpInterfaces6Config().

◆ loadEigrpInterfaceParams()

bool inet::eigrp::EigrpDeviceConfigurator::loadEigrpInterfaceParams ( cXMLElement *  eigrpIface,
IEigrpModule< Ipv4Address > *  eigrpModule,
int  ifaceId,
const char *  ifaceName 
)
protected
421 {
422  int tempNumber;
423  bool success, changed = false;
424 
425  cXMLElementList ifDetails = eigrpIface->getChildren();
426  for (cXMLElementList::iterator ifElemIt = ifDetails.begin(); ifElemIt != ifDetails.end(); ifElemIt++) {
427  std::string nodeName = (*ifElemIt)->getTagName();
428 
429  if (nodeName == "Delay") {
430  success = Str2Int(&tempNumber, (*ifElemIt)->getNodeValue());
431  if (!success || tempNumber < 0 || tempNumber > 16777215)
432  throw cRuntimeError("Bad value for EIGRP Delay on interface %s", ifaceName);
433  eigrpModule->setDelay(tempNumber, ifaceId);
434  changed = true;
435  }
436  else if (nodeName == "Bandwidth") {
437  success = Str2Int(&tempNumber, (*ifElemIt)->getNodeValue());
438  if (!success || tempNumber < 0 || tempNumber > 10000000)
439  throw cRuntimeError("Bad value for EIGRP Bandwidth on interface %s", ifaceName);
440  eigrpModule->setBandwidth(tempNumber, ifaceId);
441  changed = true;
442  }
443  else if (nodeName == "Reliability") {
444  success = Str2Int(&tempNumber, (*ifElemIt)->getNodeValue());
445  if (!success || tempNumber < 1 || tempNumber > 255)
446  throw cRuntimeError("Bad value for EIGRP Reliability on interface %s", ifaceName);
447  eigrpModule->setReliability(tempNumber, ifaceId);
448  changed = true;
449  }
450  else if (nodeName == "Load") {
451  success = Str2Int(&tempNumber, (*ifElemIt)->getNodeValue());
452  if (!success || tempNumber < 1 || tempNumber > 255)
453  throw cRuntimeError("Bad value for EIGRP Load on interface %s", ifaceName);
454  eigrpModule->setLoad(tempNumber, ifaceId);
455  changed = true;
456  }
457  }
458  return changed;
459 }

Referenced by loadEigrpInterfacesConfig().

◆ loadEigrpInterfaceParams6()

bool inet::eigrp::EigrpDeviceConfigurator::loadEigrpInterfaceParams6 ( cXMLElement *  eigrpIface,
IEigrpModule< Ipv6Address > *  eigrpModule,
int  ifaceId,
const char *  ifaceName 
)
protected

Loads interfaces for EIGRP IPv6.

681 {
682  int tempNumber;
683  bool success, changed = false;
684 
685  cXMLElementList ifDetails = eigrpIface->getChildren();
686  for (cXMLElementList::iterator ifElemIt = ifDetails.begin(); ifElemIt != ifDetails.end(); ifElemIt++) {
687  std::string nodeName = (*ifElemIt)->getTagName();
688 
689  if (nodeName == "Delay") {
690  success = Str2Int(&tempNumber, (*ifElemIt)->getNodeValue());
691  if (!success || tempNumber < 0 || tempNumber > 16777215)
692  throw cRuntimeError("Bad value for EIGRP Delay on interface %s", ifaceName);
693  eigrpModule->setDelay(tempNumber, ifaceId);
694  changed = true;
695  }
696  else if (nodeName == "Bandwidth") {
697  success = Str2Int(&tempNumber, (*ifElemIt)->getNodeValue());
698  if (!success || tempNumber < 0 || tempNumber > 10000000)
699  throw cRuntimeError("Bad value for EIGRP Bandwidth on interface %s", ifaceName);
700  eigrpModule->setBandwidth(tempNumber, ifaceId);
701  changed = true;
702  }
703  else if (nodeName == "Reliability") {
704  success = Str2Int(&tempNumber, (*ifElemIt)->getNodeValue());
705  if (!success || tempNumber < 1 || tempNumber > 255)
706  throw cRuntimeError("Bad value for EIGRP Reliability on interface %s", ifaceName);
707  eigrpModule->setReliability(tempNumber, ifaceId);
708  changed = true;
709  }
710  else if (nodeName == "Load") {
711  success = Str2Int(&tempNumber, (*ifElemIt)->getNodeValue());
712  if (!success || tempNumber < 1 || tempNumber > 255)
713  throw cRuntimeError("Bad value for EIGRP Load on interface %s", ifaceName);
714  eigrpModule->setLoad(tempNumber, ifaceId);
715  changed = true;
716  }
717  }
718  return changed;
719 }

Referenced by loadEigrpInterfaces6Config().

◆ loadEigrpInterfaces6Config()

void inet::eigrp::EigrpDeviceConfigurator::loadEigrpInterfaces6Config ( cXMLElement *  device,
IEigrpModule< Ipv6Address > *  eigrpModule 
)
protected

Loads parameters of interfaces for EIGRP.

596 {
597  // XML nodes for EIGRP
598  cXMLElement *eigrpIfaceElem = nullptr;
599  cXMLElement *ifaceElem = nullptr;
600  cXMLElement *ipv6AddrElem = nullptr;
601 
602  bool success;
603  int tempNumber;
604 
605  if ((ifaceElem = GetInterface(ifaceElem, device)) == nullptr)
606  return;
607 
608  while (ifaceElem != nullptr) {
609  // Get interface ID
610  const char *ifaceName = ifaceElem->getAttribute("name");
611  NetworkInterface *iface = ift->findInterfaceByName(ifaceName);
612  if (iface == nullptr) {
613  throw cRuntimeError("No interface called %s on this device", ifaceName);
614  }
615 
616  auto int6data = iface->findProtocolDataForUpdate<Ipv6InterfaceData>();
617 
618  // for each IPv6 address - save info about network prefix
619  ipv6AddrElem = GetIPv6Address(nullptr, ifaceElem);
620  while (ipv6AddrElem != nullptr) {
621 
622  // get address string
623  string addrFull = ipv6AddrElem->getNodeValue();
624  Ipv6Address ipv6;
625  int prefixLen;
626 
627  // check if it's a valid IPv6 address string with prefix and get prefix
628  if (!ipv6.tryParseAddrWithPrefix(addrFull.c_str(), prefixLen)) {
629  throw cRuntimeError("Unable to set IPv6 address %s on interface %s", addrFull.c_str(), ifaceName);
630  }
631 
632  ipv6 = Ipv6Address(addrFull.substr(0, addrFull.find_last_of('/')).c_str());
633 
634  int6data->assignAddress(ipv6, false, SIMTIME_ZERO, SIMTIME_ZERO);
635 
636 // EV_DEBUG << "IPv6 address: " << ipv6 << "/" << prefixLen << " on iface " << ifaceName << endl;
637 
638  if (ipv6.getScope() != Ipv6Address::LINK) { // is not link-local -> add
639  if (!eigrpModule->addNetPrefix(ipv6.getPrefix(prefixLen), prefixLen, iface->getInterfaceId())) { // only saves information about prefix - does not enable in EIGRP
640  // failure - same prefix on different interfaces
641 // throw cRuntimeError("Same IPv6 network prefix (%s/%i) on different interfaces (%s)", ipv6.getPrefix(prefixLen).str().c_str(), prefixLen, ifaceName);
642  EV_DEBUG << "ERROR: Same IPv6 network prefix (" << ipv6.getPrefix(prefixLen) << "/" << prefixLen << ") on different interfaces (prefix ignored on " << ifaceName << ")" << endl;
643  }
644  }
645  // get next IPv6 address
646  ipv6AddrElem = GetIPv6Address(ipv6AddrElem, nullptr);
647  }
648 
649  int ifaceId = iface->getInterfaceId();
650 
651  // Get EIGRP configuration for interface
652  eigrpIfaceElem = ifaceElem->getFirstChildWithTag("EIGRP-IPv6");
653 
654  // Load EIGRP IPv6 configuration
655  if (eigrpIfaceElem != nullptr) {
656  // Get EIGRP AS number
657  const char *asNumStr;
658  if ((asNumStr = eigrpIfaceElem->getAttribute("asNumber")) == nullptr)
659  throw cRuntimeError("No EIGRP autonomous system number specified in settings of interface %s", ifaceName);
660  success = Str2Int(&tempNumber, asNumStr);
661  if (!success || tempNumber < 1 || tempNumber > 65535)
662  throw cRuntimeError("Bad value for EIGRP autonomous system number (<1, 65535>) on interface %s", ifaceName);
663  // TODO vybrat podle AS spravny PDM a pro ten nastavovat nasledujici
664 
665  if (tempNumber == eigrpModule->getASNum()) { // same AS number of process
666  loadEigrpInterface6(eigrpIfaceElem, eigrpModule, ifaceId, ifaceName);
667 
668  if (loadEigrpInterfaceParams6(eigrpIfaceElem, eigrpModule, ifaceId, ifaceName))
669  eigrpModule->updateInterface(ifaceId);
670 
671  eigrpModule->addInterface(iface->getInterfaceId(), true); // interface included to EIGRP process -> add
672 
673  }
674  }
675 
676  ifaceElem = GetInterface(ifaceElem, nullptr);
677  }
678 }

Referenced by loadEigrpIPv6Config().

◆ loadEigrpInterfacesConfig()

void inet::eigrp::EigrpDeviceConfigurator::loadEigrpInterfacesConfig ( cXMLElement *  device,
IEigrpModule< Ipv4Address > *  eigrpModule 
)
protected

Loads parameters of interfaces for EIGRP.

377 {
378  // XML nodes for EIGRP
379  cXMLElement *eigrpIfaceElem = nullptr;
380  cXMLElement *ifaceElem = nullptr;
381 
382  bool success;
383  int tempNumber;
384 
385  if ((ifaceElem = GetInterface(ifaceElem, device)) == nullptr)
386  return;
387  while (ifaceElem != nullptr) {
388  // Get interface ID
389  const char *ifaceName = ifaceElem->getAttribute("name");
390  NetworkInterface *iface = ift->findInterfaceByName(ifaceName);
391  if (iface == nullptr) {
392  throw cRuntimeError("No interface called %s on this device", ifaceName);
393  }
394  int ifaceId = iface->getInterfaceId();
395 
396  // Get EIGRP configuration for interface
397  eigrpIfaceElem = ifaceElem->getFirstChildWithTag("EIGRP-IPv4");
398 
399  // Load EIGRP IPv4 configuration
400  if (eigrpIfaceElem != nullptr) {
401  // Get EIGRP AS number
402  const char *asNumStr;
403  if ((asNumStr = eigrpIfaceElem->getAttribute("asNumber")) == nullptr)
404  throw cRuntimeError("No EIGRP autonomous system number specified in settings of interface %s", ifaceName);
405  success = Str2Int(&tempNumber, asNumStr);
406  if (!success || tempNumber < 1 || tempNumber > 65535)
407  throw cRuntimeError("Bad value for EIGRP autonomous system number (<1, 65535>) on interface %s", ifaceName);
408  // TODO vybrat podle AS spravny PDM a pro ten nastavovat nasledujici
409  if (tempNumber == eigrpModule->getASNum()) {
410  loadEigrpInterface(eigrpIfaceElem, eigrpModule, ifaceId, ifaceName);
411 
412  if (loadEigrpInterfaceParams(eigrpIfaceElem, eigrpModule, ifaceId, ifaceName))
413  eigrpModule->updateInterface(ifaceId);
414  }
415  }
416  ifaceElem = GetInterface(ifaceElem, nullptr);
417  }
418 }

Referenced by loadEigrpIPv4Config().

◆ loadEigrpIPv4Config()

void inet::eigrp::EigrpDeviceConfigurator::loadEigrpIPv4Config ( IEigrpModule< Ipv4Address > *  eigrpModule)

Loads configuration for EIGRP.

Parameters
eigrpModule[in]
250 {
251  ASSERT(eigrpModule != nullptr);
252 
253  // get access to device node from XML
254 // const char *deviceType = par("deviceType");
255 // const char *deviceId = par("deviceId");
256 // const char *configFile = par("configFile");
257  device = configFile;
258 
259  if (device == nullptr) {
260  EV_DEBUG << "No EIGRP configuration found for this device!" << endl;
261  return;
262  }
263 
264  loadEigrpProcessesConfig(device, eigrpModule);
265 
266  loadEigrpInterfacesConfig(device, eigrpModule);
267 }

Referenced by inet::eigrp::EigrpIpv4Pdm::initialize().

◆ loadEigrpIPv4Networks()

void inet::eigrp::EigrpDeviceConfigurator::loadEigrpIPv4Networks ( cXMLElement *  processElem,
IEigrpModule< Ipv4Address > *  eigrpModule 
)
protected

Loads K-value and converts it to number.

196 {
197  const char *addressStr, *wildcardStr;
198  Ipv4Address address, mask;
199  std::vector<EigrpNetwork<Ipv4Address> *> networks;
200  EigrpNetwork<Ipv4Address> *net;
201  NetworkInterface *iface;
202 
203  cXMLElement *netoworkParentElem = processElem->getFirstChildWithTag("Networks");
204  if (netoworkParentElem == nullptr)
205  return;
206  cXMLElement *networkElem = GetEigrpIPv4Network(nullptr, netoworkParentElem);
207 
208  while (networkElem != nullptr) {
209  // Get IP address
210  if ((addressStr = GetNodeParamConfig(networkElem, "IPAddress", nullptr)) == nullptr) { // address is mandatory
211  throw cRuntimeError("No IP address specified in the IPAddress node");
212  }
213 
214  // Get wildcard
215  wildcardStr = GetNodeParamConfig(networkElem, "Wildcard", nullptr);
216 
217  // Create network address and mask
218  address.set(addressStr);
219  if (wildcardStr == nullptr) { // wildcard is optional
221  // classful network
222  address = address.getNetwork();
223  }
224  else {
225  // Accepts incorrectly specified wildcard as normal mask (Cisco)
226  mask = Ipv4Address(wildcardStr);
227  if (mask.isUnspecified() || !mask.isValidNetmask()) {
228  if (!wildcardToMask(wildcardStr, mask))
229  throw cRuntimeError("Invalid wildcard in EIGRP network configuration");
230  }
231  address = address.doAnd(mask);
232  }
233 
234  net = eigrpModule->addNetwork(address, mask);
235  networks.push_back(net);
236 
237  networkElem = GetEigrpIPv4Network(networkElem, nullptr);
238  }
239 
240  // Find and store interfaces for networks
241  for (int i = 0; i < ift->getNumInterfaces(); i++) {
242  iface = ift->getInterface(i);
243  net = isEigrpInterface(networks, iface);
244  if (net != nullptr)
245  eigrpModule->addInterface(iface->getInterfaceId(), net->getNetworkId(), true);
246  }
247 }

Referenced by loadEigrpProcessesConfig().

◆ loadEigrpIPv6Config()

void inet::eigrp::EigrpDeviceConfigurator::loadEigrpIPv6Config ( IEigrpModule< Ipv6Address > *  eigrpModule)

Loads configuration for EIGRP IPv6.

Parameters
eigrpModule[in]
491 { // TODO
492  ASSERT(eigrpModule != nullptr);
493 
494  // get access to device node from XML
495 // const char *deviceType = par("deviceType");
496 // const char *deviceId = par("deviceId");
497 // const char *configFile = par("configFile");
498 // cXMLElement *device = GetDevice(deviceType, deviceId, configFile);
499  device = configFile;
500 
501  if (device == nullptr) {
502  EV_DEBUG << "No EIGRP configuration found for this device!" << endl;
503  return;
504  }
505 
506  loadEigrpProcesses6Config(device, eigrpModule);
507 
508  loadEigrpInterfaces6Config(device, eigrpModule);
509 }

Referenced by inet::eigrp::EigrpIpv6Pdm::initialize().

◆ loadEigrpKValue()

int inet::eigrp::EigrpDeviceConfigurator::loadEigrpKValue ( cXMLElement *  node,
const char *  attrName,
const char *  attrValue 
)
protected

Loads stub configuration.

351 {
352  int result;
353  bool success;
354  const char *kvalueStr = GetNodeAttrConfig(node, attrName, attrValue);
355 
356  success = Str2Int(&result, kvalueStr);
357  if (!success || result < 0 || result > 255)
358  throw cRuntimeError("Bad value for EIGRP metric weights (<0, 255>)");
359  return result;
360 }

Referenced by loadEigrpProcesses6Config(), and loadEigrpProcessesConfig().

◆ loadEigrpProcesses6Config()

void inet::eigrp::EigrpDeviceConfigurator::loadEigrpProcesses6Config ( cXMLElement *  device,
IEigrpModule< Ipv6Address > *  eigrpModule 
)
protected

Loads configuration of interfaces for EIGRP IPv6.

512 {
513  // XML nodes for EIGRP
514  cXMLElement *processElem = nullptr;
515  cXMLElementList procDetails;
516 
517  int asNum; // converted AS number
518  const char *asNumStr; // string with AS number
519  const char *rIdStr; // string with routerID
520  int tempNumber;
521  bool success;
522 
523  processElem = GetEigrpProcess6(processElem, device);
524  if (processElem == nullptr) {
525  EV_DEBUG << "No EIGRP configuration found." << endl;
526  return;
527  }
528 
529  // AS number of process
530  if ((asNumStr = processElem->getAttribute("asNumber")) == nullptr)
531  throw cRuntimeError("No EIGRP autonomous system number specified");
532  success = Str2Int(&asNum, asNumStr);
533  if (!success || asNum < 1 || asNum > 65535)
534  throw cRuntimeError("Bad value for EIGRP autonomous system number (<1, 65535>)");
535  eigrpModule->setASNum(asNum);
536 
537  // routerID for process
538  if ((rIdStr = processElem->getAttribute("routerId")) == nullptr)
539  throw cRuntimeError("No EIGRP routerID specified"); // routerID must be specified
540  eigrpModule->setRouterId(Ipv4Address(rIdStr));
541 
542  procDetails = processElem->getChildren();
543  for (cXMLElementList::iterator procElem = procDetails.begin(); procElem != procDetails.end(); procElem++) {
544  std::string nodeName = (*procElem)->getTagName();
545 
546  if (nodeName == "MetricWeights") {
547  EigrpKValues kval;
548  kval.K1 = loadEigrpKValue((*procElem), "k1", "1");
549  kval.K2 = loadEigrpKValue((*procElem), "k2", "0");
550  kval.K3 = loadEigrpKValue((*procElem), "k3", "1");
551  kval.K4 = loadEigrpKValue((*procElem), "k4", "0");
552  kval.K5 = loadEigrpKValue((*procElem), "k5", "0");
553  kval.K6 = loadEigrpKValue((*procElem), "k6", "0");
554  eigrpModule->setKValues(kval);
555  }
556  else if (nodeName == "MaximumPath") {
557  success = Str2Int(&tempNumber, (*procElem)->getNodeValue());
558  if (!success || tempNumber < 1)
559  throw cRuntimeError("Bad value for EIGRP maximum paths for load balancing <1, 255>");
560  eigrpModule->setMaximumPath(tempNumber);
561  }
562  else if (nodeName == "Variance") {
563  success = Str2Int(&tempNumber, (*procElem)->getNodeValue());
564  if (!success || tempNumber < 1 || tempNumber > 128)
565  throw cRuntimeError("Bad value for EIGRP variance (<1, 128>)");
566  eigrpModule->setVariance(tempNumber);
567  }
568  else if (nodeName == "PassiveInterface") {
569  // Get interface ID
570  const char *ifaceName = (*procElem)->getNodeValue();
571  NetworkInterface *iface = ift->findInterfaceByName(ifaceName);
572  if (iface == nullptr) {
573  throw cRuntimeError("No interface called %s on this device", ifaceName);
574  }
575  int ifaceId = iface->getInterfaceId();
576  eigrpModule->setPassive(true, ifaceId);
577  }
578  else if (nodeName == "Stub") {
579  EigrpStub stub;
580  stub.connectedRt = loadEigrpStubConf((*procElem), "connected");
581  stub.leakMapRt = loadEigrpStubConf((*procElem), "leakMap");
582  stub.recvOnlyRt = loadEigrpStubConf((*procElem), "receiveOnly");
583  stub.redistributedRt = loadEigrpStubConf((*procElem), "redistributed");
584  stub.staticRt = loadEigrpStubConf((*procElem), "static");
585  stub.summaryRt = loadEigrpStubConf((*procElem), "summary");
586  if (!(stub.connectedRt || stub.leakMapRt || stub.recvOnlyRt || stub.redistributedRt || stub.staticRt || stub.summaryRt))
587  stub.connectedRt = stub.summaryRt = true; // Default values
588  eigrpModule->setStub(stub);
589  }
590  }
591 
592  return;
593 }

Referenced by loadEigrpIPv6Config().

◆ loadEigrpProcessesConfig()

void inet::eigrp::EigrpDeviceConfigurator::loadEigrpProcessesConfig ( cXMLElement *  device,
IEigrpModule< Ipv4Address > *  eigrpModule 
)
protected

Loads configuration of interfaces for EIGRP.

270 {
271  // XML nodes for EIGRP
272  cXMLElement *processElem = nullptr;
273  cXMLElementList procDetails;
274 
275  int asNum; // converted AS number
276  const char *asNumStr; // string with AS number
277  int tempNumber;
278  bool success;
279 
280  processElem = GetEigrpProcess(processElem, device);
281  if (processElem == nullptr) {
282  EV_DEBUG << "No EIGRP configuration found." << endl;
283  return;
284  }
285 
286  while (processElem != nullptr) {
287  // AS number of process
288  if ((asNumStr = processElem->getAttribute("asNumber")) == nullptr)
289  throw cRuntimeError("No EIGRP autonomous system number specified");
290  success = Str2Int(&asNum, asNumStr);
291  if (!success || asNum < 1 || asNum > 65535)
292  throw cRuntimeError("Bad value for EIGRP autonomous system number (<1, 65535>)");
293  eigrpModule->setASNum(asNum);
294  // Load networks and enable corresponding interfaces
295 
296  loadEigrpIPv4Networks(processElem, eigrpModule);
297  procDetails = processElem->getChildren();
298  for (cXMLElementList::iterator procElem = procDetails.begin(); procElem != procDetails.end(); procElem++) {
299  std::string nodeName = (*procElem)->getTagName();
300  if (nodeName == "MetricWeights") {
301  EigrpKValues kval;
302  kval.K1 = loadEigrpKValue((*procElem), "k1", "1");
303  kval.K2 = loadEigrpKValue((*procElem), "k2", "0");
304  kval.K3 = loadEigrpKValue((*procElem), "k3", "1");
305  kval.K4 = loadEigrpKValue((*procElem), "k4", "0");
306  kval.K5 = loadEigrpKValue((*procElem), "k5", "0");
307  kval.K6 = loadEigrpKValue((*procElem), "k6", "0");
308  eigrpModule->setKValues(kval);
309  }
310  else if (nodeName == "MaximumPath") {
311  success = Str2Int(&tempNumber, (*procElem)->getNodeValue());
312  if (!success || tempNumber < 1)
313  throw cRuntimeError("Bad value for EIGRP maximum paths for load balancing <1, 255>");
314  eigrpModule->setMaximumPath(tempNumber);
315  }
316  else if (nodeName == "Variance") {
317  success = Str2Int(&tempNumber, (*procElem)->getNodeValue());
318  if (!success || tempNumber < 1 || tempNumber > 128)
319  throw cRuntimeError("Bad value for EIGRP variance (<1, 128>)");
320  eigrpModule->setVariance(tempNumber);
321  }
322  else if (nodeName == "PassiveInterface") {
323  // Get interface ID
324  const char *ifaceName = (*procElem)->getNodeValue();
325  NetworkInterface *iface = ift->findInterfaceByName(ifaceName);
326  if (iface == nullptr) {
327  throw cRuntimeError("No interface called %s on this device", ifaceName);
328  }
329  int ifaceId = iface->getInterfaceId();
330  eigrpModule->setPassive(true, ifaceId);
331  }
332  else if (nodeName == "Stub") {
333  EigrpStub stub;
334  stub.connectedRt = loadEigrpStubConf((*procElem), "connected");
335  stub.leakMapRt = loadEigrpStubConf((*procElem), "leakMap");
336  stub.recvOnlyRt = loadEigrpStubConf((*procElem), "receiveOnly");
337  stub.redistributedRt = loadEigrpStubConf((*procElem), "redistributed");
338  stub.staticRt = loadEigrpStubConf((*procElem), "static");
339  stub.summaryRt = loadEigrpStubConf((*procElem), "summary");
340  if (!(stub.connectedRt || stub.leakMapRt || stub.recvOnlyRt || stub.redistributedRt || stub.staticRt || stub.summaryRt))
341  stub.connectedRt = stub.summaryRt = true; // Default values
342  eigrpModule->setStub(stub);
343  }
344  }
345 
346  processElem = GetEigrpProcess(processElem, nullptr);
347  }
348 }

Referenced by loadEigrpIPv4Config().

◆ loadEigrpStubConf()

bool inet::eigrp::EigrpDeviceConfigurator::loadEigrpStubConf ( cXMLElement *  node,
const char *  attrName 
)
protected

Loads configuration of EIGRP IPv6 process.

363 {
364  bool result;
365  bool success;
366  const char *stubConf = GetNodeAttrConfig(node, attrName, nullptr);
367  if (stubConf == nullptr)
368  return false;
369 
370  success = Str2Bool(&result, stubConf);
371  if (!success)
372  throw cRuntimeError("Bad value for EIGRP stub configuration of parameter %s", attrName);
373  return result;
374 }

Referenced by loadEigrpProcesses6Config(), and loadEigrpProcessesConfig().

◆ Str2Bool()

bool inet::eigrp::EigrpDeviceConfigurator::Str2Bool ( bool *  ret,
const char *  str 
)
static
107  {
108 
109  if ((strcmp(str, "yes") == 0)
110  || (strcmp(str, "enabled") == 0)
111  || (strcmp(str, "on") == 0)
112  || (strcmp(str, "true") == 0))
113  {
114 
115  *ret = true;
116  return true;
117  }
118 
119  if ((strcmp(str, "no") == 0)
120  || (strcmp(str, "disabled") == 0)
121  || (strcmp(str, "off") == 0)
122  || (strcmp(str, "false") == 0))
123  {
124 
125  *ret = false;
126  return true;
127  }
128 
129  int value;
130  if (Str2Int(&value, str)) {
131  if (value == 1) {
132  *ret = true;
133  return true;
134  }
135 
136  if (value == 0) {
137  *ret = false;
138  return true;
139  }
140  }
141 
142  return false;
143 }

Referenced by loadEigrpInterface(), loadEigrpInterface6(), and loadEigrpStubConf().

◆ Str2Int()

bool inet::eigrp::EigrpDeviceConfigurator::Str2Int ( int *  retValue,
const char *  str 
)
static
87  {
88 
89  if (retValue == nullptr || str == nullptr) {
90  return false;
91  }
92 
93  char *tail = nullptr;
94  long value = 0;
95  errno = 0;
96 
97  value = strtol(str, &tail, 0);
98 
99  if (*tail != '\0' || errno == ERANGE || errno == EINVAL || value < INT_MIN || value > INT_MAX) {
100  return false;
101  }
102 
103  *retValue = (int)value;
104  return true;
105 }

Referenced by loadEigrpInterface(), loadEigrpInterface6(), loadEigrpInterfaceParams(), loadEigrpInterfaceParams6(), loadEigrpInterfaces6Config(), loadEigrpInterfacesConfig(), loadEigrpKValue(), loadEigrpProcesses6Config(), loadEigrpProcessesConfig(), and Str2Bool().

◆ wildcardToMask()

bool inet::eigrp::EigrpDeviceConfigurator::wildcardToMask ( const char *  wildcard,
Ipv4Address result 
)
protected

Loads configuration of EIGRP process.

146 {
147  result.set(wildcard);
148  uint32_t wcNum = result.getInt();
149 
150  // convert wildcard to mask
151  wcNum = ~wcNum;
152  result.set(wcNum);
153 
154  if (!result.isValidNetmask())
155  return false;
156 
157  return true;
158 }

Referenced by loadEigrpIPv4Networks().

Member Data Documentation

◆ configFile

cXMLElement* inet::eigrp::EigrpDeviceConfigurator::configFile = nullptr
private

◆ device

◆ ift


The documentation for this class was generated from the following files:
inet::eigrp::EigrpDeviceConfigurator::GetEigrpProcess
static cXMLElement * GetEigrpProcess(cXMLElement *process, cXMLElement *device)
Definition: EigrpDeviceConfigurator.cc:804
inet::eigrp::IEigrpModule::setPassive
virtual void setPassive(bool passive, int ifaceId)=0
inet::eigrp::IEigrpModule::setDelay
virtual void setDelay(int delay, int interfaceId)=0
inet::eigrp::EigrpDeviceConfigurator::device
cXMLElement * device
Definition: EigrpDeviceConfigurator.h:33
inet::Ipv6Address::LINK
@ LINK
Definition: Ipv6Address.h:46
inet::Ipv4Address::getNetwork
Ipv4Address getNetwork() const
Returns an address with the network part of the address (the bits of the hosts part are to 0).
Definition: Ipv4Address.cc:157
inet::eigrp::IEigrpModule::setReliability
virtual void setReliability(int reability, int interfaceId)=0
inet::eigrp::EigrpDeviceConfigurator::GetIPv6Address
static cXMLElement * GetIPv6Address(cXMLElement *addr, cXMLElement *iface)
Definition: EigrpDeviceConfigurator.cc:66
inet::eigrp::IEigrpModule::addNetwork
virtual EigrpNetwork< IPAddress > * addNetwork(IPAddress address, IPAddress mask)=0
Adds new network to EigrpNetworkTable for routing.
inet::eigrp::IEigrpModule::setMaximumPath
virtual void setMaximumPath(int maximumPath)=0
inet::eigrp::EigrpDeviceConfigurator::loadEigrpInterface6
void loadEigrpInterface6(cXMLElement *eigrpIface, IEigrpModule< Ipv6Address > *eigrpModule, int ifaceId, const char *ifaceName)
Definition: EigrpDeviceConfigurator.cc:721
inet::eigrp::IEigrpModule::setLoad
virtual void setLoad(int load, int interfaceId)=0
inet::eigrp::IEigrpModule::addNetPrefix
virtual bool addNetPrefix(const IPAddress &network, const short int prefixLen, const int ifaceId)=0
Adds information about IPv6 network prefix.
inet::eigrp::EigrpDeviceConfigurator::loadEigrpProcessesConfig
void loadEigrpProcessesConfig(cXMLElement *device, IEigrpModule< Ipv4Address > *eigrpModule)
Loads configuration of interfaces for EIGRP.
Definition: EigrpDeviceConfigurator.cc:269
inet::eigrp::EigrpDeviceConfigurator::isEigrpInterface
EigrpNetwork< Ipv4Address > * isEigrpInterface(std::vector< EigrpNetwork< Ipv4Address > * > &networks, NetworkInterface *interface)
< Gets interfaces that correspond to the IP address and mask
Definition: EigrpDeviceConfigurator.cc:160
inet::eigrp::IEigrpModule::addInterface
virtual void addInterface(int interfaceId, int networkId, bool enabled)=0
Adds interface to EIGRP.
inet::eigrp::EigrpDeviceConfigurator::wildcardToMask
bool wildcardToMask(const char *wildcard, Ipv4Address &result)
Loads configuration of EIGRP process.
Definition: EigrpDeviceConfigurator.cc:145
inet::eigrp::EigrpDeviceConfigurator::ift
IInterfaceTable * ift
Definition: EigrpDeviceConfigurator.h:36
inet::eigrp::EigrpDeviceConfigurator::GetNodeAttrConfig
static const char * GetNodeAttrConfig(cXMLElement *node, const char *attrName, const char *defaultValue)
Definition: EigrpDeviceConfigurator.cc:793
inet::eigrp::IEigrpModule::setKValues
virtual void setKValues(const EigrpKValues &kValues)=0
inet::eigrp::IEigrpModule::setHoldInt
virtual void setHoldInt(int interval, int interfaceId)=0
inet::eigrp::EigrpDeviceConfigurator::loadEigrpIPv4Networks
void loadEigrpIPv4Networks(cXMLElement *processElem, IEigrpModule< Ipv4Address > *eigrpModule)
Loads K-value and converts it to number.
Definition: EigrpDeviceConfigurator.cc:195
inet::IInterfaceTable::findInterfaceByName
virtual NetworkInterface * findInterfaceByName(const char *name) const =0
Returns an interface given by its name.
inet::eigrp::EigrpDeviceConfigurator::GetNodeParamConfig
static const char * GetNodeParamConfig(cXMLElement *node, const char *paramName, const char *defaultValue)
Definition: EigrpDeviceConfigurator.cc:778
inet::eigrp::IEigrpModule::setSplitHorizon
virtual void setSplitHorizon(bool shEnabled, int interfaceId)=0
inet::eigrp::EigrpDeviceConfigurator::loadEigrpKValue
int loadEigrpKValue(cXMLElement *node, const char *attrName, const char *attrValue)
Loads stub configuration.
Definition: EigrpDeviceConfigurator.cc:350
inet::eigrp::EigrpDeviceConfigurator::Str2Bool
static bool Str2Bool(bool *ret, const char *str)
Definition: EigrpDeviceConfigurator.cc:107
inet::eigrp::EigrpDeviceConfigurator::Str2Int
static bool Str2Int(int *retValue, const char *str)
Definition: EigrpDeviceConfigurator.cc:87
inet::eigrp::EigrpDeviceConfigurator::GetEigrpProcess6
static cXMLElement * GetEigrpProcess6(cXMLElement *process, cXMLElement *device)
Definition: EigrpDeviceConfigurator.cc:750
inet::eigrp::EigrpDeviceConfigurator::loadEigrpInterfacesConfig
void loadEigrpInterfacesConfig(cXMLElement *device, IEigrpModule< Ipv4Address > *eigrpModule)
Loads parameters of interfaces for EIGRP.
Definition: EigrpDeviceConfigurator.cc:376
inet::eigrp::EigrpDeviceConfigurator::loadEigrpInterfaceParams
bool loadEigrpInterfaceParams(cXMLElement *eigrpIface, IEigrpModule< Ipv4Address > *eigrpModule, int ifaceId, const char *ifaceName)
Definition: EigrpDeviceConfigurator.cc:420
inet::eigrp::EigrpDeviceConfigurator::loadEigrpInterfaceParams6
bool loadEigrpInterfaceParams6(cXMLElement *eigrpIface, IEigrpModule< Ipv6Address > *eigrpModule, int ifaceId, const char *ifaceName)
Loads interfaces for EIGRP IPv6.
Definition: EigrpDeviceConfigurator.cc:680
inet::eigrp::IEigrpModule::setStub
virtual void setStub(const EigrpStub &stub)=0
inet::eigrp::IEigrpModule::setBandwidth
virtual void setBandwidth(int bandwith, int interfaceId)=0
inet::eigrp::EigrpDeviceConfigurator::GetEigrpIPv4Network
static cXMLElement * GetEigrpIPv4Network(cXMLElement *network, cXMLElement *process)
Definition: EigrpDeviceConfigurator.cc:832
inet::eigrp::EigrpDeviceConfigurator::loadEigrpStubConf
bool loadEigrpStubConf(cXMLElement *node, const char *attrName)
Loads configuration of EIGRP IPv6 process.
Definition: EigrpDeviceConfigurator.cc:362
inet::eigrp::EigrpDeviceConfigurator::loadEigrpInterface
void loadEigrpInterface(cXMLElement *eigrpIface, IEigrpModule< Ipv4Address > *eigrpModule, int ifaceId, const char *ifaceName)
Loads networks added to EIGRP.
Definition: EigrpDeviceConfigurator.cc:461
inet::IInterfaceTable::getNumInterfaces
virtual int getNumInterfaces() const =0
Returns the number of interfaces.
inet::Ipv4Address::UNSPECIFIED_ADDRESS
static const Ipv4Address UNSPECIFIED_ADDRESS
0.0.0.0
Definition: Ipv4Address.h:91
inet::math::tail
Point< TS ... > tail(const Point< T, TS ... > &p)
Returns all but the first coordinate of p.
Definition: Point.h:228
inet::eigrp::EigrpDeviceConfigurator::loadEigrpProcesses6Config
void loadEigrpProcesses6Config(cXMLElement *device, IEigrpModule< Ipv6Address > *eigrpModule)
Loads configuration of interfaces for EIGRP IPv6.
Definition: EigrpDeviceConfigurator.cc:511
inet::eigrp::IEigrpModule::setVariance
virtual void setVariance(int variance)=0
inet::eigrp::IEigrpModule::setRouterId
virtual void setRouterId(Ipv4Address routerID)=0
Sets router ID.
inet::eigrp::IEigrpModule::setHelloInt
virtual void setHelloInt(int interval, int interfaceId)=0
inet::IInterfaceTable::getInterface
virtual NetworkInterface * getInterface(int pos) const =0
Returns the NetworkInterface specified by an index 0..numInterfaces-1.
inet::eigrp::IEigrpModule::updateInterface
virtual void updateInterface(int interfaceId)=0
inet::eigrp::EigrpDeviceConfigurator::configFile
cXMLElement * configFile
Definition: EigrpDeviceConfigurator.h:32
inet::eigrp::EigrpDeviceConfigurator::loadEigrpInterfaces6Config
void loadEigrpInterfaces6Config(cXMLElement *device, IEigrpModule< Ipv6Address > *eigrpModule)
Loads parameters of interfaces for EIGRP.
Definition: EigrpDeviceConfigurator.cc:595
inet::eigrp::EigrpDeviceConfigurator::GetInterface
static cXMLElement * GetInterface(cXMLElement *iface, cXMLElement *device)
Definition: EigrpDeviceConfigurator.cc:43
inet::eigrp::IEigrpModule::getASNum
virtual int getASNum()=0
inet::eigrp::IEigrpModule::setASNum
virtual void setASNum(int asNum)=0