Swap map around to make it easier for the bridge helper
authorRichard Whitehouse <github@richardwhiuk.com>
Sun, 20 Feb 2011 02:06:51 +0000 (02:06 +0000)
committerRichard Whitehouse <github@richardwhiuk.com>
Sun, 20 Feb 2011 02:06:51 +0000 (02:06 +0000)
code/src/helper/moose-helper.cc

index aeb27a09041fe9de91b05f36f0db43efe9a37293..c894686d1bf5f9ba38308c72c044f4ca85fb1bf9 100644 (file)
@@ -161,7 +161,7 @@ void MooseHelper::Create(MooseHelper::Network& n){
                                std::cout << "parents from " << root << ":" << std::endl;
                                boost::graph_traits<graph_t>::vertex_iterator vi, vend;
 
-                               std::map<MoosePrefixAddress, Ptr<NetDevice> > routes;
+                               std::map<Ptr<NetDevice>, MoosePrefixAddress> routes;
 
                                for (boost::tie(vi, vend) = vertices(g); vi != vend; ++vi) {
                                        std::cout << root << "->" << *vi << " ";
@@ -180,7 +180,7 @@ void MooseHelper::Create(MooseHelper::Network& n){
        
                                                        std::cout << current << std::endl;
 
-                                                       routes[MoosePrefixAddress(root)] = portMap[root][current];
+                                                       routes[portMap[root][current]] = MoosePrefixAddress(root);
        
                                                } else {