src/node/packet-socket-address.cc
changeset 1188 34386185bc1f
parent 1185 eac7427958e9
child 1191 5583facf0af8
--- a/src/node/packet-socket-address.cc	Wed Aug 01 09:01:54 2007 +0200
+++ b/src/node/packet-socket-address.cc	Wed Aug 01 09:02:03 2007 +0200
@@ -35,6 +35,18 @@
   m_device = index;
 }
 void 
+PacketSocketAddress::SetDevice (Ptr<NetDevice> device)
+{
+  if (device == 0)
+    {
+      m_device = 0;
+    }
+  else
+    {
+      m_device = device->GetIfIndex ();
+    }
+}
+void 
 PacketSocketAddress::SetPhysicalAddress (const Address address)
 {
   m_address = address;