blob: 129ab8a5ee919faabf979a224ec44ba427f3dc78 [file] [log] [blame]
akmhoqueba094742014-02-28 11:47:21 -06001#include <iostream>
2#include <string>
3
4#include "nlsr_rte.hpp"
5
6namespace nlsr
7{
8
akmhoque5a44dd42014-03-12 18:11:32 -05009 using namespace std;
akmhoqueba094742014-02-28 11:47:21 -060010
akmhoque5a44dd42014-03-12 18:11:32 -050011 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++)
akmhoqueba094742014-02-28 11:47:21 -060020 {
akmhoque5a44dd42014-03-12 18:11:32 -050021 os <<" Nexthop "<<i<<": "<<(*it)<<endl;
akmhoqueba094742014-02-28 11:47:21 -060022 }
akmhoque5a44dd42014-03-12 18:11:32 -050023 return os;
24 }
akmhoqueba094742014-02-28 11:47:21 -060025
26}//namespace nlsr