Changeset 3690 for source/ariba/overlay/modules/onehop/OneHop.cpp
- Timestamp:
- May 26, 2009, 1:40:23 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/overlay/modules/onehop/OneHop.cpp
r3067 r3690 1 // [Licen ce]1 // [License] 2 2 // The Ariba-Underlay Copyright 3 3 // … … 35 35 // official policies, either expressed or implied, of the Institute of 36 36 // Telematics. 37 // [Licen ce]37 // [License] 38 38 39 39 #include "OneHop.h" 40 40 #include "ariba/overlay/BaseOverlay.h" 41 42 #include "ariba/overlay/modules/onehop/messages/OneHopMessage.h" 43 #include "ariba/overlay/modules/onehop/messages/NodeListingRequest.h" 44 #include "ariba/overlay/modules/onehop/messages/NodeListingReply.h" 41 45 42 46 namespace ariba { … … 84 88 return; 85 89 } 86 87 baseoverlay.sendMessage( msg, i->second ); 88 } 89 90 void OneHop::createOverlay(){ 91 90 OneHopMessage onehopRoute( OneHopMessage::OneHopMessageTypeRoute ); 91 onehopRoute.encapsulate(msg); 92 93 baseoverlay.sendMessage( &onehopRoute, i->second ); 94 } 95 96 void OneHop::createOverlay() { 92 97 // don't need to bootstrap against ourselfs. 93 98 // the create and join process is completed now. 94 95 99 logging_info( "creating onehop overlay structure" ); 96 100 state = OneHopStateCompleted; … … 119 123 void OneHop::joinOverlay(const EndpointDescriptor& bootstrapEp){ 120 124 121 logging_info( "joining onehop overlay structure through end point " <<125 logging_info( "joining onehop overlay structure through end-point " << 122 126 (bootstrapEp == EndpointDescriptor::UNSPECIFIED ? 123 127 "local" : bootstrapEp.toString()) ); … … 133 137 134 138 state = OneHopStateCompleted; 135 136 137 139 } else { 138 139 140 bootstrapLink = baseoverlay.establishLink( bootstrapEp, 140 141 OverlayInterface::OVERLAY_SERVICE_ID ); … … 175 176 if( state == OneHopStateInvalid ) return; 176 177 177 //178 178 // node went down, remove from overlay mapping 179 //180 181 179 logging_debug( "node " << remote.toString() << " left overlay structure" ); 182 180 … … 223 221 // 224 222 225 if( onemsg->isType( OneHopMessage::OneHopMessageTypeListingRequest ) ){223 if( onemsg->isType( OneHopMessage::OneHopMessageTypeListingRequest ) ){ 226 224 227 225 NodeListingRequest* request = onemsg->decapsulate<NodeListingRequest>(); … … 316 314 } // if( reply != NULL ) 317 315 316 if( onemsg->isType( OneHopMessage::OneHopMessageTypeRoute) ){ 317 logging_debug( "Route message arrived at destination node -> delegate to BaseOverlay" ); 318 baseoverlay.incomingRouteMessage( onemsg ); 319 } 320 321 318 322 } 319 323
Note:
See TracChangeset
for help on using the changeset viewer.