blob: 7c06b03b6fe40661969072edfa70b5fb4dd5d155 [file] [log] [blame]
akmhoqueba094742014-02-28 11:47:21 -06001#include <iostream>
2#include <string>
3
4#include "nlsr_rte.hpp"
akmhoque05d5fcf2014-04-15 14:58:45 -05005#include "utility/nlsr_logger.hpp"
6
7#define THIS_FILE "nlsr_rte.cpp"
akmhoqueba094742014-02-28 11:47:21 -06008
9namespace nlsr
10{
11
akmhoque5a44dd42014-03-12 18:11:32 -050012 using namespace std;
akmhoqueba094742014-02-28 11:47:21 -060013
akmhoque5a44dd42014-03-12 18:11:32 -050014 ostream&
akmhoque05d5fcf2014-04-15 14:58:45 -050015 operator<<(ostream& os, RoutingTableEntry& rte)
akmhoque5a44dd42014-03-12 18:11:32 -050016 {
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++)
akmhoqueba094742014-02-28 11:47:21 -060023 {
akmhoque5a44dd42014-03-12 18:11:32 -050024 os <<" Nexthop "<<i<<": "<<(*it)<<endl;
akmhoqueba094742014-02-28 11:47:21 -060025 }
akmhoque5a44dd42014-03-12 18:11:32 -050026 return os;
27 }
akmhoqueba094742014-02-28 11:47:21 -060028
29}//namespace nlsr