View | Details | Raw Unified | Return to bug 2204
Collapse All | Expand All

(-)a/src/aodv/model/aodv-routing-protocol.cc (-1 / +5 lines)
 Lines 298-305    Link Here 
298
void
298
void
299
RoutingProtocol::PrintRoutingTable (Ptr<OutputStreamWrapper> stream) const
299
RoutingProtocol::PrintRoutingTable (Ptr<OutputStreamWrapper> stream) const
300
{
300
{
301
  *stream->GetStream () << "Node: " << m_ipv4->GetObject<Node> ()->GetId () << " Time: " << Simulator::Now ().GetSeconds () << "s ";
301
  *stream->GetStream () << "Node: " << m_ipv4->GetObject<Node> ()->GetId ()
302
                        << " Time: " << Simulator::Now ().GetSeconds () << "s "
303
                        << "AODV Routing table" << std::endl;
304
302
  m_routingTable.Print (stream);
305
  m_routingTable.Print (stream);
306
  *stream->GetStream () << std::endl;
303
}
307
}
304
308
305
int64_t
309
int64_t
(-)a/src/dsdv/model/dsdv-routing-protocol.cc (-1 / +5 lines)
 Lines 231-238    Link Here 
231
void
231
void
232
RoutingProtocol::PrintRoutingTable (Ptr<OutputStreamWrapper> stream) const
232
RoutingProtocol::PrintRoutingTable (Ptr<OutputStreamWrapper> stream) const
233
{
233
{
234
  *stream->GetStream () << "Node: " << m_ipv4->GetObject<Node> ()->GetId () << " Time: " << Simulator::Now ().GetSeconds () << "s ";
234
  *stream->GetStream () << "Node: " << m_ipv4->GetObject<Node> ()->GetId ()
235
                        << " Time: " << Simulator::Now ().GetSeconds () << "s "
236
                        << "DSDV Routing table" << std::endl;
237
235
  m_routingTable.Print (stream);
238
  m_routingTable.Print (stream);
239
  *stream->GetStream () << std::endl;
236
}
240
}
237
241
238
void
242
void
(-)a/src/internet/model/ipv4-list-routing.cc (-1 lines)
 Lines 82-88    Link Here 
82
      *stream->GetStream () << "  Priority: " << (*i).first << " Protocol: " << (*i).second->GetInstanceTypeId () << std::endl;
82
      *stream->GetStream () << "  Priority: " << (*i).first << " Protocol: " << (*i).second->GetInstanceTypeId () << std::endl;
83
      (*i).second->PrintRoutingTable (stream);
83
      (*i).second->PrintRoutingTable (stream);
84
    }
84
    }
85
  *stream->GetStream () << std::endl;
86
}
85
}
87
86
88
void
87
void
(-)a/src/internet/model/ipv4-static-routing.cc (+6 lines)
 Lines 712-717    Link Here 
712
{
712
{
713
  NS_LOG_FUNCTION (this << stream);
713
  NS_LOG_FUNCTION (this << stream);
714
  std::ostream* os = stream->GetStream ();
714
  std::ostream* os = stream->GetStream ();
715
716
  *os << "Node: " << m_ipv4->GetObject<Node> ()->GetId ()
717
      << " Time: " << Simulator::Now ().GetSeconds () << "s "
718
      << "Ipv4StaticRouting table" << std::endl;
719
715
  if (GetNRoutes () > 0)
720
  if (GetNRoutes () > 0)
716
    {
721
    {
717
      *os << "Destination     Gateway         Genmask         Flags Metric Ref    Use Iface" << std::endl;
722
      *os << "Destination     Gateway         Genmask         Flags Metric Ref    Use Iface" << std::endl;
 Lines 751-756    Link Here 
751
          *os << std::endl;
756
          *os << std::endl;
752
        }
757
        }
753
    }
758
    }
759
  *os << std::endl;
754
}
760
}
755
Ipv4Address
761
Ipv4Address
756
Ipv4StaticRouting::SourceAddressSelection (uint32_t interfaceIdx, Ipv4Address dest)
762
Ipv4StaticRouting::SourceAddressSelection (uint32_t interfaceIdx, Ipv4Address dest)
(-)a/src/internet/model/ipv6-list-routing.cc (-1 lines)
 Lines 215-221    Link Here 
215
      *stream->GetStream () << "  Priority: " << (*i).first << " Protocol: " << (*i).second->GetInstanceTypeId () << std::endl;
215
      *stream->GetStream () << "  Priority: " << (*i).first << " Protocol: " << (*i).second->GetInstanceTypeId () << std::endl;
216
      (*i).second->PrintRoutingTable (stream);
216
      (*i).second->PrintRoutingTable (stream);
217
    }
217
    }
218
  *stream->GetStream () << std::endl;
219
}
218
}
220
219
221
void
220
void
(-)a/src/internet/model/ipv6-static-routing.cc (+1 lines)
 Lines 125-130    Link Here 
125
          *os << std::endl;
125
          *os << std::endl;
126
        }
126
        }
127
    }
127
    }
128
  *os << std::endl;
128
}
129
}
129
130
130
void Ipv6StaticRouting::AddHostRouteTo (Ipv6Address dst, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse, uint32_t metric)
131
void Ipv6StaticRouting::AddHostRouteTo (Ipv6Address dst, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse, uint32_t metric)
(-)a/src/internet/model/ripng.cc (+1 lines)
 Lines 537-542    Link Here 
537
            }
537
            }
538
        }
538
        }
539
    }
539
    }
540
  *os << std::endl;
540
}
541
}
541
542
542
void RipNg::DoDispose ()
543
void RipNg::DoDispose ()
(-)a/src/nix-vector-routing/model/ipv4-nix-vector-routing.cc (+6 lines)
 Lines 677-682    Link Here 
677
  CheckCacheStateAndFlush ();
677
  CheckCacheStateAndFlush ();
678
678
679
  std::ostream* os = stream->GetStream ();
679
  std::ostream* os = stream->GetStream ();
680
681
  *os << "Node: " << m_ipv4->GetObject<Node> ()->GetId ()
682
      << " Time: " << Simulator::Now ().GetSeconds () << "s "
683
      << "Nix Routing" << std::endl;
684
680
  *os << "NixCache:" << std::endl;
685
  *os << "NixCache:" << std::endl;
681
  if (m_nixCache.size () > 0)
686
  if (m_nixCache.size () > 0)
682
    {
687
    {
 Lines 714-719    Link Here 
714
          *os << std::endl;
719
          *os << std::endl;
715
        }
720
        }
716
    }
721
    }
722
  *os << std::endl;
717
}
723
}
718
724
719
// virtual functions from Ipv4RoutingProtocol 
725
// virtual functions from Ipv4RoutingProtocol 
(-)a/src/olsr/model/olsr-routing-protocol.cc (-2 / +15 lines)
 Lines 254-259    Link Here 
254
RoutingProtocol::PrintRoutingTable (Ptr<OutputStreamWrapper> stream) const
254
RoutingProtocol::PrintRoutingTable (Ptr<OutputStreamWrapper> stream) const
255
{
255
{
256
  std::ostream* os = stream->GetStream ();
256
  std::ostream* os = stream->GetStream ();
257
258
  *os << "Node: " << m_ipv4->GetObject<Node> ()->GetId ()
259
      << " Time: " << Simulator::Now ().GetSeconds () << "s "
260
      << "OLSR Routing table" << std::endl;
261
257
  *os << "Destination\t\tNextHop\t\tInterface\tDistance\n";
262
  *os << "Destination\t\tNextHop\t\tInterface\tDistance\n";
258
263
259
  for (std::map<Ipv4Address, RoutingTableEntry>::const_iterator iter = m_table.begin ();
264
  for (std::map<Ipv4Address, RoutingTableEntry>::const_iterator iter = m_table.begin ();
 Lines 272-280    Link Here 
272
      *os << iter->second.distance << "\t";
277
      *os << iter->second.distance << "\t";
273
      *os << "\n";
278
      *os << "\n";
274
    }
279
    }
280
275
  // Also print the HNA routing table
281
  // Also print the HNA routing table
276
  *os << " HNA Routing Table:\n";
282
  if (m_hnaRoutingTable->GetNRoutes () > 0)
277
  m_hnaRoutingTable->PrintRoutingTable (stream);
283
    {
284
      *os << " HNA Routing Table: ";
285
      m_hnaRoutingTable->PrintRoutingTable (stream);
286
    }
287
  else
288
    {
289
      *os << std::endl;
290
    }
278
}
291
}
279
292
280
void RoutingProtocol::DoInitialize ()
293
void RoutingProtocol::DoInitialize ()

Return to bug 2204