INET Framework for OMNeT++/OMNEST
inet::ospf Namespace Reference

Classes

class  Area
 
class  ASExternalLSA
 
struct  AuthenticationKeyType
 
class  DatabaseDescriptionHandler
 
struct  DesignatedRouterID
 
struct  ExternalTOSInfo
 Struct generated from inet/routing/ospfv2/OSPFPacket.msg:170 by nedtool. More...
 
class  HelloHandler
 
struct  HostRouteParameters
 
class  IMessageHandler
 
class  Interface
 
class  InterfaceState
 
class  InterfaceStateBackup
 
class  InterfaceStateDesignatedRouter
 
class  InterfaceStateDown
 
class  InterfaceStateLoopback
 
class  InterfaceStateNotDesignatedRouter
 
class  InterfaceStatePointToPoint
 
class  InterfaceStateWaiting
 
struct  IPv4AddressRange
 
class  Link
 Class generated from inet/routing/ospfv2/OSPFPacket.msg:129 by nedtool. More...
 
class  LinkStateAcknowledgementHandler
 
class  LinkStateRequestHandler
 
class  LinkStateUpdateHandler
 
struct  LSAKeyType
 
class  LSAKeyType_Less
 
class  LSAProcessingMarker
 
struct  LSARequest
 Struct generated from inet/routing/ospfv2/OSPFPacket.msg:225 by nedtool. More...
 
class  LSATrackingInfo
 
class  MessageHandler
 
class  Neighbor
 
class  NeighborState
 
class  NeighborStateAttempt
 
class  NeighborStateDown
 
class  NeighborStateExchange
 
class  NeighborStateExchangeStart
 
class  NeighborStateFull
 
class  NeighborStateInit
 
class  NeighborStateLoading
 
class  NeighborStateTwoWay
 
class  NetworkLSA
 
struct  NextHop
 
class  OSPFASExternalLSA
 Class generated from inet/routing/ospfv2/OSPFPacket.msg:194 by nedtool. More...
 
class  OSPFASExternalLSAContents
 Class generated from inet/routing/ospfv2/OSPFPacket.msg:181 by nedtool. More...
 
class  OSPFConfigReader
 Configuration reader for the OSPF module. More...
 
class  OSPFDatabaseDescriptionPacket
 Class generated from inet/routing/ospfv2/OSPFPacket.msg:216 by nedtool. More...
 
struct  OSPFDDOptions
 Struct generated from inet/routing/ospfv2/OSPFPacket.msg:201 by nedtool. More...
 
class  OSPFHelloPacket
 Class generated from inet/routing/ospfv2/OSPFPacket.msg:67 by nedtool. More...
 
class  OSPFLinkStateAcknowledgementPacket
 Class generated from inet/routing/ospfv2/OSPFPacket.msg:255 by nedtool. More...
 
class  OSPFLinkStateRequestPacket
 Class generated from inet/routing/ospfv2/OSPFPacket.msg:235 by nedtool. More...
 
class  OSPFLinkStateUpdatePacket
 Class generated from inet/routing/ospfv2/OSPFPacket.msg:243 by nedtool. More...
 
class  OSPFLSA
 Class generated from inet/routing/ospfv2/OSPFPacket.msg:110 by nedtool. More...
 
class  OSPFLSAHeader
 Class generated from inet/routing/ospfv2/OSPFPacket.msg:96 by nedtool. More...
 
class  OSPFNetworkLSA
 Class generated from inet/routing/ospfv2/OSPFPacket.msg:154 by nedtool. More...
 
struct  OSPFOptions
 Struct generated from inet/routing/ospfv2/OSPFPacket.msg:37 by nedtool. More...
 
class  OSPFPacket
 Class generated from inet/routing/ospfv2/OSPFPacket.msg:52 by nedtool. More...
 
class  OSPFRouterLSA
 Class generated from inet/routing/ospfv2/OSPFPacket.msg:142 by nedtool. More...
 
class  OSPFRouting
 Implements the OSPFv2 routing protocol. More...
 
class  OSPFSummaryLSA
 Class generated from inet/routing/ospfv2/OSPFPacket.msg:163 by nedtool. More...
 
class  Router
 All OSPF classes are in this namespace. More...
 
class  RouterLSA
 
class  RoutingInfo
 
class  RoutingTableEntry
 
class  SummaryLSA
 
struct  TOSData
 Struct generated from inet/routing/ospfv2/OSPFPacket.msg:123 by nedtool. More...
 

Typedefs

typedef unsigned long Metric
 
typedef IPv4Address RouterID
 
typedef IPv4Address AreaID
 
typedef IPv4Address LinkStateID
 

Enumerations

enum  OSPFPacketType {
  HELLO_PACKET = 1, DATABASE_DESCRIPTION_PACKET = 2, LINKSTATE_REQUEST_PACKET = 3, LINKSTATE_UPDATE_PACKET = 4,
  LINKSTATE_ACKNOWLEDGEMENT_PACKET = 5
}
 Enum generated from inet/routing/ospfv2/OSPFPacket.msg:27 by nedtool. More...
 
enum  LSAType {
  ROUTERLSA_TYPE = 1, NETWORKLSA_TYPE = 2, SUMMARYLSA_NETWORKS_TYPE = 3, SUMMARYLSA_ASBOUNDARYROUTERS_TYPE = 4,
  AS_EXTERNAL_LSA_TYPE = 5
}
 Enum generated from inet/routing/ospfv2/OSPFPacket.msg:84 by nedtool. More...
 
enum  LinkType { POINTTOPOINT_LINK = 1, TRANSIT_LINK = 2, STUB_LINK = 3, VIRTUAL_LINK = 4 }
 Enum generated from inet/routing/ospfv2/OSPFPacket.msg:115 by nedtool. More...
 
enum  OSPFTimerType {
  INTERFACE_HELLO_TIMER = 0, INTERFACE_WAIT_TIMER = 1, INTERFACE_ACKNOWLEDGEMENT_TIMER = 3, NEIGHBOR_INACTIVITY_TIMER = 4,
  NEIGHBOR_POLL_TIMER = 5, NEIGHBOR_DD_RETRANSMISSION_TIMER = 6, NEIGHBOR_UPDATE_RETRANSMISSION_TIMER = 7, NEIGHBOR_REQUEST_RETRANSMISSION_TIMER = 8,
  DATABASE_AGE_TIMER = 9
}
 
enum  AuthenticationType { NULL_TYPE = 0, SIMPLE_PASSWORD_TYPE = 1, CRYTOGRAPHIC_TYPE = 2 }
 

Functions

bool operator== (Neighbor::DDPacketID leftID, Neighbor::DDPacketID rightID)
 
bool operator!= (Neighbor::DDPacketID leftID, Neighbor::DDPacketID rightID)
 
void INET_API __doPacking (omnetpp::cCommBuffer *b, const OSPFOptions &a)
 
void INET_API __doUnpacking (omnetpp::cCommBuffer *b, OSPFOptions &a)
 
void doParsimPacking (omnetpp::cCommBuffer *b, const OSPFOptions &obj)
 
void doParsimUnpacking (omnetpp::cCommBuffer *b, OSPFOptions &obj)
 
void doParsimPacking (omnetpp::cCommBuffer *b, const OSPFPacket &obj)
 
void doParsimUnpacking (omnetpp::cCommBuffer *b, OSPFPacket &obj)
 
void doParsimPacking (omnetpp::cCommBuffer *b, const OSPFHelloPacket &obj)
 
void doParsimUnpacking (omnetpp::cCommBuffer *b, OSPFHelloPacket &obj)
 
void doParsimPacking (omnetpp::cCommBuffer *b, const OSPFLSAHeader &obj)
 
void doParsimUnpacking (omnetpp::cCommBuffer *b, OSPFLSAHeader &obj)
 
void doParsimPacking (omnetpp::cCommBuffer *b, const OSPFLSA &obj)
 
void doParsimUnpacking (omnetpp::cCommBuffer *b, OSPFLSA &obj)
 
void INET_API __doPacking (omnetpp::cCommBuffer *b, const TOSData &a)
 
void INET_API __doUnpacking (omnetpp::cCommBuffer *b, TOSData &a)
 
void doParsimPacking (omnetpp::cCommBuffer *b, const TOSData &obj)
 
void doParsimUnpacking (omnetpp::cCommBuffer *b, TOSData &obj)
 
void doParsimPacking (omnetpp::cCommBuffer *b, const Link &obj)
 
void doParsimUnpacking (omnetpp::cCommBuffer *b, Link &obj)
 
void doParsimPacking (omnetpp::cCommBuffer *b, const OSPFRouterLSA &obj)
 
void doParsimUnpacking (omnetpp::cCommBuffer *b, OSPFRouterLSA &obj)
 
void doParsimPacking (omnetpp::cCommBuffer *b, const OSPFNetworkLSA &obj)
 
void doParsimUnpacking (omnetpp::cCommBuffer *b, OSPFNetworkLSA &obj)
 
void doParsimPacking (omnetpp::cCommBuffer *b, const OSPFSummaryLSA &obj)
 
void doParsimUnpacking (omnetpp::cCommBuffer *b, OSPFSummaryLSA &obj)
 
void INET_API __doPacking (omnetpp::cCommBuffer *b, const ExternalTOSInfo &a)
 
void INET_API __doUnpacking (omnetpp::cCommBuffer *b, ExternalTOSInfo &a)
 
void doParsimPacking (omnetpp::cCommBuffer *b, const ExternalTOSInfo &obj)
 
void doParsimUnpacking (omnetpp::cCommBuffer *b, ExternalTOSInfo &obj)
 
void doParsimPacking (omnetpp::cCommBuffer *b, const OSPFASExternalLSAContents &obj)
 
void doParsimUnpacking (omnetpp::cCommBuffer *b, OSPFASExternalLSAContents &obj)
 
void doParsimPacking (omnetpp::cCommBuffer *b, const OSPFASExternalLSA &obj)
 
void doParsimUnpacking (omnetpp::cCommBuffer *b, OSPFASExternalLSA &obj)
 
void INET_API __doPacking (omnetpp::cCommBuffer *b, const OSPFDDOptions &a)
 
void INET_API __doUnpacking (omnetpp::cCommBuffer *b, OSPFDDOptions &a)
 
void doParsimPacking (omnetpp::cCommBuffer *b, const OSPFDDOptions &obj)
 
void doParsimUnpacking (omnetpp::cCommBuffer *b, OSPFDDOptions &obj)
 
void doParsimPacking (omnetpp::cCommBuffer *b, const OSPFDatabaseDescriptionPacket &obj)
 
void doParsimUnpacking (omnetpp::cCommBuffer *b, OSPFDatabaseDescriptionPacket &obj)
 
void INET_API __doPacking (omnetpp::cCommBuffer *b, const LSARequest &a)
 
void INET_API __doUnpacking (omnetpp::cCommBuffer *b, LSARequest &a)
 
void doParsimPacking (omnetpp::cCommBuffer *b, const LSARequest &obj)
 
void doParsimUnpacking (omnetpp::cCommBuffer *b, LSARequest &obj)
 
void doParsimPacking (omnetpp::cCommBuffer *b, const OSPFLinkStateRequestPacket &obj)
 
void doParsimUnpacking (omnetpp::cCommBuffer *b, OSPFLinkStateRequestPacket &obj)
 
void doParsimPacking (omnetpp::cCommBuffer *b, const OSPFLinkStateUpdatePacket &obj)
 
void doParsimUnpacking (omnetpp::cCommBuffer *b, OSPFLinkStateUpdatePacket &obj)
 
void doParsimPacking (omnetpp::cCommBuffer *b, const OSPFLinkStateAcknowledgementPacket &obj)
 
void doParsimUnpacking (omnetpp::cCommBuffer *b, OSPFLinkStateAcknowledgementPacket &obj)
 
 Define_Module (OSPFRouting)
 
bool operator< (const OSPFLSAHeader &leftLSA, const OSPFLSAHeader &rightLSA)
 Returns true if leftLSA is older than rightLSA. More...
 
bool operator== (const OSPFLSAHeader &leftLSA, const OSPFLSAHeader &rightLSA)
 Returns true if leftLSA is the same age as rightLSA. More...
 
bool operator== (const OSPFOptions &leftOptions, const OSPFOptions &rightOptions)
 
unsigned int calculateLSASize (const OSPFRouterLSA *routerLSA)
 
unsigned int calculateLSASize (const OSPFNetworkLSA *networkLSA)
 
unsigned int calculateLSASize (const OSPFSummaryLSA *summaryLSA)
 
unsigned int calculateLSASize (const OSPFASExternalLSA *asExternalLSA)
 
std::ostream & operator<< (std::ostream &ostr, const OSPFLSAHeader &lsaHeader)
 
std::ostream & operator<< (std::ostream &ostr, const OSPFNetworkLSA &lsa)
 
std::ostream & operator<< (std::ostream &ostr, const TOSData &tos)
 
std::ostream & operator<< (std::ostream &ostr, const Link &link)
 
std::ostream & operator<< (std::ostream &ostr, const OSPFRouterLSA &lsa)
 
std::ostream & operator<< (std::ostream &ostr, const OSPFSummaryLSA &lsa)
 
std::ostream & operator<< (std::ostream &ostr, const ExternalTOSInfo &tos)
 
std::ostream & operator<< (std::ostream &ostr, const OSPFASExternalLSA &lsa)
 
bool operator!= (const OSPFOptions &leftOptions, const OSPFOptions &rightOptions)
 
bool operator== (const NextHop &leftHop, const NextHop &rightHop)
 
bool operator!= (const NextHop &leftHop, const NextHop &rightHop)
 
std::ostream & operator<< (std::ostream &ostr, const OSPFLSA &lsa)
 
std::ostream & operator<< (std::ostream &ostr, Area &area)
 
const RouterID NULL_ROUTERID (0, 0, 0, 0)
 
const AreaID BACKBONE_AREAID (0, 0, 0, 0)
 
const LinkStateID NULL_LINKSTATEID (0, 0, 0, 0)
 
const IPv4Address NULL_IPV4ADDRESS (0, 0, 0, 0)
 
const IPv4AddressRange NULL_IPV4ADDRESSRANGE (IPv4Address(0, 0, 0, 0), IPv4Address(0, 0, 0, 0))
 
IPv4Address operator& (IPv4Address address, IPv4Address mask)
 
IPv4Address operator| (IPv4Address address, IPv4Address match)
 
bool isSameNetwork (IPv4Address address1, IPv4Address mask1, IPv4Address address2, IPv4Address mask2)
 
bool operator== (DesignatedRouterID leftID, DesignatedRouterID rightID)
 
bool operator!= (DesignatedRouterID leftID, DesignatedRouterID rightID)
 
IPv4Address ipv4AddressFromAddressString (const char *charForm)
 
IPv4Address ipv4NetmaskFromAddressString (const char *charForm)
 
char hexCharToByte (char hex)
 
char hexPairToByte (char upperHex, char lowerHex)
 
std::ostream & operator<< (std::ostream &out, const RoutingTableEntry &entry)
 

Variables

const DesignatedRouterID NULL_DESIGNATEDROUTERID
 

Typedef Documentation

typedef unsigned long inet::ospf::Metric

Enumeration Type Documentation

Enumerator
NULL_TYPE 
SIMPLE_PASSWORD_TYPE 
CRYTOGRAPHIC_TYPE 
66  {
67  NULL_TYPE = 0,
70 };
Definition: OSPFcommon.h:68
Definition: OSPFcommon.h:69
Definition: OSPFcommon.h:67

Enum generated from inet/routing/ospfv2/OSPFPacket.msg:115 by nedtool.

enum LinkType
{
POINTTOPOINT_LINK = 1;
TRANSIT_LINK = 2;
STUB_LINK = 3;
VIRTUAL_LINK = 4;
}
Enumerator
POINTTOPOINT_LINK 
TRANSIT_LINK 
STUB_LINK 
VIRTUAL_LINK 
375  {
376  POINTTOPOINT_LINK = 1,
377  TRANSIT_LINK = 2,
378  STUB_LINK = 3,
379  VIRTUAL_LINK = 4
380 };
Definition: OSPFPacket_m.h:379
Definition: OSPFPacket_m.h:378
Definition: OSPFPacket_m.h:377
Definition: OSPFPacket_m.h:376

Enum generated from inet/routing/ospfv2/OSPFPacket.msg:84 by nedtool.

enum LSAType
{
ROUTERLSA_TYPE = 1;
NETWORKLSA_TYPE = 2;
SUMMARYLSA_NETWORKS_TYPE = 3;
SUMMARYLSA_ASBOUNDARYROUTERS_TYPE = 4;
AS_EXTERNAL_LSA_TYPE = 5;
}
Enumerator
ROUTERLSA_TYPE 
NETWORKLSA_TYPE 
SUMMARYLSA_NETWORKS_TYPE 
SUMMARYLSA_ASBOUNDARYROUTERS_TYPE 
AS_EXTERNAL_LSA_TYPE 
244  {
245  ROUTERLSA_TYPE = 1,
246  NETWORKLSA_TYPE = 2,
250 };
Definition: OSPFPacket_m.h:246
Definition: OSPFPacket_m.h:245
Definition: OSPFPacket_m.h:249
Definition: OSPFPacket_m.h:247
Definition: OSPFPacket_m.h:248

Enum generated from inet/routing/ospfv2/OSPFPacket.msg:27 by nedtool.

enum OSPFPacketType
{
HELLO_PACKET = 1;
DATABASE_DESCRIPTION_PACKET = 2;
LINKSTATE_REQUEST_PACKET = 3;
LINKSTATE_UPDATE_PACKET = 4;
LINKSTATE_ACKNOWLEDGEMENT_PACKET = 5;
}
Enumerator
HELLO_PACKET 
DATABASE_DESCRIPTION_PACKET 
LINKSTATE_REQUEST_PACKET 
LINKSTATE_UPDATE_PACKET 
LINKSTATE_ACKNOWLEDGEMENT_PACKET 
52  {
53  HELLO_PACKET = 1,
58 };
Definition: OSPFPacket_m.h:54
Definition: OSPFPacket_m.h:55
Definition: OSPFPacket_m.h:53
Definition: OSPFPacket_m.h:56
Enumerator
INTERFACE_HELLO_TIMER 
INTERFACE_WAIT_TIMER 
INTERFACE_ACKNOWLEDGEMENT_TIMER 
NEIGHBOR_INACTIVITY_TIMER 
NEIGHBOR_POLL_TIMER 
NEIGHBOR_DD_RETRANSMISSION_TIMER 
NEIGHBOR_UPDATE_RETRANSMISSION_TIMER 
NEIGHBOR_REQUEST_RETRANSMISSION_TIMER 
DATABASE_AGE_TIMER 

Function Documentation

void INET_API inet::ospf::__doPacking ( omnetpp::cCommBuffer *  b,
const OSPFOptions a 
)

Referenced by doParsimPacking().

void INET_API inet::ospf::__doPacking ( omnetpp::cCommBuffer *  b,
const TOSData a 
)
void INET_API inet::ospf::__doPacking ( omnetpp::cCommBuffer *  b,
const ExternalTOSInfo a 
)
void INET_API inet::ospf::__doPacking ( omnetpp::cCommBuffer *  b,
const OSPFDDOptions a 
)
void INET_API inet::ospf::__doPacking ( omnetpp::cCommBuffer *  b,
const LSARequest a 
)
void INET_API inet::ospf::__doUnpacking ( omnetpp::cCommBuffer *  b,
OSPFOptions a 
)

Referenced by doParsimUnpacking().

void INET_API inet::ospf::__doUnpacking ( omnetpp::cCommBuffer *  b,
TOSData a 
)
void INET_API inet::ospf::__doUnpacking ( omnetpp::cCommBuffer *  b,
ExternalTOSInfo a 
)
void INET_API inet::ospf::__doUnpacking ( omnetpp::cCommBuffer *  b,
OSPFDDOptions a 
)
void INET_API inet::ospf::__doUnpacking ( omnetpp::cCommBuffer *  b,
LSARequest a 
)
unsigned int inet::ospf::calculateLSASize ( const OSPFRouterLSA routerLSA)

Referenced by inet::ospf::Interface::createUpdatePacket(), operator!=(), and inet::ospf::Neighbor::retransmitUpdatePacket().

78 {
79  unsigned int lsaLength = OSPF_LSA_HEADER_LENGTH + OSPF_ROUTERLSA_HEADER_LENGTH;
80  unsigned short linkCount = routerLSA->getLinksArraySize();
81 
82  for (unsigned short i = 0; i < linkCount; i++) {
83  const Link& link = routerLSA->getLinks(i);
84  lsaLength += OSPF_LINK_HEADER_LENGTH + (link.getTosDataArraySize() * OSPF_TOS_LENGTH);
85  }
86 
87  return lsaLength;
88 }
#define OSPF_ROUTERLSA_HEADER_LENGTH
Definition: OSPFcommon.h:53
#define OSPF_LINK_HEADER_LENGTH
Definition: OSPFcommon.h:54
#define OSPF_LSA_HEADER_LENGTH
Definition: OSPFcommon.h:49
#define OSPF_TOS_LENGTH
Definition: OSPFcommon.h:55
unsigned int inet::ospf::calculateLSASize ( const OSPFNetworkLSA networkLSA)
91 {
93  + (networkLSA->getAttachedRoutersArraySize() * OSPF_NETWORKLSA_ADDRESS_LENGTH);
94 }
#define OSPF_NETWORKLSA_MASK_LENGTH
Definition: OSPFcommon.h:56
#define OSPF_LSA_HEADER_LENGTH
Definition: OSPFcommon.h:49
#define OSPF_NETWORKLSA_ADDRESS_LENGTH
Definition: OSPFcommon.h:57
unsigned int inet::ospf::calculateLSASize ( const OSPFSummaryLSA summaryLSA)
97 {
99  + (summaryLSA->getTosDataArraySize() * OSPF_TOS_LENGTH);
100 }
#define OSPF_SUMMARYLSA_HEADER_LENGTH
Definition: OSPFcommon.h:58
#define OSPF_LSA_HEADER_LENGTH
Definition: OSPFcommon.h:49
#define OSPF_TOS_LENGTH
Definition: OSPFcommon.h:55
unsigned int inet::ospf::calculateLSASize ( const OSPFASExternalLSA asExternalLSA)
103 {
105  + (asExternalLSA->getContents().getExternalTOSInfoArraySize() * OSPF_ASEXTERNALLSA_TOS_INFO_LENGTH);
106 }
#define OSPF_ASEXTERNALLSA_TOS_INFO_LENGTH
Definition: OSPFcommon.h:60
#define OSPF_ASEXTERNALLSA_HEADER_LENGTH
Definition: OSPFcommon.h:59
#define OSPF_LSA_HEADER_LENGTH
Definition: OSPFcommon.h:49
inet::ospf::Define_Module ( OSPFRouting  )
void inet::ospf::doParsimPacking ( omnetpp::cCommBuffer *  b,
const OSPFOptions obj 
)
inline
80 { __doPacking(b, obj); }
void INET_API __doPacking(omnetpp::cCommBuffer *b, const LSARequest &a)
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimPacking ( omnetpp::cCommBuffer *  b,
const OSPFPacket obj 
)
inline
146 {obj.parsimPack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimPacking ( omnetpp::cCommBuffer *  b,
const OSPFHelloPacket obj 
)
inline
227 {obj.parsimPack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimPacking ( omnetpp::cCommBuffer *  b,
const OSPFLSAHeader obj 
)
inline
317 {obj.parsimPack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimPacking ( omnetpp::cCommBuffer *  b,
const OSPFLSA obj 
)
inline
359 {obj.parsimPack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimPacking ( omnetpp::cCommBuffer *  b,
const TOSData obj 
)
inline
396 { __doPacking(b, obj); }
void INET_API __doPacking(omnetpp::cCommBuffer *b, const LSARequest &a)
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimPacking ( omnetpp::cCommBuffer *  b,
const Link obj 
)
inline
459 {obj.parsimPack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimPacking ( omnetpp::cCommBuffer *  b,
const OSPFRouterLSA obj 
)
inline
520 {obj.parsimPack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimPacking ( omnetpp::cCommBuffer *  b,
const OSPFNetworkLSA obj 
)
inline
570 {obj.parsimPack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimPacking ( omnetpp::cCommBuffer *  b,
const OSPFSummaryLSA obj 
)
inline
624 {obj.parsimPack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimPacking ( omnetpp::cCommBuffer *  b,
const ExternalTOSInfo obj 
)
inline
643 { __doPacking(b, obj); }
void INET_API __doPacking(omnetpp::cCommBuffer *b, const LSARequest &a)
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimPacking ( omnetpp::cCommBuffer *  b,
const OSPFASExternalLSAContents obj 
)
inline
710 {obj.parsimPack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimPacking ( omnetpp::cCommBuffer *  b,
const OSPFASExternalLSA obj 
)
inline
752 {obj.parsimPack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimPacking ( omnetpp::cCommBuffer *  b,
const OSPFDDOptions obj 
)
inline
775 { __doPacking(b, obj); }
void INET_API __doPacking(omnetpp::cCommBuffer *b, const LSARequest &a)
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimPacking ( omnetpp::cCommBuffer *  b,
const OSPFDatabaseDescriptionPacket obj 
)
inline
838 {obj.parsimPack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimPacking ( omnetpp::cCommBuffer *  b,
const LSARequest obj 
)
inline
856 { __doPacking(b, obj); }
void INET_API __doPacking(omnetpp::cCommBuffer *b, const LSARequest &a)
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimPacking ( omnetpp::cCommBuffer *  b,
const OSPFLinkStateRequestPacket obj 
)
inline
901 {obj.parsimPack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimPacking ( omnetpp::cCommBuffer *  b,
const OSPFLinkStateUpdatePacket obj 
)
inline
974 {obj.parsimPack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimPacking ( omnetpp::cCommBuffer *  b,
const OSPFLinkStateAcknowledgementPacket obj 
)
inline
1019 {obj.parsimPack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimUnpacking ( omnetpp::cCommBuffer *  b,
OSPFOptions obj 
)
inline
81 { __doUnpacking(b, obj); }
void INET_API __doUnpacking(omnetpp::cCommBuffer *b, LSARequest &a)
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimUnpacking ( omnetpp::cCommBuffer *  b,
OSPFPacket obj 
)
inline
147 {obj.parsimUnpack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimUnpacking ( omnetpp::cCommBuffer *  b,
OSPFHelloPacket obj 
)
inline
228 {obj.parsimUnpack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimUnpacking ( omnetpp::cCommBuffer *  b,
OSPFLSAHeader obj 
)
inline
318 {obj.parsimUnpack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimUnpacking ( omnetpp::cCommBuffer *  b,
OSPFLSA obj 
)
inline
360 {obj.parsimUnpack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimUnpacking ( omnetpp::cCommBuffer *  b,
TOSData obj 
)
inline
397 { __doUnpacking(b, obj); }
void INET_API __doUnpacking(omnetpp::cCommBuffer *b, LSARequest &a)
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimUnpacking ( omnetpp::cCommBuffer *  b,
Link obj 
)
inline
460 {obj.parsimUnpack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimUnpacking ( omnetpp::cCommBuffer *  b,
OSPFRouterLSA obj 
)
inline
521 {obj.parsimUnpack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimUnpacking ( omnetpp::cCommBuffer *  b,
OSPFNetworkLSA obj 
)
inline
571 {obj.parsimUnpack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimUnpacking ( omnetpp::cCommBuffer *  b,
OSPFSummaryLSA obj 
)
inline
625 {obj.parsimUnpack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimUnpacking ( omnetpp::cCommBuffer *  b,
ExternalTOSInfo obj 
)
inline
644 { __doUnpacking(b, obj); }
void INET_API __doUnpacking(omnetpp::cCommBuffer *b, LSARequest &a)
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimUnpacking ( omnetpp::cCommBuffer *  b,
OSPFASExternalLSAContents obj 
)
inline
711 {obj.parsimUnpack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimUnpacking ( omnetpp::cCommBuffer *  b,
OSPFASExternalLSA obj 
)
inline
753 {obj.parsimUnpack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimUnpacking ( omnetpp::cCommBuffer *  b,
OSPFDDOptions obj 
)
inline
776 { __doUnpacking(b, obj); }
void INET_API __doUnpacking(omnetpp::cCommBuffer *b, LSARequest &a)
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimUnpacking ( omnetpp::cCommBuffer *  b,
OSPFDatabaseDescriptionPacket obj 
)
inline
839 {obj.parsimUnpack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimUnpacking ( omnetpp::cCommBuffer *  b,
LSARequest obj 
)
inline
857 { __doUnpacking(b, obj); }
void INET_API __doUnpacking(omnetpp::cCommBuffer *b, LSARequest &a)
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimUnpacking ( omnetpp::cCommBuffer *  b,
OSPFLinkStateRequestPacket obj 
)
inline
902 {obj.parsimUnpack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimUnpacking ( omnetpp::cCommBuffer *  b,
OSPFLinkStateUpdatePacket obj 
)
inline
975 {obj.parsimUnpack(b);}
value< double, units::m > b
Definition: Units.h:1054
void inet::ospf::doParsimUnpacking ( omnetpp::cCommBuffer *  b,
OSPFLinkStateAcknowledgementPacket obj 
)
inline
1020 {obj.parsimUnpack(b);}
value< double, units::m > b
Definition: Units.h:1054
char inet::ospf::hexCharToByte ( char  hex)
inline

Referenced by hexPairToByte().

216 {
217  switch (hex) {
218  case '0':
219  return 0;
220 
221  case '1':
222  return 1;
223 
224  case '2':
225  return 2;
226 
227  case '3':
228  return 3;
229 
230  case '4':
231  return 4;
232 
233  case '5':
234  return 5;
235 
236  case '6':
237  return 6;
238 
239  case '7':
240  return 7;
241 
242  case '8':
243  return 8;
244 
245  case '9':
246  return 9;
247 
248  case 'A':
249  return 10;
250 
251  case 'B':
252  return 11;
253 
254  case 'C':
255  return 12;
256 
257  case 'D':
258  return 13;
259 
260  case 'E':
261  return 14;
262 
263  case 'F':
264  return 15;
265 
266  case 'a':
267  return 10;
268 
269  case 'b':
270  return 11;
271 
272  case 'c':
273  return 12;
274 
275  case 'd':
276  return 13;
277 
278  case 'e':
279  return 14;
280 
281  case 'f':
282  return 15;
283 
284  default:
285  break;
286  }
287  ;
288  return 0;
289 }
char inet::ospf::hexPairToByte ( char  upperHex,
char  lowerHex 
)
inline

Referenced by inet::ospf::OSPFConfigReader::loadAuthenticationConfig().

292 {
293  return (hexCharToByte(upperHex) << 4) & (hexCharToByte(lowerHex));
294 }
char hexCharToByte(char hex)
Definition: OSPFcommon.h:215
IPv4Address inet::ospf::ipv4AddressFromAddressString ( const char *  charForm)
inline
IPv4Address inet::ospf::ipv4NetmaskFromAddressString ( const char *  charForm)
inline

Referenced by inet::ospf::OSPFConfigReader::loadAreaFromXML(), and inet::ospf::OSPFConfigReader::loadExternalRoute().

211 {
212  return L3AddressResolver().resolve(charForm, L3AddressResolver::ADDR_IPv4 | L3AddressResolver::ADDR_MASK).toIPv4();
213 }
bool inet::ospf::isSameNetwork ( IPv4Address  address1,
IPv4Address  mask1,
IPv4Address  address2,
IPv4Address  mask2 
)
inline

Referenced by inet::ospf::Area::calculateNextHops(), inet::ospf::Area::findSameOrWorseCostRoute(), and inet::ospf::Area::originateSummaryLSA().

183 {
184  return (mask1 == mask2) && ((address1 & mask1) == (address2 & mask2));
185 }
const LinkStateID inet::ospf::NULL_LINKSTATEID ( ,
,
,
 
)
const RouterID inet::ospf::NULL_ROUTERID ( ,
,
,
 
)
bool inet::ospf::operator!= ( const OSPFOptions leftOptions,
const OSPFOptions rightOptions 
)
inline
173 {
174  return !(leftOptions == rightOptions);
175 }
bool inet::ospf::operator!= ( const NextHop leftHop,
const NextHop rightHop 
)
inline
185 {
186  return !(leftHop == rightHop);
187 }
bool inet::ospf::operator!= ( DesignatedRouterID  leftID,
DesignatedRouterID  rightID 
)
inline
194 {
195  return !(leftID == rightID);
196 }
bool inet::ospf::operator!= ( Neighbor::DDPacketID  leftID,
Neighbor::DDPacketID  rightID 
)
inline
213 {
214  return !(leftID == rightID);
215 }
IPv4Address inet::ospf::operator& ( IPv4Address  address,
IPv4Address  mask 
)
inline
169 {
170  IPv4Address maskedAddress;
171  maskedAddress.set(address.getInt() & mask.getInt());
172  return maskedAddress;
173 }
bool inet::ospf::operator< ( const OSPFLSAHeader leftLSA,
const OSPFLSAHeader rightLSA 
)

Returns true if leftLSA is older than rightLSA.

Referenced by inet::ospf::ASExternalLSA::validateLSChecksum().

25 {
26  long leftSequenceNumber = leftLSA.getLsSequenceNumber();
27  long rightSequenceNumber = rightLSA.getLsSequenceNumber();
28 
29  if (leftSequenceNumber < rightSequenceNumber) {
30  return true;
31  }
32  if (leftSequenceNumber == rightSequenceNumber) {
33  unsigned short leftAge = leftLSA.getLsAge();
34  unsigned short rightAge = rightLSA.getLsAge();
35 
36  if ((leftAge != MAX_AGE) && (rightAge == MAX_AGE)) {
37  return true;
38  }
39  if ((leftAge == MAX_AGE) && (rightAge != MAX_AGE)) {
40  return false;
41  }
42  if ((abs(leftAge - rightAge) > MAX_AGE_DIFF) && (leftAge > rightAge)) {
43  return true;
44  }
45  }
46  return false;
47 }
#define MAX_AGE_DIFF
Definition: OSPFcommon.h:38
#define MAX_AGE
Definition: OSPFcommon.h:36
std::ostream & inet::ospf::operator<< ( std::ostream &  ostr,
const OSPFLSAHeader lsaHeader 
)

Referenced by inet::ospf::RoutingTableEntry::getNextHop(), operator!=(), and operator<<().

109 {
110  ostr << "LSAHeader: age=" << lsaHeader.getLsAge()
111  << ", type=";
112  switch (lsaHeader.getLsType()) {
113  case ROUTERLSA_TYPE:
114  ostr << "RouterLSA";
115  break;
116 
117  case NETWORKLSA_TYPE:
118  ostr << "NetworkLSA";
119  break;
120 
122  ostr << "SummaryLSA_Networks";
123  break;
124 
126  ostr << "SummaryLSA_ASBoundaryRouters";
127  break;
128 
130  ostr << "ASExternalLSA";
131  break;
132 
133  default:
134  ostr << "Unknown";
135  break;
136  }
137  ostr << ", LSID=" << lsaHeader.getLinkStateID().str(false)
138  << ", advertisingRouter=" << lsaHeader.getAdvertisingRouter().str(false)
139  << ", seqNumber=" << lsaHeader.getLsSequenceNumber()
140  << endl;
141  return ostr;
142 }
Definition: OSPFPacket_m.h:246
Definition: OSPFPacket_m.h:245
Definition: OSPFPacket_m.h:249
Definition: OSPFPacket_m.h:247
Definition: OSPFPacket_m.h:248
std::ostream & inet::ospf::operator<< ( std::ostream &  out,
const RoutingTableEntry entry 
)
127 {
128  out << "Destination: " << entry.getDestination() << "/" << entry.getNetmask() << " (";
129  if (entry.getDestinationType() == RoutingTableEntry::NETWORK_DESTINATION) {
130  out << "Network";
131  }
132  else {
133  if ((entry.getDestinationType() & RoutingTableEntry::AREA_BORDER_ROUTER_DESTINATION) != 0) {
134  out << "AreaBorderRouter";
135  }
136  if ((entry.getDestinationType() & RoutingTableEntry::AS_BOUNDARY_ROUTER_DESTINATION) != 0) {
137  if ((entry.getDestinationType() & RoutingTableEntry::AREA_BORDER_ROUTER_DESTINATION) != 0) {
138  out << "+";
139  }
140  out << "ASBoundaryRouter";
141  }
142  }
143  out << "), Area: "
144  << entry.getArea().str(false)
145  << ", PathType: ";
146  switch (entry.getPathType()) {
147  case RoutingTableEntry::INTRAAREA:
148  out << "IntraArea";
149  break;
150 
151  case RoutingTableEntry::INTERAREA:
152  out << "InterArea";
153  break;
154 
155  case RoutingTableEntry::TYPE1_EXTERNAL:
156  out << "Type1External";
157  break;
158 
159  case RoutingTableEntry::TYPE2_EXTERNAL:
160  out << "Type2External";
161  break;
162 
163  default:
164  out << "Unknown";
165  break;
166  }
167  out << ", iface: " << entry.getInterfaceName();
168  out << ", Cost: " << entry.getCost()
169  << ", Type2Cost: " << entry.getType2Cost()
170  << ", Origin: [" << entry.getLinkStateOrigin()->getHeader()
171  << "], NextHops: ";
172 
173  unsigned int hopCount = entry.getNextHopCount();
174  for (unsigned int i = 0; i < hopCount; i++) {
175  out << entry.getNextHop(i).hopAddress << " ";
176  }
177 
178  return out;
179 }
std::ostream & inet::ospf::operator<< ( std::ostream &  ostr,
const OSPFNetworkLSA lsa 
)
145 {
146  ostr << "Mask: " << lsa.getNetworkMask();
147  unsigned int cnt = lsa.getAttachedRoutersArraySize();
148  if (cnt) {
149  ostr << ", Attached routers:";
150  for (unsigned int i = 0; i < cnt; i++) {
151  ostr << " " << lsa.getAttachedRouters(i);
152  }
153  }
154  ostr << ", " << lsa.getHeader();
155  return ostr;
156 }
std::ostream& inet::ospf::operator<< ( std::ostream &  ostr,
Area area 
)
inline
151 {
152  ostr << area.detailedInfo();
153  return ostr;
154 }
std::ostream & inet::ospf::operator<< ( std::ostream &  ostr,
const TOSData tos 
)
159 {
160  ostr << "tos: " << (int)tos.tos
161  << "metric:";
162  for (int i = 0; i < 3; i++)
163  ostr << " " << (int)tos.tosMetric[i];
164  return ostr;
165 }
uint8_t tos
Definition: TCP_NSC.cc:83
std::ostream & inet::ospf::operator<< ( std::ostream &  ostr,
const Link link 
)
168 {
169  ostr << "ID: " << link.getLinkID().str(false)
170  << ", data: ";
171  unsigned long data = link.getLinkData();
172  if ((data & 0xFF000000) != 0)
173  ostr << IPv4Address(data).str(false);
174  else
175  ostr << data;
176  ostr << ", cost: " << link.getLinkCost();
177  unsigned int cnt = link.getTosDataArraySize();
178  if (cnt) {
179  ostr << ", tos: {";
180  for (unsigned int i = 0; i < cnt; i++) {
181  ostr << " " << link.getTosData(i);
182  }
183  ostr << "}";
184  }
185  return ostr;
186 }
std::ostream & inet::ospf::operator<< ( std::ostream &  ostr,
const OSPFRouterLSA lsa 
)
189 {
190  if (lsa.getV_VirtualLinkEndpoint())
191  ostr << "V, ";
192  if (lsa.getE_ASBoundaryRouter())
193  ostr << "E, ";
194  if (lsa.getB_AreaBorderRouter())
195  ostr << "B, ";
196  ostr << "numberOfLinks: " << lsa.getNumberOfLinks() << ", ";
197  unsigned int cnt = lsa.getLinksArraySize();
198  if (cnt) {
199  ostr << "Links: {";
200  for (unsigned int i = 0; i < cnt; i++) {
201  ostr << " {" << lsa.getLinks(i) << "}";
202  }
203  ostr << "}, ";
204  }
205  ostr << lsa.getHeader();
206  return ostr;
207 }
std::ostream& inet::ospf::operator<< ( std::ostream &  ostr,
const OSPFLSA lsa 
)
inline
195 { ostr << lsa.getHeader(); return ostr; }
std::ostream & inet::ospf::operator<< ( std::ostream &  ostr,
const OSPFSummaryLSA lsa 
)
210 {
211  ostr << "Mask: " << lsa.getNetworkMask()
212  << ", Cost: " << lsa.getRouteCost() << ", ";
213  unsigned int cnt = lsa.getTosDataArraySize();
214  if (cnt) {
215  ostr << ", tosData: {";
216  for (unsigned int i = 0; i < cnt; i++) {
217  ostr << " " << lsa.getTosData(i);
218  }
219  ostr << "}, ";
220  }
221  ostr << lsa.getHeader();
222  return ostr;
223 }
std::ostream & inet::ospf::operator<< ( std::ostream &  ostr,
const ExternalTOSInfo tos 
)
226 {
227  ostr << "TOSData: {" << tos.tosData
228  << "}, MetricType: " << tos.E_ExternalMetricType
229  << ", fwAddr: " << tos.forwardingAddress
230  << ", extRouteTag: " << tos.externalRouteTag;
231  return ostr;
232 }
uint8_t tos
Definition: TCP_NSC.cc:83
std::ostream & inet::ospf::operator<< ( std::ostream &  ostr,
const OSPFASExternalLSA lsa 
)
235 {
236  const OSPFASExternalLSAContents& contents = lsa.getContents();
237  ostr << "Mask: " << contents.getNetworkMask()
238  << ", Cost: " << contents.getRouteCost()
239  << ", MetricType: " << contents.getE_ExternalMetricType()
240  << ", Forward: " << contents.getForwardingAddress()
241  << ", ExtRouteTag: " << contents.getExternalRouteTag()
242  << ", ";
243  unsigned int cnt = contents.getExternalTOSInfoArraySize();
244  if (cnt) {
245  ostr << ", tosData: {";
246  for (unsigned int i = 0; i < cnt; i++) {
247  ostr << " " << contents.getExternalTOSInfo(i);
248  }
249  ostr << "}, ";
250  }
251  ostr << lsa.getHeader();
252  return ostr;
253 }
bool inet::ospf::operator== ( const OSPFLSAHeader leftLSA,
const OSPFLSAHeader rightLSA 
)

Returns true if leftLSA is the same age as rightLSA.

50 {
51  long leftSequenceNumber = leftLSA.getLsSequenceNumber();
52  long rightSequenceNumber = rightLSA.getLsSequenceNumber();
53  unsigned short leftAge = leftLSA.getLsAge();
54  unsigned short rightAge = rightLSA.getLsAge();
55 
56  if ((leftSequenceNumber == rightSequenceNumber) &&
57  (((leftAge == MAX_AGE) && (rightAge == MAX_AGE)) ||
58  (((leftAge != MAX_AGE) && (rightAge != MAX_AGE)) &&
59  (abs(leftAge - rightAge) <= MAX_AGE_DIFF))))
60  {
61  return true;
62  }
63  else {
64  return false;
65  }
66 }
#define MAX_AGE_DIFF
Definition: OSPFcommon.h:38
#define MAX_AGE
Definition: OSPFcommon.h:36
bool inet::ospf::operator== ( const OSPFOptions leftOptions,
const OSPFOptions rightOptions 
)
69 {
70  return (leftOptions.E_ExternalRoutingCapability == rightOptions.E_ExternalRoutingCapability) &&
71  (leftOptions.MC_MulticastForwarding == rightOptions.MC_MulticastForwarding) &&
72  (leftOptions.NP_Type7LSA == rightOptions.NP_Type7LSA) &&
73  (leftOptions.EA_ForwardExternalLSAs == rightOptions.EA_ForwardExternalLSAs) &&
74  (leftOptions.DC_DemandCircuits == rightOptions.DC_DemandCircuits);
75 }
bool inet::ospf::operator== ( const NextHop leftHop,
const NextHop rightHop 
)
inline
178 {
179  return (leftHop.ifIndex == rightHop.ifIndex) &&
180  (leftHop.hopAddress == rightHop.hopAddress) &&
181  (leftHop.advertisingRouter == rightHop.advertisingRouter);
182 }
bool inet::ospf::operator== ( DesignatedRouterID  leftID,
DesignatedRouterID  rightID 
)
inline
188 {
189  return leftID.routerID == rightID.routerID &&
190  leftID.ipInterfaceAddress == rightID.ipInterfaceAddress;
191 }
bool inet::ospf::operator== ( Neighbor::DDPacketID  leftID,
Neighbor::DDPacketID  rightID 
)
inline

Referenced by inet::ospf::IPv4AddressRange::operator!=(), inet::ospf::LinkStateUpdateHandler::processPacket(), inet::ospf::ASExternalLSA::validateLSChecksum(), and inet::ospf::RoutingTableEntry::~RoutingTableEntry().

204 {
205  return (leftID.ddOptions.I_Init == rightID.ddOptions.I_Init) &&
206  (leftID.ddOptions.M_More == rightID.ddOptions.M_More) &&
207  (leftID.ddOptions.MS_MasterSlave == rightID.ddOptions.MS_MasterSlave) &&
208  (leftID.options == rightID.options) &&
209  (leftID.sequenceNumber == rightID.sequenceNumber);
210 }
IPv4Address inet::ospf::operator| ( IPv4Address  address,
IPv4Address  match 
)
inline
176 {
177  IPv4Address matchAddress;
178  matchAddress.set(address.getInt() | match.getInt());
179  return matchAddress;
180 }

Variable Documentation