diff --git a/bindings/python/apidefs/gcc-ILP32/ns3_module_helper.py b/bindings/python/apidefs/gcc-ILP32/ns3_module_helper.py index b38deda19..8076e0b70 100644 --- a/bindings/python/apidefs/gcc-ILP32/ns3_module_helper.py +++ b/bindings/python/apidefs/gcc-ILP32/ns3_module_helper.py @@ -1355,14 +1355,14 @@ def register_Ns3PcapHelperForDevice_methods(root_module, cls): 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 nd, bool promiscuous=false) [member function] + ## trace-helper.h: void ns3::PcapHelperForDevice::EnablePcap(std::string prefix, ns3::Ptr 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 @@ def register_Ns3PcapHelperForDevice_methods(root_module, cls): 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 nd, bool promiscuous) [member function] + ## trace-helper.h: void ns3::PcapHelperForDevice::EnablePcapInternal(std::string prefix, ns3::Ptr 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 @@ def register_Ns3PointToPointHelper_methods(root_module, cls): '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 nd, bool promiscuous=false) [member function] + ## point-to-point-helper.h: void ns3::PointToPointHelper::EnablePcapInternal(std::string prefix, ns3::Ptr 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 @@ def register_Ns3YansWifiPhyHelper_methods(root_module, cls): '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 nd, bool promiscuous) [member function] + ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::EnablePcapInternal(std::string prefix, ns3::Ptr 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 @@ def register_Ns3CsmaHelper_methods(root_module, cls): '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 nd, bool promiscuous=false) [member function] + ## csma-helper.h: void ns3::CsmaHelper::EnablePcapInternal(std::string prefix, ns3::Ptr 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 @@ def register_Ns3EmuHelper_methods(root_module, cls): '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 nd, bool promiscuous=false) [member function] + ## emu-helper.h: void ns3::EmuHelper::EnablePcapInternal(std::string prefix, ns3::Ptr 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 diff --git a/bindings/python/apidefs/gcc-ILP32/ns3_module_mesh.py b/bindings/python/apidefs/gcc-ILP32/ns3_module_mesh.py index 62f2edf56..fc5c7c09b 100644 --- a/bindings/python/apidefs/gcc-ILP32/ns3_module_mesh.py +++ b/bindings/python/apidefs/gcc-ILP32/ns3_module_mesh.py @@ -514,6 +514,11 @@ def register_Ns3MeshWifiInterfaceMac_methods(root_module, cls): '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 packet, ns3::Mac48Address src, ns3::Mac48Address dst) [member function] cls.add_method('ForwardUp', 'void', diff --git a/bindings/python/apidefs/gcc-ILP32/ns3_module_wifi.py b/bindings/python/apidefs/gcc-ILP32/ns3_module_wifi.py index 0ed46be35..3a50f2526 100644 --- a/bindings/python/apidefs/gcc-ILP32/ns3_module_wifi.py +++ b/bindings/python/apidefs/gcc-ILP32/ns3_module_wifi.py @@ -3778,6 +3778,11 @@ def register_Ns3AdhocWifiMac_methods(root_module, cls): '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 @@ def register_Ns3EdcaTxopN_methods(root_module, cls): 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 @@ def register_Ns3NqstaWifiMac_methods(root_module, cls): 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 @@ def register_Ns3QadhocWifiMac_methods(root_module, cls): '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 @@ def register_Ns3QstaWifiMac_methods(root_module, cls): 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 @@ def register_Ns3DcaTxop_methods(root_module, cls): 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', diff --git a/bindings/python/apidefs/gcc-LP64/ns3_module_helper.py b/bindings/python/apidefs/gcc-LP64/ns3_module_helper.py index b38deda19..8076e0b70 100644 --- a/bindings/python/apidefs/gcc-LP64/ns3_module_helper.py +++ b/bindings/python/apidefs/gcc-LP64/ns3_module_helper.py @@ -1355,14 +1355,14 @@ def register_Ns3PcapHelperForDevice_methods(root_module, cls): 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 nd, bool promiscuous=false) [member function] + ## trace-helper.h: void ns3::PcapHelperForDevice::EnablePcap(std::string prefix, ns3::Ptr 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 @@ def register_Ns3PcapHelperForDevice_methods(root_module, cls): 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 nd, bool promiscuous) [member function] + ## trace-helper.h: void ns3::PcapHelperForDevice::EnablePcapInternal(std::string prefix, ns3::Ptr 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 @@ def register_Ns3PointToPointHelper_methods(root_module, cls): '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 nd, bool promiscuous=false) [member function] + ## point-to-point-helper.h: void ns3::PointToPointHelper::EnablePcapInternal(std::string prefix, ns3::Ptr 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 @@ def register_Ns3YansWifiPhyHelper_methods(root_module, cls): '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 nd, bool promiscuous) [member function] + ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::EnablePcapInternal(std::string prefix, ns3::Ptr 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 @@ def register_Ns3CsmaHelper_methods(root_module, cls): '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 nd, bool promiscuous=false) [member function] + ## csma-helper.h: void ns3::CsmaHelper::EnablePcapInternal(std::string prefix, ns3::Ptr 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 @@ def register_Ns3EmuHelper_methods(root_module, cls): '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 nd, bool promiscuous=false) [member function] + ## emu-helper.h: void ns3::EmuHelper::EnablePcapInternal(std::string prefix, ns3::Ptr 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 diff --git a/bindings/python/apidefs/gcc-LP64/ns3_module_mesh.py b/bindings/python/apidefs/gcc-LP64/ns3_module_mesh.py index 62f2edf56..fc5c7c09b 100644 --- a/bindings/python/apidefs/gcc-LP64/ns3_module_mesh.py +++ b/bindings/python/apidefs/gcc-LP64/ns3_module_mesh.py @@ -514,6 +514,11 @@ def register_Ns3MeshWifiInterfaceMac_methods(root_module, cls): '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 packet, ns3::Mac48Address src, ns3::Mac48Address dst) [member function] cls.add_method('ForwardUp', 'void', diff --git a/bindings/python/apidefs/gcc-LP64/ns3_module_wifi.py b/bindings/python/apidefs/gcc-LP64/ns3_module_wifi.py index 0ed46be35..3a50f2526 100644 --- a/bindings/python/apidefs/gcc-LP64/ns3_module_wifi.py +++ b/bindings/python/apidefs/gcc-LP64/ns3_module_wifi.py @@ -3778,6 +3778,11 @@ def register_Ns3AdhocWifiMac_methods(root_module, cls): '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 @@ def register_Ns3EdcaTxopN_methods(root_module, cls): 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 @@ def register_Ns3NqstaWifiMac_methods(root_module, cls): 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 @@ def register_Ns3QadhocWifiMac_methods(root_module, cls): '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 @@ def register_Ns3QstaWifiMac_methods(root_module, cls): 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 @@ def register_Ns3DcaTxop_methods(root_module, cls): 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', diff --git a/src/helper/csma-helper.cc b/src/helper/csma-helper.cc index 85149ad1a..e2be9d663 100644 --- a/src/helper/csma-helper.cc +++ b/src/helper/csma-helper.cc @@ -72,7 +72,7 @@ CsmaHelper::SetChannelAttribute (std::string n1, const AttributeValue &v1) } void -CsmaHelper::EnablePcapInternal (std::string prefix, Ptr nd, bool promiscuous) +CsmaHelper::EnablePcapInternal (std::string prefix, Ptr nd, bool explicitFilename, bool promiscuous) { // // All of the Pcap enable functions vector through here including the ones @@ -87,7 +87,17 @@ CsmaHelper::EnablePcapInternal (std::string prefix, Ptr nd, bool prom } PcapHelper pcapHelper; - std::string filename = pcapHelper.GetFilenameFromDevice (prefix, device); + + std::string filename; + if (explicitFilename) + { + filename = prefix; + } + else + { + filename = pcapHelper.GetFilenameFromDevice (prefix, device); + } + Ptr file = pcapHelper.CreateFile (filename, "w", PcapHelper::DLT_EN10MB); if (promiscuous) { diff --git a/src/helper/csma-helper.h b/src/helper/csma-helper.h index 67a788cf0..3d94fd449 100644 --- a/src/helper/csma-helper.h +++ b/src/helper/csma-helper.h @@ -207,9 +207,10 @@ private: * * \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 nd, bool promiscuous = false); + virtual void EnablePcapInternal (std::string prefix, Ptr nd, bool explicitFilename, bool promiscuous); /** * \brief Enable ascii trace output on the indicated net device. diff --git a/src/helper/emu-helper.cc b/src/helper/emu-helper.cc index e2d288f5c..b28124aa1 100644 --- a/src/helper/emu-helper.cc +++ b/src/helper/emu-helper.cc @@ -65,7 +65,7 @@ EmuHelper::SetAttribute (std::string n1, const AttributeValue &v1) } void -EmuHelper::EnablePcapInternal (std::string prefix, Ptr nd, bool promiscuous) +EmuHelper::EnablePcapInternal (std::string prefix, Ptr nd, bool explicitFilename, bool promiscuous) { // // All of the Pcap enable functions vector through here including the ones @@ -80,7 +80,17 @@ EmuHelper::EnablePcapInternal (std::string prefix, Ptr nd, bool promi } PcapHelper pcapHelper; - std::string filename = pcapHelper.GetFilenameFromDevice (prefix, device); + + std::string filename; + if (explicitFilename) + { + filename = prefix; + } + else + { + filename = pcapHelper.GetFilenameFromDevice (prefix, device); + } + Ptr file = pcapHelper.CreateFile (filename, "w", PcapHelper::DLT_EN10MB); if (promiscuous) { diff --git a/src/helper/emu-helper.h b/src/helper/emu-helper.h index 282acba87..baa24acc6 100644 --- a/src/helper/emu-helper.h +++ b/src/helper/emu-helper.h @@ -123,9 +123,10 @@ private: * * \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 nd, bool promiscuous = false); + virtual void EnablePcapInternal (std::string prefix, Ptr nd, bool explicitFilename, bool promiscuous); /** * \brief Enable ascii trace output on the indicated net device. diff --git a/src/helper/point-to-point-helper.cc b/src/helper/point-to-point-helper.cc index 5e3304329..2c1642a57 100644 --- a/src/helper/point-to-point-helper.cc +++ b/src/helper/point-to-point-helper.cc @@ -69,7 +69,7 @@ PointToPointHelper::SetChannelAttribute (std::string n1, const AttributeValue &v } void -PointToPointHelper::EnablePcapInternal (std::string prefix, Ptr nd, bool promiscuous) +PointToPointHelper::EnablePcapInternal (std::string prefix, Ptr nd, bool explicitFilename, bool promiscuous) { // // All of the Pcap enable functions vector through here including the ones @@ -84,7 +84,17 @@ PointToPointHelper::EnablePcapInternal (std::string prefix, Ptr nd, b } PcapHelper pcapHelper; - std::string filename = pcapHelper.GetFilenameFromDevice (prefix, device); + + std::string filename; + if (explicitFilename) + { + filename = prefix; + } + else + { + filename = pcapHelper.GetFilenameFromDevice (prefix, device); + } + Ptr file = pcapHelper.CreateFile (filename, "w", PcapHelper::DLT_PPP); pcapHelper.HookDefaultSink (device, "PromiscSniffer", file); } diff --git a/src/helper/point-to-point-helper.h b/src/helper/point-to-point-helper.h index b3f37293a..3e716c0c2 100644 --- a/src/helper/point-to-point-helper.h +++ b/src/helper/point-to-point-helper.h @@ -153,9 +153,10 @@ private: * * \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 nd, bool promiscuous = false); + virtual void EnablePcapInternal (std::string prefix, Ptr nd, bool implicitFilename, bool promiscuous); /** * \brief Enable ascii trace output on the indicated net device. diff --git a/src/helper/trace-helper.cc b/src/helper/trace-helper.cc index bdb294a0f..976cb0bc7 100644 --- a/src/helper/trace-helper.cc +++ b/src/helper/trace-helper.cc @@ -412,16 +412,16 @@ AsciiTraceHelper::DefaultReceiveSinkWithContext (Ptr stream } void -PcapHelperForDevice::EnablePcap (std::string prefix, Ptr nd, bool promiscuous) +PcapHelperForDevice::EnablePcap (std::string prefix, Ptr 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 nd = Names::Find (ndName); - EnablePcap (prefix, nd, promiscuous); + EnablePcap (prefix, nd, explicitFilename, promiscuous); } void @@ -430,7 +430,7 @@ PcapHelperForDevice::EnablePcap (std::string prefix, NetDeviceContainer d, bool for (NetDeviceContainer::Iterator i = d.Begin (); i != d.End (); ++i) { Ptr dev = *i; - EnablePcap (prefix, dev, promiscuous); + EnablePcap (prefix, dev, false, promiscuous); } } diff --git a/src/helper/trace-helper.h b/src/helper/trace-helper.h index 464c0e8d3..f2e393abb 100644 --- a/src/helper/trace-helper.h +++ b/src/helper/trace-helper.h @@ -342,18 +342,20 @@ public: * * @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 nd, bool promiscuous) = 0; + virtual void EnablePcapInternal (std::string prefix, Ptr 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 nd, bool promiscuous = false); + void EnablePcap (std::string prefix, Ptr nd, bool explicitFilename = false, bool promiscuous = false); /** * @brief Enable pcap output the indicated net device using a device previously @@ -361,9 +363,10 @@ public: * * @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 diff --git a/src/helper/yans-wifi-helper.cc b/src/helper/yans-wifi-helper.cc index e87343dc8..afaabeb4e 100644 --- a/src/helper/yans-wifi-helper.cc +++ b/src/helper/yans-wifi-helper.cc @@ -380,7 +380,7 @@ YansWifiPhyHelper::SetPcapDataLinkType (enum SupportedPcapDataLinkTypes dlt) } void -YansWifiPhyHelper::EnablePcapInternal (std::string prefix, Ptr nd, bool promiscuous) +YansWifiPhyHelper::EnablePcapInternal (std::string prefix, Ptr nd, bool explicitFilename, bool promiscuous) { // // All of the Pcap enable functions vector through here including the ones @@ -398,7 +398,15 @@ YansWifiPhyHelper::EnablePcapInternal (std::string prefix, Ptr nd, bo 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 file = pcapHelper.CreateFile (filename, "w", m_pcapDlt); diff --git a/src/helper/yans-wifi-helper.h b/src/helper/yans-wifi-helper.h index 9093044e0..c1252a532 100644 --- a/src/helper/yans-wifi-helper.h +++ b/src/helper/yans-wifi-helper.h @@ -243,7 +243,7 @@ private: * @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 nd, bool promiscuous); + virtual void EnablePcapInternal (std::string prefix, Ptr nd, bool explicitFilename, bool promiscuous); /** * \brief Enable ascii trace output on the indicated net device.