INET Framework for OMNeT++/OMNEST
inet::bgp::RoutingTableEntry Class Reference

#include <BGPRoutingTableEntry.h>

Inheritance diagram for inet::bgp::RoutingTableEntry:
inet::IPv4Route inet::IRoute

Public Types

typedef unsigned char RoutingPathType
 
- Public Types inherited from inet::IPv4Route
enum  RouteAdminDist {
  dDirectlyConnected = 0, dStatic = 1, dEIGRPSummary = 5, dBGPExternal = 20,
  dEIGRPInternal = 90, dIGRP = 100, dOSPF = 110, dISIS = 115,
  dRIP = 120, dEGP = 140, dODR = 160, dEIGRPExternal = 170,
  dBGPInternal = 200, dDHCPlearned = 254, dUnknown = 255
}
 Cisco like administrative distances. More...
 
- Public Types inherited from inet::IRoute
enum  SourceType {
  MANUAL, IFACENETMASK, ROUTER_ADVERTISEMENT, OWN_ADV_PREFIX,
  ICMP_REDIRECT, RIP, OSPF, BGP,
  ZEBRA, MANET, MANET2, DYMO,
  AODV
}
 Specifies where the route comes from. More...
 
enum  ChangeCodes {
  F_DESTINATION, F_PREFIX_LENGTH, F_NEXTHOP, F_IFACE,
  F_SOURCE, F_TYPE, F_ADMINDIST, F_METRIC,
  F_EXPIRYTIME, F_LAST
}
 Field codes for NB_ROUTE_CHANGED notifications. More...
 

Public Member Functions

 RoutingTableEntry (void)
 
 RoutingTableEntry (const IPv4Route *entry)
 
virtual ~RoutingTableEntry (void)
 
void setPathType (RoutingPathType type)
 
RoutingPathType getPathType (void) const
 
void addAS (ASID newAS)
 
unsigned int getASCount (void) const
 
ASID getAS (unsigned int index) const
 
- Public Member Functions inherited from inet::IPv4Route
 IPv4Route ()
 
virtual ~IPv4Route ()
 
virtual std::string info () const override
 
virtual std::string detailedInfo () const override
 
bool operator== (const IPv4Route &route) const
 
bool operator!= (const IPv4Route &route) const
 
bool equals (const IPv4Route &route) const
 
virtual void setRoutingTable (IIPv4RoutingTable *rt)
 To be called by the routing table when this route is added or removed from it. More...
 
IIPv4RoutingTablegetRoutingTable () const
 
virtual bool isValid () const
 test validity of route entry, e.g. More...
 
virtual void setDestination (IPv4Address _dest)
 
virtual void setNetmask (IPv4Address _netmask)
 
virtual void setGateway (IPv4Address _gateway)
 
virtual void setInterface (InterfaceEntry *_interfacePtr) override
 
virtual void setSourceType (SourceType _source) override
 
virtual void setAdminDist (unsigned int _adminDist)
 
virtual void setMetric (int _metric) override
 
IPv4Address getDestination () const
 Destination address prefix to match. More...
 
IPv4Address getNetmask () const
 Represents length of prefix to match. More...
 
IPv4Address getGateway () const
 Next hop address. More...
 
InterfaceEntrygetInterface () const override
 Next hop interface. More...
 
const char * getInterfaceName () const
 Convenience method. More...
 
SourceType getSourceType () const override
 Source of route. More...
 
unsigned int getAdminDist () const
 Route source specific preference value. More...
 
int getMetric () const override
 "Cost" to reach the destination More...
 
void setSource (cObject *_source) override
 
cObject * getSource () const override
 Source of route. More...
 
cObject * getProtocolData () const override
 
void setProtocolData (cObject *protocolData) override
 
virtual IRoutingTablegetRoutingTableAsGeneric () const override
 The routing table in which this route is inserted, or nullptr. More...
 
virtual void setDestination (const L3Address &dest) override
 
virtual void setPrefixLength (int len) override
 
virtual void setNextHop (const L3Address &nextHop) override
 
virtual L3Address getDestinationAsGeneric () const override
 Destination address prefix to match. More...
 
virtual int getPrefixLength () const override
 Represents length of prefix to match. More...
 
virtual L3Address getNextHopAsGeneric () const override
 Next hop address. More...
 
- Public Member Functions inherited from inet::IRoute
virtual ~IRoute ()
 
virtual void setSourceType (SourceType type)=0
 

Private Attributes

RoutingPathType _pathType = INCOMPLETE
 
std::vector< ASID_ASList
 

Additional Inherited Members

- Static Public Member Functions inherited from inet::IRoute
static const char * sourceTypeName (SourceType sourceType)
 
- Protected Member Functions inherited from inet::IPv4Route
void changed (int fieldCode)
 

Member Typedef Documentation

Constructor & Destructor Documentation

inet::bgp::RoutingTableEntry::RoutingTableEntry ( void  )
inline
51 {
55 }
const unsigned char DEFAULT_COST
Definition: BGPCommon.h:42
virtual void setSourceType(SourceType _source) override
Definition: IPv4Route.h:100
managed by the given routing protocol
Definition: IRoute.h:47
virtual void setMetric(int _metric) override
Definition: IPv4Route.h:102
static const IPv4Address ALLONES_ADDRESS
255.255.255.255
Definition: IPv4Address.h:105
virtual void setNetmask(IPv4Address _netmask)
Definition: IPv4Route.h:97
inet::bgp::RoutingTableEntry::RoutingTableEntry ( const IPv4Route entry)
inline
58 {
59  setDestination(entry->getDestination());
60  setNetmask(entry->getNetmask());
61  setGateway(entry->getGateway());
62  setInterface(entry->getInterface());
65 }
const unsigned char DEFAULT_COST
Definition: BGPCommon.h:42
virtual void setSourceType(SourceType _source) override
Definition: IPv4Route.h:100
managed by the given routing protocol
Definition: IRoute.h:47
virtual void setInterface(InterfaceEntry *_interfacePtr) override
Definition: IPv4Route.h:99
virtual void setGateway(IPv4Address _gateway)
Definition: IPv4Route.h:98
virtual void setMetric(int _metric) override
Definition: IPv4Route.h:102
virtual void setDestination(IPv4Address _dest)
Definition: IPv4Route.h:96
virtual void setNetmask(IPv4Address _netmask)
Definition: IPv4Route.h:97
virtual inet::bgp::RoutingTableEntry::~RoutingTableEntry ( void  )
inlinevirtual
35 {}

Member Function Documentation

void inet::bgp::RoutingTableEntry::addAS ( ASID  newAS)
inline

Referenced by inet::bgp::BGPRouting::processMessage().

39 { _ASList.push_back(newAS); }
std::vector< ASID > _ASList
Definition: BGPRoutingTableEntry.h:47
ASID inet::bgp::RoutingTableEntry::getAS ( unsigned int  index) const
inline
unsigned int inet::bgp::RoutingTableEntry::getASCount ( void  ) const
inline
RoutingPathType inet::bgp::RoutingTableEntry::getPathType ( void  ) const
inline

Referenced by inet::bgp::operator<<(), and inet::bgp::BGPRouting::tieBreakingProcess().

38 { return _pathType; }
RoutingPathType _pathType
Definition: BGPRoutingTableEntry.h:46
void inet::bgp::RoutingTableEntry::setPathType ( RoutingPathType  type)
inline

Referenced by inet::bgp::BGPRouting::decisionProcess().

37 { _pathType = type; }
RoutingPathType _pathType
Definition: BGPRoutingTableEntry.h:46

Member Data Documentation

std::vector<ASID> inet::bgp::RoutingTableEntry::_ASList
private
RoutingPathType inet::bgp::RoutingTableEntry::_pathType = INCOMPLETE
private

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