--- a/bindings/python/ns3_module_bridge.py Wed Nov 05 14:33:20 2008 -0800
+++ b/bindings/python/ns3_module_bridge.py Wed Nov 05 14:49:21 2008 -0800
@@ -158,14 +158,9 @@
'bool',
[],
is_const=True, is_virtual=True)
- ## bridge-net-device.h: ns3::Address ns3::BridgeNetDevice::GetMulticast() const [member function]
+ ## bridge-net-device.h: ns3::Address ns3::BridgeNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function]
cls.add_method('GetMulticast',
'ns3::Address',
- [],
- is_const=True, is_virtual=True)
- ## bridge-net-device.h: ns3::Address ns3::BridgeNetDevice::MakeMulticastAddress(ns3::Ipv4Address multicastGroup) const [member function]
- cls.add_method('MakeMulticastAddress',
- 'ns3::Address',
[param('ns3::Ipv4Address', 'multicastGroup')],
is_const=True, is_virtual=True)
## bridge-net-device.h: bool ns3::BridgeNetDevice::IsPointToPoint() const [member function]
--- a/bindings/python/ns3_module_core.py Wed Nov 05 14:33:20 2008 -0800
+++ b/bindings/python/ns3_module_core.py Wed Nov 05 14:49:21 2008 -0800
@@ -1879,7 +1879,7 @@
cls.add_method('ConnectWithoutContext',
'void',
[param('ns3::CallbackBase const &', 'cb')])
- ## traced-value.h: void ns3::TracedValue<unsigned int>::Connect(ns3::CallbackBase const & cb, std::string path) [member function]
+ ## traced-value.h: void ns3::TracedValue<unsigned int>::Connect(ns3::CallbackBase const & cb, std::basic_string<char,std::char_traits<char>,std::allocator<char> > path) [member function]
cls.add_method('Connect',
'void',
[param('ns3::CallbackBase const &', 'cb'), param('std::string', 'path')])
@@ -1887,7 +1887,7 @@
cls.add_method('DisconnectWithoutContext',
'void',
[param('ns3::CallbackBase const &', 'cb')])
- ## traced-value.h: void ns3::TracedValue<unsigned int>::Disconnect(ns3::CallbackBase const & cb, std::string path) [member function]
+ ## traced-value.h: void ns3::TracedValue<unsigned int>::Disconnect(ns3::CallbackBase const & cb, std::basic_string<char,std::char_traits<char>,std::allocator<char> > path) [member function]
cls.add_method('Disconnect',
'void',
[param('ns3::CallbackBase const &', 'cb'), param('std::string', 'path')])
@@ -1981,7 +1981,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',
@@ -2001,7 +2001,7 @@
module.add_function('TypeNameGet',
'std::string',
[],
- template_parameters=['unsigned long long'])
+ template_parameters=['unsigned long'])
## type-name.h: extern std::string ns3::TypeNameGet() [free function]
module.add_function('TypeNameGet',
'std::string',
@@ -2017,18 +2017,22 @@
'std::string',
[],
template_parameters=['unsigned char'])
- ## log.h: extern void ns3::LogComponentDisable(char const * name, ns3::LogLevel level) [free function]
- module.add_function('LogComponentDisable',
- 'void',
- [param('char const *', 'name'), param('ns3::LogLevel', 'level')])
## string.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeStringChecker() [free function]
module.add_function('MakeStringChecker',
'ns3::Ptr< ns3::AttributeChecker const >',
[])
+ ## enum.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeEnumChecker(int v1, std::string n1, int v2=0, std::string n2="", int v3=0, std::string n3="", int v4=0, std::string n4="", int v5=0, std::string n5="", int v6=0, std::string n6="", int v7=0, std::string n7="", int v8=0, std::string n8="", int v9=0, std::string n9="", int v10=0, std::string n10="", int v11=0, std::string n11="", int v12=0, std::string n12="") [free function]
+ module.add_function('MakeEnumChecker',
+ 'ns3::Ptr< ns3::AttributeChecker const >',
+ [param('int', 'v1'), param('std::string', 'n1'), param('int', 'v2', default_value='0'), param('std::string', 'n2', default_value='""'), param('int', 'v3', default_value='0'), param('std::string', 'n3', default_value='""'), param('int', 'v4', default_value='0'), param('std::string', 'n4', default_value='""'), param('int', 'v5', default_value='0'), param('std::string', 'n5', default_value='""'), param('int', 'v6', default_value='0'), param('std::string', 'n6', default_value='""'), param('int', 'v7', default_value='0'), param('std::string', 'n7', default_value='""'), param('int', 'v8', default_value='0'), param('std::string', 'n8', default_value='""'), param('int', 'v9', default_value='0'), param('std::string', 'n9', default_value='""'), param('int', 'v10', default_value='0'), param('std::string', 'n10', default_value='""'), param('int', 'v11', default_value='0'), param('std::string', 'n11', default_value='""'), param('int', 'v12', default_value='0'), param('std::string', 'n12', default_value='""')])
## type-id.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeTypeIdChecker() [free function]
module.add_function('MakeTypeIdChecker',
'ns3::Ptr< ns3::AttributeChecker const >',
[])
+ ## log.h: extern void ns3::LogComponentEnableAll(ns3::LogLevel level) [free function]
+ module.add_function('LogComponentEnableAll',
+ 'void',
+ [param('ns3::LogLevel', 'level')])
## ptr.h: extern ns3::Ptr<ns3::PointerValue> ns3::Create() [free function]
module.add_function('Create',
'ns3::Ptr< ns3::PointerValue >',
@@ -2039,10 +2043,6 @@
'ns3::Ptr< ns3::ObjectVectorValue >',
[],
template_parameters=['ns3::ObjectVectorValue'])
- ## log.h: extern void ns3::LogComponentEnableAll(ns3::LogLevel level) [free function]
- module.add_function('LogComponentEnableAll',
- 'void',
- [param('ns3::LogLevel', 'level')])
## object-factory.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeObjectFactoryChecker() [free function]
module.add_function('MakeObjectFactoryChecker',
'ns3::Ptr< ns3::AttributeChecker const >',
@@ -2063,14 +2063,14 @@
module.add_function('MakeRandomVariableChecker',
'ns3::Ptr< ns3::AttributeChecker const >',
[])
+ ## log.h: extern void ns3::LogComponentDisable(char const * name, ns3::LogLevel level) [free function]
+ module.add_function('LogComponentDisable',
+ 'void',
+ [param('char const *', 'name'), param('ns3::LogLevel', 'level')])
## log.h: extern void ns3::LogComponentEnable(char const * name, ns3::LogLevel level) [free function]
module.add_function('LogComponentEnable',
'void',
[param('char const *', 'name'), param('ns3::LogLevel', 'level')])
- ## enum.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeEnumChecker(int v1, std::string n1, int v2=0, std::string n2="", int v3=0, std::string n3="", int v4=0, std::string n4="", int v5=0, std::string n5="", int v6=0, std::string n6="", int v7=0, std::string n7="", int v8=0, std::string n8="", int v9=0, std::string n9="", int v10=0, std::string n10="", int v11=0, std::string n11="", int v12=0, std::string n12="") [free function]
- module.add_function('MakeEnumChecker',
- 'ns3::Ptr< ns3::AttributeChecker const >',
- [param('int', 'v1'), param('std::string', 'n1'), param('int', 'v2', default_value='0'), param('std::string', 'n2', default_value='""'), param('int', 'v3', default_value='0'), param('std::string', 'n3', default_value='""'), param('int', 'v4', default_value='0'), param('std::string', 'n4', default_value='""'), param('int', 'v5', default_value='0'), param('std::string', 'n5', default_value='""'), param('int', 'v6', default_value='0'), param('std::string', 'n6', default_value='""'), param('int', 'v7', default_value='0'), param('std::string', 'n7', default_value='""'), param('int', 'v8', default_value='0'), param('std::string', 'n8', default_value='""'), param('int', 'v9', default_value='0'), param('std::string', 'n9', default_value='""'), param('int', 'v10', default_value='0'), param('std::string', 'n10', default_value='""'), param('int', 'v11', default_value='0'), param('std::string', 'n11', default_value='""'), param('int', 'v12', default_value='0'), param('std::string', 'n12', default_value='""')])
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
register_functions_ns3_Config(module.get_submodule('Config'), root_module)
@@ -2132,10 +2132,6 @@
module.add_function('SetGlobalFailSafe',
'bool',
[param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
- ## config.h: extern void ns3::Config::Disconnect(std::string path, ns3::CallbackBase const & cb) [free function]
- module.add_function('Disconnect',
- 'void',
- [param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
## config.h: extern uint32_t ns3::Config::GetRootNamespaceObjectN() [free function]
module.add_function('GetRootNamespaceObjectN',
'uint32_t',
@@ -2152,6 +2148,10 @@
module.add_function('RegisterRootNamespaceObject',
'void',
[param('ns3::Ptr< ns3::Object >', 'obj')])
+ ## config.h: extern void ns3::Config::Disconnect(std::string path, ns3::CallbackBase const & cb) [free function]
+ module.add_function('Disconnect',
+ 'void',
+ [param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
return
def register_functions_ns3_olsr(module, root_module):
--- a/bindings/python/ns3_module_csma.py Wed Nov 05 14:33:20 2008 -0800
+++ b/bindings/python/ns3_module_csma.py Wed Nov 05 14:49:21 2008 -0800
@@ -338,14 +338,9 @@
'bool',
[],
is_const=True, is_virtual=True)
- ## csma-net-device.h: ns3::Address ns3::CsmaNetDevice::GetMulticast() const [member function]
+ ## csma-net-device.h: ns3::Address ns3::CsmaNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function]
cls.add_method('GetMulticast',
'ns3::Address',
- [],
- is_const=True, is_virtual=True)
- ## csma-net-device.h: ns3::Address ns3::CsmaNetDevice::MakeMulticastAddress(ns3::Ipv4Address multicastGroup) const [member function]
- cls.add_method('MakeMulticastAddress',
- 'ns3::Address',
[param('ns3::Ipv4Address', 'multicastGroup')],
is_const=True, is_virtual=True)
## csma-net-device.h: bool ns3::CsmaNetDevice::IsPointToPoint() const [member function]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bindings/python/ns3_module_emu.py Wed Nov 05 14:49:21 2008 -0800
@@ -0,0 +1,232 @@
+from pybindgen import Module, FileCodeSink, param, retval, cppclass
+
+def register_types(module):
+ root_module = module.get_root()
+
+ ## emu-net-device.h: ns3::EmuNetDevice [class]
+ module.add_class('EmuNetDevice', parent=root_module['ns3::NetDevice'])
+
+ ## Register a nested module for the namespace internal
+
+ nested_module = module.add_cpp_namespace('internal')
+ register_types_ns3_internal(nested_module)
+
+
+ ## Register a nested module for the namespace TimeStepPrecision
+
+ nested_module = module.add_cpp_namespace('TimeStepPrecision')
+ register_types_ns3_TimeStepPrecision(nested_module)
+
+
+ ## Register a nested module for the namespace Config
+
+ nested_module = module.add_cpp_namespace('Config')
+ register_types_ns3_Config(nested_module)
+
+
+ ## Register a nested module for the namespace olsr
+
+ nested_module = module.add_cpp_namespace('olsr')
+ register_types_ns3_olsr(nested_module)
+
+
+def register_types_ns3_internal(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_TimeStepPrecision(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_Config(module):
+ root_module = module.get_root()
+
+
+def register_types_ns3_olsr(module):
+ root_module = module.get_root()
+
+
+def register_methods(root_module):
+ register_Ns3EmuNetDevice_methods(root_module, root_module['ns3::EmuNetDevice'])
+ return
+
+def register_Ns3EmuNetDevice_methods(root_module, cls):
+ ## emu-net-device.h: ns3::EmuNetDevice::EmuNetDevice(ns3::EmuNetDevice const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::EmuNetDevice const &', 'arg0')])
+ ## emu-net-device.h: static ns3::TypeId ns3::EmuNetDevice::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
+ ## emu-net-device.h: ns3::EmuNetDevice::EmuNetDevice() [constructor]
+ cls.add_constructor([])
+ ## emu-net-device.h: void ns3::EmuNetDevice::SetDataRate(ns3::DataRate bps) [member function]
+ cls.add_method('SetDataRate',
+ 'void',
+ [param('ns3::DataRate', 'bps')])
+ ## emu-net-device.h: void ns3::EmuNetDevice::SetInterframeGap(ns3::Time t) [member function]
+ cls.add_method('SetInterframeGap',
+ 'void',
+ [param('ns3::Time', 't')])
+ ## emu-net-device.h: void ns3::EmuNetDevice::Start(ns3::Time tStart) [member function]
+ cls.add_method('Start',
+ 'void',
+ [param('ns3::Time', 'tStart')])
+ ## emu-net-device.h: void ns3::EmuNetDevice::Stop(ns3::Time tStop) [member function]
+ cls.add_method('Stop',
+ 'void',
+ [param('ns3::Time', 'tStop')])
+ ## emu-net-device.h: void ns3::EmuNetDevice::SetQueue(ns3::Ptr<ns3::Queue> queue) [member function]
+ cls.add_method('SetQueue',
+ 'void',
+ [param('ns3::Ptr< ns3::Queue >', 'queue')])
+ ## emu-net-device.h: void ns3::EmuNetDevice::Receive(ns3::Ptr<ns3::Packet> p) [member function]
+ cls.add_method('Receive',
+ 'void',
+ [param('ns3::Ptr< ns3::Packet >', 'p')])
+ ## emu-net-device.h: void ns3::EmuNetDevice::SetAddress(ns3::Mac48Address addr) [member function]
+ cls.add_method('SetAddress',
+ 'void',
+ [param('ns3::Mac48Address', 'addr')])
+ ## emu-net-device.h: void ns3::EmuNetDevice::SetName(std::string const name) [member function]
+ cls.add_method('SetName',
+ 'void',
+ [param('std::string const', 'name')],
+ is_virtual=True)
+ ## emu-net-device.h: std::string ns3::EmuNetDevice::GetName() const [member function]
+ cls.add_method('GetName',
+ 'std::string',
+ [],
+ is_const=True, is_virtual=True)
+ ## emu-net-device.h: void ns3::EmuNetDevice::SetIfIndex(uint32_t const index) [member function]
+ cls.add_method('SetIfIndex',
+ 'void',
+ [param('uint32_t const', 'index')],
+ is_virtual=True)
+ ## emu-net-device.h: uint32_t ns3::EmuNetDevice::GetIfIndex() const [member function]
+ cls.add_method('GetIfIndex',
+ 'uint32_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## emu-net-device.h: ns3::Ptr<ns3::Channel> ns3::EmuNetDevice::GetChannel() const [member function]
+ cls.add_method('GetChannel',
+ 'ns3::Ptr< ns3::Channel >',
+ [],
+ is_const=True, is_virtual=True)
+ ## emu-net-device.h: ns3::Address ns3::EmuNetDevice::GetAddress() const [member function]
+ cls.add_method('GetAddress',
+ 'ns3::Address',
+ [],
+ is_const=True, is_virtual=True)
+ ## emu-net-device.h: bool ns3::EmuNetDevice::SetMtu(uint16_t const mtu) [member function]
+ cls.add_method('SetMtu',
+ 'bool',
+ [param('uint16_t const', 'mtu')],
+ is_virtual=True)
+ ## emu-net-device.h: uint16_t ns3::EmuNetDevice::GetMtu() const [member function]
+ cls.add_method('GetMtu',
+ 'uint16_t',
+ [],
+ is_const=True, is_virtual=True)
+ ## emu-net-device.h: bool ns3::EmuNetDevice::IsLinkUp() const [member function]
+ cls.add_method('IsLinkUp',
+ 'bool',
+ [],
+ is_const=True, is_virtual=True)
+ ## emu-net-device.h: void ns3::EmuNetDevice::SetLinkChangeCallback(ns3::Callback<void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function]
+ cls.add_method('SetLinkChangeCallback',
+ 'void',
+ [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')],
+ is_virtual=True)
+ ## emu-net-device.h: bool ns3::EmuNetDevice::IsBroadcast() const [member function]
+ cls.add_method('IsBroadcast',
+ 'bool',
+ [],
+ is_const=True, is_virtual=True)
+ ## emu-net-device.h: ns3::Address ns3::EmuNetDevice::GetBroadcast() const [member function]
+ cls.add_method('GetBroadcast',
+ 'ns3::Address',
+ [],
+ is_const=True, is_virtual=True)
+ ## emu-net-device.h: bool ns3::EmuNetDevice::IsMulticast() const [member function]
+ cls.add_method('IsMulticast',
+ 'bool',
+ [],
+ is_const=True, is_virtual=True)
+ ## emu-net-device.h: ns3::Address ns3::EmuNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function]
+ cls.add_method('GetMulticast',
+ 'ns3::Address',
+ [param('ns3::Ipv4Address', 'multicastGroup')],
+ is_const=True, is_virtual=True)
+ ## emu-net-device.h: bool ns3::EmuNetDevice::IsPointToPoint() const [member function]
+ cls.add_method('IsPointToPoint',
+ 'bool',
+ [],
+ is_const=True, is_virtual=True)
+ ## emu-net-device.h: bool ns3::EmuNetDevice::Send(ns3::Ptr<ns3::Packet> packet, ns3::Address const & dest, uint16_t protocolNumber) [member function]
+ cls.add_method('Send',
+ 'bool',
+ [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')],
+ is_virtual=True)
+ ## emu-net-device.h: bool ns3::EmuNetDevice::SendFrom(ns3::Ptr<ns3::Packet> packet, ns3::Address const & source, ns3::Address const & dest, uint16_t protocolNumber) [member function]
+ cls.add_method('SendFrom',
+ 'bool',
+ [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')],
+ is_virtual=True)
+ ## emu-net-device.h: ns3::Ptr<ns3::Node> ns3::EmuNetDevice::GetNode() const [member function]
+ cls.add_method('GetNode',
+ 'ns3::Ptr< ns3::Node >',
+ [],
+ is_const=True, is_virtual=True)
+ ## emu-net-device.h: void ns3::EmuNetDevice::SetNode(ns3::Ptr<ns3::Node> node) [member function]
+ cls.add_method('SetNode',
+ 'void',
+ [param('ns3::Ptr< ns3::Node >', 'node')],
+ is_virtual=True)
+ ## emu-net-device.h: bool ns3::EmuNetDevice::NeedsArp() const [member function]
+ cls.add_method('NeedsArp',
+ 'bool',
+ [],
+ is_const=True, is_virtual=True)
+ ## emu-net-device.h: void ns3::EmuNetDevice::SetReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::empty, ns3::empty> cb) [member function]
+ cls.add_method('SetReceiveCallback',
+ 'void',
+ [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::empty, ns3::empty >', 'cb')],
+ is_virtual=True)
+ ## emu-net-device.h: void ns3::EmuNetDevice::SetPromiscReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType> cb) [member function]
+ cls.add_method('SetPromiscReceiveCallback',
+ 'void',
+ [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::Address const &, ns3::NetDevice::PacketType >', 'cb')],
+ is_virtual=True)
+ ## emu-net-device.h: bool ns3::EmuNetDevice::SupportsSendFrom() const [member function]
+ cls.add_method('SupportsSendFrom',
+ 'bool',
+ [],
+ is_const=True, is_virtual=True)
+ ## emu-net-device.h: void ns3::EmuNetDevice::DoDispose() [member function]
+ cls.add_method('DoDispose',
+ 'void',
+ [],
+ visibility='private', is_virtual=True)
+ return
+
+def register_functions(root_module):
+ module = root_module
+ register_functions_ns3_internal(module.get_submodule('internal'), root_module)
+ register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
+ register_functions_ns3_Config(module.get_submodule('Config'), root_module)
+ register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
+ return
+
+def register_functions_ns3_internal(module, root_module):
+ return
+
+def register_functions_ns3_TimeStepPrecision(module, root_module):
+ return
+
+def register_functions_ns3_Config(module, root_module):
+ return
+
+def register_functions_ns3_olsr(module, root_module):
+ return
+
--- a/bindings/python/ns3_module_helper.py Wed Nov 05 14:33:20 2008 -0800
+++ b/bindings/python/ns3_module_helper.py Wed Nov 05 14:49:21 2008 -0800
@@ -9,6 +9,8 @@
module.add_class('BridgeHelper', allow_subclassing=False)
## csma-helper.h: ns3::CsmaHelper [class]
module.add_class('CsmaHelper', allow_subclassing=False)
+ ## emu-helper.h: ns3::EmuHelper [class]
+ module.add_class('EmuHelper', allow_subclassing=False)
## internet-stack-helper.h: ns3::InternetStackHelper [class]
module.add_class('InternetStackHelper', allow_subclassing=False)
## ipv4-address-helper.h: ns3::Ipv4AddressHelper [class]
@@ -39,6 +41,8 @@
module.add_class('UdpEchoClientHelper', allow_subclassing=False)
## udp-echo-helper.h: ns3::UdpEchoServerHelper [class]
module.add_class('UdpEchoServerHelper', allow_subclassing=False)
+ ## v4ping-helper.h: ns3::V4PingHelper [class]
+ module.add_class('V4PingHelper', allow_subclassing=False)
## wifi-helper.h: ns3::WifiHelper [class]
module.add_class('WifiHelper', allow_subclassing=False)
@@ -86,6 +90,7 @@
register_Ns3ApplicationContainer_methods(root_module, root_module['ns3::ApplicationContainer'])
register_Ns3BridgeHelper_methods(root_module, root_module['ns3::BridgeHelper'])
register_Ns3CsmaHelper_methods(root_module, root_module['ns3::CsmaHelper'])
+ register_Ns3EmuHelper_methods(root_module, root_module['ns3::EmuHelper'])
register_Ns3InternetStackHelper_methods(root_module, root_module['ns3::InternetStackHelper'])
register_Ns3Ipv4AddressHelper_methods(root_module, root_module['ns3::Ipv4AddressHelper'])
register_Ns3Ipv4InterfaceContainer_methods(root_module, root_module['ns3::Ipv4InterfaceContainer'])
@@ -101,6 +106,7 @@
register_Ns3StaticMulticastRouteHelper_methods(root_module, root_module['ns3::StaticMulticastRouteHelper'])
register_Ns3UdpEchoClientHelper_methods(root_module, root_module['ns3::UdpEchoClientHelper'])
register_Ns3UdpEchoServerHelper_methods(root_module, root_module['ns3::UdpEchoServerHelper'])
+ register_Ns3V4PingHelper_methods(root_module, root_module['ns3::V4PingHelper'])
register_Ns3WifiHelper_methods(root_module, root_module['ns3::WifiHelper'])
return
@@ -243,6 +249,65 @@
[param('ns3::Ptr< ns3::Node >', 'hub'), param('ns3::NodeContainer', 'spokes'), param('ns3::NetDeviceContainer &', 'hubDevices'), param('ns3::NetDeviceContainer &', 'spokeDevices')])
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: 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::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: static void ns3::EmuHelper::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)
+ ## emu-helper.h: static void ns3::EmuHelper::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)
+ ## emu-helper.h: static void ns3::EmuHelper::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)
+ ## emu-helper.h: static void ns3::EmuHelper::EnablePcapAll(std::string filename) [member function]
+ cls.add_method('EnablePcapAll',
+ 'void',
+ [param('std::string', 'filename')],
+ is_static=True)
+ ## 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::NodeContainer const & c) [member function]
+ cls.add_method('Install',
+ 'ns3::NetDeviceContainer',
+ [param('ns3::NodeContainer const &', 'c')])
+ return
+
def register_Ns3InternetStackHelper_methods(root_module, cls):
## internet-stack-helper.h: ns3::InternetStackHelper::InternetStackHelper(ns3::InternetStackHelper const & arg0) [copy constructor]
cls.add_constructor([param('ns3::InternetStackHelper const &', 'arg0')])
@@ -667,6 +732,21 @@
[param('ns3::NodeContainer', 'c')])
return
+def register_Ns3V4PingHelper_methods(root_module, cls):
+ ## v4ping-helper.h: ns3::V4PingHelper::V4PingHelper(ns3::V4PingHelper const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::V4PingHelper const &', 'arg0')])
+ ## v4ping-helper.h: ns3::V4PingHelper::V4PingHelper(ns3::Ipv4Address remote) [constructor]
+ cls.add_constructor([param('ns3::Ipv4Address', 'remote')])
+ ## v4ping-helper.h: void ns3::V4PingHelper::SetAttribute(std::string name, ns3::AttributeValue const & value) [member function]
+ cls.add_method('SetAttribute',
+ 'void',
+ [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
+ ## v4ping-helper.h: ns3::ApplicationContainer ns3::V4PingHelper::Install(ns3::NodeContainer nodes) [member function]
+ cls.add_method('Install',
+ 'ns3::ApplicationContainer',
+ [param('ns3::NodeContainer', 'nodes')])
+ return
+
def register_Ns3WifiHelper_methods(root_module, cls):
## wifi-helper.h: ns3::WifiHelper::WifiHelper(ns3::WifiHelper const & arg0) [copy constructor]
cls.add_constructor([param('ns3::WifiHelper const &', 'arg0')])
--- a/bindings/python/ns3_module_node.py Wed Nov 05 14:33:20 2008 -0800
+++ b/bindings/python/ns3_module_node.py Wed Nov 05 14:49:21 2008 -0800
@@ -100,7 +100,7 @@
## net-device.h: ns3::NetDevice [class]
module.add_class('NetDevice', parent=root_module['ns3::Object'])
## net-device.h: ns3::NetDevice::PacketType [enumeration]
- module.add_enum('PacketType', ['PACKET_HOST', 'PACKET_BROADCAST', 'PACKET_MULTICAST', 'PACKET_OTHERHOST'], outer_class=root_module['ns3::NetDevice'])
+ module.add_enum('PacketType', ['PACKET_HOST', 'NS3_PACKET_HOST', 'PACKET_BROADCAST', 'NS3_PACKET_BROADCAST', 'PACKET_MULTICAST', 'NS3_PACKET_MULTICAST', 'PACKET_OTHERHOST', 'NS3_PACKET_OTHERHOST'], outer_class=root_module['ns3::NetDevice'])
## node.h: ns3::Node [class]
module.add_class('Node', parent=root_module['ns3::Object'])
## packet-socket-factory.h: ns3::PacketSocketFactory [class]
@@ -2339,14 +2339,9 @@
'bool',
[],
is_pure_virtual=True, is_const=True, is_virtual=True)
- ## net-device.h: ns3::Address ns3::NetDevice::GetMulticast() const [member function]
+ ## net-device.h: ns3::Address ns3::NetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function]
cls.add_method('GetMulticast',
'ns3::Address',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## net-device.h: ns3::Address ns3::NetDevice::MakeMulticastAddress(ns3::Ipv4Address multicastGroup) const [member function]
- cls.add_method('MakeMulticastAddress',
- 'ns3::Address',
[param('ns3::Ipv4Address', 'multicastGroup')],
is_pure_virtual=True, is_const=True, is_virtual=True)
## net-device.h: bool ns3::NetDevice::IsPointToPoint() const [member function]
@@ -2600,14 +2595,9 @@
'bool',
[],
is_const=True, is_virtual=True)
- ## simple-net-device.h: ns3::Address ns3::SimpleNetDevice::GetMulticast() const [member function]
+ ## simple-net-device.h: ns3::Address ns3::SimpleNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function]
cls.add_method('GetMulticast',
'ns3::Address',
- [],
- is_const=True, is_virtual=True)
- ## simple-net-device.h: ns3::Address ns3::SimpleNetDevice::MakeMulticastAddress(ns3::Ipv4Address multicastGroup) const [member function]
- cls.add_method('MakeMulticastAddress',
- 'ns3::Address',
[param('ns3::Ipv4Address', 'multicastGroup')],
is_const=True, is_virtual=True)
## simple-net-device.h: bool ns3::SimpleNetDevice::IsPointToPoint() const [member function]
@@ -2664,18 +2654,10 @@
def register_functions(root_module):
module = root_module
- ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Mac48Address & ad) [free function]
- module.add_function('ReadFrom',
- 'void',
- [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac48Address &', 'ad')])
- ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Address & ad, uint32_t len) [free function]
- module.add_function('ReadFrom',
- 'void',
- [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Address &', 'ad'), param('uint32_t', 'len')])
- ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Ipv4Address & ad) [free function]
- module.add_function('ReadFrom',
- 'void',
- [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Ipv4Address &', 'ad')])
+ ## mac48-address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeMac48AddressChecker() [free function]
+ module.add_function('MakeMac48AddressChecker',
+ 'ns3::Ptr< ns3::AttributeChecker const >',
+ [])
## ipv4-address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeIpv4AddressChecker() [free function]
module.add_function('MakeIpv4AddressChecker',
'ns3::Ptr< ns3::AttributeChecker const >',
@@ -2700,10 +2682,18 @@
module.add_function('MakeIpv4MaskChecker',
'ns3::Ptr< ns3::AttributeChecker const >',
[])
- ## mac48-address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeMac48AddressChecker() [free function]
- module.add_function('MakeMac48AddressChecker',
- 'ns3::Ptr< ns3::AttributeChecker const >',
- [])
+ ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Mac48Address & ad) [free function]
+ module.add_function('ReadFrom',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac48Address &', 'ad')])
+ ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Address & ad, uint32_t len) [free function]
+ module.add_function('ReadFrom',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Address &', 'ad'), param('uint32_t', 'len')])
+ ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Ipv4Address & ad) [free function]
+ module.add_function('ReadFrom',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Ipv4Address &', 'ad')])
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
register_functions_ns3_Config(module.get_submodule('Config'), root_module)
--- a/bindings/python/ns3_module_point_to_point.py Wed Nov 05 14:33:20 2008 -0800
+++ b/bindings/python/ns3_module_point_to_point.py Wed Nov 05 14:49:21 2008 -0800
@@ -200,14 +200,9 @@
'bool',
[],
is_const=True, is_virtual=True)
- ## point-to-point-net-device.h: ns3::Address ns3::PointToPointNetDevice::GetMulticast() const [member function]
+ ## point-to-point-net-device.h: ns3::Address ns3::PointToPointNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function]
cls.add_method('GetMulticast',
'ns3::Address',
- [],
- is_const=True, is_virtual=True)
- ## point-to-point-net-device.h: ns3::Address ns3::PointToPointNetDevice::MakeMulticastAddress(ns3::Ipv4Address multicastGroup) const [member function]
- cls.add_method('MakeMulticastAddress',
- 'ns3::Address',
[param('ns3::Ipv4Address', 'multicastGroup')],
is_const=True, is_virtual=True)
## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::IsPointToPoint() const [member function]
--- a/bindings/python/ns3_module_wifi.py Wed Nov 05 14:33:20 2008 -0800
+++ b/bindings/python/ns3_module_wifi.py Wed Nov 05 14:49:21 2008 -0800
@@ -2466,14 +2466,9 @@
'bool',
[],
is_const=True, is_virtual=True)
- ## wifi-net-device.h: ns3::Address ns3::WifiNetDevice::GetMulticast() const [member function]
+ ## wifi-net-device.h: ns3::Address ns3::WifiNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function]
cls.add_method('GetMulticast',
'ns3::Address',
- [],
- is_const=True, is_virtual=True)
- ## wifi-net-device.h: ns3::Address ns3::WifiNetDevice::MakeMulticastAddress(ns3::Ipv4Address multicastGroup) const [member function]
- cls.add_method('MakeMulticastAddress',
- 'ns3::Address',
[param('ns3::Ipv4Address', 'multicastGroup')],
is_const=True, is_virtual=True)
## wifi-net-device.h: bool ns3::WifiNetDevice::IsPointToPoint() const [member function]
--- a/bindings/python/ns3modulegen_generated.py Wed Nov 05 14:33:20 2008 -0800
+++ b/bindings/python/ns3modulegen_generated.py Wed Nov 05 14:49:21 2008 -0800
@@ -23,8 +23,10 @@
import ns3_module_internet_stack
import ns3_module_wifi
import ns3_module_csma
+import ns3_module_emu
import ns3_module_bridge
import ns3_module_packet_sink
+import ns3_module_v4ping
import ns3_module_global_routing
import ns3_module_onoff
import ns3_module_olsr
@@ -159,6 +161,17 @@
ns3_module_csma__local.register_types(module)
root_module.end_section('ns3_module_csma')
+ root_module.begin_section('ns3_module_emu')
+ ns3_module_emu.register_types(module)
+
+ try:
+ import ns3_module_emu__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_emu__local.register_types(module)
+
+ root_module.end_section('ns3_module_emu')
root_module.begin_section('ns3_module_bridge')
ns3_module_bridge.register_types(module)
@@ -181,6 +194,17 @@
ns3_module_packet_sink__local.register_types(module)
root_module.end_section('ns3_module_packet_sink')
+ root_module.begin_section('ns3_module_v4ping')
+ ns3_module_v4ping.register_types(module)
+
+ try:
+ import ns3_module_v4ping__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_v4ping__local.register_types(module)
+
+ root_module.end_section('ns3_module_v4ping')
root_module.begin_section('ns3_module_global_routing')
ns3_module_global_routing.register_types(module)
@@ -402,6 +426,17 @@
ns3_module_csma__local.register_methods(root_module)
root_module.end_section('ns3_module_csma')
+ root_module.begin_section('ns3_module_emu')
+ ns3_module_emu.register_methods(root_module)
+
+ try:
+ import ns3_module_emu__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_emu__local.register_methods(root_module)
+
+ root_module.end_section('ns3_module_emu')
root_module.begin_section('ns3_module_bridge')
ns3_module_bridge.register_methods(root_module)
@@ -424,6 +459,17 @@
ns3_module_packet_sink__local.register_methods(root_module)
root_module.end_section('ns3_module_packet_sink')
+ root_module.begin_section('ns3_module_v4ping')
+ ns3_module_v4ping.register_methods(root_module)
+
+ try:
+ import ns3_module_v4ping__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_v4ping__local.register_methods(root_module)
+
+ root_module.end_section('ns3_module_v4ping')
root_module.begin_section('ns3_module_global_routing')
ns3_module_global_routing.register_methods(root_module)
@@ -604,6 +650,17 @@
ns3_module_csma__local.register_functions(root_module)
root_module.end_section('ns3_module_csma')
+ root_module.begin_section('ns3_module_emu')
+ ns3_module_emu.register_functions(root_module)
+
+ try:
+ import ns3_module_emu__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_emu__local.register_functions(root_module)
+
+ root_module.end_section('ns3_module_emu')
root_module.begin_section('ns3_module_bridge')
ns3_module_bridge.register_functions(root_module)
@@ -626,6 +683,17 @@
ns3_module_packet_sink__local.register_functions(root_module)
root_module.end_section('ns3_module_packet_sink')
+ root_module.begin_section('ns3_module_v4ping')
+ ns3_module_v4ping.register_functions(root_module)
+
+ try:
+ import ns3_module_v4ping__local
+ except ImportError:
+ pass
+ else:
+ ns3_module_v4ping__local.register_functions(root_module)
+
+ root_module.end_section('ns3_module_v4ping')
root_module.begin_section('ns3_module_global_routing')
ns3_module_global_routing.register_functions(root_module)
--- a/src/devices/emu/emu-net-device.cc Wed Nov 05 14:33:20 2008 -0800
+++ b/src/devices/emu/emu-net-device.cc Wed Nov 05 14:49:21 2008 -0800
@@ -502,44 +502,23 @@
NS_LOG_LOGIC ("Pkt source is " << header.GetSource ());
NS_LOG_LOGIC ("Pkt destination is " << header.GetDestination ());
- //
- // An IP host group address is mapped to an Ethernet multicast address
- // by placing the low-order 23-bits of the IP address into the low-order
- // 23 bits of the Ethernet multicast address 01-00-5E-00-00-00 (hex).
- //
- // We are going to receive all packets destined to any multicast address,
- // which means clearing the low-order 23 bits the header destination
- //
- Mac48Address mcDest;
- uint8_t mcBuf[6];
-
- header.GetDestination ().CopyTo (mcBuf);
- mcBuf[3] &= 0x80;
- mcBuf[4] = 0;
- mcBuf[5] = 0;
- mcDest.CopyFrom (mcBuf);
-
- Mac48Address multicast = Mac48Address::ConvertFrom (GetMulticast ());
- Mac48Address broadcast = Mac48Address::ConvertFrom (GetBroadcast ());
- Mac48Address destination = Mac48Address::ConvertFrom (GetAddress ());
-
LlcSnapHeader llc;
packet->RemoveHeader (llc);
uint16_t protocol = llc.GetType ();
PacketType packetType;
- if (header.GetDestination () == broadcast)
+ if (header.GetDestination ().IsBroadcast ())
{
NS_LOG_LOGIC ("Pkt destination is PACKET_BROADCAST");
packetType = NS3_PACKET_BROADCAST;
}
- else if (mcDest == multicast)
+ else if (header.GetDestination ().IsMulticast ())
{
NS_LOG_LOGIC ("Pkt destination is PACKET_MULTICAST");
packetType = NS3_PACKET_MULTICAST;
}
- else if (header.GetDestination () == destination)
+ else if (header.GetDestination () == m_address)
{
NS_LOG_LOGIC ("Pkt destination is PACKET_HOST");
packetType = NS3_PACKET_HOST;
@@ -841,26 +820,21 @@
return false;
}
-Address
-EmuNetDevice::GetMulticast (void) const
-{
- return Mac48Address ("01:00:5e:00:00:00");
-}
-
-Address
-EmuNetDevice::MakeMulticastAddress (Ipv4Address multicastGroup) const
+ Address
+EmuNetDevice::GetMulticast (Ipv4Address multicastGroup) const
{
NS_LOG_FUNCTION (multicastGroup);
- Mac48Address addr = Mac48Address::GetMulticast (multicastGroup);
+ Mac48Address ad = Mac48Address::GetMulticast (multicastGroup);
//
// Implicit conversion (operator Address ()) is defined for Mac48Address, so
// use it by just returning the EUI-48 address which is automagically converted
// to an Address.
//
- NS_LOG_LOGIC ("Multicast address is " << addr);
- return addr;
+ NS_LOG_LOGIC ("multicast address is " << ad);
+
+ return ad;
}
bool
--- a/src/devices/emu/emu-net-device.h Wed Nov 05 14:33:20 2008 -0800
+++ b/src/devices/emu/emu-net-device.h Wed Nov 05 14:49:21 2008 -0800
@@ -144,9 +144,35 @@
virtual Address GetBroadcast (void) const;
virtual bool IsMulticast (void) const;
- virtual Address GetMulticast (void) const;
- virtual Address MakeMulticastAddress (Ipv4Address multicastGroup) const;
+ /**
+ * \brief Make and return a MAC multicast address using the provided
+ * multicast group
+ *
+ * RFC 1112 says that an Ipv4 host group address is mapped to an Ethernet
+ * multicast address by placing the low-order 23-bits of the IP address into
+ * the low-order 23 bits of the Ethernet multicast address
+ * 01-00-5E-00-00-00 (hex).
+ *
+ * This method performs the multicast address creation function appropriate
+ * to an EUI-48-based CSMA device. This MAC address is encapsulated in an
+ * abstract Address to avoid dependencies on the exact address format.
+ *
+ * \param multicastGroup The IP address for the multicast group destination
+ * of the packet.
+ * \return The MAC multicast Address used to send packets to the provided
+ * multicast group.
+ *
+ * \see Ipv4Address
+ * \see Mac48Address
+ * \see Address
+ */
+ virtual Address GetMulticast (Ipv4Address multicastGroup) const;
+
+ /**
+ * Is this a point to point link?
+ * \returns false.
+ */
virtual bool IsPointToPoint (void) const;
virtual bool Send(Ptr<Packet> packet, const Address &dest, uint16_t protocolNumber);