akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame^] | 1 | #include <iostream> |
| 2 | #include <string> |
| 3 | |
| 4 | #include "routing-table-entry.hpp" |
| 5 | |
| 6 | namespace nlsr { |
| 7 | |
| 8 | using namespace std; |
| 9 | |
| 10 | ostream& |
| 11 | operator<<(ostream& os, RoutingTableEntry& rte) |
| 12 | { |
| 13 | os << "Destination: " << rte.getDestination() << endl; |
| 14 | os << "Nexthops: " << endl; |
| 15 | int i = 1; |
| 16 | std::list<NextHop> nhl = rte.getNhl().getNextHopList(); |
| 17 | for (std::list<NextHop>::iterator it = nhl.begin(); |
| 18 | it != nhl.end() ; it++, i++) |
| 19 | { |
| 20 | os << " Nexthop " << i << ": " << (*it) << endl; |
| 21 | } |
| 22 | return os; |
| 23 | } |
| 24 | |
| 25 | }//namespace nlsr |