redo pcap tracing
authorCraig Dowell <craigdo@ee.washington.edu>
Mon, 04 Jan 2010 10:35:32 -0800
changeset 6009 e1b696a1ed28
parent 5893 2654e75513dc
child 6010 2f8808d4bb93
redo pcap tracing
bindings/python/apidefs/gcc-ILP32/ns3_module_common.py
bindings/python/apidefs/gcc-ILP32/ns3_module_core.py
bindings/python/apidefs/gcc-ILP32/ns3_module_helper.py
bindings/python/apidefs/gcc-LP64/ns3_module_common.py
bindings/python/apidefs/gcc-LP64/ns3_module_core.py
bindings/python/apidefs/gcc-LP64/ns3_module_helper.py
examples/csma/csma-bridge-one-hop.cc
examples/csma/csma-bridge.cc
examples/csma/csma-bridge.py
examples/csma/csma-broadcast.cc
examples/csma/csma-multicast.cc
examples/csma/csma-one-subnet.cc
examples/csma/csma-star.cc
examples/emulation/emu-ping.cc
examples/emulation/emu-udp-echo.cc
examples/error-model/simple-error-model.cc
examples/ipv6/fragmentation-ipv6.cc
examples/ipv6/icmpv6-redirect.cc
examples/ipv6/loose-routing-ipv6.cc
examples/ipv6/ping6.cc
examples/ipv6/radvd-two-prefix.cc
examples/ipv6/radvd.cc
examples/naming/object-names.cc
examples/realtime/realtime-udp-echo.cc
examples/routing/dynamic-global-routing.cc
examples/routing/global-injection-slash32.cc
examples/routing/global-routing-slash32.cc
examples/routing/mixed-global-routing.cc
examples/routing/simple-alternate-routing.cc
examples/routing/simple-global-routing.cc
examples/routing/simple-point-to-point-olsr.cc
examples/routing/simple-routing-ping6.cc
examples/routing/static-routing-slash32.cc
examples/socket/socket-bound-static-routing.cc
examples/socket/socket-bound-tcp-static-routing.cc
examples/tap/tap-csma.cc
examples/tap/tap-wifi-dumbbell.cc
examples/tcp/star.cc
examples/tcp/tcp-large-transfer.cc
examples/tcp/tcp-nsc-lfn.cc
examples/tcp/tcp-nsc-zoo.cc
examples/tcp/tcp-star-server.cc
examples/tunneling/virtual-net-device.cc
examples/tutorial/second.cc
examples/tutorial/third.cc
examples/udp/udp-echo.cc
examples/wireless/mixed-wireless.cc
examples/wireless/wifi-simple-adhoc-grid.cc
examples/wireless/wifi-simple-adhoc.cc
examples/wireless/wifi-simple-infra.cc
examples/wireless/wifi-simple-interference.cc
examples/wireless/wifi-wired-bridging.cc
src/common/pcap-file-object.cc
src/common/pcap-file-object.h
src/common/wscript
src/helper/csma-helper.cc
src/helper/csma-helper.h
src/helper/emu-helper.cc
src/helper/emu-helper.h
src/helper/pcap-helper.cc
src/helper/pcap-helper.h
src/helper/pcap-user-helper.cc
src/helper/pcap-user-helper.h
src/helper/point-to-point-helper.cc
src/helper/point-to-point-helper.h
src/helper/wscript
src/helper/yans-wifi-helper.cc
src/helper/yans-wifi-helper.h
src/node/radiotap-header.cc
src/node/radiotap-header.h
src/node/wscript
src/test/ns3tcp/ns3tcp-cwnd-test-suite.cc
src/test/ns3tcp/ns3tcp-interop-test-suite.cc
src/test/ns3wifi/wifi-interference-test-suite.cc
--- a/bindings/python/apidefs/gcc-ILP32/ns3_module_common.py	Thu Dec 31 10:20:06 2009 -0800
+++ b/bindings/python/apidefs/gcc-ILP32/ns3_module_common.py	Mon Jan 04 10:35:32 2010 -0800
@@ -47,6 +47,8 @@
     module.add_class('Chunk', parent=root_module['ns3::ObjectBase'])
     ## header.h: ns3::Header [class]
     module.add_class('Header', parent=root_module['ns3::Chunk'])
+    ## pcap-file-object.h: ns3::PcapFileObject [class]
+    module.add_class('PcapFileObject', parent=root_module['ns3::Object'])
     ## pcap-writer.h: ns3::PcapWriter [class]
     module.add_class('PcapWriter', parent=root_module['ns3::Object'])
     ## simple-ref-count.h: ns3::SimpleRefCount<ns3::AsciiWriter, ns3::empty, ns3::DefaultDeleter<ns3::AsciiWriter> > [class]
@@ -175,6 +177,7 @@
     register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
     register_Ns3Chunk_methods(root_module, root_module['ns3::Chunk'])
     register_Ns3Header_methods(root_module, root_module['ns3::Header'])
+    register_Ns3PcapFileObject_methods(root_module, root_module['ns3::PcapFileObject'])
     register_Ns3PcapWriter_methods(root_module, root_module['ns3::PcapWriter'])
     register_Ns3Trailer_methods(root_module, root_module['ns3::Trailer'])
     register_Ns3AsciiWriter_methods(root_module, root_module['ns3::AsciiWriter'])
@@ -948,6 +951,38 @@
                    is_pure_virtual=True, is_const=True, is_virtual=True)
     return
 
+def register_Ns3PcapFileObject_methods(root_module, cls):
+    ## pcap-file-object.h: ns3::PcapFileObject::PcapFileObject(ns3::PcapFileObject const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::PcapFileObject const &', 'arg0')])
+    ## pcap-file-object.h: ns3::PcapFileObject::PcapFileObject() [constructor]
+    cls.add_constructor([])
+    ## pcap-file-object.h: void ns3::PcapFileObject::Close() [member function]
+    cls.add_method('Close', 
+                   'void', 
+                   [])
+    ## pcap-file-object.h: static ns3::TypeId ns3::PcapFileObject::GetTypeId() [member function]
+    cls.add_method('GetTypeId', 
+                   'ns3::TypeId', 
+                   [], 
+                   is_static=True)
+    ## pcap-file-object.h: bool ns3::PcapFileObject::Init(uint32_t dataLinkType, uint32_t snapLen=ns3::PcapFile::SNAPLEN_DEFAULT, int32_t tzCorrection=ns3::PcapFile::ZONE_DEFAULT) [member function]
+    cls.add_method('Init', 
+                   'bool', 
+                   [param('uint32_t', 'dataLinkType'), param('uint32_t', 'snapLen', default_value='ns3::PcapFile::SNAPLEN_DEFAULT'), param('int32_t', 'tzCorrection', default_value='ns3::PcapFile::ZONE_DEFAULT')])
+    ## pcap-file-object.h: bool ns3::PcapFileObject::Open(std::string const & filename, std::string const & mode) [member function]
+    cls.add_method('Open', 
+                   'bool', 
+                   [param('std::string const &', 'filename'), param('std::string const &', 'mode')])
+    ## pcap-file-object.h: bool ns3::PcapFileObject::Write(ns3::Time t, ns3::Ptr<ns3::Packet const> p) [member function]
+    cls.add_method('Write', 
+                   'bool', 
+                   [param('ns3::Time', 't'), param('ns3::Ptr< ns3::Packet const >', 'p')])
+    ## pcap-file-object.h: bool ns3::PcapFileObject::Write(ns3::Time t, uint8_t const * buffer, uint32_t length) [member function]
+    cls.add_method('Write', 
+                   'bool', 
+                   [param('ns3::Time', 't'), param('uint8_t const *', 'buffer'), param('uint32_t', 'length')])
+    return
+
 def register_Ns3PcapWriter_methods(root_module, cls):
     ## pcap-writer.h: ns3::PcapWriter::PcapWriter(ns3::PcapWriter const & arg0) [copy constructor]
     cls.add_constructor([param('ns3::PcapWriter const &', 'arg0')])
--- a/bindings/python/apidefs/gcc-ILP32/ns3_module_core.py	Thu Dec 31 10:20:06 2009 -0800
+++ b/bindings/python/apidefs/gcc-ILP32/ns3_module_core.py	Mon Jan 04 10:35:32 2010 -0800
@@ -3043,6 +3043,11 @@
     module.add_function('MakeBooleanChecker', 
                         'ns3::Ptr< ns3::AttributeChecker const >', 
                         [])
+    ## callback.h: extern ns3::Callback<void,ns3::Ptr<const ns3::Packet>,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ns3::MakeBoundCallback(void (*)( ::ns3::Ptr<ns3::PcapFileObject>,::ns3::Ptr<ns3::Packet const> ) * fnPtr, ns3::Ptr<ns3::PcapFileObject> a) [free function]
+    module.add_function('MakeBoundCallback', 
+                        'ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 
+                        [param('void ( * ) ( ns3::Ptr< ns3::PcapFileObject >, ns3::Ptr< ns3::Packet const > ) *', 'fnPtr'), param('ns3::Ptr< ns3::PcapFileObject >', 'a')], 
+                        template_parameters=['void', 'ns3::Ptr<ns3::PcapFileObject>', 'ns3::Ptr<ns3::PcapFileObject>', 'ns3::Ptr<ns3::Packet const>'])
     ## callback.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeCallbackChecker() [free function]
     module.add_function('MakeCallbackChecker', 
                         'ns3::Ptr< ns3::AttributeChecker const >', 
@@ -3097,7 +3102,7 @@
     module.add_function('TypeNameGet', 
                         'std::string', 
                         [], 
-                        template_parameters=['long long'])
+                        template_parameters=['long'])
     ## type-name.h: extern std::string ns3::TypeNameGet() [free function]
     module.add_function('TypeNameGet', 
                         'std::string', 
--- a/bindings/python/apidefs/gcc-ILP32/ns3_module_helper.py	Thu Dec 31 10:20:06 2009 -0800
+++ b/bindings/python/apidefs/gcc-ILP32/ns3_module_helper.py	Mon Jan 04 10:35:32 2010 -0800
@@ -11,12 +11,8 @@
     module.add_class('AthstatsHelper', allow_subclassing=False)
     ## bridge-helper.h: ns3::BridgeHelper [class]
     module.add_class('BridgeHelper', allow_subclassing=False)
-    ## csma-helper.h: ns3::CsmaHelper [class]
-    module.add_class('CsmaHelper', allow_subclassing=False)
     ## csma-star-helper.h: ns3::CsmaStarHelper [class]
     module.add_class('CsmaStarHelper', allow_subclassing=False)
-    ## emu-helper.h: ns3::EmuHelper [class]
-    module.add_class('EmuHelper', allow_subclassing=False)
     ## flow-monitor-helper.h: ns3::FlowMonitorHelper [class]
     module.add_class('FlowMonitorHelper', allow_subclassing=False)
     ## internet-stack-helper.h: ns3::InternetStackHelper [class]
@@ -57,6 +53,12 @@
     module.add_class('PacketSinkHelper', allow_subclassing=False)
     ## packet-socket-helper.h: ns3::PacketSocketHelper [class]
     module.add_class('PacketSocketHelper', allow_subclassing=False)
+    ## pcap-helper.h: ns3::PcapHelper [class]
+    module.add_class('PcapHelper', allow_subclassing=False)
+    ## pcap-helper.h: ns3::PcapHelper::DataLinkType [enumeration]
+    module.add_enum('DataLinkType', ['DLT_NULL', 'DLT_EN10MB', 'DLT_PPP', 'DLT_IEEE802_11', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO'], outer_class=root_module['ns3::PcapHelper'])
+    ## pcap-user-helper.h: ns3::PcapUserHelper [class]
+    module.add_class('PcapUserHelper', allow_subclassing=False)
     ## ping6-helper.h: ns3::Ping6Helper [class]
     module.add_class('Ping6Helper', allow_subclassing=False)
     ## point-to-point-dumbbell-helper.h: ns3::PointToPointDumbbellHelper [class]
@@ -64,7 +66,7 @@
     ## point-to-point-grid-helper.h: ns3::PointToPointGridHelper [class]
     module.add_class('PointToPointGridHelper', allow_subclassing=False)
     ## point-to-point-helper.h: ns3::PointToPointHelper [class]
-    module.add_class('PointToPointHelper', allow_subclassing=False)
+    module.add_class('PointToPointHelper', allow_subclassing=False, parent=root_module['ns3::PcapUserHelper'])
     ## point-to-point-star-helper.h: ns3::PointToPointStarHelper [class]
     module.add_class('PointToPointStarHelper', allow_subclassing=False)
     ## tap-bridge-helper.h: ns3::TapBridgeHelper [class]
@@ -89,12 +91,12 @@
     module.add_class('WifiPhyHelper', allow_subclassing=False)
     ## yans-wifi-helper.h: ns3::YansWifiChannelHelper [class]
     module.add_class('YansWifiChannelHelper', allow_subclassing=False)
-    ## yans-wifi-helper.h: ns3::YansWifiPhyHelper [class]
-    module.add_class('YansWifiPhyHelper', allow_subclassing=False, parent=root_module['ns3::WifiPhyHelper'])
-    ## yans-wifi-helper.h: ns3::YansWifiPhyHelper::PcapFormat [enumeration]
-    module.add_enum('PcapFormat', ['PCAP_FORMAT_80211', 'PCAP_FORMAT_80211_PRISM', 'PCAP_FORMAT_80211_RADIOTAP'], outer_class=root_module['ns3::YansWifiPhyHelper'])
     ## aodv-helper.h: ns3::AodvHelper [class]
     module.add_class('AodvHelper', allow_subclassing=False, parent=root_module['ns3::Ipv4RoutingHelper'])
+    ## csma-helper.h: ns3::CsmaHelper [class]
+    module.add_class('CsmaHelper', allow_subclassing=False, parent=root_module['ns3::PcapUserHelper'])
+    ## emu-helper.h: ns3::EmuHelper [class]
+    module.add_class('EmuHelper', allow_subclassing=False, parent=root_module['ns3::PcapUserHelper'])
     ## ipv4-global-routing-helper.h: ns3::Ipv4GlobalRoutingHelper [class]
     module.add_class('Ipv4GlobalRoutingHelper', allow_subclassing=False, parent=root_module['ns3::Ipv4RoutingHelper'])
     ## ipv4-list-routing-helper.h: ns3::Ipv4ListRoutingHelper [class]
@@ -203,9 +205,7 @@
     register_Ns3ApplicationContainer_methods(root_module, root_module['ns3::ApplicationContainer'])
     register_Ns3AthstatsHelper_methods(root_module, root_module['ns3::AthstatsHelper'])
     register_Ns3BridgeHelper_methods(root_module, root_module['ns3::BridgeHelper'])
-    register_Ns3CsmaHelper_methods(root_module, root_module['ns3::CsmaHelper'])
     register_Ns3CsmaStarHelper_methods(root_module, root_module['ns3::CsmaStarHelper'])
-    register_Ns3EmuHelper_methods(root_module, root_module['ns3::EmuHelper'])
     register_Ns3FlowMonitorHelper_methods(root_module, root_module['ns3::FlowMonitorHelper'])
     register_Ns3InternetStackHelper_methods(root_module, root_module['ns3::InternetStackHelper'])
     register_Ns3Ipv4AddressHelper_methods(root_module, root_module['ns3::Ipv4AddressHelper'])
@@ -225,6 +225,8 @@
     register_Ns3OnOffHelper_methods(root_module, root_module['ns3::OnOffHelper'])
     register_Ns3PacketSinkHelper_methods(root_module, root_module['ns3::PacketSinkHelper'])
     register_Ns3PacketSocketHelper_methods(root_module, root_module['ns3::PacketSocketHelper'])
+    register_Ns3PcapHelper_methods(root_module, root_module['ns3::PcapHelper'])
+    register_Ns3PcapUserHelper_methods(root_module, root_module['ns3::PcapUserHelper'])
     register_Ns3Ping6Helper_methods(root_module, root_module['ns3::Ping6Helper'])
     register_Ns3PointToPointDumbbellHelper_methods(root_module, root_module['ns3::PointToPointDumbbellHelper'])
     register_Ns3PointToPointGridHelper_methods(root_module, root_module['ns3::PointToPointGridHelper'])
@@ -241,8 +243,9 @@
     register_Ns3WifiMacHelper_methods(root_module, root_module['ns3::WifiMacHelper'])
     register_Ns3WifiPhyHelper_methods(root_module, root_module['ns3::WifiPhyHelper'])
     register_Ns3YansWifiChannelHelper_methods(root_module, root_module['ns3::YansWifiChannelHelper'])
-    register_Ns3YansWifiPhyHelper_methods(root_module, root_module['ns3::YansWifiPhyHelper'])
     register_Ns3AodvHelper_methods(root_module, root_module['ns3::AodvHelper'])
+    register_Ns3CsmaHelper_methods(root_module, root_module['ns3::CsmaHelper'])
+    register_Ns3EmuHelper_methods(root_module, root_module['ns3::EmuHelper'])
     register_Ns3Ipv4GlobalRoutingHelper_methods(root_module, root_module['ns3::Ipv4GlobalRoutingHelper'])
     register_Ns3Ipv4ListRoutingHelper_methods(root_module, root_module['ns3::Ipv4ListRoutingHelper'])
     register_Ns3Ipv4NixVectorHelper_methods(root_module, root_module['ns3::Ipv4NixVectorHelper'])
@@ -372,120 +375,6 @@
                    [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')])
     return
 
-def register_Ns3CsmaHelper_methods(root_module, cls):
-    ## csma-helper.h: ns3::CsmaHelper::CsmaHelper(ns3::CsmaHelper const & arg0) [copy constructor]
-    cls.add_constructor([param('ns3::CsmaHelper const &', 'arg0')])
-    ## csma-helper.h: ns3::CsmaHelper::CsmaHelper() [constructor]
-    cls.add_constructor([])
-    ## csma-helper.h: static void ns3::CsmaHelper::EnableAscii(std::ostream & os, uint32_t nodeid, uint32_t deviceid) [member function]
-    cls.add_method('EnableAscii', 
-                   'void', 
-                   [param('std::ostream &', 'os'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')], 
-                   is_static=True)
-    ## csma-helper.h: static void ns3::CsmaHelper::EnableAscii(std::ostream & os, ns3::NetDeviceContainer d) [member function]
-    cls.add_method('EnableAscii', 
-                   'void', 
-                   [param('std::ostream &', 'os'), param('ns3::NetDeviceContainer', 'd')], 
-                   is_static=True)
-    ## csma-helper.h: static void ns3::CsmaHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function]
-    cls.add_method('EnableAscii', 
-                   'void', 
-                   [param('std::ostream &', 'os'), param('ns3::NodeContainer', 'n')], 
-                   is_static=True)
-    ## csma-helper.h: static void ns3::CsmaHelper::EnableAsciiAll(std::ostream & os) [member function]
-    cls.add_method('EnableAsciiAll', 
-                   'void', 
-                   [param('std::ostream &', 'os')], 
-                   is_static=True)
-    ## csma-helper.h: static void ns3::CsmaHelper::EnablePcap(std::string filename, uint32_t nodeid, uint32_t deviceid, bool promiscuous) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid'), param('bool', 'promiscuous')], 
-                   is_static=True)
-    ## csma-helper.h: static void ns3::CsmaHelper::EnablePcap(std::string filename, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous')], 
-                   is_static=True)
-    ## csma-helper.h: static void ns3::CsmaHelper::EnablePcap(std::string filename, std::string ndName, bool promiscuous) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('std::string', 'ndName'), param('bool', 'promiscuous')], 
-                   is_static=True)
-    ## csma-helper.h: static void ns3::CsmaHelper::EnablePcap(std::string filename, ns3::NetDeviceContainer d, bool promiscuous) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('ns3::NetDeviceContainer', 'd'), param('bool', 'promiscuous')], 
-                   is_static=True)
-    ## csma-helper.h: static void ns3::CsmaHelper::EnablePcap(std::string filename, ns3::NodeContainer n, bool promiscuous) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('ns3::NodeContainer', 'n'), param('bool', 'promiscuous')], 
-                   is_static=True)
-    ## csma-helper.h: static void ns3::CsmaHelper::EnablePcapAll(std::string filename, bool promiscuous) [member function]
-    cls.add_method('EnablePcapAll', 
-                   'void', 
-                   [param('std::string', 'filename'), param('bool', 'promiscuous')], 
-                   is_static=True)
-    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::Ptr<ns3::Node> node) const [member function]
-    cls.add_method('Install', 
-                   'ns3::NetDeviceContainer', 
-                   [param('ns3::Ptr< ns3::Node >', 'node')], 
-                   is_const=True)
-    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(std::string name) const [member function]
-    cls.add_method('Install', 
-                   'ns3::NetDeviceContainer', 
-                   [param('std::string', 'name')], 
-                   is_const=True)
-    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::CsmaChannel> channel) const [member function]
-    cls.add_method('Install', 
-                   'ns3::NetDeviceContainer', 
-                   [param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::Ptr< ns3::CsmaChannel >', 'channel')], 
-                   is_const=True)
-    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::Ptr<ns3::Node> node, std::string channelName) const [member function]
-    cls.add_method('Install', 
-                   'ns3::NetDeviceContainer', 
-                   [param('ns3::Ptr< ns3::Node >', 'node'), param('std::string', 'channelName')], 
-                   is_const=True)
-    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(std::string nodeName, ns3::Ptr<ns3::CsmaChannel> channel) const [member function]
-    cls.add_method('Install', 
-                   'ns3::NetDeviceContainer', 
-                   [param('std::string', 'nodeName'), param('ns3::Ptr< ns3::CsmaChannel >', 'channel')], 
-                   is_const=True)
-    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(std::string nodeName, std::string channelName) const [member function]
-    cls.add_method('Install', 
-                   'ns3::NetDeviceContainer', 
-                   [param('std::string', 'nodeName'), param('std::string', 'channelName')], 
-                   is_const=True)
-    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::NodeContainer const & c) const [member function]
-    cls.add_method('Install', 
-                   'ns3::NetDeviceContainer', 
-                   [param('ns3::NodeContainer const &', 'c')], 
-                   is_const=True)
-    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::NodeContainer const & c, ns3::Ptr<ns3::CsmaChannel> channel) const [member function]
-    cls.add_method('Install', 
-                   'ns3::NetDeviceContainer', 
-                   [param('ns3::NodeContainer const &', 'c'), param('ns3::Ptr< ns3::CsmaChannel >', 'channel')], 
-                   is_const=True)
-    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::NodeContainer const & c, std::string channelName) const [member function]
-    cls.add_method('Install', 
-                   'ns3::NetDeviceContainer', 
-                   [param('ns3::NodeContainer const &', 'c'), param('std::string', 'channelName')], 
-                   is_const=True)
-    ## csma-helper.h: void ns3::CsmaHelper::SetChannelAttribute(std::string n1, ns3::AttributeValue const & v1) [member function]
-    cls.add_method('SetChannelAttribute', 
-                   'void', 
-                   [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')])
-    ## csma-helper.h: void ns3::CsmaHelper::SetDeviceAttribute(std::string n1, ns3::AttributeValue const & v1) [member function]
-    cls.add_method('SetDeviceAttribute', 
-                   'void', 
-                   [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')])
-    ## csma-helper.h: void ns3::CsmaHelper::SetQueue(std::string type, std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue(), std::string n4="", ns3::AttributeValue const & v4=ns3::EmptyAttributeValue()) [member function]
-    cls.add_method('SetQueue', 
-                   'void', 
-                   [param('std::string', 'type'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()')])
-    return
-
 def register_Ns3CsmaStarHelper_methods(root_module, cls):
     ## csma-star-helper.h: ns3::CsmaStarHelper::CsmaStarHelper(ns3::CsmaStarHelper const & arg0) [copy constructor]
     cls.add_constructor([param('ns3::CsmaStarHelper const &', 'arg0')])
@@ -536,86 +425,6 @@
                    is_const=True)
     return
 
-def register_Ns3EmuHelper_methods(root_module, cls):
-    ## emu-helper.h: ns3::EmuHelper::EmuHelper(ns3::EmuHelper const & arg0) [copy constructor]
-    cls.add_constructor([param('ns3::EmuHelper const &', 'arg0')])
-    ## emu-helper.h: ns3::EmuHelper::EmuHelper() [constructor]
-    cls.add_constructor([])
-    ## emu-helper.h: static void ns3::EmuHelper::EnableAscii(std::ostream & os, uint32_t nodeid, uint32_t deviceid) [member function]
-    cls.add_method('EnableAscii', 
-                   'void', 
-                   [param('std::ostream &', 'os'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')], 
-                   is_static=True)
-    ## emu-helper.h: static void ns3::EmuHelper::EnableAscii(std::ostream & os, ns3::NetDeviceContainer d) [member function]
-    cls.add_method('EnableAscii', 
-                   'void', 
-                   [param('std::ostream &', 'os'), param('ns3::NetDeviceContainer', 'd')], 
-                   is_static=True)
-    ## emu-helper.h: static void ns3::EmuHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function]
-    cls.add_method('EnableAscii', 
-                   'void', 
-                   [param('std::ostream &', 'os'), param('ns3::NodeContainer', 'n')], 
-                   is_static=True)
-    ## emu-helper.h: static void ns3::EmuHelper::EnableAsciiAll(std::ostream & os) [member function]
-    cls.add_method('EnableAsciiAll', 
-                   'void', 
-                   [param('std::ostream &', 'os')], 
-                   is_static=True)
-    ## emu-helper.h: static void ns3::EmuHelper::EnablePcap(std::string filename, uint32_t nodeid, uint32_t deviceid, bool promiscuous) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid'), param('bool', 'promiscuous')], 
-                   is_static=True)
-    ## emu-helper.h: static void ns3::EmuHelper::EnablePcap(std::string filename, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous')], 
-                   is_static=True)
-    ## emu-helper.h: static void ns3::EmuHelper::EnablePcap(std::string filename, std::string ndName, bool promiscuous) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('std::string', 'ndName'), param('bool', 'promiscuous')], 
-                   is_static=True)
-    ## emu-helper.h: static void ns3::EmuHelper::EnablePcap(std::string filename, ns3::NetDeviceContainer d, bool promiscuous) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('ns3::NetDeviceContainer', 'd'), param('bool', 'promiscuous')], 
-                   is_static=True)
-    ## emu-helper.h: static void ns3::EmuHelper::EnablePcap(std::string filename, ns3::NodeContainer n, bool promiscuous) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('ns3::NodeContainer', 'n'), param('bool', 'promiscuous')], 
-                   is_static=True)
-    ## emu-helper.h: static void ns3::EmuHelper::EnablePcapAll(std::string filename, bool promiscuous) [member function]
-    cls.add_method('EnablePcapAll', 
-                   'void', 
-                   [param('std::string', 'filename'), param('bool', 'promiscuous')], 
-                   is_static=True)
-    ## emu-helper.h: ns3::NetDeviceContainer ns3::EmuHelper::Install(ns3::Ptr<ns3::Node> node) const [member function]
-    cls.add_method('Install', 
-                   'ns3::NetDeviceContainer', 
-                   [param('ns3::Ptr< ns3::Node >', 'node')], 
-                   is_const=True)
-    ## emu-helper.h: ns3::NetDeviceContainer ns3::EmuHelper::Install(std::string nodeName) const [member function]
-    cls.add_method('Install', 
-                   'ns3::NetDeviceContainer', 
-                   [param('std::string', 'nodeName')], 
-                   is_const=True)
-    ## emu-helper.h: ns3::NetDeviceContainer ns3::EmuHelper::Install(ns3::NodeContainer const & c) const [member function]
-    cls.add_method('Install', 
-                   'ns3::NetDeviceContainer', 
-                   [param('ns3::NodeContainer const &', 'c')], 
-                   is_const=True)
-    ## emu-helper.h: void ns3::EmuHelper::SetAttribute(std::string n1, ns3::AttributeValue const & v1) [member function]
-    cls.add_method('SetAttribute', 
-                   'void', 
-                   [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')])
-    ## emu-helper.h: void ns3::EmuHelper::SetQueue(std::string type, std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue(), std::string n4="", ns3::AttributeValue const & v4=ns3::EmptyAttributeValue()) [member function]
-    cls.add_method('SetQueue', 
-                   'void', 
-                   [param('std::string', 'type'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()')])
-    return
-
 def register_Ns3FlowMonitorHelper_methods(root_module, cls):
     ## flow-monitor-helper.h: ns3::FlowMonitorHelper::FlowMonitorHelper(ns3::FlowMonitorHelper const & arg0) [copy constructor]
     cls.add_constructor([param('ns3::FlowMonitorHelper const &', 'arg0')])
@@ -1310,6 +1119,57 @@
                    is_const=True)
     return
 
+def register_Ns3PcapHelper_methods(root_module, cls):
+    ## pcap-helper.h: ns3::PcapHelper::PcapHelper(ns3::PcapHelper const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::PcapHelper const &', 'arg0')])
+    ## pcap-helper.h: ns3::PcapHelper::PcapHelper() [constructor]
+    cls.add_constructor([])
+    ## pcap-helper.h: ns3::Ptr<ns3::PcapFileObject> ns3::PcapHelper::CreateFile(std::string filename, std::string filemode, uint32_t dataLinkType, uint32_t snapLen=65535, int32_t tzCorrection=0) [member function]
+    cls.add_method('CreateFile', 
+                   'ns3::Ptr< ns3::PcapFileObject >', 
+                   [param('std::string', 'filename'), param('std::string', 'filemode'), param('uint32_t', 'dataLinkType'), param('uint32_t', 'snapLen', default_value='65535'), param('int32_t', 'tzCorrection', default_value='0')])
+    ## pcap-helper.h: std::string ns3::PcapHelper::GetFilename(std::string prefix, ns3::Ptr<ns3::NetDevice> device, bool useObjectNames=true) [member function]
+    cls.add_method('GetFilename', 
+                   'std::string', 
+                   [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'device'), param('bool', 'useObjectNames', default_value='true')])
+    return
+
+def register_Ns3PcapUserHelper_methods(root_module, cls):
+    ## pcap-user-helper.h: ns3::PcapUserHelper::PcapUserHelper() [constructor]
+    cls.add_constructor([])
+    ## pcap-user-helper.h: ns3::PcapUserHelper::PcapUserHelper(ns3::PcapUserHelper const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::PcapUserHelper const &', 'arg0')])
+    ## pcap-user-helper.h: void ns3::PcapUserHelper::EnablePcap(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, 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')])
+    ## pcap-user-helper.h: void ns3::PcapUserHelper::EnablePcap(std::string prefix, std::string ndName, bool promiscuous=false) [member function]
+    cls.add_method('EnablePcap', 
+                   'void', 
+                   [param('std::string', 'prefix'), param('std::string', 'ndName'), param('bool', 'promiscuous', default_value='false')])
+    ## pcap-user-helper.h: void ns3::PcapUserHelper::EnablePcap(std::string filename, ns3::NetDeviceContainer d, bool promiscuous=false) [member function]
+    cls.add_method('EnablePcap', 
+                   'void', 
+                   [param('std::string', 'filename'), param('ns3::NetDeviceContainer', 'd'), param('bool', 'promiscuous', default_value='false')])
+    ## pcap-user-helper.h: void ns3::PcapUserHelper::EnablePcap(std::string filename, ns3::NodeContainer n, bool promiscuous=false) [member function]
+    cls.add_method('EnablePcap', 
+                   'void', 
+                   [param('std::string', 'filename'), param('ns3::NodeContainer', 'n'), param('bool', 'promiscuous', default_value='false')])
+    ## pcap-user-helper.h: void ns3::PcapUserHelper::EnablePcap(std::string filename, uint32_t nodeid, uint32_t deviceid, bool promiscuous=false) [member function]
+    cls.add_method('EnablePcap', 
+                   'void', 
+                   [param('std::string', 'filename'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid'), param('bool', 'promiscuous', default_value='false')])
+    ## pcap-user-helper.h: void ns3::PcapUserHelper::EnablePcapAll(std::string filename, bool promiscuous=false) [member function]
+    cls.add_method('EnablePcapAll', 
+                   'void', 
+                   [param('std::string', 'filename'), param('bool', 'promiscuous', default_value='false')])
+    ## pcap-user-helper.h: void ns3::PcapUserHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous) [member function]
+    cls.add_method('EnablePcapInternal', 
+                   'void', 
+                   [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous')], 
+                   is_pure_virtual=True, is_virtual=True)
+    return
+
 def register_Ns3Ping6Helper_methods(root_module, cls):
     ## ping6-helper.h: ns3::Ping6Helper::Ping6Helper(ns3::Ping6Helper const & arg0) [copy constructor]
     cls.add_constructor([param('ns3::Ping6Helper const &', 'arg0')])
@@ -1452,36 +1312,6 @@
                    'void', 
                    [param('std::ostream &', 'os')], 
                    is_static=True)
-    ## point-to-point-helper.h: static void ns3::PointToPointHelper::EnablePcap(std::string filename, uint32_t nodeid, uint32_t deviceid) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')], 
-                   is_static=True)
-    ## point-to-point-helper.h: static void ns3::PointToPointHelper::EnablePcap(std::string filename, ns3::Ptr<ns3::NetDevice> nd) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('ns3::Ptr< ns3::NetDevice >', 'nd')], 
-                   is_static=True)
-    ## point-to-point-helper.h: static void ns3::PointToPointHelper::EnablePcap(std::string filename, std::string ndName) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('std::string', 'ndName')], 
-                   is_static=True)
-    ## point-to-point-helper.h: static void ns3::PointToPointHelper::EnablePcap(std::string filename, ns3::NetDeviceContainer d) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('ns3::NetDeviceContainer', 'd')], 
-                   is_static=True)
-    ## point-to-point-helper.h: static void ns3::PointToPointHelper::EnablePcap(std::string filename, ns3::NodeContainer n) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('ns3::NodeContainer', 'n')], 
-                   is_static=True)
-    ## point-to-point-helper.h: static void ns3::PointToPointHelper::EnablePcapAll(std::string filename) [member function]
-    cls.add_method('EnablePcapAll', 
-                   'void', 
-                   [param('std::string', 'filename')], 
-                   is_static=True)
     ## point-to-point-helper.h: ns3::NetDeviceContainer ns3::PointToPointHelper::Install(ns3::NodeContainer c) [member function]
     cls.add_method('Install', 
                    'ns3::NetDeviceContainer', 
@@ -1514,6 +1344,11 @@
     cls.add_method('SetQueue', 
                    'void', 
                    [param('std::string', 'type'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()')])
+    ## point-to-point-helper.h: void ns3::PointToPointHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous=false) [member function]
+    cls.add_method('EnablePcapInternal', 
+                   'void', 
+                   [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous', default_value='false')], 
+                   visibility='private', is_virtual=True)
     return
 
 def register_Ns3PointToPointStarHelper_methods(root_module, cls):
@@ -1827,87 +1662,6 @@
                    [param('std::string', 'name'), param('std::string', 'n0', default_value='""'), param('ns3::AttributeValue const &', 'v0', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n5', default_value='""'), param('ns3::AttributeValue const &', 'v5', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n6', default_value='""'), param('ns3::AttributeValue const &', 'v6', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n7', default_value='""'), param('ns3::AttributeValue const &', 'v7', default_value='ns3::EmptyAttributeValue()')])
     return
 
-def register_Ns3YansWifiPhyHelper_methods(root_module, cls):
-    ## yans-wifi-helper.h: ns3::YansWifiPhyHelper::YansWifiPhyHelper(ns3::YansWifiPhyHelper const & arg0) [copy constructor]
-    cls.add_constructor([param('ns3::YansWifiPhyHelper const &', 'arg0')])
-    ## yans-wifi-helper.h: ns3::YansWifiPhyHelper::YansWifiPhyHelper() [constructor]
-    cls.add_constructor([])
-    ## yans-wifi-helper.h: static ns3::YansWifiPhyHelper ns3::YansWifiPhyHelper::Default() [member function]
-    cls.add_method('Default', 
-                   'ns3::YansWifiPhyHelper', 
-                   [], 
-                   is_static=True)
-    ## yans-wifi-helper.h: static void ns3::YansWifiPhyHelper::EnableAscii(std::ostream & os, uint32_t nodeid, uint32_t deviceid) [member function]
-    cls.add_method('EnableAscii', 
-                   'void', 
-                   [param('std::ostream &', 'os'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')], 
-                   is_static=True)
-    ## yans-wifi-helper.h: static void ns3::YansWifiPhyHelper::EnableAscii(std::ostream & os, ns3::NetDeviceContainer d) [member function]
-    cls.add_method('EnableAscii', 
-                   'void', 
-                   [param('std::ostream &', 'os'), param('ns3::NetDeviceContainer', 'd')], 
-                   is_static=True)
-    ## yans-wifi-helper.h: static void ns3::YansWifiPhyHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function]
-    cls.add_method('EnableAscii', 
-                   'void', 
-                   [param('std::ostream &', 'os'), param('ns3::NodeContainer', 'n')], 
-                   is_static=True)
-    ## yans-wifi-helper.h: static void ns3::YansWifiPhyHelper::EnableAsciiAll(std::ostream & os) [member function]
-    cls.add_method('EnableAsciiAll', 
-                   'void', 
-                   [param('std::ostream &', 'os')], 
-                   is_static=True)
-    ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::EnablePcap(std::string filename, uint32_t nodeid, uint32_t deviceid) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')])
-    ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::EnablePcap(std::string filename, ns3::Ptr<ns3::NetDevice> nd) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('ns3::Ptr< ns3::NetDevice >', 'nd')])
-    ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::EnablePcap(std::string filename, std::string ndName) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('std::string', 'ndName')])
-    ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::EnablePcap(std::string filename, ns3::NetDeviceContainer d) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('ns3::NetDeviceContainer', 'd')])
-    ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::EnablePcap(std::string filename, ns3::NodeContainer n) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('ns3::NodeContainer', 'n')])
-    ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::EnablePcapAll(std::string filename) [member function]
-    cls.add_method('EnablePcapAll', 
-                   'void', 
-                   [param('std::string', 'filename')])
-    ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::Set(std::string name, ns3::AttributeValue const & v) [member function]
-    cls.add_method('Set', 
-                   'void', 
-                   [param('std::string', 'name'), param('ns3::AttributeValue const &', 'v')])
-    ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::SetChannel(ns3::Ptr<ns3::YansWifiChannel> channel) [member function]
-    cls.add_method('SetChannel', 
-                   'void', 
-                   [param('ns3::Ptr< ns3::YansWifiChannel >', 'channel')])
-    ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::SetChannel(std::string channelName) [member function]
-    cls.add_method('SetChannel', 
-                   'void', 
-                   [param('std::string', 'channelName')])
-    ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::SetErrorRateModel(std::string name, std::string n0="", ns3::AttributeValue const & v0=ns3::EmptyAttributeValue(), std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue(), std::string n4="", ns3::AttributeValue const & v4=ns3::EmptyAttributeValue(), std::string n5="", ns3::AttributeValue const & v5=ns3::EmptyAttributeValue(), std::string n6="", ns3::AttributeValue const & v6=ns3::EmptyAttributeValue(), std::string n7="", ns3::AttributeValue const & v7=ns3::EmptyAttributeValue()) [member function]
-    cls.add_method('SetErrorRateModel', 
-                   'void', 
-                   [param('std::string', 'name'), param('std::string', 'n0', default_value='""'), param('ns3::AttributeValue const &', 'v0', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n5', default_value='""'), param('ns3::AttributeValue const &', 'v5', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n6', default_value='""'), param('ns3::AttributeValue const &', 'v6', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n7', default_value='""'), param('ns3::AttributeValue const &', 'v7', default_value='ns3::EmptyAttributeValue()')])
-    ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::SetPcapFormat(ns3::YansWifiPhyHelper::PcapFormat format) [member function]
-    cls.add_method('SetPcapFormat', 
-                   'void', 
-                   [param('ns3::YansWifiPhyHelper::PcapFormat', 'format')])
-    ## yans-wifi-helper.h: ns3::Ptr<ns3::WifiPhy> ns3::YansWifiPhyHelper::Create(ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::WifiNetDevice> device) const [member function]
-    cls.add_method('Create', 
-                   'ns3::Ptr< ns3::WifiPhy >', 
-                   [param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::Ptr< ns3::WifiNetDevice >', 'device')], 
-                   is_const=True, visibility='private', is_virtual=True)
-    return
-
 def register_Ns3AodvHelper_methods(root_module, cls):
     ## aodv-helper.h: ns3::AodvHelper::AodvHelper(ns3::AodvHelper const & arg0) [copy constructor]
     cls.add_constructor([param('ns3::AodvHelper const &', 'arg0')])
@@ -1929,6 +1683,150 @@
                    [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
     return
 
+def register_Ns3CsmaHelper_methods(root_module, cls):
+    ## csma-helper.h: ns3::CsmaHelper::CsmaHelper(ns3::CsmaHelper const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::CsmaHelper const &', 'arg0')])
+    ## csma-helper.h: ns3::CsmaHelper::CsmaHelper() [constructor]
+    cls.add_constructor([])
+    ## csma-helper.h: static void ns3::CsmaHelper::EnableAscii(std::ostream & os, uint32_t nodeid, uint32_t deviceid) [member function]
+    cls.add_method('EnableAscii', 
+                   'void', 
+                   [param('std::ostream &', 'os'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')], 
+                   is_static=True)
+    ## csma-helper.h: static void ns3::CsmaHelper::EnableAscii(std::ostream & os, ns3::NetDeviceContainer d) [member function]
+    cls.add_method('EnableAscii', 
+                   'void', 
+                   [param('std::ostream &', 'os'), param('ns3::NetDeviceContainer', 'd')], 
+                   is_static=True)
+    ## csma-helper.h: static void ns3::CsmaHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function]
+    cls.add_method('EnableAscii', 
+                   'void', 
+                   [param('std::ostream &', 'os'), param('ns3::NodeContainer', 'n')], 
+                   is_static=True)
+    ## csma-helper.h: static void ns3::CsmaHelper::EnableAsciiAll(std::ostream & os) [member function]
+    cls.add_method('EnableAsciiAll', 
+                   'void', 
+                   [param('std::ostream &', 'os')], 
+                   is_static=True)
+    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::Ptr<ns3::Node> node) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('ns3::Ptr< ns3::Node >', 'node')], 
+                   is_const=True)
+    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(std::string name) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('std::string', 'name')], 
+                   is_const=True)
+    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::CsmaChannel> channel) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::Ptr< ns3::CsmaChannel >', 'channel')], 
+                   is_const=True)
+    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::Ptr<ns3::Node> node, std::string channelName) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('ns3::Ptr< ns3::Node >', 'node'), param('std::string', 'channelName')], 
+                   is_const=True)
+    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(std::string nodeName, ns3::Ptr<ns3::CsmaChannel> channel) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('std::string', 'nodeName'), param('ns3::Ptr< ns3::CsmaChannel >', 'channel')], 
+                   is_const=True)
+    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(std::string nodeName, std::string channelName) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('std::string', 'nodeName'), param('std::string', 'channelName')], 
+                   is_const=True)
+    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::NodeContainer const & c) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('ns3::NodeContainer const &', 'c')], 
+                   is_const=True)
+    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::NodeContainer const & c, ns3::Ptr<ns3::CsmaChannel> channel) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('ns3::NodeContainer const &', 'c'), param('ns3::Ptr< ns3::CsmaChannel >', 'channel')], 
+                   is_const=True)
+    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::NodeContainer const & c, std::string channelName) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('ns3::NodeContainer const &', 'c'), param('std::string', 'channelName')], 
+                   is_const=True)
+    ## csma-helper.h: void ns3::CsmaHelper::SetChannelAttribute(std::string n1, ns3::AttributeValue const & v1) [member function]
+    cls.add_method('SetChannelAttribute', 
+                   'void', 
+                   [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')])
+    ## csma-helper.h: void ns3::CsmaHelper::SetDeviceAttribute(std::string n1, ns3::AttributeValue const & v1) [member function]
+    cls.add_method('SetDeviceAttribute', 
+                   'void', 
+                   [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')])
+    ## csma-helper.h: void ns3::CsmaHelper::SetQueue(std::string type, std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue(), std::string n4="", ns3::AttributeValue const & v4=ns3::EmptyAttributeValue()) [member function]
+    cls.add_method('SetQueue', 
+                   'void', 
+                   [param('std::string', 'type'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()')])
+    ## csma-helper.h: void ns3::CsmaHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous=false) [member function]
+    cls.add_method('EnablePcapInternal', 
+                   'void', 
+                   [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous', default_value='false')], 
+                   visibility='private', is_virtual=True)
+    return
+
+def register_Ns3EmuHelper_methods(root_module, cls):
+    ## emu-helper.h: ns3::EmuHelper::EmuHelper(ns3::EmuHelper const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::EmuHelper const &', 'arg0')])
+    ## emu-helper.h: ns3::EmuHelper::EmuHelper() [constructor]
+    cls.add_constructor([])
+    ## emu-helper.h: static void ns3::EmuHelper::EnableAscii(std::ostream & os, uint32_t nodeid, uint32_t deviceid) [member function]
+    cls.add_method('EnableAscii', 
+                   'void', 
+                   [param('std::ostream &', 'os'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')], 
+                   is_static=True)
+    ## emu-helper.h: static void ns3::EmuHelper::EnableAscii(std::ostream & os, ns3::NetDeviceContainer d) [member function]
+    cls.add_method('EnableAscii', 
+                   'void', 
+                   [param('std::ostream &', 'os'), param('ns3::NetDeviceContainer', 'd')], 
+                   is_static=True)
+    ## emu-helper.h: static void ns3::EmuHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function]
+    cls.add_method('EnableAscii', 
+                   'void', 
+                   [param('std::ostream &', 'os'), param('ns3::NodeContainer', 'n')], 
+                   is_static=True)
+    ## emu-helper.h: static void ns3::EmuHelper::EnableAsciiAll(std::ostream & os) [member function]
+    cls.add_method('EnableAsciiAll', 
+                   'void', 
+                   [param('std::ostream &', 'os')], 
+                   is_static=True)
+    ## emu-helper.h: ns3::NetDeviceContainer ns3::EmuHelper::Install(ns3::Ptr<ns3::Node> node) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('ns3::Ptr< ns3::Node >', 'node')], 
+                   is_const=True)
+    ## emu-helper.h: ns3::NetDeviceContainer ns3::EmuHelper::Install(std::string nodeName) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('std::string', 'nodeName')], 
+                   is_const=True)
+    ## emu-helper.h: ns3::NetDeviceContainer ns3::EmuHelper::Install(ns3::NodeContainer const & c) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('ns3::NodeContainer const &', 'c')], 
+                   is_const=True)
+    ## emu-helper.h: void ns3::EmuHelper::SetAttribute(std::string n1, ns3::AttributeValue const & v1) [member function]
+    cls.add_method('SetAttribute', 
+                   'void', 
+                   [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')])
+    ## emu-helper.h: void ns3::EmuHelper::SetQueue(std::string type, std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue(), std::string n4="", ns3::AttributeValue const & v4=ns3::EmptyAttributeValue()) [member function]
+    cls.add_method('SetQueue', 
+                   'void', 
+                   [param('std::string', 'type'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()')])
+    ## emu-helper.h: void ns3::EmuHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous=false) [member function]
+    cls.add_method('EnablePcapInternal', 
+                   'void', 
+                   [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous', default_value='false')], 
+                   visibility='private', is_virtual=True)
+    return
+
 def register_Ns3Ipv4GlobalRoutingHelper_methods(root_module, cls):
     ## ipv4-global-routing-helper.h: ns3::Ipv4GlobalRoutingHelper::Ipv4GlobalRoutingHelper() [constructor]
     cls.add_constructor([])
--- a/bindings/python/apidefs/gcc-LP64/ns3_module_common.py	Thu Dec 31 10:20:06 2009 -0800
+++ b/bindings/python/apidefs/gcc-LP64/ns3_module_common.py	Mon Jan 04 10:35:32 2010 -0800
@@ -47,6 +47,8 @@
     module.add_class('Chunk', parent=root_module['ns3::ObjectBase'])
     ## header.h: ns3::Header [class]
     module.add_class('Header', parent=root_module['ns3::Chunk'])
+    ## pcap-file-object.h: ns3::PcapFileObject [class]
+    module.add_class('PcapFileObject', parent=root_module['ns3::Object'])
     ## pcap-writer.h: ns3::PcapWriter [class]
     module.add_class('PcapWriter', parent=root_module['ns3::Object'])
     ## simple-ref-count.h: ns3::SimpleRefCount<ns3::AsciiWriter, ns3::empty, ns3::DefaultDeleter<ns3::AsciiWriter> > [class]
@@ -175,6 +177,7 @@
     register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
     register_Ns3Chunk_methods(root_module, root_module['ns3::Chunk'])
     register_Ns3Header_methods(root_module, root_module['ns3::Header'])
+    register_Ns3PcapFileObject_methods(root_module, root_module['ns3::PcapFileObject'])
     register_Ns3PcapWriter_methods(root_module, root_module['ns3::PcapWriter'])
     register_Ns3Trailer_methods(root_module, root_module['ns3::Trailer'])
     register_Ns3AsciiWriter_methods(root_module, root_module['ns3::AsciiWriter'])
@@ -948,6 +951,38 @@
                    is_pure_virtual=True, is_const=True, is_virtual=True)
     return
 
+def register_Ns3PcapFileObject_methods(root_module, cls):
+    ## pcap-file-object.h: ns3::PcapFileObject::PcapFileObject(ns3::PcapFileObject const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::PcapFileObject const &', 'arg0')])
+    ## pcap-file-object.h: ns3::PcapFileObject::PcapFileObject() [constructor]
+    cls.add_constructor([])
+    ## pcap-file-object.h: void ns3::PcapFileObject::Close() [member function]
+    cls.add_method('Close', 
+                   'void', 
+                   [])
+    ## pcap-file-object.h: static ns3::TypeId ns3::PcapFileObject::GetTypeId() [member function]
+    cls.add_method('GetTypeId', 
+                   'ns3::TypeId', 
+                   [], 
+                   is_static=True)
+    ## pcap-file-object.h: bool ns3::PcapFileObject::Init(uint32_t dataLinkType, uint32_t snapLen=ns3::PcapFile::SNAPLEN_DEFAULT, int32_t tzCorrection=ns3::PcapFile::ZONE_DEFAULT) [member function]
+    cls.add_method('Init', 
+                   'bool', 
+                   [param('uint32_t', 'dataLinkType'), param('uint32_t', 'snapLen', default_value='ns3::PcapFile::SNAPLEN_DEFAULT'), param('int32_t', 'tzCorrection', default_value='ns3::PcapFile::ZONE_DEFAULT')])
+    ## pcap-file-object.h: bool ns3::PcapFileObject::Open(std::string const & filename, std::string const & mode) [member function]
+    cls.add_method('Open', 
+                   'bool', 
+                   [param('std::string const &', 'filename'), param('std::string const &', 'mode')])
+    ## pcap-file-object.h: bool ns3::PcapFileObject::Write(ns3::Time t, ns3::Ptr<ns3::Packet const> p) [member function]
+    cls.add_method('Write', 
+                   'bool', 
+                   [param('ns3::Time', 't'), param('ns3::Ptr< ns3::Packet const >', 'p')])
+    ## pcap-file-object.h: bool ns3::PcapFileObject::Write(ns3::Time t, uint8_t const * buffer, uint32_t length) [member function]
+    cls.add_method('Write', 
+                   'bool', 
+                   [param('ns3::Time', 't'), param('uint8_t const *', 'buffer'), param('uint32_t', 'length')])
+    return
+
 def register_Ns3PcapWriter_methods(root_module, cls):
     ## pcap-writer.h: ns3::PcapWriter::PcapWriter(ns3::PcapWriter const & arg0) [copy constructor]
     cls.add_constructor([param('ns3::PcapWriter const &', 'arg0')])
--- a/bindings/python/apidefs/gcc-LP64/ns3_module_core.py	Thu Dec 31 10:20:06 2009 -0800
+++ b/bindings/python/apidefs/gcc-LP64/ns3_module_core.py	Mon Jan 04 10:35:32 2010 -0800
@@ -3043,6 +3043,11 @@
     module.add_function('MakeBooleanChecker', 
                         'ns3::Ptr< ns3::AttributeChecker const >', 
                         [])
+    ## callback.h: extern ns3::Callback<void,ns3::Ptr<const ns3::Packet>,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ns3::MakeBoundCallback(void (*)( ::ns3::Ptr<ns3::PcapFileObject>,::ns3::Ptr<ns3::Packet const> ) * fnPtr, ns3::Ptr<ns3::PcapFileObject> a) [free function]
+    module.add_function('MakeBoundCallback', 
+                        'ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 
+                        [param('void ( * ) ( ns3::Ptr< ns3::PcapFileObject >, ns3::Ptr< ns3::Packet const > ) *', 'fnPtr'), param('ns3::Ptr< ns3::PcapFileObject >', 'a')], 
+                        template_parameters=['void', 'ns3::Ptr<ns3::PcapFileObject>', 'ns3::Ptr<ns3::PcapFileObject>', 'ns3::Ptr<ns3::Packet const>'])
     ## callback.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeCallbackChecker() [free function]
     module.add_function('MakeCallbackChecker', 
                         'ns3::Ptr< ns3::AttributeChecker const >', 
--- a/bindings/python/apidefs/gcc-LP64/ns3_module_helper.py	Thu Dec 31 10:20:06 2009 -0800
+++ b/bindings/python/apidefs/gcc-LP64/ns3_module_helper.py	Mon Jan 04 10:35:32 2010 -0800
@@ -11,12 +11,8 @@
     module.add_class('AthstatsHelper', allow_subclassing=False)
     ## bridge-helper.h: ns3::BridgeHelper [class]
     module.add_class('BridgeHelper', allow_subclassing=False)
-    ## csma-helper.h: ns3::CsmaHelper [class]
-    module.add_class('CsmaHelper', allow_subclassing=False)
     ## csma-star-helper.h: ns3::CsmaStarHelper [class]
     module.add_class('CsmaStarHelper', allow_subclassing=False)
-    ## emu-helper.h: ns3::EmuHelper [class]
-    module.add_class('EmuHelper', allow_subclassing=False)
     ## flow-monitor-helper.h: ns3::FlowMonitorHelper [class]
     module.add_class('FlowMonitorHelper', allow_subclassing=False)
     ## internet-stack-helper.h: ns3::InternetStackHelper [class]
@@ -57,6 +53,12 @@
     module.add_class('PacketSinkHelper', allow_subclassing=False)
     ## packet-socket-helper.h: ns3::PacketSocketHelper [class]
     module.add_class('PacketSocketHelper', allow_subclassing=False)
+    ## pcap-helper.h: ns3::PcapHelper [class]
+    module.add_class('PcapHelper', allow_subclassing=False)
+    ## pcap-helper.h: ns3::PcapHelper::DataLinkType [enumeration]
+    module.add_enum('DataLinkType', ['DLT_NULL', 'DLT_EN10MB', 'DLT_PPP', 'DLT_IEEE802_11', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO'], outer_class=root_module['ns3::PcapHelper'])
+    ## pcap-user-helper.h: ns3::PcapUserHelper [class]
+    module.add_class('PcapUserHelper', allow_subclassing=False)
     ## ping6-helper.h: ns3::Ping6Helper [class]
     module.add_class('Ping6Helper', allow_subclassing=False)
     ## point-to-point-dumbbell-helper.h: ns3::PointToPointDumbbellHelper [class]
@@ -64,7 +66,7 @@
     ## point-to-point-grid-helper.h: ns3::PointToPointGridHelper [class]
     module.add_class('PointToPointGridHelper', allow_subclassing=False)
     ## point-to-point-helper.h: ns3::PointToPointHelper [class]
-    module.add_class('PointToPointHelper', allow_subclassing=False)
+    module.add_class('PointToPointHelper', allow_subclassing=False, parent=root_module['ns3::PcapUserHelper'])
     ## point-to-point-star-helper.h: ns3::PointToPointStarHelper [class]
     module.add_class('PointToPointStarHelper', allow_subclassing=False)
     ## tap-bridge-helper.h: ns3::TapBridgeHelper [class]
@@ -89,12 +91,12 @@
     module.add_class('WifiPhyHelper', allow_subclassing=False)
     ## yans-wifi-helper.h: ns3::YansWifiChannelHelper [class]
     module.add_class('YansWifiChannelHelper', allow_subclassing=False)
-    ## yans-wifi-helper.h: ns3::YansWifiPhyHelper [class]
-    module.add_class('YansWifiPhyHelper', allow_subclassing=False, parent=root_module['ns3::WifiPhyHelper'])
-    ## yans-wifi-helper.h: ns3::YansWifiPhyHelper::PcapFormat [enumeration]
-    module.add_enum('PcapFormat', ['PCAP_FORMAT_80211', 'PCAP_FORMAT_80211_PRISM', 'PCAP_FORMAT_80211_RADIOTAP'], outer_class=root_module['ns3::YansWifiPhyHelper'])
     ## aodv-helper.h: ns3::AodvHelper [class]
     module.add_class('AodvHelper', allow_subclassing=False, parent=root_module['ns3::Ipv4RoutingHelper'])
+    ## csma-helper.h: ns3::CsmaHelper [class]
+    module.add_class('CsmaHelper', allow_subclassing=False, parent=root_module['ns3::PcapUserHelper'])
+    ## emu-helper.h: ns3::EmuHelper [class]
+    module.add_class('EmuHelper', allow_subclassing=False, parent=root_module['ns3::PcapUserHelper'])
     ## ipv4-global-routing-helper.h: ns3::Ipv4GlobalRoutingHelper [class]
     module.add_class('Ipv4GlobalRoutingHelper', allow_subclassing=False, parent=root_module['ns3::Ipv4RoutingHelper'])
     ## ipv4-list-routing-helper.h: ns3::Ipv4ListRoutingHelper [class]
@@ -203,9 +205,7 @@
     register_Ns3ApplicationContainer_methods(root_module, root_module['ns3::ApplicationContainer'])
     register_Ns3AthstatsHelper_methods(root_module, root_module['ns3::AthstatsHelper'])
     register_Ns3BridgeHelper_methods(root_module, root_module['ns3::BridgeHelper'])
-    register_Ns3CsmaHelper_methods(root_module, root_module['ns3::CsmaHelper'])
     register_Ns3CsmaStarHelper_methods(root_module, root_module['ns3::CsmaStarHelper'])
-    register_Ns3EmuHelper_methods(root_module, root_module['ns3::EmuHelper'])
     register_Ns3FlowMonitorHelper_methods(root_module, root_module['ns3::FlowMonitorHelper'])
     register_Ns3InternetStackHelper_methods(root_module, root_module['ns3::InternetStackHelper'])
     register_Ns3Ipv4AddressHelper_methods(root_module, root_module['ns3::Ipv4AddressHelper'])
@@ -225,6 +225,8 @@
     register_Ns3OnOffHelper_methods(root_module, root_module['ns3::OnOffHelper'])
     register_Ns3PacketSinkHelper_methods(root_module, root_module['ns3::PacketSinkHelper'])
     register_Ns3PacketSocketHelper_methods(root_module, root_module['ns3::PacketSocketHelper'])
+    register_Ns3PcapHelper_methods(root_module, root_module['ns3::PcapHelper'])
+    register_Ns3PcapUserHelper_methods(root_module, root_module['ns3::PcapUserHelper'])
     register_Ns3Ping6Helper_methods(root_module, root_module['ns3::Ping6Helper'])
     register_Ns3PointToPointDumbbellHelper_methods(root_module, root_module['ns3::PointToPointDumbbellHelper'])
     register_Ns3PointToPointGridHelper_methods(root_module, root_module['ns3::PointToPointGridHelper'])
@@ -241,8 +243,9 @@
     register_Ns3WifiMacHelper_methods(root_module, root_module['ns3::WifiMacHelper'])
     register_Ns3WifiPhyHelper_methods(root_module, root_module['ns3::WifiPhyHelper'])
     register_Ns3YansWifiChannelHelper_methods(root_module, root_module['ns3::YansWifiChannelHelper'])
-    register_Ns3YansWifiPhyHelper_methods(root_module, root_module['ns3::YansWifiPhyHelper'])
     register_Ns3AodvHelper_methods(root_module, root_module['ns3::AodvHelper'])
+    register_Ns3CsmaHelper_methods(root_module, root_module['ns3::CsmaHelper'])
+    register_Ns3EmuHelper_methods(root_module, root_module['ns3::EmuHelper'])
     register_Ns3Ipv4GlobalRoutingHelper_methods(root_module, root_module['ns3::Ipv4GlobalRoutingHelper'])
     register_Ns3Ipv4ListRoutingHelper_methods(root_module, root_module['ns3::Ipv4ListRoutingHelper'])
     register_Ns3Ipv4NixVectorHelper_methods(root_module, root_module['ns3::Ipv4NixVectorHelper'])
@@ -372,120 +375,6 @@
                    [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')])
     return
 
-def register_Ns3CsmaHelper_methods(root_module, cls):
-    ## csma-helper.h: ns3::CsmaHelper::CsmaHelper(ns3::CsmaHelper const & arg0) [copy constructor]
-    cls.add_constructor([param('ns3::CsmaHelper const &', 'arg0')])
-    ## csma-helper.h: ns3::CsmaHelper::CsmaHelper() [constructor]
-    cls.add_constructor([])
-    ## csma-helper.h: static void ns3::CsmaHelper::EnableAscii(std::ostream & os, uint32_t nodeid, uint32_t deviceid) [member function]
-    cls.add_method('EnableAscii', 
-                   'void', 
-                   [param('std::ostream &', 'os'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')], 
-                   is_static=True)
-    ## csma-helper.h: static void ns3::CsmaHelper::EnableAscii(std::ostream & os, ns3::NetDeviceContainer d) [member function]
-    cls.add_method('EnableAscii', 
-                   'void', 
-                   [param('std::ostream &', 'os'), param('ns3::NetDeviceContainer', 'd')], 
-                   is_static=True)
-    ## csma-helper.h: static void ns3::CsmaHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function]
-    cls.add_method('EnableAscii', 
-                   'void', 
-                   [param('std::ostream &', 'os'), param('ns3::NodeContainer', 'n')], 
-                   is_static=True)
-    ## csma-helper.h: static void ns3::CsmaHelper::EnableAsciiAll(std::ostream & os) [member function]
-    cls.add_method('EnableAsciiAll', 
-                   'void', 
-                   [param('std::ostream &', 'os')], 
-                   is_static=True)
-    ## csma-helper.h: static void ns3::CsmaHelper::EnablePcap(std::string filename, uint32_t nodeid, uint32_t deviceid, bool promiscuous) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid'), param('bool', 'promiscuous')], 
-                   is_static=True)
-    ## csma-helper.h: static void ns3::CsmaHelper::EnablePcap(std::string filename, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous')], 
-                   is_static=True)
-    ## csma-helper.h: static void ns3::CsmaHelper::EnablePcap(std::string filename, std::string ndName, bool promiscuous) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('std::string', 'ndName'), param('bool', 'promiscuous')], 
-                   is_static=True)
-    ## csma-helper.h: static void ns3::CsmaHelper::EnablePcap(std::string filename, ns3::NetDeviceContainer d, bool promiscuous) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('ns3::NetDeviceContainer', 'd'), param('bool', 'promiscuous')], 
-                   is_static=True)
-    ## csma-helper.h: static void ns3::CsmaHelper::EnablePcap(std::string filename, ns3::NodeContainer n, bool promiscuous) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('ns3::NodeContainer', 'n'), param('bool', 'promiscuous')], 
-                   is_static=True)
-    ## csma-helper.h: static void ns3::CsmaHelper::EnablePcapAll(std::string filename, bool promiscuous) [member function]
-    cls.add_method('EnablePcapAll', 
-                   'void', 
-                   [param('std::string', 'filename'), param('bool', 'promiscuous')], 
-                   is_static=True)
-    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::Ptr<ns3::Node> node) const [member function]
-    cls.add_method('Install', 
-                   'ns3::NetDeviceContainer', 
-                   [param('ns3::Ptr< ns3::Node >', 'node')], 
-                   is_const=True)
-    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(std::string name) const [member function]
-    cls.add_method('Install', 
-                   'ns3::NetDeviceContainer', 
-                   [param('std::string', 'name')], 
-                   is_const=True)
-    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::CsmaChannel> channel) const [member function]
-    cls.add_method('Install', 
-                   'ns3::NetDeviceContainer', 
-                   [param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::Ptr< ns3::CsmaChannel >', 'channel')], 
-                   is_const=True)
-    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::Ptr<ns3::Node> node, std::string channelName) const [member function]
-    cls.add_method('Install', 
-                   'ns3::NetDeviceContainer', 
-                   [param('ns3::Ptr< ns3::Node >', 'node'), param('std::string', 'channelName')], 
-                   is_const=True)
-    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(std::string nodeName, ns3::Ptr<ns3::CsmaChannel> channel) const [member function]
-    cls.add_method('Install', 
-                   'ns3::NetDeviceContainer', 
-                   [param('std::string', 'nodeName'), param('ns3::Ptr< ns3::CsmaChannel >', 'channel')], 
-                   is_const=True)
-    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(std::string nodeName, std::string channelName) const [member function]
-    cls.add_method('Install', 
-                   'ns3::NetDeviceContainer', 
-                   [param('std::string', 'nodeName'), param('std::string', 'channelName')], 
-                   is_const=True)
-    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::NodeContainer const & c) const [member function]
-    cls.add_method('Install', 
-                   'ns3::NetDeviceContainer', 
-                   [param('ns3::NodeContainer const &', 'c')], 
-                   is_const=True)
-    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::NodeContainer const & c, ns3::Ptr<ns3::CsmaChannel> channel) const [member function]
-    cls.add_method('Install', 
-                   'ns3::NetDeviceContainer', 
-                   [param('ns3::NodeContainer const &', 'c'), param('ns3::Ptr< ns3::CsmaChannel >', 'channel')], 
-                   is_const=True)
-    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::NodeContainer const & c, std::string channelName) const [member function]
-    cls.add_method('Install', 
-                   'ns3::NetDeviceContainer', 
-                   [param('ns3::NodeContainer const &', 'c'), param('std::string', 'channelName')], 
-                   is_const=True)
-    ## csma-helper.h: void ns3::CsmaHelper::SetChannelAttribute(std::string n1, ns3::AttributeValue const & v1) [member function]
-    cls.add_method('SetChannelAttribute', 
-                   'void', 
-                   [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')])
-    ## csma-helper.h: void ns3::CsmaHelper::SetDeviceAttribute(std::string n1, ns3::AttributeValue const & v1) [member function]
-    cls.add_method('SetDeviceAttribute', 
-                   'void', 
-                   [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')])
-    ## csma-helper.h: void ns3::CsmaHelper::SetQueue(std::string type, std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue(), std::string n4="", ns3::AttributeValue const & v4=ns3::EmptyAttributeValue()) [member function]
-    cls.add_method('SetQueue', 
-                   'void', 
-                   [param('std::string', 'type'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()')])
-    return
-
 def register_Ns3CsmaStarHelper_methods(root_module, cls):
     ## csma-star-helper.h: ns3::CsmaStarHelper::CsmaStarHelper(ns3::CsmaStarHelper const & arg0) [copy constructor]
     cls.add_constructor([param('ns3::CsmaStarHelper const &', 'arg0')])
@@ -536,86 +425,6 @@
                    is_const=True)
     return
 
-def register_Ns3EmuHelper_methods(root_module, cls):
-    ## emu-helper.h: ns3::EmuHelper::EmuHelper(ns3::EmuHelper const & arg0) [copy constructor]
-    cls.add_constructor([param('ns3::EmuHelper const &', 'arg0')])
-    ## emu-helper.h: ns3::EmuHelper::EmuHelper() [constructor]
-    cls.add_constructor([])
-    ## emu-helper.h: static void ns3::EmuHelper::EnableAscii(std::ostream & os, uint32_t nodeid, uint32_t deviceid) [member function]
-    cls.add_method('EnableAscii', 
-                   'void', 
-                   [param('std::ostream &', 'os'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')], 
-                   is_static=True)
-    ## emu-helper.h: static void ns3::EmuHelper::EnableAscii(std::ostream & os, ns3::NetDeviceContainer d) [member function]
-    cls.add_method('EnableAscii', 
-                   'void', 
-                   [param('std::ostream &', 'os'), param('ns3::NetDeviceContainer', 'd')], 
-                   is_static=True)
-    ## emu-helper.h: static void ns3::EmuHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function]
-    cls.add_method('EnableAscii', 
-                   'void', 
-                   [param('std::ostream &', 'os'), param('ns3::NodeContainer', 'n')], 
-                   is_static=True)
-    ## emu-helper.h: static void ns3::EmuHelper::EnableAsciiAll(std::ostream & os) [member function]
-    cls.add_method('EnableAsciiAll', 
-                   'void', 
-                   [param('std::ostream &', 'os')], 
-                   is_static=True)
-    ## emu-helper.h: static void ns3::EmuHelper::EnablePcap(std::string filename, uint32_t nodeid, uint32_t deviceid, bool promiscuous) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid'), param('bool', 'promiscuous')], 
-                   is_static=True)
-    ## emu-helper.h: static void ns3::EmuHelper::EnablePcap(std::string filename, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous')], 
-                   is_static=True)
-    ## emu-helper.h: static void ns3::EmuHelper::EnablePcap(std::string filename, std::string ndName, bool promiscuous) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('std::string', 'ndName'), param('bool', 'promiscuous')], 
-                   is_static=True)
-    ## emu-helper.h: static void ns3::EmuHelper::EnablePcap(std::string filename, ns3::NetDeviceContainer d, bool promiscuous) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('ns3::NetDeviceContainer', 'd'), param('bool', 'promiscuous')], 
-                   is_static=True)
-    ## emu-helper.h: static void ns3::EmuHelper::EnablePcap(std::string filename, ns3::NodeContainer n, bool promiscuous) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('ns3::NodeContainer', 'n'), param('bool', 'promiscuous')], 
-                   is_static=True)
-    ## emu-helper.h: static void ns3::EmuHelper::EnablePcapAll(std::string filename, bool promiscuous) [member function]
-    cls.add_method('EnablePcapAll', 
-                   'void', 
-                   [param('std::string', 'filename'), param('bool', 'promiscuous')], 
-                   is_static=True)
-    ## emu-helper.h: ns3::NetDeviceContainer ns3::EmuHelper::Install(ns3::Ptr<ns3::Node> node) const [member function]
-    cls.add_method('Install', 
-                   'ns3::NetDeviceContainer', 
-                   [param('ns3::Ptr< ns3::Node >', 'node')], 
-                   is_const=True)
-    ## emu-helper.h: ns3::NetDeviceContainer ns3::EmuHelper::Install(std::string nodeName) const [member function]
-    cls.add_method('Install', 
-                   'ns3::NetDeviceContainer', 
-                   [param('std::string', 'nodeName')], 
-                   is_const=True)
-    ## emu-helper.h: ns3::NetDeviceContainer ns3::EmuHelper::Install(ns3::NodeContainer const & c) const [member function]
-    cls.add_method('Install', 
-                   'ns3::NetDeviceContainer', 
-                   [param('ns3::NodeContainer const &', 'c')], 
-                   is_const=True)
-    ## emu-helper.h: void ns3::EmuHelper::SetAttribute(std::string n1, ns3::AttributeValue const & v1) [member function]
-    cls.add_method('SetAttribute', 
-                   'void', 
-                   [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')])
-    ## emu-helper.h: void ns3::EmuHelper::SetQueue(std::string type, std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue(), std::string n4="", ns3::AttributeValue const & v4=ns3::EmptyAttributeValue()) [member function]
-    cls.add_method('SetQueue', 
-                   'void', 
-                   [param('std::string', 'type'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()')])
-    return
-
 def register_Ns3FlowMonitorHelper_methods(root_module, cls):
     ## flow-monitor-helper.h: ns3::FlowMonitorHelper::FlowMonitorHelper(ns3::FlowMonitorHelper const & arg0) [copy constructor]
     cls.add_constructor([param('ns3::FlowMonitorHelper const &', 'arg0')])
@@ -1310,6 +1119,57 @@
                    is_const=True)
     return
 
+def register_Ns3PcapHelper_methods(root_module, cls):
+    ## pcap-helper.h: ns3::PcapHelper::PcapHelper(ns3::PcapHelper const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::PcapHelper const &', 'arg0')])
+    ## pcap-helper.h: ns3::PcapHelper::PcapHelper() [constructor]
+    cls.add_constructor([])
+    ## pcap-helper.h: ns3::Ptr<ns3::PcapFileObject> ns3::PcapHelper::CreateFile(std::string filename, std::string filemode, uint32_t dataLinkType, uint32_t snapLen=65535, int32_t tzCorrection=0) [member function]
+    cls.add_method('CreateFile', 
+                   'ns3::Ptr< ns3::PcapFileObject >', 
+                   [param('std::string', 'filename'), param('std::string', 'filemode'), param('uint32_t', 'dataLinkType'), param('uint32_t', 'snapLen', default_value='65535'), param('int32_t', 'tzCorrection', default_value='0')])
+    ## pcap-helper.h: std::string ns3::PcapHelper::GetFilename(std::string prefix, ns3::Ptr<ns3::NetDevice> device, bool useObjectNames=true) [member function]
+    cls.add_method('GetFilename', 
+                   'std::string', 
+                   [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'device'), param('bool', 'useObjectNames', default_value='true')])
+    return
+
+def register_Ns3PcapUserHelper_methods(root_module, cls):
+    ## pcap-user-helper.h: ns3::PcapUserHelper::PcapUserHelper() [constructor]
+    cls.add_constructor([])
+    ## pcap-user-helper.h: ns3::PcapUserHelper::PcapUserHelper(ns3::PcapUserHelper const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::PcapUserHelper const &', 'arg0')])
+    ## pcap-user-helper.h: void ns3::PcapUserHelper::EnablePcap(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, 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')])
+    ## pcap-user-helper.h: void ns3::PcapUserHelper::EnablePcap(std::string prefix, std::string ndName, bool promiscuous=false) [member function]
+    cls.add_method('EnablePcap', 
+                   'void', 
+                   [param('std::string', 'prefix'), param('std::string', 'ndName'), param('bool', 'promiscuous', default_value='false')])
+    ## pcap-user-helper.h: void ns3::PcapUserHelper::EnablePcap(std::string filename, ns3::NetDeviceContainer d, bool promiscuous=false) [member function]
+    cls.add_method('EnablePcap', 
+                   'void', 
+                   [param('std::string', 'filename'), param('ns3::NetDeviceContainer', 'd'), param('bool', 'promiscuous', default_value='false')])
+    ## pcap-user-helper.h: void ns3::PcapUserHelper::EnablePcap(std::string filename, ns3::NodeContainer n, bool promiscuous=false) [member function]
+    cls.add_method('EnablePcap', 
+                   'void', 
+                   [param('std::string', 'filename'), param('ns3::NodeContainer', 'n'), param('bool', 'promiscuous', default_value='false')])
+    ## pcap-user-helper.h: void ns3::PcapUserHelper::EnablePcap(std::string filename, uint32_t nodeid, uint32_t deviceid, bool promiscuous=false) [member function]
+    cls.add_method('EnablePcap', 
+                   'void', 
+                   [param('std::string', 'filename'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid'), param('bool', 'promiscuous', default_value='false')])
+    ## pcap-user-helper.h: void ns3::PcapUserHelper::EnablePcapAll(std::string filename, bool promiscuous=false) [member function]
+    cls.add_method('EnablePcapAll', 
+                   'void', 
+                   [param('std::string', 'filename'), param('bool', 'promiscuous', default_value='false')])
+    ## pcap-user-helper.h: void ns3::PcapUserHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous) [member function]
+    cls.add_method('EnablePcapInternal', 
+                   'void', 
+                   [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous')], 
+                   is_pure_virtual=True, is_virtual=True)
+    return
+
 def register_Ns3Ping6Helper_methods(root_module, cls):
     ## ping6-helper.h: ns3::Ping6Helper::Ping6Helper(ns3::Ping6Helper const & arg0) [copy constructor]
     cls.add_constructor([param('ns3::Ping6Helper const &', 'arg0')])
@@ -1452,36 +1312,6 @@
                    'void', 
                    [param('std::ostream &', 'os')], 
                    is_static=True)
-    ## point-to-point-helper.h: static void ns3::PointToPointHelper::EnablePcap(std::string filename, uint32_t nodeid, uint32_t deviceid) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')], 
-                   is_static=True)
-    ## point-to-point-helper.h: static void ns3::PointToPointHelper::EnablePcap(std::string filename, ns3::Ptr<ns3::NetDevice> nd) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('ns3::Ptr< ns3::NetDevice >', 'nd')], 
-                   is_static=True)
-    ## point-to-point-helper.h: static void ns3::PointToPointHelper::EnablePcap(std::string filename, std::string ndName) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('std::string', 'ndName')], 
-                   is_static=True)
-    ## point-to-point-helper.h: static void ns3::PointToPointHelper::EnablePcap(std::string filename, ns3::NetDeviceContainer d) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('ns3::NetDeviceContainer', 'd')], 
-                   is_static=True)
-    ## point-to-point-helper.h: static void ns3::PointToPointHelper::EnablePcap(std::string filename, ns3::NodeContainer n) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('ns3::NodeContainer', 'n')], 
-                   is_static=True)
-    ## point-to-point-helper.h: static void ns3::PointToPointHelper::EnablePcapAll(std::string filename) [member function]
-    cls.add_method('EnablePcapAll', 
-                   'void', 
-                   [param('std::string', 'filename')], 
-                   is_static=True)
     ## point-to-point-helper.h: ns3::NetDeviceContainer ns3::PointToPointHelper::Install(ns3::NodeContainer c) [member function]
     cls.add_method('Install', 
                    'ns3::NetDeviceContainer', 
@@ -1514,6 +1344,11 @@
     cls.add_method('SetQueue', 
                    'void', 
                    [param('std::string', 'type'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()')])
+    ## point-to-point-helper.h: void ns3::PointToPointHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous=false) [member function]
+    cls.add_method('EnablePcapInternal', 
+                   'void', 
+                   [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous', default_value='false')], 
+                   visibility='private', is_virtual=True)
     return
 
 def register_Ns3PointToPointStarHelper_methods(root_module, cls):
@@ -1827,87 +1662,6 @@
                    [param('std::string', 'name'), param('std::string', 'n0', default_value='""'), param('ns3::AttributeValue const &', 'v0', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n5', default_value='""'), param('ns3::AttributeValue const &', 'v5', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n6', default_value='""'), param('ns3::AttributeValue const &', 'v6', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n7', default_value='""'), param('ns3::AttributeValue const &', 'v7', default_value='ns3::EmptyAttributeValue()')])
     return
 
-def register_Ns3YansWifiPhyHelper_methods(root_module, cls):
-    ## yans-wifi-helper.h: ns3::YansWifiPhyHelper::YansWifiPhyHelper(ns3::YansWifiPhyHelper const & arg0) [copy constructor]
-    cls.add_constructor([param('ns3::YansWifiPhyHelper const &', 'arg0')])
-    ## yans-wifi-helper.h: ns3::YansWifiPhyHelper::YansWifiPhyHelper() [constructor]
-    cls.add_constructor([])
-    ## yans-wifi-helper.h: static ns3::YansWifiPhyHelper ns3::YansWifiPhyHelper::Default() [member function]
-    cls.add_method('Default', 
-                   'ns3::YansWifiPhyHelper', 
-                   [], 
-                   is_static=True)
-    ## yans-wifi-helper.h: static void ns3::YansWifiPhyHelper::EnableAscii(std::ostream & os, uint32_t nodeid, uint32_t deviceid) [member function]
-    cls.add_method('EnableAscii', 
-                   'void', 
-                   [param('std::ostream &', 'os'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')], 
-                   is_static=True)
-    ## yans-wifi-helper.h: static void ns3::YansWifiPhyHelper::EnableAscii(std::ostream & os, ns3::NetDeviceContainer d) [member function]
-    cls.add_method('EnableAscii', 
-                   'void', 
-                   [param('std::ostream &', 'os'), param('ns3::NetDeviceContainer', 'd')], 
-                   is_static=True)
-    ## yans-wifi-helper.h: static void ns3::YansWifiPhyHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function]
-    cls.add_method('EnableAscii', 
-                   'void', 
-                   [param('std::ostream &', 'os'), param('ns3::NodeContainer', 'n')], 
-                   is_static=True)
-    ## yans-wifi-helper.h: static void ns3::YansWifiPhyHelper::EnableAsciiAll(std::ostream & os) [member function]
-    cls.add_method('EnableAsciiAll', 
-                   'void', 
-                   [param('std::ostream &', 'os')], 
-                   is_static=True)
-    ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::EnablePcap(std::string filename, uint32_t nodeid, uint32_t deviceid) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')])
-    ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::EnablePcap(std::string filename, ns3::Ptr<ns3::NetDevice> nd) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('ns3::Ptr< ns3::NetDevice >', 'nd')])
-    ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::EnablePcap(std::string filename, std::string ndName) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('std::string', 'ndName')])
-    ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::EnablePcap(std::string filename, ns3::NetDeviceContainer d) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('ns3::NetDeviceContainer', 'd')])
-    ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::EnablePcap(std::string filename, ns3::NodeContainer n) [member function]
-    cls.add_method('EnablePcap', 
-                   'void', 
-                   [param('std::string', 'filename'), param('ns3::NodeContainer', 'n')])
-    ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::EnablePcapAll(std::string filename) [member function]
-    cls.add_method('EnablePcapAll', 
-                   'void', 
-                   [param('std::string', 'filename')])
-    ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::Set(std::string name, ns3::AttributeValue const & v) [member function]
-    cls.add_method('Set', 
-                   'void', 
-                   [param('std::string', 'name'), param('ns3::AttributeValue const &', 'v')])
-    ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::SetChannel(ns3::Ptr<ns3::YansWifiChannel> channel) [member function]
-    cls.add_method('SetChannel', 
-                   'void', 
-                   [param('ns3::Ptr< ns3::YansWifiChannel >', 'channel')])
-    ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::SetChannel(std::string channelName) [member function]
-    cls.add_method('SetChannel', 
-                   'void', 
-                   [param('std::string', 'channelName')])
-    ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::SetErrorRateModel(std::string name, std::string n0="", ns3::AttributeValue const & v0=ns3::EmptyAttributeValue(), std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue(), std::string n4="", ns3::AttributeValue const & v4=ns3::EmptyAttributeValue(), std::string n5="", ns3::AttributeValue const & v5=ns3::EmptyAttributeValue(), std::string n6="", ns3::AttributeValue const & v6=ns3::EmptyAttributeValue(), std::string n7="", ns3::AttributeValue const & v7=ns3::EmptyAttributeValue()) [member function]
-    cls.add_method('SetErrorRateModel', 
-                   'void', 
-                   [param('std::string', 'name'), param('std::string', 'n0', default_value='""'), param('ns3::AttributeValue const &', 'v0', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n5', default_value='""'), param('ns3::AttributeValue const &', 'v5', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n6', default_value='""'), param('ns3::AttributeValue const &', 'v6', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n7', default_value='""'), param('ns3::AttributeValue const &', 'v7', default_value='ns3::EmptyAttributeValue()')])
-    ## yans-wifi-helper.h: void ns3::YansWifiPhyHelper::SetPcapFormat(ns3::YansWifiPhyHelper::PcapFormat format) [member function]
-    cls.add_method('SetPcapFormat', 
-                   'void', 
-                   [param('ns3::YansWifiPhyHelper::PcapFormat', 'format')])
-    ## yans-wifi-helper.h: ns3::Ptr<ns3::WifiPhy> ns3::YansWifiPhyHelper::Create(ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::WifiNetDevice> device) const [member function]
-    cls.add_method('Create', 
-                   'ns3::Ptr< ns3::WifiPhy >', 
-                   [param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::Ptr< ns3::WifiNetDevice >', 'device')], 
-                   is_const=True, visibility='private', is_virtual=True)
-    return
-
 def register_Ns3AodvHelper_methods(root_module, cls):
     ## aodv-helper.h: ns3::AodvHelper::AodvHelper(ns3::AodvHelper const & arg0) [copy constructor]
     cls.add_constructor([param('ns3::AodvHelper const &', 'arg0')])
@@ -1929,6 +1683,150 @@
                    [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
     return
 
+def register_Ns3CsmaHelper_methods(root_module, cls):
+    ## csma-helper.h: ns3::CsmaHelper::CsmaHelper(ns3::CsmaHelper const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::CsmaHelper const &', 'arg0')])
+    ## csma-helper.h: ns3::CsmaHelper::CsmaHelper() [constructor]
+    cls.add_constructor([])
+    ## csma-helper.h: static void ns3::CsmaHelper::EnableAscii(std::ostream & os, uint32_t nodeid, uint32_t deviceid) [member function]
+    cls.add_method('EnableAscii', 
+                   'void', 
+                   [param('std::ostream &', 'os'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')], 
+                   is_static=True)
+    ## csma-helper.h: static void ns3::CsmaHelper::EnableAscii(std::ostream & os, ns3::NetDeviceContainer d) [member function]
+    cls.add_method('EnableAscii', 
+                   'void', 
+                   [param('std::ostream &', 'os'), param('ns3::NetDeviceContainer', 'd')], 
+                   is_static=True)
+    ## csma-helper.h: static void ns3::CsmaHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function]
+    cls.add_method('EnableAscii', 
+                   'void', 
+                   [param('std::ostream &', 'os'), param('ns3::NodeContainer', 'n')], 
+                   is_static=True)
+    ## csma-helper.h: static void ns3::CsmaHelper::EnableAsciiAll(std::ostream & os) [member function]
+    cls.add_method('EnableAsciiAll', 
+                   'void', 
+                   [param('std::ostream &', 'os')], 
+                   is_static=True)
+    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::Ptr<ns3::Node> node) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('ns3::Ptr< ns3::Node >', 'node')], 
+                   is_const=True)
+    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(std::string name) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('std::string', 'name')], 
+                   is_const=True)
+    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::CsmaChannel> channel) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::Ptr< ns3::CsmaChannel >', 'channel')], 
+                   is_const=True)
+    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::Ptr<ns3::Node> node, std::string channelName) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('ns3::Ptr< ns3::Node >', 'node'), param('std::string', 'channelName')], 
+                   is_const=True)
+    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(std::string nodeName, ns3::Ptr<ns3::CsmaChannel> channel) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('std::string', 'nodeName'), param('ns3::Ptr< ns3::CsmaChannel >', 'channel')], 
+                   is_const=True)
+    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(std::string nodeName, std::string channelName) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('std::string', 'nodeName'), param('std::string', 'channelName')], 
+                   is_const=True)
+    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::NodeContainer const & c) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('ns3::NodeContainer const &', 'c')], 
+                   is_const=True)
+    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::NodeContainer const & c, ns3::Ptr<ns3::CsmaChannel> channel) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('ns3::NodeContainer const &', 'c'), param('ns3::Ptr< ns3::CsmaChannel >', 'channel')], 
+                   is_const=True)
+    ## csma-helper.h: ns3::NetDeviceContainer ns3::CsmaHelper::Install(ns3::NodeContainer const & c, std::string channelName) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('ns3::NodeContainer const &', 'c'), param('std::string', 'channelName')], 
+                   is_const=True)
+    ## csma-helper.h: void ns3::CsmaHelper::SetChannelAttribute(std::string n1, ns3::AttributeValue const & v1) [member function]
+    cls.add_method('SetChannelAttribute', 
+                   'void', 
+                   [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')])
+    ## csma-helper.h: void ns3::CsmaHelper::SetDeviceAttribute(std::string n1, ns3::AttributeValue const & v1) [member function]
+    cls.add_method('SetDeviceAttribute', 
+                   'void', 
+                   [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')])
+    ## csma-helper.h: void ns3::CsmaHelper::SetQueue(std::string type, std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue(), std::string n4="", ns3::AttributeValue const & v4=ns3::EmptyAttributeValue()) [member function]
+    cls.add_method('SetQueue', 
+                   'void', 
+                   [param('std::string', 'type'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()')])
+    ## csma-helper.h: void ns3::CsmaHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous=false) [member function]
+    cls.add_method('EnablePcapInternal', 
+                   'void', 
+                   [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous', default_value='false')], 
+                   visibility='private', is_virtual=True)
+    return
+
+def register_Ns3EmuHelper_methods(root_module, cls):
+    ## emu-helper.h: ns3::EmuHelper::EmuHelper(ns3::EmuHelper const & arg0) [copy constructor]
+    cls.add_constructor([param('ns3::EmuHelper const &', 'arg0')])
+    ## emu-helper.h: ns3::EmuHelper::EmuHelper() [constructor]
+    cls.add_constructor([])
+    ## emu-helper.h: static void ns3::EmuHelper::EnableAscii(std::ostream & os, uint32_t nodeid, uint32_t deviceid) [member function]
+    cls.add_method('EnableAscii', 
+                   'void', 
+                   [param('std::ostream &', 'os'), param('uint32_t', 'nodeid'), param('uint32_t', 'deviceid')], 
+                   is_static=True)
+    ## emu-helper.h: static void ns3::EmuHelper::EnableAscii(std::ostream & os, ns3::NetDeviceContainer d) [member function]
+    cls.add_method('EnableAscii', 
+                   'void', 
+                   [param('std::ostream &', 'os'), param('ns3::NetDeviceContainer', 'd')], 
+                   is_static=True)
+    ## emu-helper.h: static void ns3::EmuHelper::EnableAscii(std::ostream & os, ns3::NodeContainer n) [member function]
+    cls.add_method('EnableAscii', 
+                   'void', 
+                   [param('std::ostream &', 'os'), param('ns3::NodeContainer', 'n')], 
+                   is_static=True)
+    ## emu-helper.h: static void ns3::EmuHelper::EnableAsciiAll(std::ostream & os) [member function]
+    cls.add_method('EnableAsciiAll', 
+                   'void', 
+                   [param('std::ostream &', 'os')], 
+                   is_static=True)
+    ## emu-helper.h: ns3::NetDeviceContainer ns3::EmuHelper::Install(ns3::Ptr<ns3::Node> node) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('ns3::Ptr< ns3::Node >', 'node')], 
+                   is_const=True)
+    ## emu-helper.h: ns3::NetDeviceContainer ns3::EmuHelper::Install(std::string nodeName) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('std::string', 'nodeName')], 
+                   is_const=True)
+    ## emu-helper.h: ns3::NetDeviceContainer ns3::EmuHelper::Install(ns3::NodeContainer const & c) const [member function]
+    cls.add_method('Install', 
+                   'ns3::NetDeviceContainer', 
+                   [param('ns3::NodeContainer const &', 'c')], 
+                   is_const=True)
+    ## emu-helper.h: void ns3::EmuHelper::SetAttribute(std::string n1, ns3::AttributeValue const & v1) [member function]
+    cls.add_method('SetAttribute', 
+                   'void', 
+                   [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')])
+    ## emu-helper.h: void ns3::EmuHelper::SetQueue(std::string type, std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue(), std::string n4="", ns3::AttributeValue const & v4=ns3::EmptyAttributeValue()) [member function]
+    cls.add_method('SetQueue', 
+                   'void', 
+                   [param('std::string', 'type'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()')])
+    ## emu-helper.h: void ns3::EmuHelper::EnablePcapInternal(std::string prefix, ns3::Ptr<ns3::NetDevice> nd, bool promiscuous=false) [member function]
+    cls.add_method('EnablePcapInternal', 
+                   'void', 
+                   [param('std::string', 'prefix'), param('ns3::Ptr< ns3::NetDevice >', 'nd'), param('bool', 'promiscuous', default_value='false')], 
+                   visibility='private', is_virtual=True)
+    return
+
 def register_Ns3Ipv4GlobalRoutingHelper_methods(root_module, cls):
     ## ipv4-global-routing-helper.h: ns3::Ipv4GlobalRoutingHelper::Ipv4GlobalRoutingHelper() [constructor]
     cls.add_constructor([])
--- a/examples/csma/csma-bridge-one-hop.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/csma/csma-bridge-one-hop.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -221,11 +221,11 @@
   //
   // Also configure some tcpdump traces; each interface will be traced.
   // The output files will be named:
-  //     csma-bridge-<nodeId>-<interfaceId>.pcap
+  //     csma-bridge-one-hop-<nodeId>-<interfaceId>.pcap
   // and can be read by the "tcpdump -r" command (use "-tt" option to
   // display timestamps correctly)
   //
-  CsmaHelper::EnablePcapAll ("csma-bridge-one-hop", false);
+  csma.EnablePcapAll ("csma-bridge-one-hop", false);
 
   //
   // Now, do the actual simulation.
--- a/examples/csma/csma-bridge.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/csma/csma-bridge.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -154,7 +154,7 @@
   // and can be read by the "tcpdump -r" command (use "-tt" option to
   // display timestamps correctly)
   //
-  CsmaHelper::EnablePcapAll ("csma-bridge", false);
+  csma.EnablePcapAll ("csma-bridge", false);
 
   //
   // Now, do the actual simulation.
--- a/examples/csma/csma-bridge.py	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/csma/csma-bridge.py	Mon Jan 04 10:35:32 2010 -0800
@@ -134,7 +134,7 @@
     # and can be read by the "tcpdump -r" command(use "-tt" option to
     # display timestamps correctly)
     #
-    ns3.CsmaHelper.EnablePcapAll("csma-bridge", False)
+    csma.EnablePcapAll("csma-bridge", False)
 
     #
     # Now, do the actual simulation.
--- a/examples/csma/csma-broadcast.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/csma/csma-broadcast.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -111,7 +111,7 @@
   // The output files will be named 
   // csma-broadcast-<nodeId>-<interfaceId>.pcap
   // and can be read by the "tcpdump -tt -r" command 
-  CsmaHelper::EnablePcapAll ("csma-broadcast", false);
+  csma.EnablePcapAll ("csma-broadcast", false);
   std::ofstream ascii;
   ascii.open ("csma-broadcast.tr", std::ios_base::binary | std::ios_base::out);
   CsmaHelper::EnableAsciiAll (ascii);
--- a/examples/csma/csma-multicast.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/csma/csma-multicast.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -170,7 +170,7 @@
   //     csma-multicast-<nodeId>-<interfaceId>.pcap
   // and can be read by the "tcpdump -r" command (use "-tt" option to
   // display timestamps correctly)
-  CsmaHelper::EnablePcapAll ("csma-multicast", false);
+  csma.EnablePcapAll ("csma-multicast", false);
   //
   // Now, do the actual simulation.
   //
--- a/examples/csma/csma-one-subnet.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/csma/csma-one-subnet.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -129,7 +129,7 @@
 // and can be read by the "tcpdump -r" command (use "-tt" option to
 // display timestamps correctly)
 //
-  CsmaHelper::EnablePcapAll ("csma-one-subnet", false);
+  csma.EnablePcapAll ("csma-one-subnet", false);
 //
 // Now, do the actual simulation.
 //
--- a/examples/csma/csma-star.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/csma/csma-star.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -182,7 +182,7 @@
   //
   // Do pcap tracing on all devices on all nodes.
   //
-  CsmaHelper::EnablePcapAll ("csma-star", false);
+  csma.EnablePcapAll ("csma-star", false);
 
   NS_LOG_INFO ("Run Simulation.");
   Simulator::Run ();
--- a/examples/emulation/emu-ping.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/emulation/emu-ping.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -203,7 +203,8 @@
   //
   // Enable a promiscuous pcap trace to see what is coming and going on our device.
   //
-  EmuHelper::EnablePcap ("emu-ping", device, true);
+  EmuHelper emu;
+  emu.EnablePcap ("emu-ping", device, true);
 
   //
   // Now, do the actual emulation.
--- a/examples/emulation/emu-udp-echo.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/emulation/emu-udp-echo.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -150,7 +150,7 @@
 
   std::ofstream ascii;
   ascii.open ("emu-udp-echo.tr");
-  EmuHelper::EnablePcapAll ("emu-udp-echo", true);
+  emu.EnablePcapAll ("emu-udp-echo", true);
 
   //
   // Now, do the actual simulation.
--- a/examples/error-model/simple-error-model.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/error-model/simple-error-model.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -168,7 +168,7 @@
 
   std::ofstream ascii;
   ascii.open ("simple-error-model.tr");
-  PointToPointHelper::EnablePcapAll ("simple-error-model");
+  p2p.EnablePcapAll ("simple-error-model");
   PointToPointHelper::EnableAsciiAll (ascii);
 
   NS_LOG_INFO ("Run Simulation.");
--- a/examples/ipv6/fragmentation-ipv6.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/ipv6/fragmentation-ipv6.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -152,7 +152,7 @@
 
   std::ofstream ascii;
   ascii.open ("fragmentation-ipv6.tr");
-  CsmaHelper::EnablePcapAll (std::string ("fragmentation-ipv6"), true);
+  csma.EnablePcapAll (std::string ("fragmentation-ipv6"), true);
   CsmaHelper::EnableAsciiAll (ascii);
 
   NS_LOG_INFO ("Run Simulation.");
--- a/examples/ipv6/icmpv6-redirect.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/ipv6/icmpv6-redirect.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -175,7 +175,7 @@
 
   std::ofstream ascii;
   ascii.open ("icmpv6-redirect.tr");
-  CsmaHelper::EnablePcapAll ("icmpv6-redirect", true);
+  csma.EnablePcapAll ("icmpv6-redirect", true);
   CsmaHelper::EnableAsciiAll (ascii);
 
   /* Now, do the actual simulation. */
--- a/examples/ipv6/loose-routing-ipv6.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/ipv6/loose-routing-ipv6.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -160,7 +160,7 @@
 
   std::ofstream ascii;
   ascii.open ("loose-routing-ipv6.tr");
-  CsmaHelper::EnablePcapAll ("loose-routing-ipv6", true);
+  csma.EnablePcapAll ("loose-routing-ipv6", true);
   CsmaHelper::EnableAsciiAll (ascii);
 
   NS_LOG_INFO ("Run Simulation.");
--- a/examples/ipv6/ping6.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/ipv6/ping6.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -100,7 +100,7 @@
 
   std::ofstream ascii;
   ascii.open ("ping6.tr");
-  CsmaHelper::EnablePcapAll (std::string ("ping6"), true);
+  csma.EnablePcapAll (std::string ("ping6"), true);
   CsmaHelper::EnableAsciiAll (ascii);
 
   NS_LOG_INFO ("Run Simulation.");
--- a/examples/ipv6/radvd-two-prefix.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/ipv6/radvd-two-prefix.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -210,7 +210,7 @@
 
   std::ofstream ascii;
   ascii.open ("radvd-two-prefix.tr");
-  CsmaHelper::EnablePcapAll (std::string ("radvd-two-prefix"), true);
+  csma.EnablePcapAll (std::string ("radvd-two-prefix"), true);
   CsmaHelper::EnableAsciiAll (ascii);
 
   NS_LOG_INFO ("Run Simulation.");
--- a/examples/ipv6/radvd.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/ipv6/radvd.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -145,7 +145,7 @@
 
   std::ofstream ascii;
   ascii.open ("radvd.tr");
-  CsmaHelper::EnablePcapAll (std::string ("radvd"), true);
+  csma.EnablePcapAll (std::string ("radvd"), true);
   CsmaHelper::EnableAsciiAll (ascii);
 
   NS_LOG_INFO ("Run Simulation.");
--- a/examples/naming/object-names.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/naming/object-names.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -153,6 +153,24 @@
   //
   Config::Connect ("/Names/client/eth0/MacRx", MakeCallback (&RxEvent));
 
+  //
+  // Set up some pcap tracing on the CSMA devices.  The names of the trace 
+  // files will automatically correspond to the object names if present.
+  // In this case, you will find trace files called:
+  //
+  //   object-names-client-eth0.pcap
+  //   object-names-server-eth0.pcap
+  //
+  // since those nodes and devices have had names associated with them.  You
+  // will also see:
+  //
+  //   object-names-2-1.pcap
+  //   object-names-3-1.pcap
+  //
+  // since nodes two and three have no associated names.
+  //
+  csma.EnablePcapAll ("object-names");
+
   Simulator::Run ();
   Simulator::Destroy ();
 }
--- a/examples/realtime/realtime-udp-echo.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/realtime/realtime-udp-echo.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -107,7 +107,7 @@
 
   std::ofstream ascii;
   ascii.open ("realtime-udp-echo.tr");
-  CsmaHelper::EnablePcapAll ("realtime-udp-echo", false);
+  csma.EnablePcapAll ("realtime-udp-echo", false);
   CsmaHelper::EnableAsciiAll (ascii);
 
   //
--- a/examples/routing/dynamic-global-routing.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/routing/dynamic-global-routing.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -192,9 +192,9 @@
 
   std::ofstream ascii;
   ascii.open ("dynamic-global-routing.tr", std::ios_base::binary | std::ios_base::out);
-  PointToPointHelper::EnablePcapAll ("dynamic-global-routing");
+  p2p.EnablePcapAll ("dynamic-global-routing");
   PointToPointHelper::EnableAsciiAll (ascii);
-  CsmaHelper::EnablePcapAll ("dynamic-global-routing", false);
+  csma.EnablePcapAll ("dynamic-global-routing", false);
   CsmaHelper::EnableAsciiAll (ascii);
   InternetStackHelper::EnableAsciiAll (ascii);
  
--- a/examples/routing/global-injection-slash32.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/routing/global-injection-slash32.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -148,7 +148,7 @@
 
   std::ofstream ascii;
   ascii.open ("global-routing-injection32.tr", std::ios_base::binary | std::ios_base::out);
-  PointToPointHelper::EnablePcapAll ("global-routing-injection32");
+  p2p.EnablePcapAll ("global-routing-injection32");
   PointToPointHelper::EnableAsciiAll (ascii);
 
   Simulator::Run ();
--- a/examples/routing/global-routing-slash32.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/routing/global-routing-slash32.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -121,7 +121,7 @@
 
   std::ofstream ascii;
   ascii.open ("global-routing-slash32.tr", std::ios_base::binary | std::ios_base::out);
-  PointToPointHelper::EnablePcapAll ("global-routing-slash32");
+  p2p.EnablePcapAll ("global-routing-slash32");
   PointToPointHelper::EnableAsciiAll (ascii);
 
   Simulator::Run ();
--- a/examples/routing/mixed-global-routing.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/routing/mixed-global-routing.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -122,9 +122,9 @@
 
   std::ofstream ascii;
   ascii.open ("mixed-global-routing.tr");
-  PointToPointHelper::EnablePcapAll ("mixed-global-routing");
+  p2p.EnablePcapAll ("mixed-global-routing");
   PointToPointHelper::EnableAsciiAll (ascii);
-  CsmaHelper::EnablePcapAll ("mixed-global-routing", false);
+  csma.EnablePcapAll ("mixed-global-routing", false);
   CsmaHelper::EnableAsciiAll (ascii);
 
 
--- a/examples/routing/simple-alternate-routing.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/routing/simple-alternate-routing.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -154,7 +154,7 @@
 
   std::ofstream ascii;
   ascii.open ("simple-alternate-routing.tr");
-  PointToPointHelper::EnablePcapAll ("simple-alternate-routing");
+  p2p.EnablePcapAll ("simple-alternate-routing");
   PointToPointHelper::EnableAsciiAll (ascii);
 
   NS_LOG_INFO ("Run Simulation.");
--- a/examples/routing/simple-global-routing.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/routing/simple-global-routing.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -147,7 +147,7 @@
 
   std::ofstream ascii;
   ascii.open ("simple-global-routing.tr");
-  PointToPointHelper::EnablePcapAll ("simple-global-routing");
+  p2p.EnablePcapAll ("simple-global-routing");
   PointToPointHelper::EnableAsciiAll (ascii);
 
   // Flow Monitor
--- a/examples/routing/simple-point-to-point-olsr.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/routing/simple-point-to-point-olsr.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -159,7 +159,7 @@
 
   std::ofstream ascii;
   ascii.open ("simple-point-to-point-olsr.tr");
-  PointToPointHelper::EnablePcapAll ("simple-point-to-point-olsr");
+  p2p.EnablePcapAll ("simple-point-to-point-olsr");
   PointToPointHelper::EnableAsciiAll (ascii);
 
   Simulator::Stop (Seconds (30));
--- a/examples/routing/simple-routing-ping6.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/routing/simple-routing-ping6.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -153,7 +153,7 @@
 
   std::ofstream ascii;
   ascii.open ("simple-routing-ping6.tr");
-  CsmaHelper::EnablePcapAll (std::string ("simple-routing-ping6"), true);
+  csma.EnablePcapAll (std::string ("simple-routing-ping6"), true);
   CsmaHelper::EnableAsciiAll (ascii);
 
   NS_LOG_INFO ("Run Simulation.");
--- a/examples/routing/static-routing-slash32.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/routing/static-routing-slash32.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -126,7 +126,7 @@
 
   std::ofstream ascii;
   ascii.open ("static-routing-slash32.tr");
-  PointToPointHelper::EnablePcapAll ("static-routing-slash32");
+  p2p.EnablePcapAll ("static-routing-slash32");
   PointToPointHelper::EnableAsciiAll (ascii);
 
   Simulator::Run ();
--- a/examples/socket/socket-bound-static-routing.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/socket/socket-bound-static-routing.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -147,7 +147,7 @@
   
   std::ofstream ascii;
   ascii.open ("socket-bound-static-routing.tr");
-  PointToPointHelper::EnablePcapAll ("socket-bound-static-routing");
+  p2p.EnablePcapAll ("socket-bound-static-routing");
   PointToPointHelper::EnableAsciiAll (ascii);
 
   LogComponentEnableAll (LOG_PREFIX_TIME);
--- a/examples/socket/socket-bound-tcp-static-routing.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/socket/socket-bound-tcp-static-routing.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -163,7 +163,7 @@
   
   std::ofstream ascii;
   ascii.open ("socket-bound-tcp-static-routing.tr");
-  PointToPointHelper::EnablePcapAll ("socket-bound-tcp-static-routing");
+  p2p.EnablePcapAll ("socket-bound-tcp-static-routing");
   PointToPointHelper::EnableAsciiAll (ascii);
 
   LogComponentEnableAll (LOG_PREFIX_TIME);
--- a/examples/tap/tap-csma.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/tap/tap-csma.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -102,7 +102,7 @@
   tapBridge.SetAttribute ("DeviceName", StringValue (tapName));
   tapBridge.Install (nodes.Get (0), devices.Get (0));
 
-  CsmaHelper::EnablePcapAll ("tap-csma", false);
+  csma.EnablePcapAll ("tap-csma", false);
   Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
 
   Simulator::Stop (Seconds (60.));
--- a/examples/tap/tap-wifi-dumbbell.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/tap/tap-wifi-dumbbell.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -217,7 +217,8 @@
   apps.Start (Seconds (1.0));
 
   wifiPhy.EnablePcapAll ("tap-wifi-dumbbell");
-  CsmaHelper::EnablePcapAll ("tap-wifi-dumbbell", false);
+
+  csmaRight.EnablePcapAll ("tap-wifi-dumbbell", false);
   Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
 
   Simulator::Stop (Seconds (60.));
--- a/examples/tcp/star.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/tcp/star.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -109,7 +109,7 @@
   //
   // Do pcap tracing on all point-to-point devices on all nodes.
   //
-  PointToPointHelper::EnablePcapAll ("star");
+  pointToPoint.EnablePcapAll ("star");
 
   NS_LOG_INFO ("Run Simulation.");
   Simulator::Run ();
--- a/examples/tcp/tcp-large-transfer.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/tcp/tcp-large-transfer.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -171,7 +171,7 @@
   std::ofstream ascii;
   ascii.open ("tcp-large-transfer.tr");
   PointToPointHelper::EnableAsciiAll (ascii);
-  PointToPointHelper::EnablePcapAll ("tcp-large-transfer");
+  p2p.EnablePcapAll ("tcp-large-transfer");
 
   // Finally, set up the simulator to run.  The 1000 second hard limit is a
   // failsafe in case some change above causes the simulation to never end
--- a/examples/tcp/tcp-nsc-lfn.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/tcp/tcp-nsc-lfn.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -142,7 +142,7 @@
                                  MakeCallback (&CwndTracer));
 
   // This tells ns-3 to generate pcap traces.
-  PointToPointHelper::EnablePcapAll ("tcp-nsc-lfn");
+  p2p.EnablePcapAll ("tcp-nsc-lfn");
 
   Simulator::Stop (Seconds(900));
   Simulator::Run ();
--- a/examples/tcp/tcp-nsc-zoo.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/tcp/tcp-nsc-zoo.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -134,7 +134,7 @@
 	}
     }
 
-  CsmaHelper::EnablePcapAll ("tcp-nsc-zoo", false);
+  csma.EnablePcapAll ("tcp-nsc-zoo", false);
 
   Simulator::Stop (Seconds(100));
   Simulator::Run ();
--- a/examples/tcp/tcp-star-server.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/tcp/tcp-star-server.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -155,7 +155,7 @@
   //configure tracing
   std::ofstream ascii;
   ascii.open ("tcp-star-server.tr");
-  PointToPointHelper::EnablePcapAll ("tcp-star-server");
+  p2p.EnablePcapAll ("tcp-star-server");
   PointToPointHelper::EnableAsciiAll (ascii);
 
   NS_LOG_INFO ("Run Simulation.");
--- a/examples/tunneling/virtual-net-device.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/tunneling/virtual-net-device.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -291,7 +291,7 @@
 
   std::ofstream ascii;
   ascii.open ("virtual-net-device.tr");
-  PointToPointHelper::EnablePcapAll ("virtual-net-device");
+  p2p.EnablePcapAll ("virtual-net-device");
   PointToPointHelper::EnableAsciiAll (ascii);
 
   NS_LOG_INFO ("Run Simulation.");
--- a/examples/tutorial/second.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/tutorial/second.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -103,8 +103,8 @@
 
   Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
 
-  PointToPointHelper::EnablePcapAll ("second");
-  CsmaHelper::EnablePcap ("second", csmaDevices.Get (1), true);
+  pointToPoint.EnablePcapAll ("second");
+  csma.EnablePcap ("second", csmaDevices.Get (1), true);
 
   Simulator::Run ();
   Simulator::Destroy ();
--- a/examples/tutorial/third.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/tutorial/third.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -162,9 +162,9 @@
 
   Simulator::Stop (Seconds (10.0));
 
-  PointToPointHelper::EnablePcapAll ("third");
+  pointToPoint.EnablePcapAll ("third");
   phy.EnablePcap ("third", apDevices.Get (0));
-  CsmaHelper::EnablePcap ("third", csmaDevices.Get (0), true);
+  csma.EnablePcap ("third", csmaDevices.Get (0), true);
 
   Simulator::Run ();
   Simulator::Destroy ();
--- a/examples/udp/udp-echo.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/udp/udp-echo.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -120,7 +120,7 @@
 
   std::ofstream ascii;
   ascii.open ("udp-echo.tr");
-  CsmaHelper::EnablePcapAll ("udp-echo", false);
+  csma.EnablePcapAll ("udp-echo", false);
   CsmaHelper::EnableAsciiAll (ascii);
 
 //
--- a/examples/wireless/mixed-wireless.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/wireless/mixed-wireless.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -394,7 +394,12 @@
 
       // Let's do a pcap trace on the application source and sink, ifIndex 0
       // Csma captures in non-promiscuous mode
-      CsmaHelper::EnablePcap ("mixed-wireless", appSource->GetId (), 0, false);
+      CsmaHelper csma;
+#if 0
+      csma.EnablePcap ("mixed-wireless", appSource->GetId (), 0, false);
+#else
+      csma.EnablePcapAll ("mixed-wireless", false);
+#endif
       wifiPhy.EnablePcap ("mixed-wireless", appSink->GetId (), 0);
       wifiPhy.EnablePcap ("mixed-wireless", 9, 2);
       wifiPhy.EnablePcap ("mixed-wireless", 9, 0);
--- a/examples/wireless/wifi-simple-adhoc-grid.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/wireless/wifi-simple-adhoc-grid.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -159,8 +159,8 @@
   // This is one parameter that matters when using FixedRssLossModel
   // set it to zero; otherwise, gain will be added
   wifiPhy.Set ("RxGain", DoubleValue (-10) ); 
-  // ns-3 support RadioTap and Prism tracing extensions for 802.11b
-  wifiPhy.SetPcapFormat (YansWifiPhyHelper::PCAP_FORMAT_80211_RADIOTAP); 
+  // ns-3 supports RadioTap and Prism tracing extensions for 802.11b
+  wifiPhy.SetPcapDataLinkType (PcapHelper::DLT_IEEE802_11_RADIO); 
 
   YansWifiChannelHelper wifiChannel ;
   wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel");
--- a/examples/wireless/wifi-simple-adhoc.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/wireless/wifi-simple-adhoc.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -134,8 +134,8 @@
   // This is one parameter that matters when using FixedRssLossModel
   // set it to zero; otherwise, gain will be added
   wifiPhy.Set ("RxGain", DoubleValue (0) ); 
-  // ns-3 support RadioTap and Prism tracing extensions for 802.11b
-  wifiPhy.SetPcapFormat (YansWifiPhyHelper::PCAP_FORMAT_80211_RADIOTAP); 
+  // ns-3 supports RadioTap and Prism tracing extensions for 802.11b
+  wifiPhy.SetPcapDataLinkType (PcapHelper::DLT_IEEE802_11_RADIO); 
 
   YansWifiChannelHelper wifiChannel ;
   wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel");
--- a/examples/wireless/wifi-simple-infra.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/wireless/wifi-simple-infra.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -135,8 +135,8 @@
   // This is one parameter that matters when using FixedRssLossModel
   // set it to zero; otherwise, gain will be added
   wifiPhy.Set ("RxGain", DoubleValue (0) ); 
-  // ns-3 support RadioTap and Prism tracing extensions for 802.11b
-  wifiPhy.SetPcapFormat (YansWifiPhyHelper::PCAP_FORMAT_80211_RADIOTAP); 
+  // ns-3 supports RadioTap and Prism tracing extensions for 802.11b
+  wifiPhy.SetPcapDataLinkType (PcapHelper::DLT_IEEE802_11_RADIO); 
 
   YansWifiChannelHelper wifiChannel ;
   wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel");
--- a/examples/wireless/wifi-simple-interference.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/wireless/wifi-simple-interference.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -180,8 +180,8 @@
   wifiPhy.Set ("RxGain", DoubleValue (0) ); 
   wifiPhy.Set ("CcaMode1Threshold", DoubleValue (0.0) );
 
-  // ns-3 support RadioTap and Prism tracing extensions for 802.11b
-  wifiPhy.SetPcapFormat (YansWifiPhyHelper::PCAP_FORMAT_80211_RADIOTAP); 
+  // ns-3 supports RadioTap and Prism tracing extensions for 802.11b
+  wifiPhy.SetPcapDataLinkType (PcapHelper::DLT_IEEE802_11_RADIO); 
 
   YansWifiChannelHelper wifiChannel ;
   wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel");
--- a/examples/wireless/wifi-wired-bridging.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/examples/wireless/wifi-wired-bridging.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -90,7 +90,7 @@
   double wifiX = 0.0;
 
   YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
-  wifiPhy.SetPcapFormat(YansWifiPhyHelper::PCAP_FORMAT_80211_RADIOTAP);
+  wifiPhy.SetPcapDataLinkType (PcapHelper::DLT_IEEE802_11_RADIO); 
 
   for (uint32_t i = 0; i < nWifis; ++i)
     {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/common/pcap-file-object.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -0,0 +1,133 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2009 University of Washington
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include "pcap-file-object.h"
+#include "ns3/log.h"
+
+NS_LOG_COMPONENT_DEFINE ("PcapFileObject");
+
+namespace ns3 {
+
+NS_OBJECT_ENSURE_REGISTERED (PcapFileObject);
+
+TypeId 
+PcapFileObject::GetTypeId (void)
+{
+  static TypeId tid = TypeId ("ns3::PcapFileObject")
+    .SetParent<Object> ()
+    .AddConstructor<PcapFileObject> ()
+    ;
+  return tid;
+}
+
+
+PcapFileObject::PcapFileObject ()
+{
+}
+
+PcapFileObject::~PcapFileObject ()
+{
+  Close ();
+}
+
+void
+PcapFileObject::Close (void)
+{
+  file.Close ();
+}
+
+bool
+PcapFileObject::Open (std::string const &filename, std::string const &mode)
+{
+  return file.Open (filename, mode);
+}
+
+bool
+PcapFileObject::Init (uint32_t dataLinkType, uint32_t snapLen, int32_t tzCorrection)
+{
+  return file.Init (dataLinkType, snapLen, tzCorrection);
+}
+
+bool
+PcapFileObject::Write (Time t, Ptr<const Packet> p)
+{
+  uint64_t current = t.GetMicroSeconds ();
+  uint64_t s = current / 1000000;
+  uint64_t us = current % 1000000;
+
+  uint32_t bufferSize = p->GetSize ();
+  uint8_t *buffer = new uint8_t[bufferSize];
+  p->CopyData (buffer, bufferSize);
+  bool rc = file.Write (s, us, buffer, bufferSize);
+  delete [] buffer;
+  return rc;
+}
+
+bool
+PcapFileObject::Write (Time t, uint8_t const *buffer, uint32_t length)
+{
+  uint64_t current = t.GetMicroSeconds ();
+  uint64_t s = current / 1000000;
+  uint64_t us = current % 1000000;
+
+  return file.Write (s, us, buffer, length);
+}
+
+uint32_t
+PcapFileObject::GetMagic (void)
+{
+  return file.GetMagic ();
+}
+
+uint16_t
+PcapFileObject::GetVersionMajor (void)
+{
+  return file.GetVersionMajor ();
+}
+
+uint16_t
+PcapFileObject::GetVersionMinor (void)
+{
+  return file.GetVersionMinor ();
+}
+
+int32_t
+PcapFileObject::GetTimeZoneOffset (void)
+{
+  return file.GetTimeZoneOffset ();
+}
+
+uint32_t
+PcapFileObject::GetSigFigs (void)
+{
+  return file.GetSigFigs ();
+}
+
+uint32_t
+PcapFileObject::GetSnapLen (void)
+{
+  return file.GetSnapLen ();
+}
+
+uint32_t
+PcapFileObject::GetDataLinkType (void)
+{
+  return file.GetDataLinkType ();
+}
+
+} //namespace ns3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/common/pcap-file-object.h	Mon Jan 04 10:35:32 2010 -0800
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2009 University of Washington
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef PCAP_FILE_OBJECT_H
+#define PCAP_FILE_OBJECT_H
+
+#include <string.h>
+#include "ns3/ptr.h"
+#include "ns3/packet.h"
+#include "ns3/nstime.h"
+#include "pcap-file.h"
+
+namespace ns3 {
+
+/*
+ * A class representing a pcap file tailored for use in model code.
+ */
+
+class PcapFileObject : public Object
+{
+public:
+  static TypeId GetTypeId (void);
+
+  PcapFileObject ();
+  ~PcapFileObject ();
+
+  bool Open (std::string const &filename, std::string const &mode);
+
+  void Close (void);
+
+  bool Init (uint32_t dataLinkType, 
+             uint32_t snapLen = PcapFile::SNAPLEN_DEFAULT, 
+             int32_t tzCorrection = PcapFile::ZONE_DEFAULT);
+
+  bool Write (Time t, Ptr<const Packet> p);
+  bool Write (Time t, uint8_t const *buffer, uint32_t length);
+
+  uint32_t GetMagic (void);
+  uint16_t GetVersionMajor (void);
+  uint16_t GetVersionMinor (void);
+  int32_t GetTimeZoneOffset (void);
+  uint32_t GetSigFigs (void);
+  uint32_t GetSnapLen (void);
+  uint32_t GetDataLinkType (void);
+  
+private:
+  PcapFile file;
+};
+
+} //namespace ns3
+
+#endif // PCAP_FILE_OBJECT_H
+
--- a/src/common/wscript	Thu Dec 31 10:20:06 2009 -0800
+++ b/src/common/wscript	Mon Jan 04 10:35:32 2010 -0800
@@ -21,6 +21,7 @@
         'ascii-writer.cc',
         'pcap-file.cc',
         'pcap-file-test-suite.cc',
+        'pcap-file-object.cc',
         ]
 
     headers = bld.new_task_gen('ns3header')
@@ -43,4 +44,5 @@
         'ascii-writer.h',
         'sgi-hashmap.h',
         'pcap-file.h',
+        'pcap-file-object.h',
         ]
--- a/src/helper/csma-helper.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/src/helper/csma-helper.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -17,7 +17,9 @@
  *
  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
  */
-#include "csma-helper.h"
+
+#include "ns3/abort.h"
+#include "ns3/log.h"
 #include "ns3/simulator.h"
 #include "ns3/object-factory.h"
 #include "ns3/queue.h"
@@ -28,8 +30,14 @@
 #include "ns3/names.h"
 #include "ns3/pcap-writer.h"
 #include "ns3/ascii-writer.h"
+
+#include "pcap-helper.h"
+#include "csma-helper.h"
+
 #include <string>
 
+NS_LOG_COMPONENT_DEFINE ("CsmaHelper");
+
 namespace ns3 {
 
 CsmaHelper::CsmaHelper ()
@@ -66,78 +74,34 @@
 }
 
 void 
-CsmaHelper::EnablePcap (std::string filename, uint32_t nodeid, uint32_t deviceid, bool promiscuous)
+CsmaHelper::EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool promiscuous)
 {
-  std::ostringstream oss;
-  oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid << "/$ns3::CsmaNetDevice/";
-  Config::MatchContainer matches = Config::LookupMatches (oss.str ());
-  if (matches.GetN () == 0)
+  //
+  // All of the Pcap enable functions vector through here including the ones
+  // that are wandering through all of devices on perhaps all of the nodes in
+  // the system.  We can only deal with devices of type CsmaNetDevice.
+  //
+  Ptr<CsmaNetDevice> device = nd->GetObject<CsmaNetDevice> ();
+  if (device == 0)
     {
+      NS_LOG_INFO ("CsmaHelper::EnablePcapInternal(): Device " << device << " not of type ns3::CsmaNetDevice");
       return;
     }
-  oss.str ("");
-  oss << filename << "-" << nodeid << "-" << deviceid << ".pcap";
-  Ptr<PcapWriter> pcap = CreateObject<PcapWriter> ();
-  pcap->Open (oss.str ());
-  pcap->WriteEthernetHeader ();
-  oss.str ("");
-  oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid;
+
+  PcapHelper pcapHelper;
+  std::string filename = pcapHelper.GetFilename (prefix, device);
+  Ptr<PcapFileObject> file = pcapHelper.CreateFile (filename, "w", PcapHelper::DLT_EN10MB);
   if (promiscuous)
     {
-      oss << "/$ns3::CsmaNetDevice/PromiscSniffer";
+      pcapHelper.HookDefaultSink<CsmaNetDevice> (device, "PromiscSniffer", file);
     }
   else
     {
-      oss << "/$ns3::CsmaNetDevice/Sniffer";
-    }
-  Config::ConnectWithoutContext (oss.str (), MakeBoundCallback (&CsmaHelper::SniffEvent, pcap));
-}
-
-void 
-CsmaHelper::EnablePcap (std::string filename, NetDeviceContainer d, bool promiscuous)
-{
-  for (NetDeviceContainer::Iterator i = d.Begin (); i != d.End (); ++i)
-    {
-      Ptr<NetDevice> dev = *i;
-      EnablePcap (filename, dev->GetNode ()->GetId (), dev->GetIfIndex (), promiscuous);
+      pcapHelper.HookDefaultSink<CsmaNetDevice> (device, "Sniffer", file);
     }
 }
 
 void 
-CsmaHelper::EnablePcap (std::string filename, Ptr<NetDevice> nd, bool promiscuous)
-{
-  EnablePcap (filename, nd->GetNode ()->GetId (), nd->GetIfIndex (), promiscuous);
-}
-
-void 
-CsmaHelper::EnablePcap (std::string filename, std::string ndName, bool promiscuous)
-{
-  Ptr<NetDevice> nd = Names::Find<NetDevice> (ndName);
-  EnablePcap (filename, nd->GetNode ()->GetId (), nd->GetIfIndex (), promiscuous);
-}
-
-void
-CsmaHelper::EnablePcap (std::string filename, NodeContainer n, bool promiscuous)
-{
-  NetDeviceContainer devs;
-  for (NodeContainer::Iterator i = n.Begin (); i != n.End (); ++i)
-    {
-      Ptr<Node> node = *i;
-      for (uint32_t j = 0; j < node->GetNDevices (); ++j)
-        {
-          devs.Add (node->GetDevice (j));
-        }
-    }
-  EnablePcap (filename, devs, promiscuous);
-}
-
-void
-CsmaHelper::EnablePcapAll (std::string filename, bool promiscuous)
-{
-  EnablePcap (filename, NodeContainer::GetGlobal (), promiscuous);
-}
-
-void 
 CsmaHelper::EnableAscii (std::ostream &os, uint32_t nodeid, uint32_t deviceid)
 {
   Ptr<AsciiWriter> writer = AsciiWriter::Get (os);
@@ -269,12 +233,6 @@
 }
 
 void 
-CsmaHelper::SniffEvent (Ptr<PcapWriter> writer, Ptr<const Packet> packet)
-{
-  writer->WritePacket (packet);
-}
-
-void 
 CsmaHelper::AsciiEnqueueEvent (Ptr<AsciiWriter> writer, std::string path, Ptr<const Packet> packet)
 {
   writer->WritePacket (AsciiWriter::ENQUEUE, path, packet);
--- a/src/helper/csma-helper.h	Thu Dec 31 10:20:06 2009 -0800
+++ b/src/helper/csma-helper.h	Mon Jan 04 10:35:32 2010 -0800
@@ -21,6 +21,7 @@
 #define CSMA_HELPER_H
 
 #include <string>
+
 #include "ns3/attribute.h"
 #include "ns3/object-factory.h"
 #include "ns3/net-device-container.h"
@@ -28,16 +29,17 @@
 #include "ns3/csma-channel.h"
 #include "ns3/deprecated.h"
 
+#include "pcap-user-helper.h"
+
 namespace ns3 {
 
 class Packet;
-class PcapWriter;
 class AsciiWriter;
 
 /**
  * \brief build a set of CsmaNetDevice objects
  */
-class CsmaHelper
+class CsmaHelper : public PcapUserHelper
 {
 public:
   /**
@@ -84,67 +86,6 @@
   void SetChannelAttribute (std::string n1, const AttributeValue &v1);
 
   /**
-   * \param filename filename prefix to use for pcap files.
-   * \param nodeid the id of the node to generate pcap output for.
-   * \param deviceid the id of the device to generate pcap output for.
-   * \param promiscuous If true capture all possible packets available at the device.
-   *
-   * Generate a pcap file which contains the link-level data observed
-   * by the specified deviceid within the specified nodeid. The pcap
-   * data is stored in the file prefix-nodeid-deviceid.pcap.
-   *
-   * This method should be invoked after the network topology has 
-   * been fully constructed.
-   */
-  static void EnablePcap (std::string filename, uint32_t nodeid, uint32_t deviceid, bool promiscuous);
-
-  /**
-   * \param filename filename prefix to use for pcap files.
-   * \param nd Net device in which you want to enable tracing.
-   * \param promiscuous If true capture all possible packets available at the device.
-   *
-   * Enable pcap output the indicated net device.
-   */
-  static void EnablePcap (std::string filename, Ptr<NetDevice> nd, bool promiscuous);
-
-  /**
-   * \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 promiscuous If true capture all possible packets available at the device.
-   *
-   * Enable pcap output the indicated net device.
-   */
-  static void EnablePcap (std::string filename, std::string ndName, bool promiscuous);
-
-  /**
-   * \param filename filename prefix to use for pcap files.
-   * \param d container of devices of type ns3::CsmaNetDevice
-   * \param promiscuous If true capture all possible packets available at the device.
-   *
-   * Enable pcap output on each input device which is of the ns3::CsmaNetDevice type.
-   */
-  static void EnablePcap (std::string filename, NetDeviceContainer d, bool promiscuous);
-
-  /**
-   * \param filename filename prefix to use for pcap files.
-   * \param n container of nodes.
-   * \param promiscuous If true capture all possible packets available at the device.
-   *
-   * Enable pcap output on each device which is of the
-   * ns3::CsmaNetDevice type and which is located in one of the 
-   * input nodes.
-   */
-  static void EnablePcap (std::string filename, NodeContainer n, bool promiscuous);
-  /**
-   * \param filename filename prefix to use for pcap files.
-   * \param promiscuous If true capture all possible packets available at the device.
-   *
-   * Enable pcap output on each device which is of the
-   * ns3::CsmaNetDevice type
-   */
-  static void EnablePcapAll (std::string filename, bool promiscuous);
-
-  /**
    * \param os output stream
    * \param nodeid the id of the node to generate ascii output for.
    * \param deviceid the id of the device to generate ascii output for.
@@ -291,10 +232,17 @@
    */
   Ptr<NetDevice> InstallPriv (Ptr<Node> node, Ptr<CsmaChannel> channel) const;
 
-  /*
-   * \internal
+  /**
+   * \brief Enable pcap output the indicated net device.
+   *
+   * NetDevice-specific implementation mechanism for hooking the trace and
+   * writing to the trace file.
+   *
+   * \param prefix Filename prefix to use for pcap files.
+   * \param nd Net device for which you want to enable tracing.
+   * \param promiscuous If true capture all possible packets available at the device.
    */
-  static void SniffEvent (Ptr<PcapWriter> writer, Ptr<const Packet> packet);
+  virtual void EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool promiscuous = false);
 
   static void AsciiRxEvent (Ptr<AsciiWriter> writer, std::string path, Ptr<const Packet> packet);
   /*
--- a/src/helper/emu-helper.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/src/helper/emu-helper.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -29,6 +29,7 @@
 #include "ns3/config.h"
 #include "ns3/packet.h"
 
+#include "pcap-helper.h"
 #include "emu-helper.h"
 
 NS_LOG_COMPONENT_DEFINE ("EmuHelper");
@@ -66,75 +67,31 @@
 }
 
 void 
-EmuHelper::EnablePcap (std::string filename, uint32_t nodeid, uint32_t deviceid, bool promiscuous)
+EmuHelper::EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool promiscuous)
 {
-  NS_LOG_FUNCTION (filename << nodeid << deviceid << promiscuous);
-  std::ostringstream oss;
-  oss << filename << "-" << nodeid << "-" << deviceid << ".pcap";
-  Ptr<PcapWriter> pcap = CreateObject<PcapWriter> ();
-  pcap->Open (oss.str ());
-  pcap->WriteEthernetHeader ();
+  //
+  // All of the Pcap enable functions vector through here including the ones
+  // that are wandering through all of devices on perhaps all of the nodes in
+  // the system.  We can only deal with devices of type EmuNetDevice.
+  //
+  Ptr<EmuNetDevice> device = nd->GetObject<EmuNetDevice> ();
+  if (device == 0)
+    {
+      NS_LOG_INFO ("EmuHelper::EnablePcapInternal(): Device " << device << " not of type ns3::EmuNetDevice");
+      return;
+    }
 
-  oss.str ("");
-  oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid;
+  PcapHelper pcapHelper;
+  std::string filename = pcapHelper.GetFilename (prefix, device);
+  Ptr<PcapFileObject> file = pcapHelper.CreateFile (filename, "w", PcapHelper::DLT_EN10MB);
   if (promiscuous)
     {
-      oss << "/$ns3::EmuNetDevice/PromiscSniffer";
+      pcapHelper.HookDefaultSink<EmuNetDevice> (device, "PromiscSniffer", file);
     }
   else
     {
-      oss << "/$ns3::EmuNetDevice/Sniffer";
+      pcapHelper.HookDefaultSink<EmuNetDevice> (device, "Sniffer", file);
     }
-  Config::ConnectWithoutContext (oss.str (), MakeBoundCallback (&EmuHelper::SniffEvent, pcap));
-}
-
-void 
-EmuHelper::EnablePcap (std::string filename, Ptr<NetDevice> nd, bool promiscuous)
-{
-  NS_LOG_FUNCTION (filename << &nd << promiscuous);
-  EnablePcap (filename, nd->GetNode ()->GetId (), nd->GetIfIndex (), promiscuous);
-}
-
-void 
-EmuHelper::EnablePcap (std::string filename, std::string ndName, bool promiscuous)
-{
-  NS_LOG_FUNCTION (filename << ndName << promiscuous);
-  Ptr<NetDevice> nd = Names::Find<NetDevice> (ndName);
-  EnablePcap (filename, nd->GetNode ()->GetId (), nd->GetIfIndex (), promiscuous);
-}
-
-void 
-EmuHelper::EnablePcap (std::string filename, NetDeviceContainer d, bool promiscuous)
-{
-  NS_LOG_FUNCTION (filename << &d << promiscuous);
-  for (NetDeviceContainer::Iterator i = d.Begin (); i != d.End (); ++i)
-    {
-      Ptr<NetDevice> dev = *i;
-      EnablePcap (filename, dev->GetNode ()->GetId (), dev->GetIfIndex (), promiscuous);
-    }
-}
-
-void
-EmuHelper::EnablePcap (std::string filename, NodeContainer n, bool promiscuous)
-{
-  NS_LOG_FUNCTION (filename << &n << promiscuous);
-  NetDeviceContainer devs;
-  for (NodeContainer::Iterator i = n.Begin (); i != n.End (); ++i)
-    {
-      Ptr<Node> node = *i;
-      for (uint32_t j = 0; j < node->GetNDevices (); ++j)
-	{
-	  devs.Add (node->GetDevice (j));
-	}
-    }
-  EnablePcap (filename, devs, promiscuous);
-}
-
-void
-EmuHelper::EnablePcapAll (std::string filename, bool promiscuous)
-{
-  NS_LOG_FUNCTION (filename << promiscuous);
-  EnablePcap (filename, NodeContainer::GetGlobal (), promiscuous);
 }
 
 void 
@@ -233,13 +190,6 @@
   return device;
 }
 
-void 
-EmuHelper::SniffEvent (Ptr<PcapWriter> writer, Ptr<const Packet> packet)
-{
-  NS_LOG_FUNCTION (writer << packet);
-  writer->WritePacket (packet);
-}
-
 void
 EmuHelper::AsciiEnqueueEvent (Ptr<AsciiWriter> writer,
                               std::string path,
--- a/src/helper/emu-helper.h	Thu Dec 31 10:20:06 2009 -0800
+++ b/src/helper/emu-helper.h	Mon Jan 04 10:35:32 2010 -0800
@@ -21,12 +21,15 @@
 
 #include <string>
 #include <ostream>
+
 #include "ns3/attribute.h"
 #include "ns3/object-factory.h"
 #include "ns3/net-device-container.h"
 #include "ns3/node-container.h"
 #include "ns3/emu-net-device.h"
 
+#include "pcap-user-helper.h"
+
 namespace ns3 {
 
 class Packet;
@@ -36,7 +39,7 @@
 /**
  * \brief build a set of EmuNetDevice objects
  */
-class EmuHelper
+class EmuHelper : public PcapUserHelper
 {
 public:
   /*
@@ -75,71 +78,6 @@
   void SetAttribute (std::string n1, const AttributeValue &v1);
 
   /**
-   * \param filename filename prefix to use for pcap files.
-   * \param nodeid the id of the node to generate pcap output for.
-   * \param deviceid the id of the device to generate pcap output for.
-   * \param promiscuous If true capture all possible packets available at the device.
-   *
-   * Generate a pcap file which contains the link-level data observed
-   * by the specified deviceid within the specified nodeid. The pcap
-   * data is stored in the file prefix-nodeid-deviceid.pcap.
-   *
-   * This method should be invoked after the network topology has 
-   * been fully constructed.
-   */
-  static void EnablePcap (std::string filename, uint32_t nodeid, uint32_t deviceid, bool promiscuous);
-
-  /**
-   * \param filename filename prefix to use for pcap files.
-   * \param nd Indicates net device on which you want to enable tracing.
-   * \param promiscuous If true capture all possible packets available at the device.
-   *
-   * Enable pcap output on each input device which is of the
-   * ns3::EmuNetDevice type.
-   */
-  static void EnablePcap (std::string filename, Ptr<NetDevice> nd, bool promiscuous);
-
-  /**
-   * \param filename filename prefix to use for pcap files.
-   * \param ndName Name of net device on which you want to enable tracing.
-   * \param promiscuous If true capture all possible packets available at the device.
-   *
-   * Enable pcap output on each input device which is of the
-   * ns3::EmuNetDevice type.
-   */
-  static void EnablePcap (std::string filename, std::string ndName, bool promiscuous);
-
-  /**
-   * \param filename filename prefix to use for pcap files.
-   * \param d container of devices of type ns3::EmuNetDevice
-   * \param promiscuous If true capture all possible packets available at the device.
-   *
-   * Enable pcap output on each input device which is of the
-   * ns3::EmuNetDevice type.
-   */
-  static void EnablePcap (std::string filename, NetDeviceContainer d, bool promiscuous);
-
-  /**
-   * \param filename filename prefix to use for pcap files.
-   * \param n container of nodes.
-   * \param promiscuous If true capture all possible packets available at the device.
-   *
-   * Enable pcap output on each device which is of the
-   * ns3::EmuNetDevice type and which is located in one of the 
-   * input nodes.
-   */
-  static void EnablePcap (std::string filename, NodeContainer n, bool promiscuous);
-
-  /**
-   * \param filename filename prefix to use for pcap files.
-   * \param promiscuous If true capture all possible packets available at the device.
-   *
-   * Enable pcap output on each device which is of the
-   * ns3::EmuNetDevice type
-   */
-  static void EnablePcapAll (std::string filename, bool promiscuous);
-
-  /**
    * \param os output stream
    * \param nodeid the id of the node to generate ascii output for.
    * \param deviceid the id of the device to generate ascii output for.
@@ -215,10 +153,17 @@
    */
   Ptr<NetDevice> InstallPriv (Ptr<Node> node) const;
 
-  /*
-   * \internal
+  /**
+   * \brief Enable pcap output the indicated net device.
+   *
+   * NetDevice-specific implementation mechanism for hooking the trace and
+   * writing to the trace file.
+   *
+   * \param prefix Filename prefix to use for pcap files.
+   * \param nd Net device for which you want to enable tracing.
+   * \param promiscuous If true capture all possible packets available at the device.
    */
-  static void SniffEvent (Ptr<PcapWriter> writer, Ptr<const Packet> packet);
+  virtual void EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool promiscuous = false);
 
   /*
    * \internal
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/helper/pcap-helper.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -0,0 +1,135 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2009 University of Washington
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <stdint.h>
+#include <stdint.h>
+#include <string>
+
+#include "ns3/abort.h"
+#include "ns3/assert.h"
+#include "ns3/log.h"
+#include "ns3/ptr.h"
+#include "ns3/node.h"
+#include "ns3/names.h"
+#include "ns3/net-device.h"
+#include "ns3/pcap-file-object.h"
+
+#include "pcap-helper.h"
+
+NS_LOG_COMPONENT_DEFINE("PcapHelper");
+
+namespace ns3 {
+
+PcapHelper::PcapHelper ()
+{
+  NS_LOG_FUNCTION_NOARGS ();
+}
+
+PcapHelper::~PcapHelper ()
+{
+  NS_LOG_FUNCTION_NOARGS ();
+}
+
+Ptr<PcapFileObject>
+PcapHelper::CreateFile (
+  std::string filename, 
+  std::string filemode,  
+  uint32_t    dataLinkType, 
+  uint32_t    snapLen, 
+  int32_t     tzCorrection)
+{
+  NS_LOG_FUNCTION (filename << filemode << dataLinkType << snapLen << tzCorrection);
+
+  Ptr<PcapFileObject> file = CreateObject<PcapFileObject> ();
+  bool err = file->Open (filename, filemode);
+  NS_ABORT_MSG_IF (err, "Unable to Open " << filename << " for mode " << filemode);
+
+  err = file->Init (dataLinkType, snapLen, tzCorrection);
+  NS_ABORT_MSG_IF (err, "Unable to Init " << filename);
+
+  //
+  // Note that the pcap helper promptly forgets all about the pcap file.  We
+  // rely on the reference count of the file object which will soon be owned
+  // by the caller to keep the object alive.  If the caller uses the file 
+  // object to hook a trace source, ownership of the file object will be
+  // implicitly transferred to the callback which keeps the object alive.
+  // When the callback is destroyed (when either the trace is disconnected or
+  // the object with the trace source is deleted) the callback will be destroyed
+  // and the file object will be destroyed, releasing the pointer and closing
+  // the file.
+  //
+  return file;
+}
+
+std::string
+PcapHelper::GetFilename (std::string prefix, Ptr<NetDevice> device, bool useObjectNames)
+{
+  NS_LOG_FUNCTION (prefix << device << useObjectNames);
+  NS_ABORT_MSG_UNLESS (prefix.size (), "Empty prefix string");
+
+  std::ostringstream oss;
+  oss << prefix << "-";
+
+  std::string nodename;
+  std::string devicename;
+
+  Ptr<Node> node = device->GetNode ();
+
+  if (useObjectNames)
+    {
+      nodename = Names::FindName (node);
+      devicename = Names::FindName (device);
+    }
+
+  if (nodename.size ())
+    {
+      oss << nodename;
+    }
+  else
+    {
+      oss << node->GetId ();
+    }
+
+  oss << "-";
+
+  if (devicename.size ())
+    {
+      oss << devicename;
+    }
+  else
+    {
+      oss << device->GetIfIndex ();
+    }
+
+  oss << ".pcap";
+
+  return oss.str ();
+}
+
+//
+// The basic default trace sink.  This one just writes the packet to the pcap
+// file which is good enough for most kinds of captures.
+//
+void
+PcapHelper::DefaultSink (Ptr<PcapFileObject> file, Ptr<const Packet> p)
+{
+  NS_LOG_FUNCTION (file << p);
+  file->Write(Simulator::Now(), p);
+}
+
+} // namespace ns3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/helper/pcap-helper.h	Mon Jan 04 10:35:32 2010 -0800
@@ -0,0 +1,90 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2009 University of Washington
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef PCAP_HELPER_H
+#define PCAP_HELPER_H
+
+#include "ns3/net-device-container.h"
+#include "ns3/node-container.h"
+#include "ns3/simulator.h"
+#include "ns3/pcap-file-object.h"
+
+namespace ns3 {
+
+/**
+ * \brief Manage pcap files for device models
+ *
+ * Handling pcap files is a common operation for ns-3 devices.  It is useful to
+ * provide a common base class for dealing with these ops.
+ */
+
+class PcapHelper
+{
+public:
+  //
+  // These are the data link types that will be written to the pcap file.  We
+  // don't include pcap-bpf.h to avoid an explicit dependency on the real pcap
+  // and we don't make an enumeration of all of the values to make it easy to
+  // pass new values in.
+  //
+  enum {DLT_NULL = 0};
+  enum {DLT_EN10MB = 1};
+  enum {DLT_PPP = 9};
+  enum {DLT_IEEE802_11 = 105};
+  enum {DLT_PRISM_HEADER = 119};
+  enum {DLT_IEEE802_11_RADIO = 127};
+
+  /**
+   * @brief Create a pcap helper.
+   */
+  PcapHelper ();
+
+  /**
+   * @brief Destroy a pcap helper.
+   */
+  ~PcapHelper ();
+
+  /**
+   * @brief Let the pcap helper figure out a reasonable filename to use for the
+   * pcap file.
+   */
+  std::string GetFilename (std::string prefix, Ptr<NetDevice> device, bool useObjectNames = true);
+
+  /**
+   * @brief Create and initialize a pcap file.
+   */
+  Ptr<PcapFileObject> CreateFile (std::string filename, std::string filemode,
+                                  uint32_t dataLinkType,  uint32_t snapLen = 65535, int32_t tzCorrection = 0);
+  /**
+   * @brief Hook a trace source to the default trace sink
+   */
+  template <typename T> void HookDefaultSink (Ptr<T> object, std::string traceName, Ptr<PcapFileObject> file);
+
+private:
+  static void DefaultSink (Ptr<PcapFileObject> file, Ptr<const Packet> p);
+};
+
+template <typename T> void
+PcapHelper::HookDefaultSink (Ptr<T> object, std::string tracename, Ptr<PcapFileObject> file)
+{
+  object->TraceConnectWithoutContext (tracename.c_str (), MakeBoundCallback (&DefaultSink, file));
+}
+
+} // namespace ns3
+
+#endif /* PCAP_HELPER_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/helper/pcap-user-helper.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -0,0 +1,90 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2009 University of Washington
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include "ns3/abort.h"
+#include "ns3/names.h"
+#include "pcap-user-helper.h"
+
+namespace ns3 {
+
+void 
+PcapUserHelper::EnablePcap (std::string prefix, Ptr<NetDevice> nd, bool promiscuous)
+{
+  EnablePcapInternal (prefix, nd, promiscuous);
+}
+
+void 
+PcapUserHelper::EnablePcap (std::string prefix, std::string ndName, bool promiscuous)
+{
+  Ptr<NetDevice> nd = Names::Find<NetDevice> (ndName);
+  EnablePcap (prefix, nd, promiscuous);
+}
+
+void 
+PcapUserHelper::EnablePcap (std::string prefix, NetDeviceContainer d, bool promiscuous)
+{
+  for (NetDeviceContainer::Iterator i = d.Begin (); i != d.End (); ++i)
+    {
+      Ptr<NetDevice> dev = *i;
+      EnablePcap (prefix, dev, promiscuous);
+    }
+}
+
+void
+PcapUserHelper::EnablePcap (std::string prefix, NodeContainer n, bool promiscuous)
+{
+  NetDeviceContainer devs;
+  for (NodeContainer::Iterator i = n.Begin (); i != n.End (); ++i)
+    {
+      Ptr<Node> node = *i;
+      for (uint32_t j = 0; j < node->GetNDevices (); ++j)
+        {
+          devs.Add (node->GetDevice (j));
+        }
+    }
+  EnablePcap (prefix, devs, promiscuous);
+}
+
+void
+PcapUserHelper::EnablePcapAll (std::string prefix, bool promiscuous)
+{
+  EnablePcap (prefix, NodeContainer::GetGlobal (), promiscuous);
+}
+
+void 
+PcapUserHelper::EnablePcap (std::string prefix, uint32_t nodeid, uint32_t deviceid, bool promiscuous)
+{
+  NodeContainer n = NodeContainer::GetGlobal ();
+
+  for (NodeContainer::Iterator i = n.Begin (); i != n.End (); ++i)
+    {
+      Ptr<Node> node = *i;
+      if (node->GetId () != nodeid) 
+        {
+          continue;
+        }
+      
+      NS_ABORT_MSG_IF (deviceid >= node->GetNDevices (), "PcapUserHelper::EnablePcap(): Unknown deviceid = " << deviceid);
+      Ptr<NetDevice> nd = node->GetDevice (deviceid);
+
+      EnablePcap (prefix, nd, promiscuous);
+      return;
+    }
+}
+
+} // namespace ns3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/helper/pcap-user-helper.h	Mon Jan 04 10:35:32 2010 -0800
@@ -0,0 +1,104 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2009 University of Washington
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef PCAP_USER_HELPER_H
+#define PCAP_USER_HELPER_H
+
+#include <string>
+#include "ns3/net-device-container.h"
+#include "ns3/node-container.h"
+
+namespace ns3 {
+
+/**
+ * \brief Base class providing common pcap operations.
+ */
+class PcapUserHelper
+{
+public:
+  /**
+   * @brief Enable pcap output the indicated net device.
+   * @internal
+   *
+   * @param prefix Filename prefix to use for pcap files.
+   * @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) = 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 promiscuous If true capture all possible packets available at the device.
+   */
+  void EnablePcap (std::string prefix, Ptr<NetDevice> nd, bool promiscuous = false);
+
+  /**
+   * @brief Enable pcap output the indicated net device using a device previously
+   * named using the ns-3 object name service.
+   *
+   * @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 promiscuous If true capture all possible packets available at the device.
+   */
+  void EnablePcap (std::string prefix, std::string ndName, bool promiscuous = false);
+
+  /**
+   * @brief Enable pcap output on each device in the container which is of the 
+   * appropriate type.
+   *
+   * @param prefix Filename prefix to use for pcap files.
+   * @param d container of devices of type ns3::CsmaNetDevice
+   * @param promiscuous If true capture all possible packets available at the device.
+   */
+  void EnablePcap (std::string prefix, NetDeviceContainer d, bool promiscuous = false);
+
+  /**
+   * @brief Enable pcap output on each device (which is of the appropriate type)
+   * in the nodes provided in the container.
+   *
+   * \param prefix Filename prefix to use for pcap files.
+   * \param n container of nodes.
+   * \param promiscuous If true capture all possible packets available at the device.
+   */
+  void EnablePcap (std::string prefix, NodeContainer n, bool promiscuous = false);
+
+  /**
+   * @brief Enable pcap output on each device (which is of the appropriate type)
+   * in the set of all nodes created in the simulation.
+   *
+   * @param prefix Filename prefix to use for pcap files.
+   * @param promiscuous If true capture all possible packets available at the device.
+   */
+  void EnablePcapAll (std::string prefix, bool promiscuous = false);
+
+  /**
+   * @brief Enable pcap output on the device specified by a global node-id (of
+   * a previously created node) and associated device-id.
+   *
+   * @param prefix Filename prefix to use for pcap files.
+   * @param promiscuous If true capture all possible packets available at the device.
+   */
+  void EnablePcap (std::string prefix, uint32_t nodeid, uint32_t deviceid, bool promiscuous = false);
+};
+
+} // namespace ns3
+
+#endif // PCAP_USER_HELPER_H
--- a/src/helper/point-to-point-helper.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/src/helper/point-to-point-helper.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -17,7 +17,9 @@
  *
  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
  */
-#include "point-to-point-helper.h"
+
+#include "ns3/abort.h"
+#include "ns3/log.h"
 #include "ns3/simulator.h"
 #include "ns3/point-to-point-net-device.h"
 #include "ns3/point-to-point-channel.h"
@@ -28,9 +30,13 @@
 #include "ns3/pcap-writer.h"
 #include "ns3/ascii-writer.h"
 
+#include "pcap-helper.h"
+#include "point-to-point-helper.h"
+
+NS_LOG_COMPONENT_DEFINE ("PointToPointHelper");
+
 namespace ns3 {
 
-
 PointToPointHelper::PointToPointHelper ()
 {
   m_queueFactory.SetTypeId ("ns3::DropTailQueue");
@@ -65,68 +71,24 @@
 }
 
 void 
-PointToPointHelper::EnablePcap (std::string filename, uint32_t nodeid, uint32_t deviceid)
+PointToPointHelper::EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool promiscuous)
 {
-  std::ostringstream oss;
-  oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid << "/$ns3::PointToPointNetDevice/";
-  Config::MatchContainer matches = Config::LookupMatches (oss.str ());
-  if (matches.GetN () == 0)
+  //
+  // All of the Pcap enable functions vector through here including the ones
+  // that are wandering through all of devices on perhaps all of the nodes in
+  // the system.  We can only deal with devices of type PointToPointNetDevice.
+  //
+  Ptr<PointToPointNetDevice> device = nd->GetObject<PointToPointNetDevice> ();
+  if (device == 0)
     {
+      NS_LOG_INFO ("PointToPointHelper::EnablePcapInternal(): Device " << device << " not of type ns3::PointToPointNetDevice");
       return;
     }
-  oss.str ("");
-  oss << filename << "-" << nodeid << "-" << deviceid << ".pcap";
-  Ptr<PcapWriter> pcap = CreateObject<PcapWriter> ();
-  pcap->Open (oss.str ());
-  pcap->WritePppHeader ();
-  oss.str ("");
-  oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid;
-  oss << "/$ns3::PointToPointNetDevice/PromiscSniffer";
-  Config::ConnectWithoutContext (oss.str (), MakeBoundCallback (&PointToPointHelper::SniffEvent, pcap));
-}
 
-void 
-PointToPointHelper::EnablePcap (std::string filename, Ptr<NetDevice> nd)
-{
-  EnablePcap (filename, nd->GetNode ()->GetId (), nd->GetIfIndex ());
-}
-
-void 
-PointToPointHelper::EnablePcap (std::string filename, std::string ndName)
-{
-  Ptr<NetDevice> nd = Names::Find<NetDevice> (ndName);
-  EnablePcap (filename, nd->GetNode ()->GetId (), nd->GetIfIndex ());
-}
-
-void 
-PointToPointHelper::EnablePcap (std::string filename, NetDeviceContainer d)
-{
-  for (NetDeviceContainer::Iterator i = d.Begin (); i != d.End (); ++i)
-    {
-      Ptr<NetDevice> dev = *i;
-      EnablePcap (filename, dev->GetNode ()->GetId (), dev->GetIfIndex ());
-    }
-}
-
-void
-PointToPointHelper::EnablePcap (std::string filename, NodeContainer n)
-{
-  NetDeviceContainer devs;
-  for (NodeContainer::Iterator i = n.Begin (); i != n.End (); ++i)
-    {
-      Ptr<Node> node = *i;
-      for (uint32_t j = 0; j < node->GetNDevices (); ++j)
-        {
-          devs.Add (node->GetDevice (j));
-        }
-    }
-  EnablePcap (filename, devs);
-}
-
-void
-PointToPointHelper::EnablePcapAll (std::string filename)
-{
-  EnablePcap (filename, NodeContainer::GetGlobal ());
+  PcapHelper pcapHelper;
+  std::string filename = pcapHelper.GetFilename (prefix, device);
+  Ptr<PcapFileObject> file = pcapHelper.CreateFile (filename, "w", PcapHelper::DLT_PPP);
+  pcapHelper.HookDefaultSink<PointToPointNetDevice> (device, "PromiscSniffer", file);
 }
 
 void 
@@ -232,12 +194,6 @@
   return Install (a, b);
 }
 
-void 
-PointToPointHelper::SniffEvent (Ptr<PcapWriter> writer, Ptr<const Packet> packet)
-{
-  writer->WritePacket (packet);
-}
-
 void
 PointToPointHelper::AsciiEnqueueEvent (Ptr<AsciiWriter> writer, std::string path,
                                        Ptr<const Packet> packet)
--- a/src/helper/point-to-point-helper.h	Thu Dec 31 10:20:06 2009 -0800
+++ b/src/helper/point-to-point-helper.h	Mon Jan 04 10:35:32 2010 -0800
@@ -24,6 +24,7 @@
 #include "ns3/net-device-container.h"
 #include "ns3/node-container.h"
 #include "ns3/deprecated.h"
+#include "pcap-user-helper.h"
 #include <string>
 
 namespace ns3 {
@@ -37,7 +38,7 @@
 /**
  * \brief Build a set of PointToPointNetDevice objects
  */
-class PointToPointHelper
+class PointToPointHelper : public PcapUserHelper
 {
 public:
   /**
@@ -95,66 +96,6 @@
   void SetChannelAttribute (std::string name, const AttributeValue &value);
 
   /**
-   * \param filename filename prefix to use for pcap files.
-   * \param nodeid the id of the node to generate pcap output for.
-   * \param deviceid the id of the device to generate pcap output for.
-   *
-   * Generate a pcap file which contains the link-level data observed
-   * by the specified deviceid within the specified nodeid. The pcap
-   * data is stored in the file prefix-nodeid-deviceid.pcap.
-   *
-   * This method should be invoked after the network topology has 
-   * been fully constructed.
-   */
-  static void EnablePcap (std::string filename, uint32_t nodeid, uint32_t deviceid);
-
-  /**
-   * \param filename filename prefix to use for pcap files.
-   * \param nd Net device on which you want to enable tracing.
-   *
-   * Enable pcap output on each input device which is of the
-   * ns3::PointToPointNetDevice type.
-   */
-  static void EnablePcap (std::string filename, Ptr<NetDevice> nd);
-
-  /**
-   * \param filename filename prefix to use for pcap files.
-   * \param ndName Name of net device on which you want to enable tracing.
-   *
-   * Enable pcap output on each input device which is of the
-   * ns3::PointToPointNetDevice type.
-   */
-  static void EnablePcap (std::string filename, std::string ndName);
-
-  /**
-   * \param filename filename prefix to use for pcap files.
-   * \param d container of devices of type ns3::PointToPointNetDevice
-   *
-   * Enable pcap output on each input device which is of the
-   * ns3::PointToPointNetDevice type.
-   */
-  static void EnablePcap (std::string filename, NetDeviceContainer d);
-
-
-  /**
-   * \param filename filename prefix to use for pcap files.
-   * \param n container of nodes.
-   *
-   * Enable pcap output on each device which is of the
-   * ns3::PointToPointNetDevice type and which is located in one of the 
-   * input nodes.
-   */
-  static void EnablePcap (std::string filename, NodeContainer n);
-
-  /**
-   * \param filename filename prefix to use for pcap files.
-   *
-   * Enable pcap output on each device which is of the
-   * ns3::PointToPointNetDevice type
-   */
-  static void EnablePcapAll (std::string filename);
-
-  /**
    * \param os output stream
    * \param nodeid the id of the node to generate ascii output for.
    * \param deviceid the id of the device to generate ascii output for.
@@ -241,8 +182,17 @@
   NetDeviceContainer Install (std::string aNode, std::string bNode);
 
 private:
-  void EnablePcap (Ptr<Node> node, Ptr<NetDevice> device, Ptr<Queue> queue);
-  static void SniffEvent (Ptr<PcapWriter> writer, Ptr<const Packet> packet);
+  /**
+   * \brief Enable pcap output the indicated net device.
+   *
+   * NetDevice-specific implementation mechanism for hooking the trace and
+   * writing to the trace file.
+   *
+   * \param prefix Filename prefix to use for pcap files.
+   * \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 = false);
 
   void EnableAscii (Ptr<Node> node, Ptr<NetDevice> device);
   static void AsciiRxEvent (Ptr<AsciiWriter> writer, std::string path, Ptr<const Packet> packet);
--- a/src/helper/wscript	Thu Dec 31 10:20:06 2009 -0800
+++ b/src/helper/wscript	Mon Jan 04 10:35:32 2010 -0800
@@ -48,6 +48,8 @@
         'point-to-point-star-helper.cc',
         'csma-star-helper.cc',
         'udp-client-server-helper.cc',
+        'pcap-helper.cc',
+        'pcap-user-helper.cc',
         ]
 
     headers = bld.new_task_gen('ns3header')
@@ -99,6 +101,8 @@
         'point-to-point-star-helper.h',
         'csma-star-helper.h',
         'udp-client-server-helper.h',
+        'pcap-helper.h',
+        'pcap-user-helper.h',
         ]
 
     env = bld.env_of_name('default')
--- a/src/helper/yans-wifi-helper.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/src/helper/yans-wifi-helper.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -17,6 +17,8 @@
  *
  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
  */
+#include "pcap-helper.h"
+#include "pcap-user-helper.h"
 #include "yans-wifi-helper.h"
 #include "ns3/error-rate-model.h"
 #include "ns3/propagation-loss-model.h"
@@ -24,29 +26,20 @@
 #include "ns3/yans-wifi-channel.h"
 #include "ns3/yans-wifi-phy.h"
 #include "ns3/wifi-net-device.h"
+#include "ns3/radiotap-header.h"
 #include "ns3/pcap-writer.h"
 #include "ns3/ascii-writer.h"
+#include "ns3/pcap-file-object.h"
 #include "ns3/simulator.h"
 #include "ns3/config.h"
 #include "ns3/names.h"
+#include "ns3/abort.h"
+#include "ns3/log.h"
+
+NS_LOG_COMPONENT_DEFINE ("YansWifiHelper");
 
 namespace ns3 {
 
-static void PcapSniffTxEvent (Ptr<PcapWriter> writer, Ptr<const Packet> packet, uint16_t channelFreqMhz,  uint16_t channelNumber, 
-                              uint32_t rate, bool isShortPreamble)
-{
-  const double unusedValue = 0;
-  writer->WriteWifiMonitorPacket(packet, channelFreqMhz, channelNumber, rate, isShortPreamble, true, unusedValue, unusedValue); 
-}
-
-
-static void PcapSniffRxEvent (Ptr<PcapWriter> writer, Ptr<const Packet> packet, uint16_t channelFreqMhz,  uint16_t channelNumber,
-                              uint32_t rate, bool isShortPreamble, double signalDbm, double noiseDbm)
-{
-  writer->WriteWifiMonitorPacket(packet, channelFreqMhz, channelNumber, rate, isShortPreamble, false, signalDbm, noiseDbm); 
-}
-
-
 static void AsciiPhyTxEvent (Ptr<AsciiWriter> writer, std::string path,
                              Ptr<const Packet> packet,
                              WifiMode mode, WifiPreamble preamble,
@@ -149,8 +142,7 @@
 
 YansWifiPhyHelper::YansWifiPhyHelper ()
   : m_channel (0),
-    m_pcapFormat(PCAP_FORMAT_80211)
-    
+    m_pcapDlt(PcapHelper::DLT_IEEE802_11)
 {
   m_phy.SetTypeId ("ns3::YansWifiPhy");
 }
@@ -215,94 +207,177 @@
   return phy;
 }
 
+static void 
+PcapSniffTxEvent (
+  Ptr<PcapFileObject> file,
+  Ptr<const Packet>   packet,
+  uint16_t            channelFreqMhz,
+  uint16_t            channelNumber,
+  uint32_t            rate,
+  bool                isShortPreamble)
+{
+  uint32_t dlt = file->GetDataLinkType ();
+
+  switch (dlt)
+    {
+    case PcapHelper::DLT_IEEE802_11:
+      file->Write (Simulator::Now (), packet);
+      return;
+    case PcapHelper::DLT_PRISM_HEADER:
+      {
+        NS_FATAL_ERROR ("PcapSniffTxEvent(): DLT_PRISM_HEADER not implemented");
+        return;
+      }
+    case PcapHelper::DLT_IEEE802_11_RADIO:
+      {
+        Ptr<Packet> p = packet->Copy ();
+        RadiotapHeader header;
+        header.SetTsft (Simulator::Now ().GetMicroSeconds ());
+
+        if (isShortPreamble)
+          {
+            header.SetFrameFlags (RadiotapHeader::FRAME_FLAG_SHORT_PREAMBLE);
+          }
+        else
+          {
+            header.SetFrameFlags (RadiotapHeader::FRAME_FLAG_NONE);
+          }
+
+        header.SetRate (rate);
+
+        if (channelFreqMhz < 2500)
+          {
+            header.SetChannelFrequencyAndFlags (channelFreqMhz, 
+              RadiotapHeader::CHANNEL_FLAG_SPECTRUM_2GHZ | RadiotapHeader::CHANNEL_FLAG_CCK);
+          }
+        else
+          {
+            header.SetChannelFrequencyAndFlags (channelFreqMhz, 
+              RadiotapHeader::CHANNEL_FLAG_SPECTRUM_5GHZ | RadiotapHeader::CHANNEL_FLAG_OFDM);
+          }
+
+        p->AddHeader (header);
+        file->Write (Simulator::Now (), p);
+        return;
+      }
+    default:
+      NS_ABORT_MSG ("PcapSniffTxEvent(): Unexpected data link type " << dlt);
+    }
+}
+
+static void 
+PcapSniffRxEvent (
+  Ptr<PcapFileObject> file,
+  Ptr<const Packet> packet,
+  uint16_t channelFreqMhz,
+  uint16_t channelNumber,
+  uint32_t rate,
+  bool isShortPreamble,
+  double signalDbm,
+  double noiseDbm)
+{
+  uint32_t dlt = file->GetDataLinkType ();
+
+  switch (dlt)
+    {
+    case PcapHelper::DLT_IEEE802_11:
+      file->Write (Simulator::Now (), packet);
+      return;
+    case PcapHelper::DLT_PRISM_HEADER:
+      {
+        NS_FATAL_ERROR ("PcapSniffRxEvent(): DLT_PRISM_HEADER not implemented");
+        return;
+      }
+    case PcapHelper::DLT_IEEE802_11_RADIO:
+      {
+        Ptr<Packet> p = packet->Copy ();
+        RadiotapHeader header;
+        header.SetTsft (Simulator::Now ().GetMicroSeconds ());
+
+        if (isShortPreamble)
+          {
+            header.SetFrameFlags (RadiotapHeader::FRAME_FLAG_SHORT_PREAMBLE);
+          }
+        else
+          {
+            header.SetFrameFlags (RadiotapHeader::FRAME_FLAG_NONE);
+          }
+
+        header.SetRate (rate);
+
+        if (channelFreqMhz < 2500)
+          {
+            header.SetChannelFrequencyAndFlags (channelFreqMhz, 
+              RadiotapHeader::CHANNEL_FLAG_SPECTRUM_2GHZ | RadiotapHeader::CHANNEL_FLAG_CCK);
+          }
+        else
+          {
+            header.SetChannelFrequencyAndFlags (channelFreqMhz, 
+              RadiotapHeader::CHANNEL_FLAG_SPECTRUM_5GHZ | RadiotapHeader::CHANNEL_FLAG_OFDM);
+          }
+
+        header.SetAntennaSignalPower (signalDbm);
+        header.SetAntennaNoisePower (noiseDbm);
+
+        p->AddHeader (header);
+        file->Write (Simulator::Now (), p);
+        return;
+      }
+    default:
+      NS_ABORT_MSG ("PcapSniffRxEvent(): Unexpected data link type " << dlt);
+    }
+}
 
 void 
 YansWifiPhyHelper::SetPcapFormat (enum PcapFormat format)
 {
-  m_pcapFormat = format;
-}
-
-
-void 
-YansWifiPhyHelper::EnablePcap (std::string filename, uint32_t nodeid, uint32_t deviceid)
-{
-  std::ostringstream oss;
-  oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid << "/$ns3::WifiNetDevice/Phy/";
-  Config::MatchContainer matches = Config::LookupMatches (oss.str ());
-  if (matches.GetN () == 0)
+  switch (format)
     {
+    case PCAP_FORMAT_80211:
+      m_pcapDlt = PcapHelper::DLT_IEEE802_11;
       return;
-    }
-  oss.str ("");
-  oss << filename << "-" << nodeid << "-" << deviceid << ".pcap";
-  Ptr<PcapWriter> pcap = CreateObject<PcapWriter> ();
-  pcap->Open (oss.str ());
-
-  switch (m_pcapFormat) {
-  case PCAP_FORMAT_80211:
-    pcap->WriteWifiHeader ();  
-    break;
-  case PCAP_FORMAT_80211_RADIOTAP:
-    pcap->WriteWifiRadiotapHeader ();  
-    break;
-  case PCAP_FORMAT_80211_PRISM:
-    pcap->WriteWifiPrismHeader ();  
-    break;
-  }
-  
-  oss.str ("");
-  oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid;
-  oss << "/$ns3::WifiNetDevice/Phy/PromiscSnifferTx";
-  Config::ConnectWithoutContext (oss.str (), MakeBoundCallback (&PcapSniffTxEvent, pcap));
-
-  oss.str ("");
-  oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid;
-  oss << "/$ns3::WifiNetDevice/Phy/PromiscSnifferRx";
-  Config::ConnectWithoutContext (oss.str (), MakeBoundCallback (&PcapSniffRxEvent, pcap));  
-}
-
-void 
-YansWifiPhyHelper::EnablePcap (std::string filename, NetDeviceContainer d)
-{
-  for (NetDeviceContainer::Iterator i = d.Begin (); i != d.End (); ++i)
-    {
-      Ptr<NetDevice> dev = *i;
-      EnablePcap (filename, dev->GetNode ()->GetId (), dev->GetIfIndex ());
+    case PCAP_FORMAT_80211_PRISM:
+      m_pcapDlt = PcapHelper::DLT_PRISM_HEADER;
+      return;
+    case PCAP_FORMAT_80211_RADIOTAP:
+      m_pcapDlt = PcapHelper::DLT_IEEE802_11_RADIO;
+      return;
+    default:
+      NS_ABORT_MSG ("YansWifiPhyHelper::SetPcapFormat(): Unexpected format");
     }
 }
 
 void 
-YansWifiPhyHelper::EnablePcap (std::string filename, Ptr<NetDevice> nd)
+YansWifiPhyHelper::SetPcapDataLinkType (uint32_t dlt)
 {
-  EnablePcap (filename, nd->GetNode ()->GetId (), nd->GetIfIndex ());
+  m_pcapDlt = dlt;
 }
 
 void 
-YansWifiPhyHelper::EnablePcap (std::string filename, std::string ndName)
+YansWifiPhyHelper::EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool promiscuous)
 {
-  Ptr<NetDevice> nd = Names::Find<NetDevice> (ndName);
-  EnablePcap (filename, nd->GetNode ()->GetId (), nd->GetIfIndex ());
-}
-
-void
-YansWifiPhyHelper::EnablePcap (std::string filename, NodeContainer n)
-{
-  NetDeviceContainer devs;
-  for (NodeContainer::Iterator i = n.Begin (); i != n.End (); ++i)
+  //
+  // All of the Pcap enable functions vector through here including the ones
+  // that are wandering through all of devices on perhaps all of the nodes in
+  // the system.  We can only deal with devices of type WifiNetDevice.
+  //
+  Ptr<WifiNetDevice> device = nd->GetObject<WifiNetDevice> ();
+  if (device == 0)
     {
-      Ptr<Node> node = *i;
-      for (uint32_t j = 0; j < node->GetNDevices (); ++j)
-        {
-          devs.Add (node->GetDevice (j));
-        }
+      NS_LOG_INFO ("YansWifiHelper::EnablePcapInternal(): Device " << &device << " not of type ns3::WifiNetDevice");
+      return;
     }
-  EnablePcap (filename, devs);
-}
+
+  Ptr<WifiPhy> phy = device->GetPhy ();
+  NS_ABORT_MSG_IF (phy == 0, "YansWifiPhyHelper::EnablePcapInternal(): Phy layer in WifiNetDevice must be set");
 
-void
-YansWifiPhyHelper::EnablePcapAll (std::string filename)
-{
-  EnablePcap (filename, NodeContainer::GetGlobal ());
+  PcapHelper pcapHelper;
+  std::string filename = pcapHelper.GetFilename (prefix, device);
+
+  Ptr<PcapFileObject> file = pcapHelper.CreateFile (filename, "w", m_pcapDlt);
+
+  phy->TraceConnectWithoutContext ("PromiscSnifferTx", MakeBoundCallback (&PcapSniffTxEvent, file));
+  phy->TraceConnectWithoutContext ("PromiscSnifferRx", MakeBoundCallback (&PcapSniffRxEvent, file));
 }
 
 void 
--- a/src/helper/yans-wifi-helper.h	Thu Dec 31 10:20:06 2009 -0800
+++ b/src/helper/yans-wifi-helper.h	Mon Jan 04 10:35:32 2010 -0800
@@ -21,7 +21,9 @@
 #define YANS_WIFI_HELPER_H
 
 #include "wifi-helper.h"
+#include "pcap-user-helper.h"
 #include "ns3/yans-wifi-channel.h"
+#include "ns3/deprecated.h"
 
 namespace ns3 {
 
@@ -133,7 +135,7 @@
  * The Pcap and ascii traces generated by the EnableAscii and EnablePcap methods defined
  * in this class correspond to PHY-level traces. 
  */
-class YansWifiPhyHelper : public WifiPhyHelper
+  class YansWifiPhyHelper : public WifiPhyHelper, public PcapUserHelper
 {
 public:
   /**
@@ -219,69 +221,24 @@
    * 
    * @param format the PcapFormat to be used
    */
-  void SetPcapFormat (enum PcapFormat format);
+  void SetPcapFormat (enum PcapFormat format) NS_DEPRECATED; 
 
-  /**
-   * \param filename filename prefix to use for pcap files.
-   * \param nodeid the id of the node to generate pcap output for.
-   * \param deviceid the id of the device to generate pcap output for.
-   *
-   * Generate a pcap file which contains the link-level data observed
-   * by the specified deviceid within the specified nodeid. The pcap
-   * data is stored in the file prefix-nodeid-deviceid.pcap. By
-   * default, no PHY layer information is provided. An optional header
-   * with PHY layer information, such as the radiotap or the prism
-   * header, can be used by invoking SetPcapFormat().
-   *
-   * This method should be invoked after the network topology has 
-   * been fully constructed.
-   */
-  void EnablePcap (std::string filename, uint32_t nodeid, uint32_t deviceid);
-
-  /**
-   * \param filename filename prefix to use for pcap files.
-   * \param nd Net device on which you want to enable tracing.
-   *
-   * Enable pcap output on each input device which is of the
-   * ns3::WifiNetDevice type.
-   */
-   void EnablePcap (std::string filename, Ptr<NetDevice> nd);
-
-  /**
-   * \param filename filename prefix to use for pcap files.
-   * \param ndName Name of net device on which you want to enable tracing.
+  /** 
+   * Set the data link type of PCAP traces to be used. This function has to be
+   * called before EnablePcap(), so that the header of the pcap file can be 
+   * written correctly.
    *
-   * Enable pcap output on each input device which is of the
-   * ns3::WifiNetDevice type.
-   */
-   void EnablePcap (std::string filename, std::string ndName);
-
-  /**
-   * \param filename filename prefix to use for pcap files.
-   * \param d container of devices of type ns3::WifiNetDevice
+   * In madwifi, this corresponds to setting /proc/sys/net/ath0/dev_type to a 
+   * particular value, however we use the pcap DLT instead of the dev_type to
+   * avoid introducing another unnecessary definition. See
    *
-   * Enable pcap output on each input device which is of the
-   * ns3::WifiNetDevice type.
+   *   http://madwifi-project.org/wiki/UserDocs/MonitorModeInterface 
+   * 
+   * for more information.
+   * 
+   * @param dlt The data link type of the pcap file (and packets) to be used
    */
-   void EnablePcap (std::string filename, NetDeviceContainer d);
-
-  /**
-   * \param filename filename prefix to use for pcap files.
-   * \param n container of nodes.
-   *
-   * Enable pcap output on each device which is of the
-   * ns3::WifiNetDevice type and which is located in one of the 
-   * input nodes.
-   */
-   void EnablePcap (std::string filename, NodeContainer n);
-
-  /**
-   * \param filename filename prefix to use for pcap files.
-   *
-   * Enable pcap output on each device which is of the
-   * ns3::WifiNetDevice type
-   */
-   void EnablePcapAll (std::string filename);
+  void SetPcapDataLinkType (uint32_t dlt); 
 
   /**
    * \param os output stream
@@ -335,10 +292,22 @@
    */
   virtual Ptr<WifiPhy> Create (Ptr<Node> node, Ptr<WifiNetDevice> device) const;
 
+  /**
+   * @brief Enable pcap output the indicated net device.
+   *
+   * NetDevice-specific implementation mechanism for hooking the trace and
+   * writing to the trace file.
+   *
+   * @param prefix Filename prefix to use for pcap files.
+   * @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);
+
   ObjectFactory m_phy;
   ObjectFactory m_errorRateModel;
   Ptr<YansWifiChannel> m_channel;
-  enum PcapFormat m_pcapFormat;
+  uint32_t m_pcapDlt;
 };
 
 } // namespace ns3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/node/radiotap-header.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -0,0 +1,404 @@
+/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2009 CTTC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as 
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Include., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Nicola Baldo <nbaldo@cttc.es>
+ */
+
+#include <iomanip>
+#include <math.h>
+#include "ns3/log.h"
+#include "radiotap-header.h"
+
+NS_LOG_COMPONENT_DEFINE ("RadiotapHeader");  
+
+namespace ns3 {
+ 
+RadiotapHeader::RadiotapHeader()
+  : m_length(8),
+    m_present(0),
+    m_tsft(0),
+    m_flags(FRAME_FLAG_NONE),
+    m_rate(0),
+    m_channelFreq(0),
+    m_channelFlags(CHANNEL_FLAG_NONE),
+    m_antennaSignal(0),
+    m_antennaNoise(0)
+{       
+  NS_LOG_FUNCTION (this);
+}
+ 
+TypeId RadiotapHeader::GetTypeId (void)
+{
+  static TypeId tid = TypeId ("RadiotapHeader")
+    .SetParent<Header> ()
+    .AddConstructor<RadiotapHeader> ()
+    ;
+  return tid;
+}
+
+TypeId 
+RadiotapHeader::GetInstanceTypeId (void) const
+{
+  NS_LOG_FUNCTION (this);
+  return GetTypeId ();
+}
+
+uint32_t  
+RadiotapHeader::GetSerializedSize (void) const
+{
+  NS_LOG_FUNCTION (this);
+  return m_length;
+}
+
+void  
+RadiotapHeader::Serialize (Buffer::Iterator start) const
+{
+  NS_LOG_FUNCTION (this);
+
+  start.WriteU8 (0); // major version of radiotap header
+  start.WriteU8 (0); // pad field
+  start.WriteU16 (m_length); // entire length of radiotap data + header
+  start.WriteU32 (m_present); // bits describing which fields follow header
+  
+  //
+  // Time Synchronization Function Timer (when the first bit of the MPDU 
+  // arrived at the MAC)
+  //
+  if (m_present & RADIOTAP_TSFT) // bit 0
+    {
+      start.WriteU64 (m_tsft);
+    }
+
+  //
+  // Properties of transmitted and received frames.
+  //
+  if (m_present & RADIOTAP_FLAGS) // bit 1
+    {
+      start.WriteU8 (m_flags);
+    }
+
+  //
+  // TX/RX data rate in units of 500 kbps
+  //
+  if (m_present & RADIOTAP_RATE) // bit 2
+    {
+      start.WriteU8 (m_rate);
+    }
+
+  //
+  // Tx/Rx frequency in MHz, followed by flags.
+  //
+  if (m_present & RADIOTAP_CHANNEL) // bit 3
+    {
+      start.WriteU16 (m_channelFreq);
+      start.WriteU16 (m_channelFlags);
+    }
+
+  //
+  // RF signal power at the antenna, decibel difference from an arbitrary, fixed
+  // reference.
+  //
+  if (m_present & RADIOTAP_DBM_ANTSIGNAL) // bit 5
+    {
+      start.WriteU8 (m_antennaSignal);
+    }
+
+  //
+  // RF noise power at the antenna, decibel difference from an arbitrary, fixed 
+  // reference.
+  //
+  if (m_present & RADIOTAP_DBM_ANTNOISE) // bit 6
+    {
+      start.WriteU8 (m_antennaNoise);
+    }
+}
+
+uint32_t  
+RadiotapHeader::Deserialize (Buffer::Iterator start)
+{
+  NS_LOG_FUNCTION (this);
+    
+  uint8_t tmp = start.ReadU8 (); // major version of radiotap header
+  NS_ASSERT_MSG (tmp == 0x00, "RadiotapHeader::Deserialize(): Unexpected major version");
+  start.ReadU8 (); // pad field
+  
+  m_length = start.ReadU16 (); // entire length of radiotap data + header
+  m_present = start.ReadU32 (); // bits describing which fields follow header
+  
+  uint32_t bytesRead = 8;
+  
+  //
+  // Time Synchronization Function Timer (when the first bit of the MPDU arrived at the MAC)
+  //
+  if (m_present & RADIOTAP_TSFT) // bit 0
+    {
+      m_tsft = start.ReadU64();
+      bytesRead += 8;
+    }
+
+  //
+  // Properties of transmitted and received frames.
+  //
+  if (m_present & RADIOTAP_FLAGS) // bit 1
+    {
+      m_flags = start.ReadU8();
+      ++bytesRead;
+    }
+
+  //
+  // TX/RX data rate in units of 500 kbps
+  //
+  if (m_present & RADIOTAP_RATE) // bit 2
+    {
+      m_rate = start.ReadU8();
+      ++bytesRead;
+    }
+
+  //
+  // Tx/Rx frequency in MHz, followed by flags.
+  //
+  if (m_present & RADIOTAP_CHANNEL) // bit 3
+    {
+      m_channelFreq = start.ReadU16();
+      m_channelFlags = start.ReadU16();
+      bytesRead += 4;
+    }
+
+  //
+  // The hop set and pattern for frequency-hopping radios.  We don't need it but
+  // still need to account for it.
+  //
+  if (m_present & RADIOTAP_FHSS) // bit 4
+    {
+      start.ReadU8(); 
+      ++bytesRead;
+    }
+
+  //
+  // RF signal power at the antenna, decibel difference from an arbitrary, fixed
+  // reference.
+  //
+  if (m_present & RADIOTAP_DBM_ANTSIGNAL) // bit 5
+    {
+      m_antennaSignal = start.ReadU8();
+      ++bytesRead;
+    }
+
+  //
+  // RF noise power at the antenna, decibel difference from an arbitrary, fixed 
+  // reference.
+  //
+  if (m_present & RADIOTAP_DBM_ANTNOISE) // bit 6
+    {
+      m_antennaNoise = start.ReadU8();
+      ++bytesRead;
+    }
+  
+  NS_ASSERT_MSG(m_length == bytesRead, "RadiotapHeader::Deserialize(): expected and actual lengths inconsistent");
+  return bytesRead;
+}
+
+void  
+RadiotapHeader::Print (std::ostream &os) const
+{
+  NS_LOG_FUNCTION (this);
+  os << " tsft=" << m_tsft
+     << " flags=" << std::hex << m_flags << std::dec
+     << " rate=" << (uint16_t) m_rate
+     << " freq=" << m_channelFreq
+     << " chflags=" << std::hex << (uint32_t)m_channelFlags << std::dec
+     << " signal=" << (int16_t) m_antennaSignal
+     << " noise=" << (int16_t) m_antennaNoise;
+}
+
+void  
+RadiotapHeader::SetTsft (uint64_t value)
+{
+  NS_LOG_FUNCTION (this << value);
+  m_tsft = value;
+
+  if (!(m_present & RADIOTAP_TSFT))
+    {
+      m_present |= RADIOTAP_TSFT;
+      m_length += 8;
+    }
+
+  NS_LOG_LOGIC (this << " m_length=" << m_length << " m_present=0x" << std::hex << m_present << std::dec);
+}
+
+uint64_t  
+RadiotapHeader::GetTsft () const
+{
+  NS_LOG_FUNCTION (this);
+  return m_tsft;
+}
+
+void 
+RadiotapHeader::SetFrameFlags (uint8_t flags)
+{
+  NS_LOG_FUNCTION (this << flags);
+  m_flags = flags;
+
+  if (!(m_present & RADIOTAP_FLAGS))
+    {
+      m_present |= RADIOTAP_FLAGS;
+      m_length += 1;
+    }
+
+  NS_LOG_LOGIC (this << " m_length=" << m_length << " m_present=0x" << std::hex << m_present << std::dec);
+}
+
+uint8_t
+RadiotapHeader::GetFrameFlags (void) const
+{
+  NS_LOG_FUNCTION (this);
+  return m_flags;
+}
+
+void 
+RadiotapHeader::SetRate (uint8_t rate)
+{
+  NS_LOG_FUNCTION (this << rate);
+  m_rate = rate;
+
+  if (!(m_present & RADIOTAP_RATE))
+    {
+      m_present |= RADIOTAP_RATE;
+      m_length += 1;
+    }
+
+  NS_LOG_LOGIC (this << " m_length=" << m_length << " m_present=0x" << std::hex << m_present << std::dec);
+}
+
+uint8_t
+RadiotapHeader::GetRate (void) const
+{
+  NS_LOG_FUNCTION (this);
+  return m_rate;
+}
+
+void 
+RadiotapHeader::SetChannelFrequencyAndFlags (uint16_t frequency, uint16_t flags)
+{
+  NS_LOG_FUNCTION (this << frequency << flags);
+  m_channelFreq = frequency;
+  m_channelFlags = flags;
+
+  if (!(m_present & RADIOTAP_CHANNEL))
+    {
+      m_present |= RADIOTAP_CHANNEL;
+      m_length += 4;
+    }
+
+  NS_LOG_LOGIC (this << " m_length=" << m_length << " m_present=0x" << std::hex << m_present << std::dec);
+}
+
+uint16_t 
+RadiotapHeader::GetChannelFrequency (void) const
+{
+  NS_LOG_FUNCTION (this);
+  return m_channelFreq;
+}
+
+uint16_t 
+RadiotapHeader::GetChannelFlags (void) const
+{
+  NS_LOG_FUNCTION (this);
+  return m_channelFlags;
+}
+
+void 
+RadiotapHeader::SetAntennaSignalPower (int8_t signal)
+{
+  NS_LOG_FUNCTION (this << signal);
+  m_antennaSignal = signal;
+
+  if (!(m_present & RADIOTAP_DBM_ANTSIGNAL))
+    {
+      m_present |= RADIOTAP_DBM_ANTSIGNAL;
+      m_length += 1;
+    }
+
+  NS_LOG_LOGIC (this << " m_length=" << m_length << " m_present=0x" << std::hex << m_present << std::dec);
+}
+
+void 
+RadiotapHeader::SetAntennaSignalPower (double signal)
+{
+  NS_LOG_FUNCTION (this << signal);
+
+  if (signal < -128)
+    {
+      return SetAntennaSignalPower (static_cast<int8_t> (-128));
+    }
+
+  if (signal > 127)
+    {
+      return SetAntennaSignalPower (static_cast<int8_t> (127));
+    }
+  
+  SetAntennaSignalPower (static_cast<int8_t> (floor(signal + 0.5)));
+}
+
+uint8_t 
+RadiotapHeader::GetAntennaSignalPower (void) const
+{
+  NS_LOG_FUNCTION (this);
+  return m_antennaSignal;
+}
+
+void 
+RadiotapHeader::SetAntennaNoisePower (int8_t noise)
+{
+  NS_LOG_FUNCTION (this << noise);
+  m_antennaNoise = noise;
+
+  if (!(m_present & RADIOTAP_DBM_ANTNOISE))
+    {
+      m_present |= RADIOTAP_DBM_ANTNOISE;
+      m_length += 1;
+    }
+
+  NS_LOG_LOGIC (this << " m_length=" << m_length << " m_present=0x" << std::hex << m_present << std::dec);
+}
+
+void 
+RadiotapHeader::SetAntennaNoisePower (double noise)
+{
+  NS_LOG_FUNCTION (this << noise);
+
+  if (noise < -128)
+    {
+      return SetAntennaNoisePower (static_cast<int8_t> (-128));
+    }
+
+  if (noise > 127)
+    {
+      return SetAntennaNoisePower (static_cast<int8_t> (127));
+    }
+  
+  SetAntennaNoisePower (static_cast<int8_t> (floor(noise + 0.5)));
+}
+
+uint8_t 
+RadiotapHeader::GetAntennaNoisePower (void) const
+{
+  NS_LOG_FUNCTION (this);
+  return m_antennaNoise;
+}
+
+} // namespace ns3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/node/radiotap-header.h	Mon Jan 04 10:35:32 2010 -0800
@@ -0,0 +1,273 @@
+/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2009 CTTC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as 
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Include., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Nicola Baldo <nbaldo@cttc.es>
+ */
+
+#ifndef RADIOTAP_HEADER_H
+#define RADIOTAP_HEADER_H
+
+
+#include <ns3/header.h> 
+
+namespace ns3 {
+    
+/**
+ * @brief Radiotap header implementation
+ *
+ * Radiotap is a de facto standard for 802.11 frame injection and reception. 
+ * The radiotap header format is a mechanism to supply additional information 
+ * about frames, from the driver to userspace applications such as libpcap, and 
+ * from a userspace application to the driver for transmission. 
+ *
+ * @warning the radiotap header specification says that the fields included in
+ * the header should be aligned to their natural ize (e.g., 16-bit fields 
+ * aligned to 16-bit boundaries, 32-bit fields aligned to 32-bit boundaries, 
+ * and so on.  This implementation does not enforce this.  However, the radiotap
+ * specification enforces an order in which fields have to appear (if they 
+ * appear), and this ordering is such that, provided you don't leave gaps, all
+ * fields will end up aligned without the need of inserting padding space.  By 
+ * the term "gap" I mean not using a field which would appear between two used 
+ * fields.  Moral: don't leave gaps, or if you do be careful about how you
+ * do it.  
+ */
+class RadiotapHeader : public Header
+{
+public:
+  RadiotapHeader();
+  static TypeId GetTypeId (void);
+  virtual TypeId GetInstanceTypeId (void) const;
+
+  /**
+   * This method is used by Packet::AddHeader to store the header into the byte
+   * buffer of a packet.  This method returns the number of bytes which are 
+   * needed to store the header data during a Serialize.
+   *
+   * @returns The expected size of the header.
+   */
+  virtual uint32_t GetSerializedSize (void) const;
+
+  /**
+   * This method is used by Packet::AddHeader to store the header into the byte
+   * buffer of a packet.  The data written is expected to match bit-for-bit the 
+   * representation of this header in a real network.
+   *
+   * @param start An iterator which points to where the header should
+   *              be written.
+   */
+  virtual void Serialize (Buffer::Iterator start) const;
+
+  /**
+   * This method is used by Packet::RemoveHeader to re-create a header from the 
+   * byte buffer of a packet.  The data read is expected to match bit-for-bit 
+   * the representation of this header in real networks.
+   *
+   * @param start An iterator which points to where the header should
+   *              written.
+   * @returns The number of bytes read.
+   */
+  virtual uint32_t Deserialize (Buffer::Iterator start);
+
+  /**
+   * This method is used by Packet::Print to print the content of the header as 
+   * ascii data to a C++ output stream.  Although the header is free to format 
+   * its output as it wishes, it is recommended to follow a few rules to integrate
+   * with the packet pretty printer: start with flags, small field 
+   * values located between a pair of parens. Values should be separated 
+   * by whitespace. Follow the parens with the important fields, 
+   * separated by whitespace.
+   *
+   * eg: (field1 val1 field2 val2 field3 val3) field4 val4 field5 val5
+   *
+   * @param os The output stream
+   */
+  virtual void Print (std::ostream &os) const;
+    
+  /**
+   * @brief Set the Time Synchronization Function Timer (TSFT) value.  Valid for
+   * received frames only. 
+   *
+   * @param tsft Value in microseconds of the MAC's 64-bit 802.11 Time 
+   *             Synchronization Function timer when the first bit of the MPDU
+   *             arrived at the MAC.
+   */
+  void SetTsft (uint64_t tsft);
+
+  /**
+   * @brief Get the Time Synchronization Function Timer (TSFT) value.  Valid for
+   * received frames only. 
+   *
+   * @returns The value in microseconds of the MAC's 64-bit 802.11 Time 
+   *          Synchronization Function timer when the first bit of the MPDU
+   *          arrived at the MAC.
+   */
+  uint64_t GetTsft (void) const;
+
+  enum {FRAME_FLAG_NONE           = 0x00}; /**< No flags set */
+  enum {FRAME_FLAG_CFP            = 0x01}; /**< Frame sent/received during CFP */
+  enum {FRAME_FLAG_SHORT_PREAMBLE = 0x02}; /**< Frame sent/received with short preamble */
+  enum {FRAME_FLAG_WEP            = 0x04}; /**< Frame sent/received with WEP encryption */
+  enum {FRAME_FLAG_FRAGMENTED     = 0x08}; /**< Frame sent/received with fragmentation */
+  enum {FRAME_FLAG_FCS_INCLUDED   = 0x10}; /**< Frame includes FCS */
+  enum {FRAME_FLAG_DATA_PADDING   = 0x20}; /**< Frame has padding between 802.11 header and payload (to 32-bit boundary) */
+  enum {FRAME_FLAG_BAD_FCS        = 0x40}; /**< Frame failed FCS check */
+  enum {FRAME_FLAG_SHORT_GUARD    = 0x80};  /**< Frame used short guard interval (HT) */
+
+  /**
+   * @brief Set the frame flags of the transmitted or received frame.
+   * @param flags flags to set.
+   */
+  void SetFrameFlags (uint8_t flags);
+
+  /**
+   * @brief Get the frame flags of the transmitted or received frame.
+   * @returns The frame flags.
+   * @see FrameFlags.
+   */
+  uint8_t GetFrameFlags (void) const;
+
+  /**
+   * @brief Set the transmit/receive channel frequency in units of megahertz
+   * @param rate the transmit/receive channel frequency in units of megahertz.
+   */
+  void SetRate (uint8_t rate);
+
+  /**
+   * @brief Get the transmit/receive channel frequency in units of megahertz.
+   * @returns The transmit/receive channel frequency in units of megahertz.
+   */
+  uint8_t GetRate (void) const;
+
+  enum {CHANNEL_FLAG_NONE          = 0x0000}; /**< No flags set */
+  enum {CHANNEL_FLAG_TURBO         = 0x0010}; /**< Turbo Channel */
+  enum {CHANNEL_FLAG_CCK           = 0x0020}; /**< CCK channel */
+  enum {CHANNEL_FLAG_OFDM          = 0x0040}; /**< OFDM channel */
+  enum {CHANNEL_FLAG_SPECTRUM_2GHZ = 0x0080}; /**< 2 GHz spectrum channel */
+  enum {CHANNEL_FLAG_SPECTRUM_5GHZ = 0x0100}; /**< 5 GHz spectrum channel */
+  enum {CHANNEL_FLAG_PASSIVE       = 0x0200}; /**< Only passive scan allowed */
+  enum {CHANNEL_FLAG_DYNAMIC       = 0x0400}; /**< Dynamic CCK-OFDM channel */
+  enum {CHANNEL_FLAG_GFSK          = 0x0800};  /**< GFSK channel (FHSS PHY) */
+
+  /**
+   * @brief Set the transmit/receive channel frequency and flags
+   * @param frequency The transmit/receive data rate in units of 500 kbps.
+   * @param flags The flags to set.
+   * @see ChannelFlags
+   */
+  void SetChannelFrequencyAndFlags (uint16_t frequency, uint16_t flags);
+
+  /**
+   * @brief Get the transmit/receive data rate in units of 500 kbps.
+   * @returns The transmit/receive data rate in units of 500 kbps.
+   */
+  uint16_t GetChannelFrequency (void) const;
+    
+  /**
+   * @brief Get the channel flags of the transmitted or received frame.
+   * @returns The frame flags.
+   * @see ChannelFlags.
+   */
+  uint16_t GetChannelFlags (void) const;
+
+  /**
+   * @brief Set the RF signal power at the antenna as a decibel difference
+   * from an arbitrary, fixed reference. 
+   *
+   * @param signal The RF signal power at the antenna as a decibel difference
+   *               from an arbitrary, fixed reference. 
+   */
+  void SetAntennaSignalPower (int8_t signal);
+
+  /**
+   * @brief Set the RF signal power at the antenna as a decibel difference
+   * from an arbitrary, fixed reference. 
+   *
+   * @param signal The RF signal power at the antenna as a decibel difference
+   *               from an arbitrary, fixed reference;
+   */
+  void SetAntennaSignalPower (double signal);
+
+  /**
+   * @brief Get the RF signal power at the antenna as a decibel difference
+   * from an arbitrary, fixed reference. 
+   *
+   * @returns The RF signal power at the antenna as a decibel difference
+   *          from an arbitrary, fixed reference. 
+   */
+  uint8_t GetAntennaSignalPower (void) const;
+
+  /**
+   * @brief Set the RF noise power at the antenna as a decibel difference
+   * from an arbitrary, fixed reference. 
+   *
+   * @param noise The RF noise power at the antenna as a decibel difference
+   *              from an arbitrary, fixed reference. 
+   */
+  void SetAntennaNoisePower (int8_t noise);
+
+  /**
+   * @brief Set the RF noise power at the antenna as a decibel difference
+   * from an arbitrary, fixed reference. 
+   *
+   * @param noise The RF noise power at the antenna as a decibel difference
+   *              from an arbitrary, fixed reference. 
+   */
+  void SetAntennaNoisePower (double noise);
+
+  /**
+   * @brief Get the RF noise power at the antenna as a decibel difference
+   * from an arbitrary, fixed reference. 
+   *
+   * @returns The RF noise power at the antenna as a decibel difference
+   *          from an arbitrary, fixed reference. 
+   */
+  uint8_t GetAntennaNoisePower (void) const;
+
+private:
+  enum {RADIOTAP_TSFT              = 0x00000001};
+  enum {RADIOTAP_FLAGS             = 0x00000002};
+  enum {RADIOTAP_RATE              = 0x00000004};
+  enum {RADIOTAP_CHANNEL           = 0x00000008};
+  enum {RADIOTAP_FHSS              = 0x00000010};
+  enum {RADIOTAP_DBM_ANTSIGNAL     = 0x00000020};
+  enum {RADIOTAP_DBM_ANTNOISE      = 0x00000040};
+  enum {RADIOTAP_LOCK_QUALITY      = 0x00000080};
+  enum {RADIOTAP_TX_ATTENUATION    = 0x00000100};
+  enum {RADIOTAP_DB_TX_ATTENUATION = 0x00000200};
+  enum {RADIOTAP_DBM_TX_POWER      = 0x00000200};
+  enum {RADIOTAP_ANTENNA           = 0x00000400};
+  enum {RADIOTAP_DB_ANTSIGNAL      = 0x00000800};
+  enum {RADIOTAP_DB_ANTNOISE       = 0x00001000};
+  enum {RADIOTAP_EXT               = 0x10000000};
+ 
+    void CheckAddChannelField();
+    
+    uint16_t m_length;
+    uint32_t m_present;
+    
+    uint64_t m_tsft;
+    uint8_t m_flags;
+    uint8_t m_rate;
+    uint16_t m_channelFreq;
+    uint16_t m_channelFlags;
+    int8_t m_antennaSignal;
+    int8_t m_antennaNoise;
+};
+
+} // namespace ns3
+
+#endif /*  RADIOTAP_HEADER_H */
--- a/src/node/wscript	Thu Dec 31 10:20:06 2009 -0800
+++ b/src/node/wscript	Mon Jan 04 10:35:32 2010 -0800
@@ -48,6 +48,7 @@
         'ipv6-routing-protocol.cc',
         'packetbb.cc',
         'packetbb-test-suite.cc',
+        'radiotap-header.cc',
         ]
 
     headers = bld.new_task_gen('ns3header')
@@ -96,4 +97,5 @@
         'ipv6-raw-socket-factory.h',
         'ipv6-routing-protocol.h',
         'packetbb.h',
+        'radiotap-header.h',
         ]
--- a/src/test/ns3tcp/ns3tcp-cwnd-test-suite.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/src/test/ns3tcp/ns3tcp-cwnd-test-suite.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -323,7 +323,7 @@
 
   if (m_writeResults)
     {
-      PointToPointHelper::EnablePcapAll ("tcp-cwnd");
+      pointToPoint.EnablePcapAll ("tcp-cwnd");
     }
 
   Simulator::Stop (Seconds(2));
@@ -490,7 +490,8 @@
   if (m_writeResults)
     {
       // Write a pcap for tcp cwnd testcase with out-of-order delivery
-      PointToPointHelper::EnablePcapAll ("tcp-cwnd-ood");
+      PointToPointHelper pointToPoint;
+      pointToPoint.EnablePcapAll ("tcp-cwnd-ood");
     }
 
   // Finally, set up the simulator to run.
--- a/src/test/ns3tcp/ns3tcp-interop-test-suite.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/src/test/ns3tcp/ns3tcp-interop-test-suite.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -282,7 +282,7 @@
 
   if (m_writeVectors)
     {
-      PointToPointHelper::EnablePcapAll ("tcp-interop");
+      pointToPoint.EnablePcapAll ("tcp-interop");
     }
 
   Simulator::Stop (Seconds(20));
--- a/src/test/ns3wifi/wifi-interference-test-suite.cc	Thu Dec 31 10:20:06 2009 -0800
+++ b/src/test/ns3wifi/wifi-interference-test-suite.cc	Mon Jan 04 10:35:32 2010 -0800
@@ -148,8 +148,9 @@
   wifiPhy.Set ("RxGain", DoubleValue (0) ); 
   wifiPhy.Set ("CcaMode1Threshold", DoubleValue (0.0) );
   
-  // ns-3 support RadioTap and Prism tracing extensions for 802.11b
-  wifiPhy.SetPcapFormat (YansWifiPhyHelper::PCAP_FORMAT_80211_RADIOTAP); 
+  // ns-3 supports RadioTap and Prism tracing extensions for 802.11b
+  const uint32_t DLT_IEEE802_11_RADIO = 127;
+  wifiPhy.SetPcapDataLinkType (DLT_IEEE802_11_RADIO); 
   
   YansWifiChannelHelper wifiChannel ;
   wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel");