Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

RoutingEntry Class Reference

#include <RoutingTable.h>

Inheritance diagram for RoutingEntry:

OSPF::RoutingTableEntry List of all members.

Detailed Description

Routing entry in RoutingTable.

See also:
RoutingTable


Public Types

enum  RouteType { DIRECT, REMOTE }
enum  RouteSource {
  MANUAL, IFACENETMASK, RIP, OSPF,
  BGP, ZEBRA
}

Public Member Functions

 RoutingEntry ()
virtual ~RoutingEntry ()
virtual std::string info () const
virtual std::string detailedInfo () const

Public Attributes

IPAddress host
 Destination.
IPAddress netmask
 Route mask.
IPAddress gateway
 Next hop.
opp_string interfaceName
 Interface name and pointer.
InterfaceEntryinterfacePtr
RouteType type
 Route type: Direct or Remote.
RouteSource source
int metric
 Metric ("cost" to reach the destination).

Private Member Functions

 RoutingEntry (const RoutingEntry &obj)
RoutingEntryoperator= (const RoutingEntry &obj)


Member Enumeration Documentation

enum RoutingEntry::RouteSource
 

Specifies where the route comes from

Enumeration values:
MANUAL  manually added static route
IFACENETMASK  comes from an interface's netmask
RIP  managed by the given routing protocol
OSPF  managed by the given routing protocol
BGP  managed by the given routing protocol
ZEBRA  managed by the Quagga/Zebra based model
00061     {
00062         MANUAL,       
00063         IFACENETMASK, 
00064         RIP,          
00065         OSPF,         
00066         BGP,          
00067         ZEBRA,        
00068     };

enum RoutingEntry::RouteType
 

Route type

Enumeration values:
DIRECT  Directly attached to the router.
REMOTE  Reached through another router.
00054     {
00055         DIRECT,  
00056         REMOTE   
00057     };


Constructor & Destructor Documentation

RoutingEntry::RoutingEntry const RoutingEntry obj  )  [private]
 

RoutingEntry::RoutingEntry  ) 
 

00039 {
00040     interfacePtr = NULL;
00041 
00042     metric = 0;
00043     type = DIRECT;
00044     source = MANUAL;
00045 }

virtual RoutingEntry::~RoutingEntry  )  [inline, virtual]
 

00100 {}


Member Function Documentation

std::string RoutingEntry::detailedInfo  )  const [virtual]
 

00070 {
00071     return std::string();
00072 }

std::string RoutingEntry::info  )  const [virtual]
 

00048 {
00049     std::stringstream out;
00050     out << "dest:"; if (host.isUnspecified()) out << "*  "; else out << host << "  ";
00051     out << "gw:"; if (gateway.isUnspecified()) out << "*  "; else out << gateway << "  ";
00052     out << "mask:"; if (netmask.isUnspecified()) out << "*  "; else out << netmask << "  ";
00053     out << "metric:" << metric << " ";
00054     out << "if:"; if (interfaceName.empty()) out << "*  "; else out << interfaceName.c_str() << "  ";
00055     out << (type==DIRECT ? "DIRECT" : "REMOTE");
00056     switch (source)
00057     {
00058         case MANUAL:       out << " MANUAL"; break;
00059         case IFACENETMASK: out << " IFACENETMASK"; break;
00060         case RIP:          out << " RIP"; break;
00061         case OSPF:         out << " OSPF"; break;
00062         case BGP:          out << " BGP"; break;
00063         case ZEBRA:        out << " ZEBRA"; break;
00064         default:           out << " ???"; break;
00065     }
00066     return out.str();
00067 }

RoutingEntry& RoutingEntry::operator= const RoutingEntry obj  )  [private]
 


Member Data Documentation

IPAddress RoutingEntry::gateway
 

Next hop.

IPAddress RoutingEntry::host
 

Destination.

opp_string RoutingEntry::interfaceName
 

Interface name and pointer.

InterfaceEntry* RoutingEntry::interfacePtr
 

int RoutingEntry::metric
 

Metric ("cost" to reach the destination).

IPAddress RoutingEntry::netmask
 

Route mask.

RouteSource RoutingEntry::source
 

Source of route, MANUAL by reading a file, routing protocol name otherwise

RouteType RoutingEntry::type
 

Route type: Direct or Remote.


The documentation for this class was generated from the following files:
Generated on Sat Apr 1 20:52:23 2006 for INET Framework for OMNeT++/OMNEST by  doxygen 1.4.1