Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

TORANeighbor Class Reference

#include <tora_neighbor.h>

Collaboration diagram for TORANeighbor:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TORANeighbor (nsaddr_t id, Agent *a)
void update_link_status (Height *h)
void dump (void)

Private Member Functions

 LIST_ENTRY (TORANeighbor) link

Private Attributes

nsaddr_t index
Height height
LinkStatus lnk_stat
double time_act
toraAgentagent

Friends

class TORADest
class toraAgent

Constructor & Destructor Documentation

TORANeighbor::TORANeighbor nsaddr_t  id,
Agent a
 

Definition at line 54 of file tora_neighbor.cc.

References agent, Scheduler::clock(), index, Scheduler::instance(), LINK_UN, lnk_stat, and time_act.

00054                                                 : height(id)
00055 {
00056         index = id;  
00057         lnk_stat = LINK_UN;
00058         time_act = Scheduler::instance().clock();
00059 
00060         agent = (toraAgent*) a;
00061 }       

Here is the call graph for this function:


Member Function Documentation

void TORANeighbor::dump void   ) 
 

Definition at line 86 of file tora_neighbor.cc.

References Height::delta, height, Height::id, index, lnk_stat, Height::oid, Height::r, Height::tau, and time_act.

Referenced by TORADest::dump().

00087 {
00088         fprintf(stdout, "\t\tNEIG: %d, Link Status: %d, Time Active: %f\n",
00089                 index, lnk_stat, time_act);
00090         fprintf(stdout, "\t\t\ttau: %f, oid: %d, r: %d, delta: %d, id: %d\n",
00091                 height.tau, height.oid, height.r, height.delta, height.id);
00092 }

TORANeighbor::LIST_ENTRY TORANeighbor   )  [private]
 

void TORANeighbor::update_link_status Height h  ) 
 

Definition at line 65 of file tora_neighbor.cc.

References agent, Height::compare(), height, Height::isNull(), LINK_DN, LINK_UN, LINK_UP, and lnk_stat.

Referenced by TORADest::update_height(), and TORADest::update_height_nb().

00066 {
00067 #ifdef LOGGING
00068         int t = lnk_stat;
00069 #endif
00070         if(height.isNull())
00071                 lnk_stat = LINK_UN;
00072         else if(h->isNull())
00073                 lnk_stat = LINK_DN;
00074         else if(height.compare(h) > 0)
00075                 lnk_stat = LINK_DN;
00076         else if(height.compare(h) < 0)
00077                 lnk_stat = LINK_UP;
00078 #ifdef LOGGING
00079         if(t != lnk_stat) {
00080                 agent->log_nb_state_change(this);
00081         }
00082 #endif
00083 }

Here is the call graph for this function:


Friends And Related Function Documentation

friend class toraAgent [friend]
 

Definition at line 53 of file tora_neighbor.h.

friend class TORADest [friend]
 

Definition at line 52 of file tora_neighbor.h.


Member Data Documentation

toraAgent* TORANeighbor::agent [private]
 

Definition at line 72 of file tora_neighbor.h.

Referenced by TORANeighbor(), and update_link_status().

Height TORANeighbor::height [private]
 

Definition at line 68 of file tora_neighbor.h.

Referenced by dump(), toraAgent::log_route_table(), toraAgent::logToraNeighbor(), TORADest::nb_add(), TORADest::nb_check_same_ref(), TORADest::nb_find_max_height(), TORADest::nb_find_min_height(), TORADest::nb_find_min_nonnull_height(), TORADest::nb_find_next_hop(), toraAgent::recvCLR(), toraAgent::recvQRY(), toraAgent::recvUPD(), TORADest::update_height_nb(), and update_link_status().

nsaddr_t TORANeighbor::index [private]
 

Definition at line 61 of file tora_neighbor.h.

Referenced by dump(), TORADest::dump(), toraAgent::log_route_table(), toraAgent::logNextHopChange(), toraAgent::logToraNeighbor(), TORADest::nb_add(), TORADest::nb_del(), TORADest::nb_find(), toraAgent::recvCLR(), toraAgent::recvTORA(), toraAgent::recvUPD(), toraAgent::rt_resolve(), and TORANeighbor().

LinkStatus TORANeighbor::lnk_stat [private]
 

Definition at line 69 of file tora_neighbor.h.

Referenced by dump(), toraAgent::log_route_table(), toraAgent::logToraNeighbor(), TORADest::nb_add(), TORADest::nb_del(), TORADest::nb_find_next_hop(), toraAgent::recvCLR(), toraAgent::recvUPD(), TORANeighbor(), TORADest::update_height(), TORADest::update_height_nb(), and update_link_status().

double TORANeighbor::time_act [private]
 

Definition at line 70 of file tora_neighbor.h.

Referenced by dump(), toraAgent::log_route_table(), toraAgent::logToraNeighbor(), toraAgent::recvQRY(), and TORANeighbor().


The documentation for this class was generated from the following files:
Generated on Tue Apr 20 13:33:26 2004 for NS2.26SourcesOriginal by doxygen 1.3.3