DescriptionThis is a proposed merge patch for bugs 947 and 963. It pretty prints Ipv4 routing tables at specified times.
Sample output (can be seen from running the modified examples):
AODV example (examples/routing/aodv.cc printRoutes=1):
Node: 0 Time: 8s
AODV Routing table
Destination Gateway Interface Flag Expire Hops
10.0.0.2 10.0.0.2 10.0.0.1 UP 3.00 1
10.0.0.10 10.0.0.2 10.0.0.1 DOWN 11.02 9
10.255.255.255 10.255.255.255 10.0.0.1 UP 9223372028.85 1
127.0.0.1 127.0.0.1 127.0.0.1 UP 9223372028.85 1
OLSR example (examples/wifi/wifi-simple-adhoc-grid tracing=1):
Node: 24 Time: 30s Ipv4ListRouting table
Priority: 10 Protocol: ns3::olsr::RoutingProtocol
Destination NextHop Interface Distance
10.1.1.1 10.1.1.20 1 8
10.1.1.2 10.1.1.20 1 7
10.1.1.3 10.1.1.20 1 6
10.1.1.4 10.1.1.20 1 5
Nix example (examples/routing/nix-simple.cc)
Node: 0 Time: 8s Ipv4ListRouting table
Priority: 10 Protocol: ns3::Ipv4NixVectorRouting
NixCache:
Destination NixVector
10.1.3.2 011
Ipv4RouteCache:
Destination Gateway Source OutputDevice
10.1.3.2 10.1.1.2 10.1.1.1 1
Global/static routing examples (examples/routing/dynamic-global-routing.cc)
(formatted like "route -n", and note use of List routing table)
Node: 6 Time: 12s Ipv4ListRouting table
Priority: 0 Protocol: ns3::Ipv4StaticRouting
Destination Gateway Genmask Flags Metric Ref Use Iface
127.0.0.0 0.0.0.0 255.0.0.0 U - - - 0
10.1.3.0 0.0.0.0 255.255.255.0 U - - - 1
172.16.1.0 0.0.0.0 255.255.255.0 U - - - 2
Priority: -10 Protocol: ns3::Ipv4GlobalRouting
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.1.3.1 0.0.0.0 UG - - - 1
Patch Set 1 #
Total comments: 1
Patch Set 2 : provide const version of Purge() #
Total comments: 1
MessagesTotal messages: 3
|