|
INET Framework for OMNeT++/OMNEST
|
#include <AnsaLSA.h>
Public Member Functions | |
| SummaryLSA (void) | |
| SummaryLSA (const OSPFSummaryLSA &lsa) | |
| SummaryLSA (const SummaryLSA &lsa) | |
| virtual | ~SummaryLSA (void) |
| bool | GetPurgeable (void) const |
| void | SetPurgeable (bool purge=true) |
| bool | ValidateLSChecksum () const |
| bool | Update (const OSPFSummaryLSA *lsa) |
| bool | DiffersFrom (const OSPFSummaryLSA *summaryLSA) const |
Protected Attributes | |
| bool | purgeable |
| AnsaOSPF::SummaryLSA::SummaryLSA | ( | void | ) | [inline] |
Definition at line 103 of file AnsaLSA.h.
: OSPFSummaryLSA(), RoutingInfo(), LSATrackingInfo(), purgeable(false) {}
| AnsaOSPF::SummaryLSA::SummaryLSA | ( | const OSPFSummaryLSA & | lsa | ) | [inline] |
Definition at line 104 of file AnsaLSA.h.
: OSPFSummaryLSA(lsa), RoutingInfo(), LSATrackingInfo(), purgeable(false) {}
| AnsaOSPF::SummaryLSA::SummaryLSA | ( | const SummaryLSA & | lsa | ) | [inline] |
Definition at line 105 of file AnsaLSA.h.
: OSPFSummaryLSA(lsa), RoutingInfo(lsa), LSATrackingInfo(lsa), purgeable(lsa.purgeable) {}
| virtual AnsaOSPF::SummaryLSA::~SummaryLSA | ( | void | ) | [inline, virtual] |
| bool AnsaOSPF::SummaryLSA::DiffersFrom | ( | const OSPFSummaryLSA * | summaryLSA | ) | const |
Definition at line 16 of file AnsaSummaryLSA.cc.
Referenced by Update().
{
const OSPFLSAHeader& lsaHeader = summaryLSA->getHeader();
bool differentHeader = ((header_var.getLsOptions() != lsaHeader.getLsOptions()) ||
((header_var.getLsAge() == MAX_AGE) && (lsaHeader.getLsAge() != MAX_AGE)) ||
((header_var.getLsAge() != MAX_AGE) && (lsaHeader.getLsAge() == MAX_AGE)) ||
(header_var.getLsaLength() != lsaHeader.getLsaLength()));
bool differentBody = false;
if (!differentHeader) {
differentBody = ((networkMask_var != summaryLSA->getNetworkMask()) ||
(routeCost_var != summaryLSA->getRouteCost()) ||
(tosData_arraysize != summaryLSA->getTosDataArraySize()));
if (!differentBody) {
unsigned int tosCount = tosData_arraysize;
for (unsigned int i = 0; i < tosCount; i++) {
if ((tosData_var[i].tos != summaryLSA->getTosData(i).tos) ||
(tosData_var[i].tosMetric[0] != summaryLSA->getTosData(i).tosMetric[0]) ||
(tosData_var[i].tosMetric[1] != summaryLSA->getTosData(i).tosMetric[1]) ||
(tosData_var[i].tosMetric[2] != summaryLSA->getTosData(i).tosMetric[2]))
{
differentBody = true;
break;
}
}
}
}
return (differentHeader || differentBody);
}
| bool AnsaOSPF::SummaryLSA::GetPurgeable | ( | void | ) | const [inline] |
| void AnsaOSPF::SummaryLSA::SetPurgeable | ( | bool | purge = true | ) | [inline] |
| bool AnsaOSPF::SummaryLSA::Update | ( | const OSPFSummaryLSA * | lsa | ) |
Definition at line 3 of file AnsaSummaryLSA.cc.
Referenced by AnsaOSPF::Area::AgeDatabase().
{
bool different = DiffersFrom(lsa);
(*this) = (*lsa);
ResetInstallTime();
if (different) {
ClearNextHops();
return true;
} else {
return false;
}
}
| bool AnsaOSPF::SummaryLSA::ValidateLSChecksum | ( | ) | const [inline] |
Definition at line 111 of file AnsaLSA.h.
Referenced by AnsaOSPF::Area::AgeDatabase().
{ return true; } // not implemented
bool AnsaOSPF::SummaryLSA::purgeable [protected] |
Definition at line 101 of file AnsaLSA.h.
Referenced by GetPurgeable(), and SetPurgeable().