--- a/src/helper/yans-wifi-helper.cc Sat Feb 28 16:25:24 2009 -0800
+++ b/src/helper/yans-wifi-helper.cc Tue Mar 10 23:47:55 2009 -0700
@@ -220,9 +220,11 @@
pcap->Open (oss.str ());
pcap->WriteWifiHeader ();
oss.str ("");
- oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid << "/$ns3::WifiNetDevice/Phy/PromiscSniffer";
+ oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid;
+ oss << "/$ns3::WifiNetDevice/Phy/PromiscSniffer";
Config::ConnectWithoutContext (oss.str (), MakeBoundCallback (&PcapSnifferEvent, pcap));
}
+
void
YansWifiPhyHelper::EnablePcap (std::string filename, NetDeviceContainer d)
{
@@ -232,6 +234,20 @@
EnablePcap (filename, dev->GetNode ()->GetId (), dev->GetIfIndex ());
}
}
+
+void
+YansWifiPhyHelper::EnablePcap (std::string filename, Ptr<NetDevice> nd)
+{
+ EnablePcap (filename, nd->GetNode ()->GetId (), nd->GetIfIndex ());
+}
+
+void
+YansWifiPhyHelper::EnablePcap (std::string filename, std::string ndName)
+{
+ Ptr<NetDevice> nd = Names::Find<NetDevice> (ndName);
+ EnablePcap (filename, nd->GetNode ()->GetId (), nd->GetIfIndex ());
+}
+
void
YansWifiPhyHelper::EnablePcap (std::string filename, NodeContainer n)
{
@@ -294,6 +310,4 @@
EnableAscii (os, NodeContainer::GetGlobal ());
}
-
-
} // namespace ns3