akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 1 | #include <iostream> |
| 2 | #include <string> |
| 3 | |
| 4 | #include "nlsr_rte.hpp" |
| 5 | |
akmhoque | 1fd8c1e | 2014-02-19 19:41:49 -0600 | [diff] [blame] | 6 | namespace nlsr |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 7 | { |
akmhoque | 1fd8c1e | 2014-02-19 19:41:49 -0600 | [diff] [blame] | 8 | |
| 9 | using namespace std; |
| 10 | |
| 11 | ostream& |
| 12 | operator<<(ostream& os, RoutingTableEntry &rte) |
| 13 | { |
| 14 | os<<"Destination: "<<rte.getDestination()<<endl; |
| 15 | os<<"Nexthops: "<<endl; |
| 16 | int i=1; |
| 17 | std::list< NextHop > nhl = rte.getNhl().getNextHopList(); |
| 18 | for( std::list<NextHop>::iterator it=nhl.begin(); |
| 19 | it!= nhl.end() ; it++,i++) |
| 20 | { |
| 21 | os <<" Nexthop "<<i<<": "<<(*it)<<endl; |
| 22 | } |
| 23 | return os; |
| 24 | } |
akmhoque | b1710aa | 2014-02-19 17:13:36 -0600 | [diff] [blame] | 25 | |
| 26 | }//namespace nlsr |