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

LsRouting Class Reference

#include <ls.h>

Collaboration diagram for LsRouting:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LsRouting ()
 ~LsRouting ()
bool init (LsNode *nodePtr)
void computeRoutes ()
LsEqualPathslookup (int destId)
bool sendLinkStates (bool buffer=false)
void linkStateChanged ()
void sendBufferedMessages ()
bool receiveMessage (int senderId, u_int32_t msgId)

Static Public Attributes

int msgSizes [LS_MESSAGE_TYPES]

Private Types

typedef LsList< IdMsgPtrMessageBuffer

Private Member Functions

LsMessageCentermsgctr ()
LsPaths_computeRoutes ()
bool isUp (int neighborId)
bool receiveAck (int neighborId, LsMessage *msgPtr)
bool receiveLSA (int neighborId, LsMessage *msgPtr)
bool receiveTopo (int neighborId, LsMessage *msgPtr)
void sendTopo (int neighborId)
void regenAndSend (int exception, int origin, const LsLinkStateList &lsl)
bool sendAck (int nbrId, ls_message_type_t type, int originNodeIdAcked, u_int32_t originMsgIdAcked)
void resendMessage (int neighborId, u_int32_t msgId, ls_message_type_t type)
void bufferedSend (int peerId, const LsMessage *mp)

Private Attributes

LsNodemyNodePtr_
int myNodeId_
LsNodeIdListpeerIdListPtr_
LsLinkStateListlinkStateListPtr_
LsMessageCentermessageCenterPtr_
LsPathsroutingTablePtr_
LsTopoMap linkStateDatabase_
LsMessageHistory lsaHistory_
LsMessageHistory tpmHistory_
LsRetransmissionManager ackManager_
MessageBuffer messageBuffer_

Friends

class LsRetransmissionManager

Member Typedef Documentation

typedef LsList<IdMsgPtr> LsRouting::MessageBuffer [private]
 

Definition at line 595 of file ls.h.


Constructor & Destructor Documentation

LsRouting::LsRouting  )  [inline]
 

Definition at line 544 of file ls.h.

References ackManager_, linkStateDatabase_, linkStateListPtr_, LS_INVALID_NODE_ID, lsaHistory_, myNodeId_, myNodePtr_, peerIdListPtr_, and routingTablePtr_.

00544                     : myNodePtr_(NULL),  myNodeId_(LS_INVALID_NODE_ID), 
00545                 peerIdListPtr_(NULL), linkStateListPtr_(NULL),
00546                 routingTablePtr_(NULL),
00547                 linkStateDatabase_(), lsaHistory_(), ackManager_(*this) {}

LsRouting::~LsRouting  )  [inline]
 

Definition at line 548 of file ls.h.

References routingTablePtr_.

00548                      {
00549                 //delete pLinkStateDatabase;
00550                 if (routingTablePtr_ != NULL)
00551                         delete routingTablePtr_;
00552         }


Member Function Documentation

LsPaths* LsRouting::_computeRoutes  )  [private]
 

Referenced by computeRoutes().

void LsRouting::bufferedSend int  peerId,
const LsMessage mp
[inline, private]
 

Definition at line 624 of file ls.h.

References messageBuffer_.

00624                                                             {
00625                 messageBuffer_.push_back(IdMsgPtr(peerId, mp));
00626         }

void LsRouting::computeRoutes  )  [inline]
 

Definition at line 555 of file ls.h.

References _computeRoutes(), and routingTablePtr_.

Referenced by rtProtoLS::computeRoutes().

00555                              {
00556                 if (routingTablePtr_ != NULL)
00557                         delete routingTablePtr_;
00558                 routingTablePtr_ = _computeRoutes();
00559         }

Here is the call graph for this function:

bool LsRouting::init LsNode nodePtr  ) 
 

bool LsRouting::isUp int  neighborId  )  [private]
 

void LsRouting::linkStateChanged  ) 
 

LsEqualPaths* LsRouting::lookup int  destId  )  [inline]
 

Definition at line 560 of file ls.h.

References LsMap< int, LsEqualPaths >::findPtr(), and routingTablePtr_.

00560                                          {
00561                 return (routingTablePtr_ == NULL) ? 
00562                         (LsEqualPaths *)NULL : 
00563                         routingTablePtr_->findPtr(destId);
00564         }

Here is the call graph for this function:

LsMessageCenter& LsRouting::msgctr  )  [inline, private]
 

Definition at line 599 of file ls.h.

References LsMessageCenter::instance().

00599 { return LsMessageCenter::instance(); }

Here is the call graph for this function:

bool LsRouting::receiveAck int  neighborId,
LsMessage msgPtr
[inline, private]
 

Definition at line 603 of file ls.h.

References LsRetransmissionManager::ackIn(), and ackManager_.

00603                                                             {
00604                 ackManager_.ackIn(neighborId, *msgPtr);
00605                 return true;
00606         }

Here is the call graph for this function:

bool LsRouting::receiveLSA int  neighborId,
LsMessage msgPtr
[private]
 

bool LsRouting::receiveMessage int  senderId,
u_int32_t  msgId
 

bool LsRouting::receiveTopo int  neighborId,
LsMessage msgPtr
[private]
 

void LsRouting::regenAndSend int  exception,
int  origin,
const LsLinkStateList lsl
[private]
 

void LsRouting::resendMessage int  neighborId,
u_int32_t  msgId,
ls_message_type_t  type
[inline, private]
 

Definition at line 618 of file ls.h.

References msgSizes, myNodePtr_, and LsNode::sendMessage().

00619                                                     {
00620                 myNodePtr_->sendMessage(neighborId, msgId, msgSizes[type]);
00621         }

Here is the call graph for this function:

bool LsRouting::sendAck int  nbrId,
ls_message_type_t  type,
int  originNodeIdAcked,
u_int32_t  originMsgIdAcked
[private]
 

void LsRouting::sendBufferedMessages  ) 
 

Referenced by rtProtoLS::sendBufferedMessages().

bool LsRouting::sendLinkStates bool  buffer = false  ) 
 

Referenced by rtProtoLS::sendUpdates().

void LsRouting::sendTopo int  neighborId  )  [private]
 


Friends And Related Function Documentation

friend class LsRetransmissionManager [friend]
 

Definition at line 541 of file ls.h.


Member Data Documentation

LsRetransmissionManager LsRouting::ackManager_ [private]
 

Definition at line 586 of file ls.h.

Referenced by LsRouting(), and receiveAck().

LsTopoMap LsRouting::linkStateDatabase_ [private]
 

Definition at line 583 of file ls.h.

Referenced by LsRouting().

LsLinkStateList* LsRouting::linkStateListPtr_ [private]
 

Definition at line 580 of file ls.h.

Referenced by LsRouting().

LsMessageHistory LsRouting::lsaHistory_ [private]
 

Definition at line 584 of file ls.h.

Referenced by LsRouting().

MessageBuffer LsRouting::messageBuffer_ [private]
 

Definition at line 596 of file ls.h.

Referenced by bufferedSend().

LsMessageCenter* LsRouting::messageCenterPtr_ [private]
 

Definition at line 581 of file ls.h.

int LsRouting::msgSizes[ LS_MESSAGE_TYPES ] [static]
 

Definition at line 540 of file ls.h.

Referenced by resendMessage().

int LsRouting::myNodeId_ [private]
 

Definition at line 578 of file ls.h.

Referenced by LsRouting().

LsNode* LsRouting::myNodePtr_ [private]
 

Definition at line 577 of file ls.h.

Referenced by LsRouting(), and resendMessage().

LsNodeIdList* LsRouting::peerIdListPtr_ [private]
 

Definition at line 579 of file ls.h.

Referenced by LsRouting().

LsPaths* LsRouting::routingTablePtr_ [private]
 

Definition at line 582 of file ls.h.

Referenced by computeRoutes(), lookup(), LsRouting(), and ~LsRouting().

LsMessageHistory LsRouting::tpmHistory_ [private]
 

Definition at line 585 of file ls.h.


The documentation for this class was generated from the following file:
Generated on Tue Apr 20 12:57:00 2004 for NS2.26SourcesOriginal by doxygen 1.3.3