akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 1 | #include <iostream> |
2 | #include <string> | ||||
3 | |||||
4 | #include "nlsr_rte.hpp" | ||||
akmhoque | 05d5fcf | 2014-04-15 14:58:45 -0500 | [diff] [blame^] | 5 | #include "utility/nlsr_logger.hpp" |
6 | |||||
7 | #define THIS_FILE "nlsr_rte.cpp" | ||||
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 8 | |
9 | namespace nlsr | ||||
10 | { | ||||
11 | |||||
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 12 | using namespace std; |
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 13 | |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 14 | ostream& |
akmhoque | 05d5fcf | 2014-04-15 14:58:45 -0500 | [diff] [blame^] | 15 | operator<<(ostream& os, RoutingTableEntry& rte) |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 16 | { |
17 | os<<"Destination: "<<rte.getDestination()<<endl; | ||||
18 | os<<"Nexthops: "<<endl; | ||||
19 | int i=1; | ||||
20 | std::list< NextHop > nhl = rte.getNhl().getNextHopList(); | ||||
21 | for( std::list<NextHop>::iterator it=nhl.begin(); | ||||
22 | it!= nhl.end() ; it++,i++) | ||||
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 23 | { |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 24 | os <<" Nexthop "<<i<<": "<<(*it)<<endl; |
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 25 | } |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 26 | return os; |
27 | } | ||||
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 28 | |
29 | }//namespace nlsr |