dtn::DTLSRRouter Class Reference

The DTLSRRouter uses link state announcements to build a multigraph of routing edges. More...

#include <DTLSRRouter.h>

Inheritance diagram for dtn::DTLSRRouter:

dtn::TableBasedRouter dtn::BundleRouter dtn::BundleEventHandler

List of all members.

Classes

class  CostWeightFn
class  DelayWeightFn
struct  EdgeInfo
 Class used for per-edge state in the graph (the link). More...
class  EstimatedDelayWeightFn
struct  NodeInfo
 Class used for per-node state in the graph. More...
class  Reg
 Registration used to grab announcements. More...
struct  RouteInfo
 Class used for router-specific state in the routing table. More...
class  TransmitLSATimer

Public Member Functions

 DTLSRRouter ()
 Constructor.
void initialize ()
 Virtual from BundleRouter.
void get_routing_state (oasys::StringBuffer *buf)
 Virtual from BundleRouter.
bool can_delete_bundle (const BundleRef &bundle)
 Virtual from BundleRouter.
void delete_bundle (const BundleRef &bundle)
 Virtual from BundleRouter.
void handle_bundle_received (BundleReceivedEvent *e)
 Event handlers.
void handle_bundle_expired (BundleExpiredEvent *e)
 Event handlers.
void handle_contact_up (ContactUpEvent *e)
 Event handlers.
void handle_contact_down (ContactDownEvent *e)
 Event handlers.
void handle_link_created (LinkCreatedEvent *e)
 Event handlers.
void handle_link_deleted (LinkDeletedEvent *e)
 Event handlers.
void handle_registration_added (RegistrationAddedEvent *event)
 Event handlers.

Protected Attributes

const char * announce_tag_
 Service tag used for routing announcements.
EndpointID announce_eid_
 Endpoint id used for routing announcements.
RoutingGraph graph_
 Routing Graph info.
RoutingGraph::Node * local_node_
RoutingGraph::WeightFn * weight_fn_
BundleList current_lsas_
 Bundle lists used to hold onto the most recent LSA from all other nodes.
Regreg_
 The registration to receive lsa and eida announcements.
TransmitLSATimer periodic_lsa_timer_
 Timer to periodically rebroadcast LSAs.
TransmitLSATimer delayed_lsa_timer_
 Timer used for a deferred LSA transmission, waiting for the minimum interval.
oasys::Time last_lsa_transmit_
 Time of the last LSA transmission.
oasys::Time last_update_
 Time of the last update of local graph.
typedef MultiGraph< NodeInfo,
EdgeInfo
RoutingGraph
typedef DTLSR::LinkParams LinkParams
typedef DTLSR::LinkState LinkState
typedef DTLSR::LinkStateVec LinkStateVec
typedef DTLSR::LSA LSA
class oasys::InlineFormatter< EdgeInfo >
const DTLSRConfigconfig ()
 Helper functions.
void generate_link_state (LinkState *ls, RoutingGraph::Edge *e, const LinkRef &link)
 Helper functions.
bool update_current_lsa (RoutingGraph::Node *node, Bundle *bundle, u_int32_t seqno)
 Helper functions.
void schedule_lsa ()
 Helper functions.
void send_lsa ()
 Helper functions.
void handle_lsa (Bundle *bundle, LSA *lsa)
 Helper functions.
void handle_lsa_expired (Bundle *bundle)
 Helper functions.
void drop_all_links (const EndpointID &source)
 Helper functions.
void remove_edge (RoutingGraph::Edge *edge)
 Helper functions.
void adjust_uptime (RoutingGraph::Edge *edge)
 Helper functions.
bool time_to_age_routes ()
 Helper functions.
void invalidate_routes ()
 Helper functions.
void recompute_routes ()
 Helper functions.
static bool is_dynamic_route (RouteEntry *entry)
 Helper functions.


Detailed Description

The DTLSRRouter uses link state announcements to build a multigraph of routing edges.

It uses the RouteTable inherited from TableBasedRouter more as a FIB, installing an entry for the best next-hop(s) for all known endpoints.

Definition at line 37 of file DTLSRRouter.h.


Member Typedef Documentation

Definition at line 67 of file DTLSRRouter.h.

Definition at line 69 of file DTLSRRouter.h.

Definition at line 70 of file DTLSRRouter.h.

typedef DTLSR::LSA dtn::DTLSRRouter::LSA [protected]

Definition at line 71 of file DTLSRRouter.h.

Definition at line 62 of file DTLSRRouter.h.


Constructor & Destructor Documentation

dtn::DTLSRRouter::DTLSRRouter (  ) 


Member Function Documentation

void dtn::DTLSRRouter::adjust_uptime ( RoutingGraph::Edge *  edge  )  [protected]

Helper functions.

bool dtn::DTLSRRouter::can_delete_bundle ( const BundleRef bundle  )  [virtual]

Virtual from BundleRouter.

Reimplemented from dtn::TableBasedRouter.

Definition at line 238 of file DTLSRRouter.cc.

References dtn::TableBasedRouter::can_delete_bundle(), dtn::BundleList::contains(), and current_lsas_.

const DTLSRConfig* dtn::DTLSRRouter::config (  )  [inline, protected]

Helper functions.

Definition at line 139 of file DTLSRRouter.h.

Referenced by handle_contact_down(), handle_lsa(), initialize(), schedule_lsa(), send_lsa(), and time_to_age_routes().

void dtn::DTLSRRouter::delete_bundle ( const BundleRef bundle  )  [virtual]

Virtual from BundleRouter.

Reimplemented from dtn::TableBasedRouter.

Definition at line 254 of file DTLSRRouter.cc.

References dtn::BundleList::contains(), current_lsas_, and dtn::BundleList::erase().

void dtn::DTLSRRouter::drop_all_links ( const EndpointID source  )  [protected]

Helper functions.

void dtn::DTLSRRouter::generate_link_state ( LinkState ls,
RoutingGraph::Edge *  e,
const LinkRef link 
) [protected]

void dtn::DTLSRRouter::get_routing_state ( oasys::StringBuffer *  buf  )  [virtual]

Virtual from BundleRouter.

Reimplemented from dtn::TableBasedRouter.

Definition at line 226 of file DTLSRRouter.cc.

References graph_.

void dtn::DTLSRRouter::handle_bundle_expired ( BundleExpiredEvent e  )  [virtual]

void dtn::DTLSRRouter::handle_bundle_received ( BundleReceivedEvent e  )  [virtual]

Event handlers.

Reimplemented from dtn::TableBasedRouter.

Definition at line 280 of file DTLSRRouter.cc.

void dtn::DTLSRRouter::handle_contact_down ( ContactDownEvent e  )  [virtual]

void dtn::DTLSRRouter::handle_contact_up ( ContactUpEvent e  )  [virtual]

void dtn::DTLSRRouter::handle_link_created ( LinkCreatedEvent e  )  [virtual]

Event handlers.

Reimplemented from dtn::TableBasedRouter.

Definition at line 268 of file DTLSRRouter.cc.

References invalidate_routes(), and recompute_routes().

void dtn::DTLSRRouter::handle_link_deleted ( LinkDeletedEvent e  )  [virtual]

Event handlers.

Reimplemented from dtn::TableBasedRouter.

Definition at line 403 of file DTLSRRouter.cc.

References dtn::LinkDeletedEvent::link_, local_node_, and remove_edge().

void dtn::DTLSRRouter::handle_lsa ( Bundle bundle,
LSA lsa 
) [protected]

void dtn::DTLSRRouter::handle_lsa_expired ( Bundle bundle  )  [protected]

Helper functions.

Definition at line 823 of file DTLSRRouter.cc.

Referenced by handle_bundle_expired().

void dtn::DTLSRRouter::handle_registration_added ( RegistrationAddedEvent event  )  [virtual]

void dtn::DTLSRRouter::initialize (  )  [virtual]

void dtn::DTLSRRouter::invalidate_routes (  )  [protected]

Helper functions.

Definition at line 500 of file DTLSRRouter.cc.

References last_update_.

Referenced by handle_contact_down(), handle_contact_up(), and handle_link_created().

bool dtn::DTLSRRouter::is_dynamic_route ( RouteEntry entry  )  [static, protected]

Helper functions.

Definition at line 508 of file DTLSRRouter.cc.

References info, and dtn::RouteEntry::info().

Referenced by recompute_routes().

void dtn::DTLSRRouter::recompute_routes (  )  [protected, virtual]

void dtn::DTLSRRouter::remove_edge ( RoutingGraph::Edge *  edge  )  [protected]

Helper functions.

Definition at line 480 of file DTLSRRouter.cc.

References ASSERT, dtn::MultiGraph< _NodeInfo, _EdgeInfo >::del_edge(), graph_, and local_node_.

Referenced by handle_contact_down(), and handle_link_deleted().

void dtn::DTLSRRouter::schedule_lsa (  )  [protected]

void dtn::DTLSRRouter::send_lsa (  )  [protected]

bool dtn::DTLSRRouter::time_to_age_routes (  )  [protected]

Helper functions.

Definition at line 489 of file DTLSRRouter.cc.

References config(), and last_update_.

bool dtn::DTLSRRouter::update_current_lsa ( RoutingGraph::Node *  node,
Bundle bundle,
u_int32_t  seqno 
) [protected]


Friends And Related Function Documentation

friend class oasys::InlineFormatter< EdgeInfo > [friend]

Definition at line 64 of file DTLSRRouter.h.


Member Data Documentation

Endpoint id used for routing announcements.

Definition at line 165 of file DTLSRRouter.h.

const char* dtn::DTLSRRouter::announce_tag_ [protected]

Service tag used for routing announcements.

Definition at line 162 of file DTLSRRouter.h.

Referenced by initialize(), and send_lsa().

Bundle lists used to hold onto the most recent LSA from all other nodes.

XXX/demmer this would be better done using a retention constraint :)

Definition at line 177 of file DTLSRRouter.h.

Referenced by can_delete_bundle(), delete_bundle(), handle_bundle_expired(), and update_current_lsa().

Timer used for a deferred LSA transmission, waiting for the minimum interval.

Definition at line 187 of file DTLSRRouter.h.

Referenced by schedule_lsa().

oasys::Time dtn::DTLSRRouter::last_lsa_transmit_ [protected]

Time of the last LSA transmission.

Definition at line 190 of file DTLSRRouter.h.

Referenced by schedule_lsa(), and send_lsa().

oasys::Time dtn::DTLSRRouter::last_update_ [protected]

Time of the last update of local graph.

Definition at line 193 of file DTLSRRouter.h.

Referenced by invalidate_routes(), recompute_routes(), and time_to_age_routes().

RoutingGraph::Node* dtn::DTLSRRouter::local_node_ [protected]

Timer to periodically rebroadcast LSAs.

Definition at line 183 of file DTLSRRouter.h.

Referenced by initialize().

The registration to receive lsa and eida announcements.

Definition at line 180 of file DTLSRRouter.h.

Referenced by initialize().

RoutingGraph::WeightFn* dtn::DTLSRRouter::weight_fn_ [protected]

Definition at line 170 of file DTLSRRouter.h.

Referenced by initialize(), and recompute_routes().


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

Generated on Fri Jan 30 09:43:15 2009 for DTN Reference Implementation by  doxygen 1.5.8