src/internet-node/ipv4-l3-protocol.cc
changeset 1776 0d5be0c3d229
parent 1524 3ead2b66f2e4
child 1828 6ab68edddf45
child 1867 16deaedc0380
--- a/src/internet-node/ipv4-l3-protocol.cc	Fri Oct 12 13:41:24 2007 -0700
+++ b/src/internet-node/ipv4-l3-protocol.cc	Sat Oct 06 21:21:07 2007 -0700
@@ -821,6 +821,24 @@
   return interface->GetAddress ();
 }
 
+void 
+Ipv4L3Protocol::SetMetric (uint32_t i, uint16_t metric)
+{
+  NS_LOG_FUNCTION;
+  NS_LOG_PARAM ("(" << i << ", " << metric << ")");
+  Ptr<Ipv4Interface> interface = GetInterface (i);
+  interface->SetMetric (metric);
+}
+
+uint16_t
+Ipv4L3Protocol::GetMetric (uint32_t i) const
+{
+  NS_LOG_FUNCTION;
+  NS_LOG_PARAM ("(" << i << ")");
+  Ptr<Ipv4Interface> interface = GetInterface (i);
+  return interface->GetMetric ();
+}
+
 bool
 Ipv4L3Protocol::GetIfIndexForDestination (
   Ipv4Address destination, uint32_t& ifIndex) const