dtn::InterfaceTable Class Reference

Class for the in-memory interface table. More...

#include <InterfaceTable.h>

List of all members.

Public Member Functions

 InterfaceTable ()
 Constructor.
virtual ~InterfaceTable ()
 Destructor.
bool add (const std::string &name, ConvergenceLayer *cl, const char *proto, int argc, const char *argv[])
 Add a new interface to the table.
bool del (const std::string &name)
 Remove the specified interface.
void list (oasys::StringBuffer *buf)
 List the current interfaces.

Static Public Member Functions

static InterfaceTableinstance ()
 Singleton instance accessor.
static void init ()
 Boot time initializer that takes as a parameter the actual storage instance to use.

Protected Member Functions

bool find (const std::string &name, InterfaceList::iterator *iter)
 Internal method to find the location of the given interface in the list.

Protected Attributes

InterfaceList iflist_
 All interfaces are tabled in-memory in a flat list.

Static Protected Attributes

static InterfaceTableinstance_ = NULL

Detailed Description

Class for the in-memory interface table.

Definition at line 38 of file InterfaceTable.h.


Constructor & Destructor Documentation

dtn::InterfaceTable::InterfaceTable (  ) 

Constructor.

Definition at line 26 of file InterfaceTable.cc.

Referenced by init().

dtn::InterfaceTable::~InterfaceTable (  )  [virtual]

Destructor.

Definition at line 31 of file InterfaceTable.cc.


Member Function Documentation

bool dtn::InterfaceTable::add ( const std::string &  name,
ConvergenceLayer cl,
const char *  proto,
int  argc,
const char *  argv[] 
)

Add a new interface to the table.

Create and add a new interface to the table.

Returns true if the interface is successfully added, false if the interface specification is invalid (or it already exists).

Returns true if the interface is successfully added, false if the interface specification is invalid.

Definition at line 62 of file InterfaceTable.cc.

bool dtn::InterfaceTable::del ( const std::string &  name  ) 

Remove the specified interface.

Definition at line 92 of file InterfaceTable.cc.

bool dtn::InterfaceTable::find ( const std::string &  name,
InterfaceList::iterator *  iter 
) [protected]

Internal method to find the location of the given interface in the list.

Definition at line 41 of file InterfaceTable.cc.

static void dtn::InterfaceTable::init (  )  [inline, static]

Boot time initializer that takes as a parameter the actual storage instance to use.

Definition at line 54 of file InterfaceTable.h.

References instance_, and InterfaceTable().

static InterfaceTable* dtn::InterfaceTable::instance (  )  [inline, static]

Singleton instance accessor.

Definition at line 43 of file InterfaceTable.h.

References instance_.

void dtn::InterfaceTable::list ( oasys::StringBuffer *  buf  ) 

List the current interfaces.

Dumps the interface table into a string.

Definition at line 125 of file InterfaceTable.cc.


Member Data Documentation

All interfaces are tabled in-memory in a flat list.

It's non-obvious what else would be better since we need to do a prefix match on demux strings in matching_interfaces.

Definition at line 97 of file InterfaceTable.h.

InterfaceTable * dtn::InterfaceTable::instance_ = NULL [static, protected]

Definition at line 90 of file InterfaceTable.h.

Referenced by init(), and instance().


The documentation for this class was generated from the following files:
Generated on Sun Nov 21 11:41:03 2010 for DTN Reference Implementation by  doxygen 1.6.3