#include <OSPFInterface.h>
Definition at line 34 of file OSPFInterface.h.
InterfaceUp | |
HelloTimer | |
WaitTimer | |
AcknowledgementTimer | |
BackupSeen | |
NeighborChange | |
LoopIndication | |
UnloopIndication | |
InterfaceDown |
Definition at line 36 of file OSPFInterface.h.
{ InterfaceUp = 0, HelloTimer = 1, WaitTimer = 2, AcknowledgementTimer = 3, BackupSeen = 4, NeighborChange = 5, LoopIndication = 6, UnloopIndication = 7, InterfaceDown = 8 };
DownState | |
LoopbackState | |
WaitingState | |
PointToPointState | |
NotDesignatedRouterState | |
BackupState | |
DesignatedRouterState |
Definition at line 57 of file OSPFInterface.h.
{ DownState = 0, LoopbackState = 1, WaitingState = 2, PointToPointState = 3, NotDesignatedRouterState = 4, BackupState = 5, DesignatedRouterState = 6 };
Definition at line 48 of file OSPFInterface.h.
{ UnknownType = 0, PointToPoint = 1, Broadcast = 2, NBMA = 3, PointToMultiPoint = 4, Virtual = 5 };
OSPF::Interface::Interface | ( | OSPFInterfaceType | ifType = UnknownType |
) |
Definition at line 28 of file OSPFInterface.cc.
: interfaceType(ifType), ifIndex(0), mtu(0), interfaceAddressRange(OSPF::NullIPv4AddressRange), areaID(OSPF::BackboneAreaID), transitAreaID(OSPF::BackboneAreaID), helloInterval(10), pollInterval(120), routerDeadInterval(40), interfaceTransmissionDelay(1), routerPriority(0), designatedRouter(OSPF::NullDesignatedRouterID), backupDesignatedRouter(OSPF::NullDesignatedRouterID), interfaceOutputCost(1), retransmissionInterval(5), acknowledgementDelay(1), authenticationType(OSPF::NullType), parentArea(NULL) { state = new OSPF::InterfaceStateDown; previousState = NULL; helloTimer = new OSPFTimer; helloTimer->setTimerKind(InterfaceHelloTimer); helloTimer->setContextPointer(this); helloTimer->setName("OSPF::Interface::InterfaceHelloTimer"); waitTimer = new OSPFTimer; waitTimer->setTimerKind(InterfaceWaitTimer); waitTimer->setContextPointer(this); waitTimer->setName("OSPF::Interface::InterfaceWaitTimer"); acknowledgementTimer = new OSPFTimer; acknowledgementTimer->setTimerKind(InterfaceAcknowledgementTimer); acknowledgementTimer->setContextPointer(this); acknowledgementTimer->setName("OSPF::Interface::InterfaceAcknowledgementTimer"); memset(authenticationKey.bytes, 0, 8 * sizeof(char)); }
OSPF::Interface::~Interface | ( | void | ) | [virtual] |
Definition at line 65 of file OSPFInterface.cc.
{ MessageHandler* messageHandler = parentArea->GetRouter()->GetMessageHandler(); messageHandler->ClearTimer(helloTimer); delete helloTimer; messageHandler->ClearTimer(waitTimer); delete waitTimer; messageHandler->ClearTimer(acknowledgementTimer); delete acknowledgementTimer; if (previousState != NULL) { delete previousState; } delete state; long neighborCount = neighboringRouters.size(); for (long i = 0; i < neighborCount; i++) { delete neighboringRouters[i]; } }
void OSPF::Interface::AddDelayedAcknowledgement | ( | OSPFLSAHeader & | lsaHeader | ) |
Definition at line 495 of file OSPFInterface.cc.
Referenced by OSPF::LinkStateUpdateHandler::AcknowledgeLSA().
{ if (interfaceType == OSPF::Interface::Broadcast) { if ((GetState() == OSPF::Interface::DesignatedRouterState) || (GetState() == OSPF::Interface::BackupState) || (designatedRouter == OSPF::NullDesignatedRouterID)) { delayedAcknowledgements[OSPF::AllSPFRouters].push_back(lsaHeader); } else { delayedAcknowledgements[OSPF::AllDRouters].push_back(lsaHeader); } } else { long neighborCount = neighboringRouters.size(); for (long i = 0; i < neighborCount; i++) { if (neighboringRouters[i]->GetState() >= OSPF::Neighbor::ExchangeState) { delayedAcknowledgements[neighboringRouters[i]->GetAddress()].push_back(lsaHeader); } } } }
void OSPF::Interface::AddNeighbor | ( | OSPF::Neighbor * | neighbor | ) |
Definition at line 216 of file OSPFInterface.cc.
Referenced by OSPFRouting::LoadInterfaceParameters(), OSPFRouting::LoadVirtualLink(), and OSPF::HelloHandler::ProcessPacket().
{ neighboringRoutersByID[neighbor->GetNeighborID()] = neighbor; neighboringRoutersByAddress[neighbor->GetAddress()] = neighbor; neighbor->SetInterface(this); neighboringRouters.push_back(neighbor); }
void OSPF::Interface::AgeTransmittedLSALists | ( | void | ) |
Definition at line 574 of file OSPFInterface.cc.
{ long neighborCount = neighboringRouters.size(); for (long i = 0; i < neighborCount; i++) { neighboringRouters[i]->AgeTransmittedLSAList(); } }
void OSPF::Interface::ChangeState | ( | OSPF::InterfaceState * | newState, | |
OSPF::InterfaceState * | currentState | |||
) | [private] |
Definition at line 95 of file OSPFInterface.cc.
Referenced by OSPF::InterfaceState::ChangeState().
{ if (previousState != NULL) { delete previousState; } state = newState; previousState = currentState; }
OSPFLinkStateUpdatePacket * OSPF::Interface::CreateUpdatePacket | ( | OSPFLSA * | lsa | ) |
Definition at line 408 of file OSPFInterface.cc.
Referenced by FloodLSA(), OSPF::LinkStateUpdateHandler::ProcessPacket(), and OSPF::LinkStateRequestHandler::ProcessPacket().
{ LSAType lsaType = static_cast<LSAType> (lsa->getHeader().getLsType()); OSPFRouterLSA* routerLSA = (lsaType == RouterLSAType) ? dynamic_cast<OSPFRouterLSA*> (lsa) : NULL; OSPFNetworkLSA* networkLSA = (lsaType == NetworkLSAType) ? dynamic_cast<OSPFNetworkLSA*> (lsa) : NULL; OSPFSummaryLSA* summaryLSA = ((lsaType == SummaryLSA_NetworksType) || (lsaType == SummaryLSA_ASBoundaryRoutersType)) ? dynamic_cast<OSPFSummaryLSA*> (lsa) : NULL; OSPFASExternalLSA* asExternalLSA = (lsaType == ASExternalLSAType) ? dynamic_cast<OSPFASExternalLSA*> (lsa) : NULL; if (((lsaType == RouterLSAType) && (routerLSA != NULL)) || ((lsaType == NetworkLSAType) && (networkLSA != NULL)) || (((lsaType == SummaryLSA_NetworksType) || (lsaType == SummaryLSA_ASBoundaryRoutersType)) && (summaryLSA != NULL)) || ((lsaType == ASExternalLSAType) && (asExternalLSA != NULL))) { OSPFLinkStateUpdatePacket* updatePacket = new OSPFLinkStateUpdatePacket; updatePacket->setType(LinkStateUpdatePacket); updatePacket->setRouterID(parentArea->GetRouter()->GetRouterID()); updatePacket->setAreaID(areaID); updatePacket->setAuthenticationType(authenticationType); for (int j = 0; j < 8; j++) { updatePacket->setAuthentication(j, authenticationKey.bytes[j]); } updatePacket->setNumberOfLSAs(1); switch (lsaType) { case RouterLSAType: { updatePacket->setRouterLSAsArraySize(1); updatePacket->setRouterLSAs(0, *routerLSA); unsigned short lsAge = updatePacket->getRouterLSAs(0).getHeader().getLsAge(); if (lsAge < MAX_AGE - interfaceTransmissionDelay) { updatePacket->getRouterLSAs(0).getHeader().setLsAge(lsAge + interfaceTransmissionDelay); } else { updatePacket->getRouterLSAs(0).getHeader().setLsAge(MAX_AGE); } } break; case NetworkLSAType: { updatePacket->setNetworkLSAsArraySize(1); updatePacket->setNetworkLSAs(0, *networkLSA); unsigned short lsAge = updatePacket->getNetworkLSAs(0).getHeader().getLsAge(); if (lsAge < MAX_AGE - interfaceTransmissionDelay) { updatePacket->getNetworkLSAs(0).getHeader().setLsAge(lsAge + interfaceTransmissionDelay); } else { updatePacket->getNetworkLSAs(0).getHeader().setLsAge(MAX_AGE); } } break; case SummaryLSA_NetworksType: case SummaryLSA_ASBoundaryRoutersType: { updatePacket->setSummaryLSAsArraySize(1); updatePacket->setSummaryLSAs(0, *summaryLSA); unsigned short lsAge = updatePacket->getSummaryLSAs(0).getHeader().getLsAge(); if (lsAge < MAX_AGE - interfaceTransmissionDelay) { updatePacket->getSummaryLSAs(0).getHeader().setLsAge(lsAge + interfaceTransmissionDelay); } else { updatePacket->getSummaryLSAs(0).getHeader().setLsAge(MAX_AGE); } } break; case ASExternalLSAType: { updatePacket->setAsExternalLSAsArraySize(1); updatePacket->setAsExternalLSAs(0, *asExternalLSA); unsigned short lsAge = updatePacket->getAsExternalLSAs(0).getHeader().getLsAge(); if (lsAge < MAX_AGE - interfaceTransmissionDelay) { updatePacket->getAsExternalLSAs(0).getHeader().setLsAge(lsAge + interfaceTransmissionDelay); } else { updatePacket->getAsExternalLSAs(0).getHeader().setLsAge(MAX_AGE); } } break; default: break; } updatePacket->setPacketLength(0); // TODO: Calculate correct length updatePacket->setChecksum(0); // TODO: Calculate correct cheksum(16-bit one's complement of the entire packet) return updatePacket; } return NULL; }
bool OSPF::Interface::FloodLSA | ( | OSPFLSA * | lsa, | |
OSPF::Interface * | intf = NULL , |
|||
OSPF::Neighbor * | neighbor = NULL | |||
) |
Definition at line 278 of file OSPFInterface.cc.
{ bool floodedBackOut = false; if ( ( (lsa->getHeader().getLsType() == ASExternalLSAType) && (interfaceType != OSPF::Interface::Virtual) && (parentArea->GetExternalRoutingCapability()) ) || ( (lsa->getHeader().getLsType() != ASExternalLSAType) && ( ( (areaID != OSPF::BackboneAreaID) && (interfaceType != OSPF::Interface::Virtual) ) || (areaID == OSPF::BackboneAreaID) ) ) ) { long neighborCount = neighboringRouters.size(); bool lsaAddedToRetransmissionList = false; OSPF::LinkStateID linkStateID = lsa->getHeader().getLinkStateID(); OSPF::LSAKeyType lsaKey; lsaKey.linkStateID = linkStateID; lsaKey.advertisingRouter = lsa->getHeader().getAdvertisingRouter().getInt(); for (long i = 0; i < neighborCount; i++) { // (1) if (neighboringRouters[i]->GetState() < OSPF::Neighbor::ExchangeState) { // (1) (a) continue; } if (neighboringRouters[i]->GetState() < OSPF::Neighbor::FullState) { // (1) (b) OSPFLSAHeader* requestLSAHeader = neighboringRouters[i]->FindOnRequestList(lsaKey); if (requestLSAHeader != NULL) { // operator< and operator== on OSPFLSAHeaders determines which one is newer(less means older) if (lsa->getHeader() < (*requestLSAHeader)) { continue; } if (operator== (lsa->getHeader(), (*requestLSAHeader))) { neighboringRouters[i]->RemoveFromRequestList(lsaKey); continue; } neighboringRouters[i]->RemoveFromRequestList(lsaKey); } } if (neighbor == neighboringRouters[i]) { // (1) (c) continue; } neighboringRouters[i]->AddToRetransmissionList(lsa); // (1) (d) lsaAddedToRetransmissionList = true; } if (lsaAddedToRetransmissionList) { // (2) if ((intf != this) || ((neighbor != NULL) && (neighbor->GetNeighborID() != designatedRouter.routerID) && (neighbor->GetNeighborID() != backupDesignatedRouter.routerID))) // (3) { if ((intf != this) || (GetState() != OSPF::Interface::BackupState)) { // (4) OSPFLinkStateUpdatePacket* updatePacket = CreateUpdatePacket(lsa); // (5) if (updatePacket != NULL) { int ttl = (interfaceType == OSPF::Interface::Virtual) ? VIRTUAL_LINK_TTL : 1; OSPF::MessageHandler* messageHandler = parentArea->GetRouter()->GetMessageHandler(); if (interfaceType == OSPF::Interface::Broadcast) { if ((GetState() == OSPF::Interface::DesignatedRouterState) || (GetState() == OSPF::Interface::BackupState) || (designatedRouter == OSPF::NullDesignatedRouterID)) { messageHandler->SendPacket(updatePacket, OSPF::AllSPFRouters, ifIndex, ttl); for (long k = 0; k < neighborCount; k++) { neighboringRouters[k]->AddToTransmittedLSAList(lsaKey); if (!neighboringRouters[k]->IsUpdateRetransmissionTimerActive()) { neighboringRouters[k]->StartUpdateRetransmissionTimer(); } } } else { messageHandler->SendPacket(updatePacket, OSPF::AllDRouters, ifIndex, ttl); OSPF::Neighbor* dRouter = GetNeighborByID(designatedRouter.routerID); OSPF::Neighbor* backupDRouter = GetNeighborByID(backupDesignatedRouter.routerID); if (dRouter != NULL) { dRouter->AddToTransmittedLSAList(lsaKey); if (!dRouter->IsUpdateRetransmissionTimerActive()) { dRouter->StartUpdateRetransmissionTimer(); } } if (backupDRouter != NULL) { backupDRouter->AddToTransmittedLSAList(lsaKey); if (!backupDRouter->IsUpdateRetransmissionTimerActive()) { backupDRouter->StartUpdateRetransmissionTimer(); } } } } else { if (interfaceType == OSPF::Interface::PointToPoint) { messageHandler->SendPacket(updatePacket, OSPF::AllSPFRouters, ifIndex, ttl); if (neighborCount > 0) { neighboringRouters[0]->AddToTransmittedLSAList(lsaKey); if (!neighboringRouters[0]->IsUpdateRetransmissionTimerActive()) { neighboringRouters[0]->StartUpdateRetransmissionTimer(); } } } else { for (long m = 0; m < neighborCount; m++) { if (neighboringRouters[m]->GetState() >= OSPF::Neighbor::ExchangeState) { messageHandler->SendPacket(updatePacket, neighboringRouters[m]->GetAddress(), ifIndex, ttl); neighboringRouters[m]->AddToTransmittedLSAList(lsaKey); if (!neighboringRouters[m]->IsUpdateRetransmissionTimerActive()) { neighboringRouters[m]->StartUpdateRetransmissionTimer(); } } } } } if (intf == this) { floodedBackOut = true; } } } } } } return floodedBackOut; }
short OSPF::Interface::GetAcknowledgementDelay | ( | void | ) | const [inline] |
Definition at line 141 of file OSPFInterface.h.
Referenced by OSPF::InterfaceStateDown::ProcessEvent().
{ return acknowledgementDelay; }
OSPFTimer* OSPF::Interface::GetAcknowledgementTimer | ( | void | ) | [inline] |
Definition at line 159 of file OSPFInterface.h.
Referenced by OSPF::InterfaceStateDown::ProcessEvent().
{ return acknowledgementTimer; }
IPv4AddressRange OSPF::Interface::GetAddressRange | ( | void | ) | const [inline] |
Definition at line 155 of file OSPFInterface.h.
Referenced by OSPF::NeighborState::ChangeState(), OSPF::InterfaceState::ChangeState(), OSPF::Area::OriginateNetworkLSA(), OSPF::Area::OriginateRouterLSA(), and OSPF::HelloHandler::ProcessPacket().
{ return interfaceAddressRange; }
Area* OSPF::Interface::GetArea | ( | void | ) | [inline] |
Definition at line 167 of file OSPFInterface.h.
Referenced by OSPF::LinkStateUpdateHandler::AcknowledgeLSA(), OSPF::NeighborState::ChangeState(), OSPF::InterfaceState::ChangeState(), OSPF::Neighbor::ClearRequestRetransmissionTimer(), OSPF::Neighbor::ClearUpdateRetransmissionTimer(), OSPF::Neighbor::CreateDatabaseSummary(), OSPF::Neighbor::NeedAdjacency(), OSPF::DatabaseDescriptionHandler::ProcessDDPacket(), OSPF::NeighborStateTwoWay::ProcessEvent(), OSPF::NeighborStateLoading::ProcessEvent(), OSPF::NeighborStateInit::ProcessEvent(), OSPF::NeighborStateFull::ProcessEvent(), OSPF::NeighborStateExchangeStart::ProcessEvent(), OSPF::NeighborStateExchange::ProcessEvent(), OSPF::NeighborStateDown::ProcessEvent(), OSPF::NeighborStateAttempt::ProcessEvent(), OSPF::InterfaceStateWaiting::ProcessEvent(), OSPF::InterfaceStatePointToPoint::ProcessEvent(), OSPF::InterfaceStateNotDesignatedRouter::ProcessEvent(), OSPF::InterfaceStateDown::ProcessEvent(), OSPF::InterfaceStateDesignatedRouter::ProcessEvent(), OSPF::InterfaceStateBackup::ProcessEvent(), OSPF::LinkStateRequestHandler::ProcessPacket(), OSPF::HelloHandler::ProcessPacket(), OSPF::Neighbor::Reset(), OSPF::Neighbor::RetransmitDatabaseDescriptionPacket(), OSPF::Neighbor::RetransmitUpdatePacket(), OSPF::Neighbor::SendDatabaseDescriptionPacket(), OSPF::Neighbor::SendLinkStateRequestPacket(), OSPF::Neighbor::StartRequestRetransmissionTimer(), OSPF::Neighbor::StartUpdateRetransmissionTimer(), and OSPF::Neighbor::~Neighbor().
{ return parentArea; }
const Area* OSPF::Interface::GetArea | ( | void | ) | const [inline] |
Definition at line 168 of file OSPFInterface.h.
{ return parentArea; }
AreaID OSPF::Interface::GetAreaID | ( | void | ) | const [inline] |
Definition at line 131 of file OSPFInterface.h.
Referenced by OSPFRouting::LoadVirtualLink().
{ return areaID; }
AuthenticationKeyType OSPF::Interface::GetAuthenticationKey | ( | void | ) | const [inline] |
Definition at line 153 of file OSPFInterface.h.
Referenced by OSPF::LinkStateUpdateHandler::AcknowledgeLSA(), OSPF::Neighbor::RetransmitUpdatePacket(), OSPF::Neighbor::SendDatabaseDescriptionPacket(), and OSPF::Neighbor::SendLinkStateRequestPacket().
{ return authenticationKey; }
AuthenticationType OSPF::Interface::GetAuthenticationType | ( | void | ) | const [inline] |
Definition at line 151 of file OSPFInterface.h.
Referenced by OSPF::LinkStateUpdateHandler::AcknowledgeLSA(), OSPF::Neighbor::RetransmitUpdatePacket(), OSPF::Neighbor::SendDatabaseDescriptionPacket(), and OSPF::Neighbor::SendLinkStateRequestPacket().
{ return authenticationType; }
DesignatedRouterID OSPF::Interface::GetBackupDesignatedRouter | ( | void | ) | const [inline] |
Definition at line 161 of file OSPFInterface.h.
Referenced by OSPF::Neighbor::NeedAdjacency(), and OSPF::InterfaceStateNotDesignatedRouter::ProcessEvent().
{ return backupDesignatedRouter; }
DesignatedRouterID OSPF::Interface::GetDesignatedRouter | ( | void | ) | const [inline] |
Definition at line 160 of file OSPFInterface.h.
Referenced by OSPF::LinkStateUpdateHandler::AcknowledgeLSA(), OSPF::Neighbor::NeedAdjacency(), OSPF::Area::OriginateRouterLSA(), OSPF::InterfaceStateNotDesignatedRouter::ProcessEvent(), OSPF::LinkStateUpdateHandler::ProcessPacket(), and OSPF::LinkStateRequestHandler::ProcessPacket().
{ return designatedRouter; }
short OSPF::Interface::GetHelloInterval | ( | void | ) | const [inline] |
Definition at line 145 of file OSPFInterface.h.
Referenced by OSPF::InterfaceStateWaiting::ProcessEvent(), OSPF::InterfaceStatePointToPoint::ProcessEvent(), OSPF::InterfaceStateNotDesignatedRouter::ProcessEvent(), OSPF::InterfaceStateDesignatedRouter::ProcessEvent(), OSPF::InterfaceStateBackup::ProcessEvent(), and OSPF::HelloHandler::ProcessPacket().
{ return helloInterval; }
OSPFTimer* OSPF::Interface::GetHelloTimer | ( | void | ) | [inline] |
Definition at line 157 of file OSPFInterface.h.
Referenced by OSPF::InterfaceStateWaiting::ProcessEvent(), OSPF::InterfaceStatePointToPoint::ProcessEvent(), OSPF::InterfaceStateNotDesignatedRouter::ProcessEvent(), OSPF::InterfaceStateDown::ProcessEvent(), OSPF::InterfaceStateDesignatedRouter::ProcessEvent(), and OSPF::InterfaceStateBackup::ProcessEvent().
{ return helloTimer; }
unsigned char OSPF::Interface::GetIfIndex | ( | void | ) | const [inline] |
Definition at line 127 of file OSPFInterface.h.
Referenced by OSPF::LinkStateUpdateHandler::AcknowledgeLSA(), OSPF::Area::OriginateRouterLSA(), OSPF::MessageHandler::PrintEvent(), OSPF::LinkStateUpdateHandler::ProcessPacket(), OSPF::LinkStateRequestHandler::ProcessPacket(), OSPF::Neighbor::RetransmitDatabaseDescriptionPacket(), OSPF::Neighbor::RetransmitUpdatePacket(), OSPF::Neighbor::SendDatabaseDescriptionPacket(), and OSPF::Neighbor::SendLinkStateRequestPacket().
{ return ifIndex; }
unsigned short OSPF::Interface::GetMTU | ( | void | ) | const [inline] |
Definition at line 129 of file OSPFInterface.h.
Referenced by OSPF::DatabaseDescriptionHandler::ProcessPacket(), OSPF::Neighbor::SendDatabaseDescriptionPacket(), and OSPF::Neighbor::SendLinkStateRequestPacket().
{ return mtu; }
Neighbor* OSPF::Interface::GetNeighbor | ( | unsigned long | i | ) | [inline] |
Definition at line 163 of file OSPFInterface.h.
Referenced by OSPF::Area::OriginateNetworkLSA(), OSPF::Area::OriginateRouterLSA(), OSPF::InterfaceStateWaiting::ProcessEvent(), OSPF::InterfaceStatePointToPoint::ProcessEvent(), OSPF::InterfaceStateNotDesignatedRouter::ProcessEvent(), OSPF::InterfaceStateDown::ProcessEvent(), OSPF::InterfaceStateDesignatedRouter::ProcessEvent(), OSPF::InterfaceStateBackup::ProcessEvent(), and OSPF::HelloHandler::ProcessPacket().
{ return neighboringRouters[i]; }
const Neighbor* OSPF::Interface::GetNeighbor | ( | unsigned long | i | ) | const [inline] |
Definition at line 164 of file OSPFInterface.h.
{ return neighboringRouters[i]; }
OSPF::Neighbor * OSPF::Interface::GetNeighborByAddress | ( | OSPF::IPv4Address | address | ) |
Definition at line 205 of file OSPFInterface.cc.
Referenced by OSPF::Area::OriginateRouterLSA(), OSPF::MessageHandler::ProcessPacket(), and OSPF::HelloHandler::ProcessPacket().
{ std::map<OSPF::IPv4Address, OSPF::Neighbor*, OSPF::IPv4Address_Less>::iterator neighborIt = neighboringRoutersByAddress.find(address); if (neighborIt != neighboringRoutersByAddress.end()) { return (neighborIt->second); } else { return NULL; } }
OSPF::Neighbor * OSPF::Interface::GetNeighborByID | ( | OSPF::RouterID | neighborID | ) |
Definition at line 194 of file OSPFInterface.cc.
Referenced by OSPF::LinkStateUpdateHandler::AcknowledgeLSA(), FloodLSA(), OSPF::MessageHandler::ProcessPacket(), and OSPF::HelloHandler::ProcessPacket().
{ std::map<OSPF::RouterID, OSPF::Neighbor*>::iterator neighborIt = neighboringRoutersByID.find(neighborID); if (neighborIt != neighboringRoutersByID.end()) { return (neighborIt->second); } else { return NULL; } }
unsigned long OSPF::Interface::GetNeighborCount | ( | void | ) | const [inline] |
Definition at line 162 of file OSPFInterface.h.
Referenced by OSPF::Area::AgeDatabase(), OSPF::Area::OriginateNetworkLSA(), OSPF::Area::OriginateRouterLSA(), OSPF::InterfaceStateWaiting::ProcessEvent(), OSPF::InterfaceStatePointToPoint::ProcessEvent(), OSPF::InterfaceStateNotDesignatedRouter::ProcessEvent(), OSPF::InterfaceStateDown::ProcessEvent(), OSPF::InterfaceStateDesignatedRouter::ProcessEvent(), OSPF::InterfaceStateBackup::ProcessEvent(), and OSPF::HelloHandler::ProcessPacket().
{ return neighboringRouters.size(); }
Metric OSPF::Interface::GetOutputCost | ( | void | ) | const [inline] |
Definition at line 135 of file OSPFInterface.h.
Referenced by OSPF::Area::OriginateRouterLSA().
{ return interfaceOutputCost; }
short OSPF::Interface::GetPollInterval | ( | void | ) | const [inline] |
Definition at line 147 of file OSPFInterface.h.
Referenced by OSPF::NeighborStateTwoWay::ProcessEvent(), OSPF::NeighborStateLoading::ProcessEvent(), OSPF::NeighborStateInit::ProcessEvent(), OSPF::NeighborStateFull::ProcessEvent(), OSPF::NeighborStateExchangeStart::ProcessEvent(), OSPF::NeighborStateExchange::ProcessEvent(), OSPF::NeighborStateDown::ProcessEvent(), and OSPF::NeighborStateAttempt::ProcessEvent().
{ return pollInterval; }
short OSPF::Interface::GetRetransmissionInterval | ( | void | ) | const [inline] |
Definition at line 137 of file OSPFInterface.h.
Referenced by OSPF::NeighborStateTwoWay::ProcessEvent(), OSPF::NeighborStateLoading::ProcessEvent(), OSPF::NeighborStateInit::ProcessEvent(), OSPF::NeighborStateFull::ProcessEvent(), OSPF::NeighborStateExchangeStart::ProcessEvent(), OSPF::NeighborStateExchange::ProcessEvent(), OSPF::Neighbor::StartRequestRetransmissionTimer(), and OSPF::Neighbor::StartUpdateRetransmissionTimer().
{ return retransmissionInterval; }
short OSPF::Interface::GetRouterDeadInterval | ( | void | ) | const [inline] |
Definition at line 149 of file OSPFInterface.h.
Referenced by OSPF::InterfaceStateDown::ProcessEvent(), and OSPF::HelloHandler::ProcessPacket().
{ return routerDeadInterval; }
unsigned char OSPF::Interface::GetRouterPriority | ( | void | ) | const [inline] |
Definition at line 143 of file OSPFInterface.h.
Referenced by OSPF::InterfaceStateNotDesignatedRouter::ProcessEvent(), OSPF::InterfaceStateDown::ProcessEvent(), and OSPF::HelloHandler::ProcessPacket().
{ return routerPriority; }
OSPF::Interface::InterfaceStateType OSPF::Interface::GetState | ( | void | ) | const |
Definition at line 224 of file OSPFInterface.cc.
Referenced by OSPF::LinkStateUpdateHandler::AcknowledgeLSA(), AddDelayedAcknowledgement(), OSPF::Area::AgeDatabase(), OSPF::InterfaceState::CalculateDesignatedRouter(), OSPF::NeighborState::ChangeState(), FloodLSA(), OSPF::Area::OriginateRouterLSA(), OSPF::MessageHandler::PrintEvent(), OSPF::MessageHandler::ProcessPacket(), OSPF::LinkStateUpdateHandler::ProcessPacket(), OSPF::LinkStateRequestHandler::ProcessPacket(), OSPF::HelloHandler::ProcessPacket(), SendDelayedAcknowledgements(), and SendHelloPacket().
{ return state->GetState(); }
const char * OSPF::Interface::GetStateString | ( | InterfaceStateType | stateType | ) | [static] |
Definition at line 229 of file OSPFInterface.cc.
Referenced by OSPF::MessageHandler::PrintEvent().
{ switch (stateType) { case DownState: return "Down"; case LoopbackState: return "Loopback"; case WaitingState: return "Waiting"; case PointToPointState: return "PointToPoint"; case NotDesignatedRouterState: return "NotDesignatedRouter"; case BackupState: return "Backup"; case DesignatedRouterState: return "DesignatedRouter"; default: ASSERT(false); } return ""; }
AreaID OSPF::Interface::GetTransitAreaID | ( | void | ) | const [inline] |
Definition at line 133 of file OSPFInterface.h.
Referenced by OSPF::MessageHandler::ProcessPacket().
{ return transitAreaID; }
short OSPF::Interface::GetTransmissionDelay | ( | void | ) | const [inline] |
Definition at line 139 of file OSPFInterface.h.
Referenced by OSPF::Neighbor::RetransmitUpdatePacket().
{ return interfaceTransmissionDelay; }
OSPFInterfaceType OSPF::Interface::GetType | ( | void | ) | const [inline] |
Definition at line 125 of file OSPFInterface.h.
Referenced by OSPF::LinkStateUpdateHandler::AcknowledgeLSA(), OSPF::InterfaceState::ChangeState(), OSPF::Neighbor::CreateDatabaseSummary(), OSPF::Neighbor::NeedAdjacency(), OSPF::Area::OriginateRouterLSA(), OSPF::MessageHandler::PrintEvent(), OSPF::NeighborStateTwoWay::ProcessEvent(), OSPF::NeighborStateLoading::ProcessEvent(), OSPF::NeighborStateInit::ProcessEvent(), OSPF::NeighborStateFull::ProcessEvent(), OSPF::NeighborStateExchangeStart::ProcessEvent(), OSPF::NeighborStateExchange::ProcessEvent(), OSPF::NeighborStateDown::ProcessEvent(), OSPF::NeighborStateAttempt::ProcessEvent(), OSPF::InterfaceStateWaiting::ProcessEvent(), OSPF::InterfaceStatePointToPoint::ProcessEvent(), OSPF::InterfaceStateNotDesignatedRouter::ProcessEvent(), OSPF::InterfaceStateDown::ProcessEvent(), OSPF::InterfaceStateDesignatedRouter::ProcessEvent(), OSPF::InterfaceStateBackup::ProcessEvent(), OSPF::MessageHandler::ProcessPacket(), OSPF::LinkStateUpdateHandler::ProcessPacket(), OSPF::LinkStateRequestHandler::ProcessPacket(), OSPF::HelloHandler::ProcessPacket(), OSPF::Neighbor::RetransmitDatabaseDescriptionPacket(), OSPF::Neighbor::RetransmitUpdatePacket(), OSPF::Neighbor::SendDatabaseDescriptionPacket(), and OSPF::Neighbor::SendLinkStateRequestPacket().
{ return interfaceType; }
OSPFTimer* OSPF::Interface::GetWaitTimer | ( | void | ) | [inline] |
Definition at line 158 of file OSPFInterface.h.
Referenced by OSPF::InterfaceStateDown::ProcessEvent().
{ return waitTimer; }
bool OSPF::Interface::HasAnyNeighborInStates | ( | int | states | ) | const |
Definition at line 244 of file OSPFInterface.cc.
Referenced by OSPF::Area::AgeDatabase(), OSPF::Area::OriginateNetworkLSA(), and OSPF::Area::OriginateRouterLSA().
{ long neighborCount = neighboringRouters.size(); for (long i = 0; i < neighborCount; i++) { OSPF::Neighbor::NeighborStateType neighborState = neighboringRouters[i]->GetState(); if (neighborState & states) { return true; } } return false; }
bool OSPF::Interface::IsOnAnyRetransmissionList | ( | OSPF::LSAKeyType | lsaKey | ) | const |
Definition at line 264 of file OSPFInterface.cc.
{ long neighborCount = neighboringRouters.size(); for (long i = 0; i < neighborCount; i++) { if (neighboringRouters[i]->IsLSAOnRetransmissionList(lsaKey)) { return true; } } return false; }
void OSPF::Interface::ProcessEvent | ( | InterfaceEventType | event | ) |
Definition at line 104 of file OSPFInterface.cc.
Referenced by OSPF::MessageHandler::HandleTimer(), OSPFRouting::LoadInterfaceParameters(), and OSPF::HelloHandler::ProcessPacket().
{ state->ProcessEvent(this, event); }
void OSPF::Interface::RemoveFromAllRetransmissionLists | ( | OSPF::LSAKeyType | lsaKey | ) |
Definition at line 256 of file OSPFInterface.cc.
{ long neighborCount = neighboringRouters.size(); for (long i = 0; i < neighborCount; i++) { neighboringRouters[i]->RemoveFromRetransmissionList(lsaKey); } }
void OSPF::Interface::Reset | ( | void | ) |
Definition at line 109 of file OSPFInterface.cc.
Referenced by OSPF::InterfaceStateWaiting::ProcessEvent(), OSPF::InterfaceStatePointToPoint::ProcessEvent(), OSPF::InterfaceStateNotDesignatedRouter::ProcessEvent(), OSPF::InterfaceStateLoopback::ProcessEvent(), OSPF::InterfaceStateDown::ProcessEvent(), OSPF::InterfaceStateDesignatedRouter::ProcessEvent(), and OSPF::InterfaceStateBackup::ProcessEvent().
{ MessageHandler* messageHandler = parentArea->GetRouter()->GetMessageHandler(); messageHandler->ClearTimer(helloTimer); messageHandler->ClearTimer(waitTimer); messageHandler->ClearTimer(acknowledgementTimer); designatedRouter = NullDesignatedRouterID; backupDesignatedRouter = NullDesignatedRouterID; long neighborCount = neighboringRouters.size(); for (long i = 0; i < neighborCount; i++) { neighboringRouters[i]->ProcessEvent(OSPF::Neighbor::KillNeighbor); } }
void OSPF::Interface::SendDelayedAcknowledgements | ( | void | ) |
Definition at line 516 of file OSPFInterface.cc.
Referenced by OSPF::InterfaceStateWaiting::ProcessEvent(), OSPF::InterfaceStatePointToPoint::ProcessEvent(), OSPF::InterfaceStateNotDesignatedRouter::ProcessEvent(), OSPF::InterfaceStateDesignatedRouter::ProcessEvent(), and OSPF::InterfaceStateBackup::ProcessEvent().
{ OSPF::MessageHandler* messageHandler = parentArea->GetRouter()->GetMessageHandler(); long maxPacketSize = ((IPV4_HEADER_LENGTH + OSPF_HEADER_LENGTH + OSPF_LSA_HEADER_LENGTH) > mtu) ? IPV4_DATAGRAM_LENGTH : mtu; for (std::map<IPv4Address, std::list<OSPFLSAHeader>, OSPF::IPv4Address_Less>::iterator delayIt = delayedAcknowledgements.begin(); delayIt != delayedAcknowledgements.end(); delayIt++) { int ackCount = delayIt->second.size(); if (ackCount > 0) { while (!(delayIt->second.empty())) { OSPFLinkStateAcknowledgementPacket* ackPacket = new OSPFLinkStateAcknowledgementPacket; long packetSize = IPV4_HEADER_LENGTH + OSPF_HEADER_LENGTH; ackPacket->setType(LinkStateAcknowledgementPacket); ackPacket->setRouterID(parentArea->GetRouter()->GetRouterID()); ackPacket->setAreaID(areaID); ackPacket->setAuthenticationType(authenticationType); for (int i = 0; i < 8; i++) { ackPacket->setAuthentication(i, authenticationKey.bytes[i]); } while ((!(delayIt->second.empty())) && (packetSize <= (maxPacketSize - OSPF_LSA_HEADER_LENGTH))) { unsigned long headerCount = ackPacket->getLsaHeadersArraySize(); ackPacket->setLsaHeadersArraySize(headerCount + 1); ackPacket->setLsaHeaders(headerCount, *(delayIt->second.begin())); delayIt->second.pop_front(); packetSize += OSPF_LSA_HEADER_LENGTH; } ackPacket->setPacketLength(0); // TODO: Calculate correct length ackPacket->setChecksum(0); // TODO: Calculate correct cheksum(16-bit one's complement of the entire packet) int ttl = (interfaceType == OSPF::Interface::Virtual) ? VIRTUAL_LINK_TTL : 1; if (interfaceType == OSPF::Interface::Broadcast) { if ((GetState() == OSPF::Interface::DesignatedRouterState) || (GetState() == OSPF::Interface::BackupState) || (designatedRouter == OSPF::NullDesignatedRouterID)) { messageHandler->SendPacket(ackPacket, OSPF::AllSPFRouters, ifIndex, ttl); } else { messageHandler->SendPacket(ackPacket, OSPF::AllDRouters, ifIndex, ttl); } } else { if (interfaceType == OSPF::Interface::PointToPoint) { messageHandler->SendPacket(ackPacket, OSPF::AllSPFRouters, ifIndex, ttl); } else { messageHandler->SendPacket(ackPacket, delayIt->first, ifIndex, ttl); } } } } } messageHandler->StartTimer(acknowledgementTimer, acknowledgementDelay); }
void OSPF::Interface::SendHelloPacket | ( | OSPF::IPv4Address | destination, | |
short | ttl = 1 | |||
) |
Definition at line 123 of file OSPFInterface.cc.
Referenced by OSPF::NeighborStateDown::ProcessEvent(), OSPF::InterfaceStateWaiting::ProcessEvent(), OSPF::InterfaceStatePointToPoint::ProcessEvent(), OSPF::InterfaceStateNotDesignatedRouter::ProcessEvent(), OSPF::InterfaceStateDesignatedRouter::ProcessEvent(), OSPF::InterfaceStateBackup::ProcessEvent(), and OSPF::HelloHandler::ProcessPacket().
{ OSPFOptions options; OSPFHelloPacket* helloPacket = new OSPFHelloPacket; std::vector<OSPF::IPv4Address> neighbors; helloPacket->setRouterID(parentArea->GetRouter()->GetRouterID()); helloPacket->setAreaID(parentArea->GetAreaID()); helloPacket->setAuthenticationType(authenticationType); for (int i = 0; i < 8; i++) { helloPacket->setAuthentication(i, authenticationKey.bytes[i]); } if (((interfaceType == PointToPoint) && (interfaceAddressRange.address == OSPF::NullIPv4Address)) || (interfaceType == Virtual)) { helloPacket->setNetworkMask(ULongFromIPv4Address(OSPF::NullIPv4Address)); } else { helloPacket->setNetworkMask(ULongFromIPv4Address(interfaceAddressRange.mask)); } memset(&options, 0, sizeof(OSPFOptions)); options.E_ExternalRoutingCapability = parentArea->GetExternalRoutingCapability(); helloPacket->setOptions(options); helloPacket->setHelloInterval(helloInterval); helloPacket->setRouterPriority(routerPriority); helloPacket->setRouterDeadInterval(routerDeadInterval); helloPacket->setDesignatedRouter(ULongFromIPv4Address(designatedRouter.ipInterfaceAddress)); helloPacket->setBackupDesignatedRouter(ULongFromIPv4Address(backupDesignatedRouter.ipInterfaceAddress)); long neighborCount = neighboringRouters.size(); for (long j = 0; j < neighborCount; j++) { if (neighboringRouters[j]->GetState() >= OSPF::Neighbor::InitState) { neighbors.push_back(neighboringRouters[j]->GetAddress()); } } unsigned int initedNeighborCount = neighbors.size(); helloPacket->setNeighborArraySize(initedNeighborCount); for (unsigned int k = 0; k < initedNeighborCount; k++) { helloPacket->setNeighbor(k, ULongFromIPv4Address(neighbors[k])); } helloPacket->setPacketLength(0); // TODO: Calculate correct length helloPacket->setChecksum(0); // TODO: Calculate correct cheksum(16-bit one's complement of the entire packet) parentArea->GetRouter()->GetMessageHandler()->SendPacket(helloPacket, destination, ifIndex, ttl); }
void OSPF::Interface::SendLSAcknowledgement | ( | OSPFLSAHeader * | lsaHeader, | |
IPv4Address | destination | |||
) |
Definition at line 170 of file OSPFInterface.cc.
Referenced by OSPF::LinkStateUpdateHandler::ProcessPacket().
{ OSPFOptions options; OSPFLinkStateAcknowledgementPacket* lsAckPacket = new OSPFLinkStateAcknowledgementPacket; lsAckPacket->setType(LinkStateAcknowledgementPacket); lsAckPacket->setRouterID(parentArea->GetRouter()->GetRouterID()); lsAckPacket->setAreaID(parentArea->GetAreaID()); lsAckPacket->setAuthenticationType(authenticationType); for (int i = 0; i < 8; i++) { lsAckPacket->setAuthentication(i, authenticationKey.bytes[i]); } lsAckPacket->setLsaHeadersArraySize(1); lsAckPacket->setLsaHeaders(0, *lsaHeader); lsAckPacket->setPacketLength(0); // TODO: Calculate correct length lsAckPacket->setChecksum(0); // TODO: Calculate correct cheksum(16-bit one's complement of the entire packet) int ttl = (interfaceType == OSPF::Interface::Virtual) ? VIRTUAL_LINK_TTL : 1; parentArea->GetRouter()->GetMessageHandler()->SendPacket(lsAckPacket, destination, ifIndex, ttl); }
void OSPF::Interface::SetAcknowledgementDelay | ( | short | delay | ) | [inline] |
Definition at line 140 of file OSPFInterface.h.
{ acknowledgementDelay = delay; }
void OSPF::Interface::SetAddressRange | ( | IPv4AddressRange | range | ) | [inline] |
Definition at line 154 of file OSPFInterface.h.
{ interfaceAddressRange = range; }
void OSPF::Interface::SetArea | ( | Area * | area | ) | [inline] |
Definition at line 166 of file OSPFInterface.h.
Referenced by OSPF::Area::AddInterface().
{ parentArea = area; }
void OSPF::Interface::SetAreaID | ( | AreaID | areaId | ) | [inline] |
Definition at line 130 of file OSPFInterface.h.
Referenced by OSPFRouting::LoadInterfaceParameters().
{ areaID = areaId; }
void OSPF::Interface::SetAuthenticationKey | ( | AuthenticationKeyType | key | ) | [inline] |
Definition at line 152 of file OSPFInterface.h.
Referenced by OSPFRouting::LoadInterfaceParameters(), and OSPFRouting::LoadVirtualLink().
{ authenticationKey = key; }
void OSPF::Interface::SetAuthenticationType | ( | AuthenticationType | type | ) | [inline] |
Definition at line 150 of file OSPFInterface.h.
Referenced by OSPFRouting::LoadInterfaceParameters(), and OSPFRouting::LoadVirtualLink().
{ authenticationType = type; }
void OSPF::Interface::SetHelloInterval | ( | short | interval | ) | [inline] |
Definition at line 144 of file OSPFInterface.h.
Referenced by OSPFRouting::LoadInterfaceParameters(), and OSPFRouting::LoadVirtualLink().
{ helloInterval = interval; }
void OSPF::Interface::SetIfIndex | ( | unsigned char | index | ) |
Definition at line 84 of file OSPFInterface.cc.
Referenced by OSPFRouting::LoadInterfaceParameters().
{ ifIndex = index; if (interfaceType == OSPF::Interface::UnknownType) { InterfaceEntry* routingInterface = InterfaceTableAccess().get()->getInterfaceById(ifIndex); interfaceAddressRange.address = IPv4AddressFromAddressString(routingInterface->ipv4Data()->getIPAddress().str().c_str()); interfaceAddressRange.mask = IPv4AddressFromAddressString(routingInterface->ipv4Data()->getNetmask().str().c_str()); mtu = routingInterface->getMTU(); } }
void OSPF::Interface::SetMTU | ( | unsigned short | ifMTU | ) | [inline] |
Definition at line 128 of file OSPFInterface.h.
{ mtu = ifMTU; }
void OSPF::Interface::SetOutputCost | ( | Metric | cost | ) | [inline] |
Definition at line 134 of file OSPFInterface.h.
Referenced by OSPFRouting::LoadInterfaceParameters().
{ interfaceOutputCost = cost; }
void OSPF::Interface::SetPollInterval | ( | short | interval | ) | [inline] |
Definition at line 146 of file OSPFInterface.h.
Referenced by OSPFRouting::LoadInterfaceParameters().
{ pollInterval = interval; }
void OSPF::Interface::SetRetransmissionInterval | ( | short | interval | ) | [inline] |
Definition at line 136 of file OSPFInterface.h.
Referenced by OSPFRouting::LoadInterfaceParameters(), and OSPFRouting::LoadVirtualLink().
{ retransmissionInterval = interval; }
void OSPF::Interface::SetRouterDeadInterval | ( | short | interval | ) | [inline] |
Definition at line 148 of file OSPFInterface.h.
Referenced by OSPFRouting::LoadInterfaceParameters(), and OSPFRouting::LoadVirtualLink().
{ routerDeadInterval = interval; }
void OSPF::Interface::SetRouterPriority | ( | unsigned char | priority | ) | [inline] |
Definition at line 142 of file OSPFInterface.h.
Referenced by OSPFRouting::LoadInterfaceParameters().
{ routerPriority = priority; }
void OSPF::Interface::SetTransitAreaID | ( | AreaID | areaId | ) | [inline] |
Definition at line 132 of file OSPFInterface.h.
Referenced by OSPFRouting::LoadVirtualLink().
{ transitAreaID = areaId; }
void OSPF::Interface::SetTransmissionDelay | ( | short | delay | ) | [inline] |
Definition at line 138 of file OSPFInterface.h.
Referenced by OSPFRouting::LoadInterfaceParameters(), and OSPFRouting::LoadVirtualLink().
{ interfaceTransmissionDelay = delay; }
void OSPF::Interface::SetType | ( | OSPFInterfaceType | ifType | ) | [inline] |
Definition at line 124 of file OSPFInterface.h.
Referenced by OSPFRouting::LoadInterfaceParameters(), and OSPFRouting::LoadVirtualLink().
{ interfaceType = ifType; }
friend class InterfaceState [friend] |
Definition at line 98 of file OSPFInterface.h.
short OSPF::Interface::acknowledgementDelay [private] |
Definition at line 92 of file OSPFInterface.h.
Referenced by GetAcknowledgementDelay(), SendDelayedAcknowledgements(), and SetAcknowledgementDelay().
OSPFTimer* OSPF::Interface::acknowledgementTimer [private] |
Definition at line 83 of file OSPFInterface.h.
Referenced by GetAcknowledgementTimer(), Interface(), Reset(), SendDelayedAcknowledgements(), and ~Interface().
AreaID OSPF::Interface::areaID [private] |
Definition at line 74 of file OSPFInterface.h.
Referenced by CreateUpdatePacket(), FloodLSA(), GetAreaID(), SendDelayedAcknowledgements(), and SetAreaID().
Definition at line 94 of file OSPFInterface.h.
Referenced by CreateUpdatePacket(), GetAuthenticationKey(), Interface(), SendDelayedAcknowledgements(), SendHelloPacket(), SendLSAcknowledgement(), and SetAuthenticationKey().
Definition at line 93 of file OSPFInterface.h.
Referenced by CreateUpdatePacket(), GetAuthenticationType(), SendDelayedAcknowledgements(), SendHelloPacket(), SendLSAcknowledgement(), and SetAuthenticationType().
Definition at line 89 of file OSPFInterface.h.
Referenced by OSPF::InterfaceState::CalculateDesignatedRouter(), FloodLSA(), GetBackupDesignatedRouter(), Reset(), and SendHelloPacket().
std::map<IPv4Address, std::list<OSPFLSAHeader>, IPv4Address_Less> OSPF::Interface::delayedAcknowledgements [private] |
Definition at line 87 of file OSPFInterface.h.
Referenced by AddDelayedAcknowledgement(), and SendDelayedAcknowledgements().
Definition at line 88 of file OSPFInterface.h.
Referenced by AddDelayedAcknowledgement(), OSPF::InterfaceState::CalculateDesignatedRouter(), FloodLSA(), GetDesignatedRouter(), Reset(), SendDelayedAcknowledgements(), and SendHelloPacket().
short OSPF::Interface::helloInterval [private] |
Definition at line 76 of file OSPFInterface.h.
Referenced by GetHelloInterval(), SendHelloPacket(), and SetHelloInterval().
OSPFTimer* OSPF::Interface::helloTimer [private] |
Definition at line 81 of file OSPFInterface.h.
Referenced by GetHelloTimer(), Interface(), Reset(), and ~Interface().
unsigned char OSPF::Interface::ifIndex [private] |
Definition at line 71 of file OSPFInterface.h.
Referenced by FloodLSA(), GetIfIndex(), SendDelayedAcknowledgements(), SendHelloPacket(), SendLSAcknowledgement(), and SetIfIndex().
Definition at line 73 of file OSPFInterface.h.
Referenced by OSPF::InterfaceState::CalculateDesignatedRouter(), GetAddressRange(), SendHelloPacket(), SetAddressRange(), and SetIfIndex().
Metric OSPF::Interface::interfaceOutputCost [private] |
Definition at line 90 of file OSPFInterface.h.
Referenced by GetOutputCost(), and SetOutputCost().
short OSPF::Interface::interfaceTransmissionDelay [private] |
Definition at line 79 of file OSPFInterface.h.
Referenced by CreateUpdatePacket(), GetTransmissionDelay(), and SetTransmissionDelay().
Definition at line 68 of file OSPFInterface.h.
Referenced by AddDelayedAcknowledgement(), OSPF::InterfaceState::CalculateDesignatedRouter(), FloodLSA(), GetType(), SendDelayedAcknowledgements(), SendHelloPacket(), SendLSAcknowledgement(), SetIfIndex(), and SetType().
unsigned short OSPF::Interface::mtu [private] |
Definition at line 72 of file OSPFInterface.h.
Referenced by GetMTU(), SendDelayedAcknowledgements(), SetIfIndex(), and SetMTU().
std::vector<Neighbor*> OSPF::Interface::neighboringRouters [private] |
Definition at line 86 of file OSPFInterface.h.
Referenced by AddDelayedAcknowledgement(), AddNeighbor(), AgeTransmittedLSALists(), OSPF::InterfaceState::CalculateDesignatedRouter(), FloodLSA(), GetNeighbor(), GetNeighborCount(), HasAnyNeighborInStates(), IsOnAnyRetransmissionList(), RemoveFromAllRetransmissionLists(), Reset(), SendHelloPacket(), and ~Interface().
std::map<IPv4Address, Neighbor*, IPv4Address_Less> OSPF::Interface::neighboringRoutersByAddress [private] |
Definition at line 85 of file OSPFInterface.h.
Referenced by AddNeighbor(), and GetNeighborByAddress().
std::map<RouterID, Neighbor*> OSPF::Interface::neighboringRoutersByID [private] |
Definition at line 84 of file OSPFInterface.h.
Referenced by AddNeighbor(), and GetNeighborByID().
Area* OSPF::Interface::parentArea [private] |
Definition at line 96 of file OSPFInterface.h.
Referenced by OSPF::InterfaceState::CalculateDesignatedRouter(), CreateUpdatePacket(), FloodLSA(), GetArea(), Reset(), SendDelayedAcknowledgements(), SendHelloPacket(), SendLSAcknowledgement(), SetArea(), and ~Interface().
short OSPF::Interface::pollInterval [private] |
Definition at line 77 of file OSPFInterface.h.
Referenced by GetPollInterval(), and SetPollInterval().
InterfaceState* OSPF::Interface::previousState [private] |
Definition at line 70 of file OSPFInterface.h.
Referenced by ChangeState(), Interface(), and ~Interface().
short OSPF::Interface::retransmissionInterval [private] |
Definition at line 91 of file OSPFInterface.h.
Referenced by GetRetransmissionInterval(), and SetRetransmissionInterval().
short OSPF::Interface::routerDeadInterval [private] |
Definition at line 78 of file OSPFInterface.h.
Referenced by GetRouterDeadInterval(), SendHelloPacket(), and SetRouterDeadInterval().
unsigned char OSPF::Interface::routerPriority [private] |
Definition at line 80 of file OSPFInterface.h.
Referenced by OSPF::InterfaceState::CalculateDesignatedRouter(), GetRouterPriority(), SendHelloPacket(), and SetRouterPriority().
InterfaceState* OSPF::Interface::state [private] |
Definition at line 69 of file OSPFInterface.h.
Referenced by ChangeState(), GetState(), Interface(), ProcessEvent(), and ~Interface().
AreaID OSPF::Interface::transitAreaID [private] |
Definition at line 75 of file OSPFInterface.h.
Referenced by GetTransitAreaID(), and SetTransitAreaID().
OSPFTimer* OSPF::Interface::waitTimer [private] |
Definition at line 82 of file OSPFInterface.h.
Referenced by GetWaitTimer(), Interface(), Reset(), and ~Interface().