OverSim
nodeInfoAS Struct Reference

Structure that contains all information about an AS-level node. More...

#include <RUNetworkConfigurator.h>

Public Member Functions

 nodeInfoAS (cTopology::Node *node, IPAddress a, IPAddress m)

Public Attributes

int id
int asType
cTopology::Node * node
cModule * module
NODE_MAP nodeMap
NODE_INFO_RL_VEC coreNode
IPAddress addr
IPAddress netmask
IPAddress subnetmask
EDGE_ROUTER_VEC edgeRouter

Detailed Description

Structure that contains all information about an AS-level node.

During initialization all necessary information is extraced of the given node: Router type and ID.

Definition at line 191 of file RUNetworkConfigurator.h.

Constructor & Destructor Documentation

nodeInfoAS::nodeInfoAS ( cTopology::Node *  node,
IPAddress  a,
IPAddress  m 
)
inline

Definition at line 204 of file RUNetworkConfigurator.h.

{
this->node = node;
this->module = node->getModule();
addr = a;
netmask = m;
int index = 0;
string fullPath = node->getModule()->getFullPath();
// check if stubstring "sas" (StubAS) or "tas" (TransitAS)
// is contained in fullPath
if ( (index = fullPath.find(".sas")) != -1 )
else if ( (index = fullPath.find(".tas")) != -1 )
else if ( (index = fullPath.find("ReaSEUnderlayNetwork")) != -1 )
else
{
cerr << "found module that doesn't belong to TAS or SAS: "<< fullPath<<endl;
opp_error("found module that doesn't belong to TAS or SAS");
}
// set index to char position after substring "sas/tas"
{
index += 3;
string currentId;
while (isdigit(fullPath[index]) && (index < (int) fullPath.length()))
currentId += fullPath[index++];
id = atoi(currentId.data());
}
}

Member Data Documentation

IPAddress nodeInfoAS::addr
int nodeInfoAS::asType

Definition at line 194 of file RUNetworkConfigurator.h.

Referenced by nodeInfoAS().

NODE_INFO_RL_VEC nodeInfoAS::coreNode
int nodeInfoAS::id

Definition at line 193 of file RUNetworkConfigurator.h.

cModule* nodeInfoAS::module

Definition at line 196 of file RUNetworkConfigurator.h.

Referenced by nodeInfoAS().

IPAddress nodeInfoAS::netmask

Definition at line 200 of file RUNetworkConfigurator.h.

Referenced by nodeInfoAS().

cTopology::Node* nodeInfoAS::node

Definition at line 195 of file RUNetworkConfigurator.h.

Referenced by nodeInfoAS().

IPAddress nodeInfoAS::subnetmask

The documentation for this struct was generated from the following file: