--- a/bindings/python/apidefs/gcc-ILP32/ns3_module_helper.py Fri Feb 26 09:35:09 2010 -0800
+++ b/bindings/python/apidefs/gcc-ILP32/ns3_module_helper.py Fri Feb 26 10:31:26 2010 -0800
@@ -1355,14 +1355,14 @@
cls.add_constructor([param('ns3::PcapHelperForDevice const &', 'arg0')])
## trace-helper.h: ns3::PcapHelperForDevice::PcapHelperForDevice() [constructor]
cls.add_constructor([])
- ## trace-helper.h: void ns3::PcapHelperForDevice::EnablePcap(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous=false) [member function]
+ ## trace-helper.h: void ns3::PcapHelperForDevice::EnablePcap(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool explicitFilename=false, bool promiscuous=false) [member function]
cls.add_method('EnablePcap',
'void',
- [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous', default_value='false')])
- ## trace-helper.h: void ns3::PcapHelperForDevice::EnablePcap(std::string prefix, std::string ndName, bool promiscuous=false) [member function]
+ [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'explicitFilename', default_value='false'), param('bool', 'promiscuous', default_value='false')])
+ ## trace-helper.h: void ns3::PcapHelperForDevice::EnablePcap(std::string prefix, std::string ndName, bool explicitFilename=false, bool promiscuous=false) [member function]
cls.add_method('EnablePcap',
'void',
- [param('std::string', 'prefix'), param('std::string', 'ndName'), param('bool', 'promiscuous', default_value='false')])
+ [param('std::string', 'prefix'), param('std::string', 'ndName'), param('bool', 'explicitFilename', default_value='false'), param('bool', 'promiscuous', default_value='false')])
## trace-helper.h: void ns3::PcapHelperForDevice::EnablePcap(std::string prefix, ns3::NetDeviceContainer d, bool promiscuous=false) [member function]
cls.add_method('EnablePcap',
'void',
@@ -1379,10 +1379,10 @@
cls.add_method('EnablePcapAll',
'void',
[param('std::string', 'prefix'), param('bool', 'promiscuous', default_value='false')])
- ## trace-helper.h: void ns3::PcapHelperForDevice::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous) [member function]
+ ## trace-helper.h: void ns3::PcapHelperForDevice::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool explicitFilename, bool promiscuous) [member function]
cls.add_method('EnablePcapInternal',
'void',
- [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous')],
+ [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'explicitFilename'), param('bool', 'promiscuous')],
is_pure_virtual=True, is_virtual=True)
return
@@ -1617,10 +1617,10 @@
'void',
[param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream'), param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd')],
visibility='private', is_virtual=True)
- ## point-to-point-helper.h: void ns3::PointToPointHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous=false) [member function]
+ ## point-to-point-helper.h: void ns3::PointToPointHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool implicitFilename, bool promiscuous) [member function]
cls.add_method('EnablePcapInternal',
'void',
- [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous', default_value='false')],
+ [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'implicitFilename'), param('bool', 'promiscuous')],
visibility='private', is_virtual=True)
return
@@ -1975,10 +1975,10 @@
'void',
[param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream'), param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd')],
visibility='private', is_virtual=True)
- ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous) [member function]
+ ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool explicitFilename, bool promiscuous) [member function]
cls.add_method('EnablePcapInternal',
'void',
- [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous')],
+ [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'explicitFilename'), param('bool', 'promiscuous')],
visibility='private', is_virtual=True)
return
@@ -2070,10 +2070,10 @@
'void',
[param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream'), param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd')],
visibility='private', is_virtual=True)
- ## csma-helper.h: void ns3::CsmaHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous=false) [member function]
+ ## csma-helper.h: void ns3::CsmaHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool explicitFilename, bool promiscuous) [member function]
cls.add_method('EnablePcapInternal',
'void',
- [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous', default_value='false')],
+ [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'explicitFilename'), param('bool', 'promiscuous')],
visibility='private', is_virtual=True)
return
@@ -2110,10 +2110,10 @@
'void',
[param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream'), param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd')],
visibility='private', is_virtual=True)
- ## emu-helper.h: void ns3::EmuHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous=false) [member function]
+ ## emu-helper.h: void ns3::EmuHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool explicitFilename, bool promiscuous) [member function]
cls.add_method('EnablePcapInternal',
'void',
- [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous', default_value='false')],
+ [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'explicitFilename'), param('bool', 'promiscuous')],
visibility='private', is_virtual=True)
return
--- a/bindings/python/apidefs/gcc-ILP32/ns3_module_mesh.py Fri Feb 26 09:35:09 2010 -0800
+++ b/bindings/python/apidefs/gcc-ILP32/ns3_module_mesh.py Fri Feb 26 10:31:26 2010 -0800
@@ -514,6 +514,11 @@
'void',
[],
visibility='private', is_virtual=True)
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::DoStart() [member function]
+ cls.add_method('DoStart',
+ 'void',
+ [],
+ visibility='private', is_virtual=True)
## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::ForwardUp(ns3::Ptr<ns3::Packet> packet, ns3::Mac48Address src, ns3::Mac48Address dst) [member function]
cls.add_method('ForwardUp',
'void',
--- a/bindings/python/apidefs/gcc-ILP32/ns3_module_wifi.py Fri Feb 26 09:35:09 2010 -0800
+++ b/bindings/python/apidefs/gcc-ILP32/ns3_module_wifi.py Fri Feb 26 10:31:26 2010 -0800
@@ -3778,6 +3778,11 @@
'void',
[],
visibility='private', is_virtual=True)
+ ## adhoc-wifi-mac.h: void ns3::AdhocWifiMac::DoStart() [member function]
+ cls.add_method('DoStart',
+ 'void',
+ [],
+ visibility='private', is_virtual=True)
## adhoc-wifi-mac.h: void ns3::AdhocWifiMac::FinishConfigureStandard(ns3::WifiPhyStandard standard) [member function]
cls.add_method('FinishConfigureStandard',
'void',
@@ -4599,6 +4604,11 @@
cls.add_method('SendDelbaFrame',
'void',
[param('ns3::Mac48Address', 'addr'), param('uint8_t', 'tid'), param('bool', 'byOriginator')])
+ ## edca-txop-n.h: void ns3::EdcaTxopN::DoStart() [member function]
+ cls.add_method('DoStart',
+ 'void',
+ [],
+ visibility='private', is_virtual=True)
return
def register_Ns3ErrorRateModel_methods(root_module, cls):
@@ -5250,6 +5260,11 @@
cls.add_method('StartActiveAssociation',
'void',
[])
+ ## nqsta-wifi-mac.h: void ns3::NqstaWifiMac::DoStart() [member function]
+ cls.add_method('DoStart',
+ 'void',
+ [],
+ visibility='private', is_virtual=True)
## nqsta-wifi-mac.h: void ns3::NqstaWifiMac::DoDispose() [member function]
cls.add_method('DoDispose',
'void',
@@ -5487,6 +5502,11 @@
'void',
[],
visibility='private', is_virtual=True)
+ ## qadhoc-wifi-mac.h: void ns3::QadhocWifiMac::DoStart() [member function]
+ cls.add_method('DoStart',
+ 'void',
+ [],
+ visibility='private', is_virtual=True)
## qadhoc-wifi-mac.h: void ns3::QadhocWifiMac::FinishConfigureStandard(ns3::WifiPhyStandard standard) [member function]
cls.add_method('FinishConfigureStandard',
'void',
@@ -5846,6 +5866,11 @@
cls.add_method('StartActiveAssociation',
'void',
[])
+ ## qsta-wifi-mac.h: void ns3::QstaWifiMac::DoStart() [member function]
+ cls.add_method('DoStart',
+ 'void',
+ [],
+ visibility='private', is_virtual=True)
## qsta-wifi-mac.h: void ns3::QstaWifiMac::DoDispose() [member function]
cls.add_method('DoDispose',
'void',
@@ -6317,6 +6342,11 @@
cls.add_method('Queue',
'void',
[param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader const &', 'hdr')])
+ ## dca-txop.h: void ns3::DcaTxop::DoStart() [member function]
+ cls.add_method('DoStart',
+ 'void',
+ [],
+ visibility='private', is_virtual=True)
## dca-txop.h: void ns3::DcaTxop::DoDispose() [member function]
cls.add_method('DoDispose',
'void',
--- a/bindings/python/apidefs/gcc-LP64/ns3_module_helper.py Fri Feb 26 09:35:09 2010 -0800
+++ b/bindings/python/apidefs/gcc-LP64/ns3_module_helper.py Fri Feb 26 10:31:26 2010 -0800
@@ -1355,14 +1355,14 @@
cls.add_constructor([param('ns3::PcapHelperForDevice const &', 'arg0')])
## trace-helper.h: ns3::PcapHelperForDevice::PcapHelperForDevice() [constructor]
cls.add_constructor([])
- ## trace-helper.h: void ns3::PcapHelperForDevice::EnablePcap(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous=false) [member function]
+ ## trace-helper.h: void ns3::PcapHelperForDevice::EnablePcap(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool explicitFilename=false, bool promiscuous=false) [member function]
cls.add_method('EnablePcap',
'void',
- [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous', default_value='false')])
- ## trace-helper.h: void ns3::PcapHelperForDevice::EnablePcap(std::string prefix, std::string ndName, bool promiscuous=false) [member function]
+ [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'explicitFilename', default_value='false'), param('bool', 'promiscuous', default_value='false')])
+ ## trace-helper.h: void ns3::PcapHelperForDevice::EnablePcap(std::string prefix, std::string ndName, bool explicitFilename=false, bool promiscuous=false) [member function]
cls.add_method('EnablePcap',
'void',
- [param('std::string', 'prefix'), param('std::string', 'ndName'), param('bool', 'promiscuous', default_value='false')])
+ [param('std::string', 'prefix'), param('std::string', 'ndName'), param('bool', 'explicitFilename', default_value='false'), param('bool', 'promiscuous', default_value='false')])
## trace-helper.h: void ns3::PcapHelperForDevice::EnablePcap(std::string prefix, ns3::NetDeviceContainer d, bool promiscuous=false) [member function]
cls.add_method('EnablePcap',
'void',
@@ -1379,10 +1379,10 @@
cls.add_method('EnablePcapAll',
'void',
[param('std::string', 'prefix'), param('bool', 'promiscuous', default_value='false')])
- ## trace-helper.h: void ns3::PcapHelperForDevice::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous) [member function]
+ ## trace-helper.h: void ns3::PcapHelperForDevice::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool explicitFilename, bool promiscuous) [member function]
cls.add_method('EnablePcapInternal',
'void',
- [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous')],
+ [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'explicitFilename'), param('bool', 'promiscuous')],
is_pure_virtual=True, is_virtual=True)
return
@@ -1617,10 +1617,10 @@
'void',
[param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream'), param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd')],
visibility='private', is_virtual=True)
- ## point-to-point-helper.h: void ns3::PointToPointHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous=false) [member function]
+ ## point-to-point-helper.h: void ns3::PointToPointHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool implicitFilename, bool promiscuous) [member function]
cls.add_method('EnablePcapInternal',
'void',
- [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous', default_value='false')],
+ [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'implicitFilename'), param('bool', 'promiscuous')],
visibility='private', is_virtual=True)
return
@@ -1975,10 +1975,10 @@
'void',
[param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream'), param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd')],
visibility='private', is_virtual=True)
- ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous) [member function]
+ ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool explicitFilename, bool promiscuous) [member function]
cls.add_method('EnablePcapInternal',
'void',
- [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous')],
+ [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'explicitFilename'), param('bool', 'promiscuous')],
visibility='private', is_virtual=True)
return
@@ -2070,10 +2070,10 @@
'void',
[param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream'), param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd')],
visibility='private', is_virtual=True)
- ## csma-helper.h: void ns3::CsmaHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous=false) [member function]
+ ## csma-helper.h: void ns3::CsmaHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool explicitFilename, bool promiscuous) [member function]
cls.add_method('EnablePcapInternal',
'void',
- [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous', default_value='false')],
+ [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'explicitFilename'), param('bool', 'promiscuous')],
visibility='private', is_virtual=True)
return
@@ -2110,10 +2110,10 @@
'void',
[param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream'), param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd')],
visibility='private', is_virtual=True)
- ## emu-helper.h: void ns3::EmuHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous=false) [member function]
+ ## emu-helper.h: void ns3::EmuHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool explicitFilename, bool promiscuous) [member function]
cls.add_method('EnablePcapInternal',
'void',
- [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous', default_value='false')],
+ [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'explicitFilename'), param('bool', 'promiscuous')],
visibility='private', is_virtual=True)
return
--- a/bindings/python/apidefs/gcc-LP64/ns3_module_mesh.py Fri Feb 26 09:35:09 2010 -0800
+++ b/bindings/python/apidefs/gcc-LP64/ns3_module_mesh.py Fri Feb 26 10:31:26 2010 -0800
@@ -514,6 +514,11 @@
'void',
[],
visibility='private', is_virtual=True)
+ ## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::DoStart() [member function]
+ cls.add_method('DoStart',
+ 'void',
+ [],
+ visibility='private', is_virtual=True)
## mesh-wifi-interface-mac.h: void ns3::MeshWifiInterfaceMac::ForwardUp(ns3::Ptr<ns3::Packet> packet, ns3::Mac48Address src, ns3::Mac48Address dst) [member function]
cls.add_method('ForwardUp',
'void',
--- a/bindings/python/apidefs/gcc-LP64/ns3_module_wifi.py Fri Feb 26 09:35:09 2010 -0800
+++ b/bindings/python/apidefs/gcc-LP64/ns3_module_wifi.py Fri Feb 26 10:31:26 2010 -0800
@@ -3778,6 +3778,11 @@
'void',
[],
visibility='private', is_virtual=True)
+ ## adhoc-wifi-mac.h: void ns3::AdhocWifiMac::DoStart() [member function]
+ cls.add_method('DoStart',
+ 'void',
+ [],
+ visibility='private', is_virtual=True)
## adhoc-wifi-mac.h: void ns3::AdhocWifiMac::FinishConfigureStandard(ns3::WifiPhyStandard standard) [member function]
cls.add_method('FinishConfigureStandard',
'void',
@@ -4599,6 +4604,11 @@
cls.add_method('SendDelbaFrame',
'void',
[param('ns3::Mac48Address', 'addr'), param('uint8_t', 'tid'), param('bool', 'byOriginator')])
+ ## edca-txop-n.h: void ns3::EdcaTxopN::DoStart() [member function]
+ cls.add_method('DoStart',
+ 'void',
+ [],
+ visibility='private', is_virtual=True)
return
def register_Ns3ErrorRateModel_methods(root_module, cls):
@@ -5250,6 +5260,11 @@
cls.add_method('StartActiveAssociation',
'void',
[])
+ ## nqsta-wifi-mac.h: void ns3::NqstaWifiMac::DoStart() [member function]
+ cls.add_method('DoStart',
+ 'void',
+ [],
+ visibility='private', is_virtual=True)
## nqsta-wifi-mac.h: void ns3::NqstaWifiMac::DoDispose() [member function]
cls.add_method('DoDispose',
'void',
@@ -5487,6 +5502,11 @@
'void',
[],
visibility='private', is_virtual=True)
+ ## qadhoc-wifi-mac.h: void ns3::QadhocWifiMac::DoStart() [member function]
+ cls.add_method('DoStart',
+ 'void',
+ [],
+ visibility='private', is_virtual=True)
## qadhoc-wifi-mac.h: void ns3::QadhocWifiMac::FinishConfigureStandard(ns3::WifiPhyStandard standard) [member function]
cls.add_method('FinishConfigureStandard',
'void',
@@ -5846,6 +5866,11 @@
cls.add_method('StartActiveAssociation',
'void',
[])
+ ## qsta-wifi-mac.h: void ns3::QstaWifiMac::DoStart() [member function]
+ cls.add_method('DoStart',
+ 'void',
+ [],
+ visibility='private', is_virtual=True)
## qsta-wifi-mac.h: void ns3::QstaWifiMac::DoDispose() [member function]
cls.add_method('DoDispose',
'void',
@@ -6317,6 +6342,11 @@
cls.add_method('Queue',
'void',
[param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader const &', 'hdr')])
+ ## dca-txop.h: void ns3::DcaTxop::DoStart() [member function]
+ cls.add_method('DoStart',
+ 'void',
+ [],
+ visibility='private', is_virtual=True)
## dca-txop.h: void ns3::DcaTxop::DoDispose() [member function]
cls.add_method('DoDispose',
'void',
--- a/src/helper/csma-helper.cc Fri Feb 26 09:35:09 2010 -0800
+++ b/src/helper/csma-helper.cc Fri Feb 26 10:31:26 2010 -0800
@@ -72,7 +72,7 @@
}
void
-CsmaHelper::EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool promiscuous)
+CsmaHelper::EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool explicitFilename, bool promiscuous)
{
//
// All of the Pcap enable functions vector through here including the ones
@@ -87,7 +87,17 @@
}
PcapHelper pcapHelper;
- std::string filename = pcapHelper.GetFilenameFromDevice (prefix, device);
+
+ std::string filename;
+ if (explicitFilename)
+ {
+ filename = prefix;
+ }
+ else
+ {
+ filename = pcapHelper.GetFilenameFromDevice (prefix, device);
+ }
+
Ptr<PcapFileWrapper> file = pcapHelper.CreateFile (filename, "w", PcapHelper::DLT_EN10MB);
if (promiscuous)
{
--- a/src/helper/csma-helper.h Fri Feb 26 09:35:09 2010 -0800
+++ b/src/helper/csma-helper.h Fri Feb 26 10:31:26 2010 -0800
@@ -207,9 +207,10 @@
*
* \param prefix Filename prefix to use for pcap files.
* \param nd Net device for which you want to enable tracing.
+ * \param explicitFilename Treat the prefix as an explicit filename if true
* \param promiscuous If true capture all possible packets available at the device.
*/
- virtual void EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool promiscuous = false);
+ virtual void EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool explicitFilename, bool promiscuous);
/**
* \brief Enable ascii trace output on the indicated net device.
--- a/src/helper/emu-helper.cc Fri Feb 26 09:35:09 2010 -0800
+++ b/src/helper/emu-helper.cc Fri Feb 26 10:31:26 2010 -0800
@@ -65,7 +65,7 @@
}
void
-EmuHelper::EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool promiscuous)
+EmuHelper::EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool explicitFilename, bool promiscuous)
{
//
// All of the Pcap enable functions vector through here including the ones
@@ -80,7 +80,17 @@
}
PcapHelper pcapHelper;
- std::string filename = pcapHelper.GetFilenameFromDevice (prefix, device);
+
+ std::string filename;
+ if (explicitFilename)
+ {
+ filename = prefix;
+ }
+ else
+ {
+ filename = pcapHelper.GetFilenameFromDevice (prefix, device);
+ }
+
Ptr<PcapFileWrapper> file = pcapHelper.CreateFile (filename, "w", PcapHelper::DLT_EN10MB);
if (promiscuous)
{
--- a/src/helper/emu-helper.h Fri Feb 26 09:35:09 2010 -0800
+++ b/src/helper/emu-helper.h Fri Feb 26 10:31:26 2010 -0800
@@ -123,9 +123,10 @@
*
* \param prefix Filename prefix to use for pcap files.
* \param nd Net device for which you want to enable tracing.
+ * \param explicitFilename Treat the prefix as an explicit filename if true
* \param promiscuous If true capture all possible packets available at the device.
*/
- virtual void EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool promiscuous = false);
+ virtual void EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool explicitFilename, bool promiscuous);
/**
* \brief Enable ascii trace output on the indicated net device.
--- a/src/helper/point-to-point-helper.cc Fri Feb 26 09:35:09 2010 -0800
+++ b/src/helper/point-to-point-helper.cc Fri Feb 26 10:31:26 2010 -0800
@@ -69,7 +69,7 @@
}
void
-PointToPointHelper::EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool promiscuous)
+PointToPointHelper::EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool explicitFilename, bool promiscuous)
{
//
// All of the Pcap enable functions vector through here including the ones
@@ -84,7 +84,17 @@
}
PcapHelper pcapHelper;
- std::string filename = pcapHelper.GetFilenameFromDevice (prefix, device);
+
+ std::string filename;
+ if (explicitFilename)
+ {
+ filename = prefix;
+ }
+ else
+ {
+ filename = pcapHelper.GetFilenameFromDevice (prefix, device);
+ }
+
Ptr<PcapFileWrapper> file = pcapHelper.CreateFile (filename, "w", PcapHelper::DLT_PPP);
pcapHelper.HookDefaultSink<PointToPointNetDevice> (device, "PromiscSniffer", file);
}
--- a/src/helper/point-to-point-helper.h Fri Feb 26 09:35:09 2010 -0800
+++ b/src/helper/point-to-point-helper.h Fri Feb 26 10:31:26 2010 -0800
@@ -153,9 +153,10 @@
*
* \param prefix Filename prefix to use for pcap files.
* \param nd Net device for which you want to enable tracing.
+ * \param explicitFilename Treat the prefix as an explicit filename if true
* \param promiscuous If true capture all possible packets available at the device.
*/
- virtual void EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool promiscuous = false);
+ virtual void EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool implicitFilename, bool promiscuous);
/**
* \brief Enable ascii trace output on the indicated net device.
--- a/src/helper/trace-helper.cc Fri Feb 26 09:35:09 2010 -0800
+++ b/src/helper/trace-helper.cc Fri Feb 26 10:31:26 2010 -0800
@@ -412,16 +412,16 @@
}
void
-PcapHelperForDevice::EnablePcap (std::string prefix, Ptr<NetDevice> nd, bool promiscuous)
+PcapHelperForDevice::EnablePcap (std::string prefix, Ptr<NetDevice> nd, bool explicitFilename, bool promiscuous)
{
- EnablePcapInternal (prefix, nd, promiscuous);
+ EnablePcapInternal (prefix, nd, explicitFilename, promiscuous);
}
void
-PcapHelperForDevice::EnablePcap (std::string prefix, std::string ndName, bool promiscuous)
+PcapHelperForDevice::EnablePcap (std::string prefix, std::string ndName, bool explicitFilename, bool promiscuous)
{
Ptr<NetDevice> nd = Names::Find<NetDevice> (ndName);
- EnablePcap (prefix, nd, promiscuous);
+ EnablePcap (prefix, nd, explicitFilename, promiscuous);
}
void
@@ -430,7 +430,7 @@
for (NetDeviceContainer::Iterator i = d.Begin (); i != d.End (); ++i)
{
Ptr<NetDevice> dev = *i;
- EnablePcap (prefix, dev, promiscuous);
+ EnablePcap (prefix, dev, false, promiscuous);
}
}
--- a/src/helper/trace-helper.h Fri Feb 26 09:35:09 2010 -0800
+++ b/src/helper/trace-helper.h Fri Feb 26 10:31:26 2010 -0800
@@ -342,18 +342,20 @@
*
* @param prefix Filename prefix to use for pcap files.
* @param nd Net device for which you want to enable tracing.
+ * @param explicitFilename Treat the prefix as an explicit filename if true
* @param promiscuous If true capture all possible packets available at the device.
*/
- virtual void EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool promiscuous) = 0;
+ virtual void EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool explicitFilename, bool promiscuous) = 0;
/**
* @brief Enable pcap output the indicated net device.
*
* @param prefix Filename prefix to use for pcap files.
* @param nd Net device for which you want to enable tracing.
+ * @param explicitFilename Treat the prefix as an explicit filename if true
* @param promiscuous If true capture all possible packets available at the device.
*/
- void EnablePcap (std::string prefix, Ptr<NetDevice> nd, bool promiscuous = false);
+ void EnablePcap (std::string prefix, Ptr<NetDevice> nd, bool explicitFilename = false, bool promiscuous = false);
/**
* @brief Enable pcap output the indicated net device using a device previously
@@ -361,9 +363,10 @@
*
* @param filename filename prefix to use for pcap files.
* @param ndName The name of the net device in which you want to enable tracing.
+ * @param explicitFilename Treat the prefix as an explicit filename if true
* @param promiscuous If true capture all possible packets available at the device.
*/
- void EnablePcap (std::string prefix, std::string ndName, bool promiscuous = false);
+ void EnablePcap (std::string prefix, std::string ndName, bool explicitFilename = false, bool promiscuous = false);
/**
* @brief Enable pcap output on each device in the container which is of the
--- a/src/helper/yans-wifi-helper.cc Fri Feb 26 09:35:09 2010 -0800
+++ b/src/helper/yans-wifi-helper.cc Fri Feb 26 10:31:26 2010 -0800
@@ -380,7 +380,7 @@
}
void
-YansWifiPhyHelper::EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool promiscuous)
+YansWifiPhyHelper::EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool explicitFilename, bool promiscuous)
{
//
// All of the Pcap enable functions vector through here including the ones
@@ -398,7 +398,15 @@
NS_ABORT_MSG_IF (phy == 0, "YansWifiPhyHelper::EnablePcapInternal(): Phy layer in WifiNetDevice must be set");
PcapHelper pcapHelper;
- std::string filename = pcapHelper.GetFilenameFromDevice (prefix, device);
+ std::string filename;
+ if (explicitFilename)
+ {
+ filename = prefix;
+ }
+ else
+ {
+ filename = pcapHelper.GetFilenameFromDevice (prefix, device);
+ }
Ptr<PcapFileWrapper> file = pcapHelper.CreateFile (filename, "w", m_pcapDlt);
--- a/src/helper/yans-wifi-helper.h Fri Feb 26 09:35:09 2010 -0800
+++ b/src/helper/yans-wifi-helper.h Fri Feb 26 10:31:26 2010 -0800
@@ -243,7 +243,7 @@
* @param nd Net device for which you want to enable tracing.
* @param promiscuous If true capture all possible packets available at the device.
*/
- virtual void EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool promiscuous);
+ virtual void EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool explicitFilename, bool promiscuous);
/**
* \brief Enable ascii trace output on the indicated net device.