--- a/src/helper/real-stack-helper-lsif.cc Thu Jun 17 10:43:20 2010 +0100
+++ b/src/helper/real-stack-helper-lsif.cc Thu Jun 17 15:55:48 2010 +0100
@@ -43,7 +43,8 @@
*/
#include "real-stack-helper.h"
-
+#include "ns3/names.h"
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -247,13 +248,14 @@
ipv4Mask = Ipv4Mask (ntohl (((struct sockaddr_in *)&item->ifr_netmask)->sin_addr.s_addr));
}
- std::cout << "Name: " << ifname << "; IP: " << ipv4Address << "; MAC: " << macAddress
- << "; Broadcast: " << ipv4Broadcast << "; Mask: " << ipv4Mask
- << std::endl;
+ // std::cout << "Name: " << ifname << "; IP: " << ipv4Address << "; MAC: " << macAddress
+ // << "; Broadcast: " << ipv4Broadcast << "; Mask: " << ipv4Mask
+ // << std::endl;
Ptr<SimpleNetDevice> netdevice = CreateObject<SimpleNetDevice> ();
netdevice->SetAddress (macAddress);
+ Names::Add (ifname, netdevice);
node->AddDevice (netdevice);
uint32_t ns3IfIndex = nodeIpv4->AddInterface (netdevice);
@@ -265,12 +267,6 @@
{
NS_FATAL_ERROR ("unable to set address");
}
- std::cout << "NS-3 IP: " << ifname << "; IP: " << nodeIpv4->GetAddress (ns3IfIndex, 0).GetLocal ()
- << "; Broadcast: " << nodeIpv4->GetAddress (ns3IfIndex, 0).GetBroadcast ()
- << "; Mask: " << nodeIpv4->GetAddress (ns3IfIndex, 0).GetMask ()
- << "; subnetdirectedbcast: " << nodeIpv4->GetAddress (ns3IfIndex, 0).GetLocal ().GetSubnetDirectedBroadcast (nodeIpv4->GetAddress (ns3IfIndex, 0).GetMask ())
- << std::endl;
-
}
}