Changeset 10572 for source/ariba/overlay/modules
- Timestamp:
- Jun 18, 2012, 1:40:59 PM (13 years ago)
- Location:
- source/ariba/overlay/modules
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/overlay/modules/OverlayInterface.h
r8606 r10572 145 145 */ 146 146 virtual const LinkID& getNextLinkId( const NodeID& id ) const = 0; 147 148 /** 149 * Returns the NodeID of the next hop a route message would take. 150 * 151 * @param id The destination node id 152 * @return The node id of the next hop 153 */ 154 virtual const NodeID& getNextNodeId( const NodeID& id ) const; 147 155 148 156 //--- functions from CommunicationListener that we _can_ use as overlay --- -
source/ariba/overlay/modules/chord/Chord.cpp
r7744 r10572 201 201 } 202 202 203 /// @see OverlayInterface.h 204 const NodeID& Chord::getNextNodeId( const NodeID& id ) const { 205 // get next hop 206 const route_item* item = table->get_next_hop(id); 207 208 // return unspecified if no next hop could be found 209 if (item == NULL) { 210 return NodeID::UNSPECIFIED; 211 } 212 213 return item->id; 214 } 215 203 216 OverlayInterface::NodeList Chord::getKnownNodes(bool deep) const { 204 217 OverlayInterface::NodeList nodelist; -
source/ariba/overlay/modules/chord/Chord.h
r6854 r10572 104 104 /// @see OverlayInterface.h 105 105 virtual const LinkID& getNextLinkId( const NodeID& id ) const; 106 107 /// @see OverlayInterface.h 108 virtual const NodeID& getNextNodeId( const NodeID& id ) const; 106 109 107 110 /// @see OverlayInterface.h -
source/ariba/overlay/modules/onehop/OneHop.cpp
r8620 r10572 122 122 } 123 123 124 /// @see OverlayInterface.h 125 const NodeID& OneHop::getNextNodeId( const NodeID& id ) const { 126 OverlayNodeMapping::const_iterator i = overlayNodes.find( id ); 127 128 // FIXME: in case the NodeID is not known we should return the nearest node 129 if (i == overlayNodes.end()) { 130 return NodeID::UNSPECIFIED; 131 } 132 133 return i->first; 134 } 135 124 136 void OneHop::createOverlay() { 125 137 // don't need to bootstrap against ourselfs. -
source/ariba/overlay/modules/onehop/OneHop.h
r6266 r10572 85 85 /// @see OverlayInterface.h 86 86 virtual const LinkID& getNextLinkId( const NodeID& id ) const; 87 88 /// @see OverlayInterface.h 89 virtual const NodeID& getNextNodeId( const NodeID& id ) const; 87 90 88 91 /// @see OverlayInterface.h
Note:
See TracChangeset
for help on using the changeset viewer.