INET Framework for OMNeT++/OMNEST
|
#include <OSPFRoutingTableEntry.h>
typedef unsigned char OSPF::RoutingTableEntry::RoutingDestinationType |
{ IntraArea = 0, InterArea = 1, Type1External = 2, Type2External = 3 };
OSPF::RoutingTableEntry::RoutingTableEntry | ( | void | ) | [inline] |
: IPRoute(), destinationType(OSPF::RoutingTableEntry::NetworkDestination), area(OSPF::BackboneAreaID), pathType(OSPF::RoutingTableEntry::IntraArea), type2Cost(0), linkStateOrigin(NULL) { netmask = 0xFFFFFFFF; source = IPRoute::OSPF; memset(&optionalCapabilities, 0, sizeof(OSPFOptions)); }
OSPF::RoutingTableEntry::RoutingTableEntry | ( | const RoutingTableEntry & | entry | ) | [inline] |
: destinationType(entry.destinationType), optionalCapabilities(entry.optionalCapabilities), area(entry.area), pathType(entry.pathType), cost(entry.cost), type2Cost(entry.type2Cost), linkStateOrigin(entry.linkStateOrigin), nextHops(entry.nextHops) { host = entry.host; netmask = entry.netmask; gateway = entry.gateway; interfacePtr = entry.interfacePtr; type = entry.type; source = entry.source; metric = entry.metric; }
virtual OSPF::RoutingTableEntry::~RoutingTableEntry | ( | void | ) | [inline, virtual] |
{}
void OSPF::RoutingTableEntry::AddNextHop | ( | OSPF::NextHop | hop | ) | [inline] |
Referenced by OSPF::Router::CalculateASExternalRoutes(), OSPF::Area::CalculateInterAreaRoutes(), OSPF::Area::CalculateShortestPathTree(), and OSPF::Area::ReCheckSummaryLSAs().
{ if (nextHops.size() == 0) { InterfaceEntry* routingInterface = InterfaceTableAccess().get()->getInterfaceById(hop.ifIndex); interfacePtr = routingInterface; //gateway = ULongFromIPv4Address(hop.hopAddress); // TODO: verify this isn't necessary } nextHops.push_back(hop); }
void OSPF::RoutingTableEntry::ClearNextHops | ( | void | ) | [inline] |
Referenced by OSPF::Router::CalculateASExternalRoutes(), OSPF::Area::CalculateShortestPathTree(), and OSPF::Area::ReCheckSummaryLSAs().
{ nextHops.clear(); }
IPAddress OSPF::RoutingTableEntry::GetAddressMask | ( | void | ) | const [inline] |
Referenced by OSPF::Area::CalculateInterAreaRoutes(), OSPF::Area::CalculateShortestPathTree(), OSPF::Router::Lookup(), operator<<(), and OSPF::Area::OriginateSummaryLSA().
{ return netmask; }
AreaID OSPF::RoutingTableEntry::GetArea | ( | void | ) | const [inline] |
Metric OSPF::RoutingTableEntry::GetCost | ( | void | ) | const [inline] |
IPAddress OSPF::RoutingTableEntry::GetDestinationID | ( | void | ) | const [inline] |
Referenced by OSPF::Area::CalculateInterAreaRoutes(), OSPF::Area::CalculateShortestPathTree(), OSPF::Area::FindSameOrWorseCostRoute(), OSPF::Router::GetRoutesToASBoundaryRouter(), OSPF::Router::HasRouteToASBoundaryRouter(), OSPF::Router::Lookup(), operator<<(), OSPF::Area::OriginateSummaryLSA(), and OSPF::Area::ReCheckSummaryLSAs().
{ return host; }
RoutingDestinationType OSPF::RoutingTableEntry::GetDestinationType | ( | void | ) | const [inline] |
Referenced by OSPF::Area::CalculateInterAreaRoutes(), OSPF::Area::FindSameOrWorseCostRoute(), OSPF::Router::GetRoutesToASBoundaryRouter(), OSPF::Router::HasRouteToASBoundaryRouter(), OSPF::Router::Lookup(), operator<<(), OSPF::Area::OriginateSummaryLSA(), and OSPF::Area::ReCheckSummaryLSAs().
{ return destinationType; }
const OSPFLSA* OSPF::RoutingTableEntry::GetLinkStateOrigin | ( | void | ) | const [inline] |
Referenced by OSPF::Router::CalculateASExternalRoutes(), OSPF::Area::CalculateShortestPathTree(), and operator<<().
{ return linkStateOrigin; }
NextHop OSPF::RoutingTableEntry::GetNextHop | ( | unsigned int | index | ) | const [inline] |
Referenced by OSPF::Router::CalculateASExternalRoutes(), OSPF::Area::CalculateInterAreaRoutes(), OSPF::Area::CreateRoutingTableEntryFromSummaryLSA(), operator<<(), and OSPF::Area::ReCheckSummaryLSAs().
{ return nextHops[index]; }
unsigned int OSPF::RoutingTableEntry::GetNextHopCount | ( | void | ) | const [inline] |
Referenced by OSPF::Router::CalculateASExternalRoutes(), OSPF::Area::CalculateInterAreaRoutes(), OSPF::Area::CreateRoutingTableEntryFromSummaryLSA(), operator<<(), and OSPF::Area::ReCheckSummaryLSAs().
{ return nextHops.size(); }
OSPFOptions OSPF::RoutingTableEntry::GetOptionalCapabilities | ( | void | ) | const [inline] |
{ return optionalCapabilities; }
RoutingPathType OSPF::RoutingTableEntry::GetPathType | ( | void | ) | const [inline] |
Referenced by OSPF::Router::CalculateASExternalRoutes(), OSPF::Area::CalculateInterAreaRoutes(), OSPF::Area::FindSameOrWorseCostRoute(), OSPF::Router::GetPreferredEntry(), OSPF::Router::Lookup(), operator<<(), OSPF::Router::PruneASBoundaryRouterEntries(), and OSPF::Area::ReCheckSummaryLSAs().
{ return pathType; }
Metric OSPF::RoutingTableEntry::GetType2Cost | ( | void | ) | const [inline] |
Referenced by OSPF::Router::CalculateASExternalRoutes(), and operator<<().
{ return type2Cost; }
bool OSPF::RoutingTableEntry::operator!= | ( | const RoutingTableEntry & | entry | ) | const [inline] |
{ return (!((*this) == entry)); }
bool OSPF::RoutingTableEntry::operator== | ( | const RoutingTableEntry & | entry | ) | const [inline] |
{ unsigned int hopCount = nextHops.size(); unsigned int i = 0; if (hopCount != entry.nextHops.size()) { return false; } for (i = 0; i < hopCount; i++) { if ((nextHops[i] != entry.nextHops[i])) { return false; } } return ((destinationType == entry.destinationType) && (host == entry.host) && (netmask == entry.netmask) && (optionalCapabilities == entry.optionalCapabilities) && (area == entry.area) && (pathType == entry.pathType) && (cost == entry.cost) && (type2Cost == entry.type2Cost) && (linkStateOrigin == entry.linkStateOrigin)); }
void OSPF::RoutingTableEntry::SetAddressMask | ( | IPAddress | destMask | ) | [inline] |
Referenced by OSPF::Router::CalculateASExternalRoutes(), OSPF::Area::CalculateShortestPathTree(), and OSPF::Router::Lookup().
{ netmask = destMask; }
void OSPF::RoutingTableEntry::SetArea | ( | AreaID | source | ) | [inline] |
void OSPF::RoutingTableEntry::SetCost | ( | Metric | pathCost | ) | [inline] |
void OSPF::RoutingTableEntry::SetDestinationID | ( | IPAddress | destID | ) | [inline] |
Referenced by OSPF::Router::CalculateASExternalRoutes(), OSPF::Area::CalculateShortestPathTree(), OSPF::Area::CreateRoutingTableEntryFromSummaryLSA(), and OSPF::Router::Lookup().
{ host = destID; }
void OSPF::RoutingTableEntry::SetDestinationType | ( | RoutingDestinationType | type | ) | [inline] |
Referenced by OSPF::Router::CalculateASExternalRoutes(), OSPF::Area::CalculateShortestPathTree(), and OSPF::Router::Lookup().
{ destinationType = type; }
void OSPF::RoutingTableEntry::SetLinkStateOrigin | ( | const OSPFLSA * | lsa | ) | [inline] |
Referenced by OSPF::Router::CalculateASExternalRoutes(), and OSPF::Area::CalculateShortestPathTree().
{ linkStateOrigin = lsa; }
void OSPF::RoutingTableEntry::SetOptionalCapabilities | ( | OSPFOptions | options | ) | [inline] |
Referenced by OSPF::Router::CalculateASExternalRoutes(), and OSPF::Area::CalculateShortestPathTree().
{ optionalCapabilities = options; }
void OSPF::RoutingTableEntry::SetPathType | ( | RoutingPathType | type | ) | [inline] |
void OSPF::RoutingTableEntry::SetType2Cost | ( | Metric | pathCost | ) | [inline] |
Referenced by OSPF::Router::CalculateASExternalRoutes(), and OSPFRouting::LoadExternalRoute().
AreaID OSPF::RoutingTableEntry::area [private] |
Referenced by GetArea(), operator==(), and SetArea().
const unsigned char OSPF::RoutingTableEntry::AreaBorderRouterDestination = 1 [static] |
const unsigned char OSPF::RoutingTableEntry::ASBoundaryRouterDestination = 2 [static] |
Referenced by OSPF::Area::CalculateInterAreaRoutes(), OSPF::Area::CalculateShortestPathTree(), OSPF::Area::CreateRoutingTableEntryFromSummaryLSA(), OSPF::Area::FindSameOrWorseCostRoute(), OSPF::Router::GetRoutesToASBoundaryRouter(), OSPF::Router::HasRouteToASBoundaryRouter(), OSPF::Router::InstallASExternalLSA(), operator<<(), OSPF::Area::OriginateSummaryLSA(), and OSPF::Area::ReCheckSummaryLSAs().
Metric OSPF::RoutingTableEntry::cost [private] |
Referenced by GetCost(), and operator==().
Referenced by GetDestinationType(), operator==(), and SetDestinationType().
const OSPFLSA* OSPF::RoutingTableEntry::linkStateOrigin [private] |
Referenced by GetLinkStateOrigin(), operator==(), and SetLinkStateOrigin().
const unsigned char OSPF::RoutingTableEntry::NetworkDestination = 0 [static] |
Referenced by OSPF::Router::CalculateASExternalRoutes(), OSPF::Area::CalculateInterAreaRoutes(), OSPF::Area::CalculateShortestPathTree(), OSPF::Area::CreateRoutingTableEntryFromSummaryLSA(), OSPF::Area::FindSameOrWorseCostRoute(), OSPF::Router::Lookup(), OSPF::Router::NotifyAboutRoutingTableChanges(), operator<<(), OSPF::Area::OriginateSummaryLSA(), OSPF::Router::RebuildRoutingTable(), and OSPF::Area::ReCheckSummaryLSAs().
std::vector<NextHop> OSPF::RoutingTableEntry::nextHops [private] |
Referenced by ClearNextHops(), GetNextHop(), GetNextHopCount(), and operator==().
OSPFOptions OSPF::RoutingTableEntry::optionalCapabilities [private] |
Referenced by GetOptionalCapabilities(), operator==(), RoutingTableEntry(), and SetOptionalCapabilities().
Referenced by GetPathType(), and operator==().
Metric OSPF::RoutingTableEntry::type2Cost [private] |
Referenced by GetType2Cost(), and operator==().