akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 1 | #include <iostream> |
| 2 | #include <string> |
| 3 | |
| 4 | #include "nlsr_rte.hpp" |
| 5 | |
| 6 | namespace nlsr |
| 7 | { |
| 8 | |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 9 | using namespace std; |
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 10 | |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 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++) |
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 20 | { |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 21 | os <<" Nexthop "<<i<<": "<<(*it)<<endl; |
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 22 | } |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 23 | return os; |
| 24 | } |
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 25 | |
| 26 | }//namespace nlsr |