diff --git a/bindings/python/apidefs/gcc-ILP32/callbacks_list.py b/bindings/python/apidefs/gcc-ILP32/callbacks_list.py index 851219054..87ce918db 100644 --- a/bindings/python/apidefs/gcc-ILP32/callbacks_list.py +++ b/bindings/python/apidefs/gcc-ILP32/callbacks_list.py @@ -1,6 +1,6 @@ callback_classes = [ - ['void', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::Ptr', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], + ['void', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::Ptr', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['bool', 'ns3::Ptr', 'ns3::Address const&', 'ns3::Address const&', 'unsigned short', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], diff --git a/bindings/python/apidefs/gcc-ILP32/ns3_module_core.py b/bindings/python/apidefs/gcc-ILP32/ns3_module_core.py index 9c196294f..c498931bd 100644 --- a/bindings/python/apidefs/gcc-ILP32/ns3_module_core.py +++ b/bindings/python/apidefs/gcc-ILP32/ns3_module_core.py @@ -17,7 +17,7 @@ def register_types(module): module.add_class('EventId') ## global-value.h: ns3::GlobalValue [class] module.add_class('GlobalValue') - ## high-precision-double.h: ns3::HighPrecision [class] + ## high-precision-cairo.h: ns3::HighPrecision [class] module.add_class('HighPrecision') ## int-to-type.h: ns3::IntToType<0> [struct] module.add_class('IntToType', template_parameters=['0']) @@ -294,14 +294,14 @@ def register_types(module): module.add_container('std::list< ns3::Ptr< ns3::UanTransducer > >', 'ns3::Ptr< ns3::UanTransducer >', container_type='list') module.add_container('std::vector< ns3::Ptr< ns3::NetDevice > >', 'ns3::Ptr< ns3::NetDevice >', container_type='vector') module.add_container('std::vector< ns3::Ptr< ns3::SpectrumPhy > >', 'ns3::Ptr< ns3::SpectrumPhy >', container_type='vector') - typehandlers.add_type_alias('ns3::Time', 'ns3::TimeInvert') - typehandlers.add_type_alias('ns3::Time*', 'ns3::TimeInvert*') - typehandlers.add_type_alias('ns3::Time&', 'ns3::TimeInvert&') - module.add_typedef(root_module['ns3::Time'], 'TimeInvert') typehandlers.add_type_alias('ns3::Vector3DChecker', 'ns3::VectorChecker') typehandlers.add_type_alias('ns3::Vector3DChecker*', 'ns3::VectorChecker*') typehandlers.add_type_alias('ns3::Vector3DChecker&', 'ns3::VectorChecker&') module.add_typedef(root_module['ns3::Vector3DChecker'], 'VectorChecker') + typehandlers.add_type_alias('ns3::Time', 'ns3::TimeInvert') + typehandlers.add_type_alias('ns3::Time*', 'ns3::TimeInvert*') + typehandlers.add_type_alias('ns3::Time&', 'ns3::TimeInvert&') + module.add_typedef(root_module['ns3::Time'], 'TimeInvert') typehandlers.add_type_alias('ns3::Time', 'ns3::TimeSquare') typehandlers.add_type_alias('ns3::Time*', 'ns3::TimeSquare*') typehandlers.add_type_alias('ns3::Time&', 'ns3::TimeSquare&') @@ -741,65 +741,65 @@ def register_Ns3GlobalValue_methods(root_module, cls): def register_Ns3HighPrecision_methods(root_module, cls): cls.add_output_stream_operator() - ## high-precision-double.h: ns3::HighPrecision::HighPrecision(ns3::HighPrecision const & arg0) [copy constructor] + ## high-precision-cairo.h: ns3::HighPrecision::HighPrecision(ns3::HighPrecision const & arg0) [copy constructor] cls.add_constructor([param('ns3::HighPrecision const &', 'arg0')]) - ## high-precision-double.h: ns3::HighPrecision::HighPrecision() [constructor] + ## high-precision-cairo.h: ns3::HighPrecision::HighPrecision() [constructor] cls.add_constructor([]) - ## high-precision-double.h: ns3::HighPrecision::HighPrecision(int64_t value, bool dummy) [constructor] + ## high-precision-cairo.h: ns3::HighPrecision::HighPrecision(int64_t value, bool dummy) [constructor] cls.add_constructor([param('int64_t', 'value'), param('bool', 'dummy')]) - ## high-precision-double.h: ns3::HighPrecision::HighPrecision(double value) [constructor] + ## high-precision-cairo.h: ns3::HighPrecision::HighPrecision(double value) [constructor] cls.add_constructor([param('double', 'value')]) - ## high-precision-double.h: void ns3::HighPrecision::Add(ns3::HighPrecision const & o) [member function] + ## high-precision-cairo.h: void ns3::HighPrecision::Add(ns3::HighPrecision const & o) [member function] cls.add_method('Add', 'void', [param('ns3::HighPrecision const &', 'o')]) - ## high-precision-double.h: int ns3::HighPrecision::Compare(ns3::HighPrecision const & o) const [member function] + ## high-precision-cairo.h: int ns3::HighPrecision::Compare(ns3::HighPrecision const & o) const [member function] cls.add_method('Compare', 'int', [param('ns3::HighPrecision const &', 'o')], is_const=True) - ## high-precision-double.h: void ns3::HighPrecision::Div(ns3::HighPrecision const & o) [member function] + ## high-precision-cairo.h: void ns3::HighPrecision::Div(ns3::HighPrecision const & o) [member function] cls.add_method('Div', 'void', [param('ns3::HighPrecision const &', 'o')]) - ## high-precision-double.h: double ns3::HighPrecision::GetDouble() const [member function] + ## high-precision-cairo.h: double ns3::HighPrecision::GetDouble() const [member function] cls.add_method('GetDouble', 'double', [], is_const=True) - ## high-precision-double.h: int64_t ns3::HighPrecision::GetHigh() const [member function] + ## high-precision-cairo.h: int64_t ns3::HighPrecision::GetHigh() const [member function] cls.add_method('GetHigh', 'int64_t', [], is_const=True) - ## high-precision-double.h: int64_t ns3::HighPrecision::GetInteger() const [member function] + ## high-precision-cairo.h: int64_t ns3::HighPrecision::GetInteger() const [member function] cls.add_method('GetInteger', 'int64_t', [], is_const=True) - ## high-precision-double.h: uint64_t ns3::HighPrecision::GetLow() const [member function] + ## high-precision-cairo.h: uint64_t ns3::HighPrecision::GetLow() const [member function] cls.add_method('GetLow', 'uint64_t', [], is_const=True) - ## high-precision-double.h: static ns3::HighPrecision ns3::HighPrecision::Invert(uint64_t v) [member function] + ## high-precision-cairo.h: static ns3::HighPrecision ns3::HighPrecision::Invert(uint64_t v) [member function] cls.add_method('Invert', 'ns3::HighPrecision', [param('uint64_t', 'v')], is_static=True) - ## high-precision-double.h: void ns3::HighPrecision::Mul(ns3::HighPrecision const & o) [member function] + ## high-precision-cairo.h: void ns3::HighPrecision::Mul(ns3::HighPrecision const & o) [member function] cls.add_method('Mul', 'void', [param('ns3::HighPrecision const &', 'o')]) - ## high-precision-double.h: void ns3::HighPrecision::MulByInvert(ns3::HighPrecision const & o) [member function] + ## high-precision-cairo.h: void ns3::HighPrecision::MulByInvert(ns3::HighPrecision const & o) [member function] cls.add_method('MulByInvert', 'void', [param('ns3::HighPrecision const &', 'o')]) - ## high-precision-double.h: void ns3::HighPrecision::Sub(ns3::HighPrecision const & o) [member function] + ## high-precision-cairo.h: void ns3::HighPrecision::Sub(ns3::HighPrecision const & o) [member function] cls.add_method('Sub', 'void', [param('ns3::HighPrecision const &', 'o')]) - ## high-precision-double.h: static ns3::HighPrecision ns3::HighPrecision::Zero() [member function] + ## high-precision-cairo.h: static ns3::HighPrecision ns3::HighPrecision::Zero() [member function] cls.add_method('Zero', 'ns3::HighPrecision', [], @@ -1628,13 +1628,13 @@ def register_Ns3TestSuite_methods(root_module, cls): def register_Ns3Time_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_inplace_numeric_operator('*=', param('ns3::Time const &', 'right')) - cls.add_inplace_numeric_operator('+=', param('ns3::Time const &', 'right')) cls.add_inplace_numeric_operator('-=', param('ns3::Time const &', 'right')) cls.add_inplace_numeric_operator('/=', param('ns3::Time const &', 'right')) cls.add_output_stream_operator() cls.add_binary_comparison_operator('<=') cls.add_binary_comparison_operator('==') cls.add_binary_comparison_operator('>=') + cls.add_inplace_numeric_operator('+=', param('ns3::Time const &', 'right')) cls.add_binary_numeric_operator('*', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right')) cls.add_binary_numeric_operator('+', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right')) cls.add_binary_numeric_operator('-', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right')) diff --git a/bindings/python/apidefs/gcc-ILP32/ns3_module_internet_stack.py b/bindings/python/apidefs/gcc-ILP32/ns3_module_internet_stack.py index d67d5d53f..58438ce84 100644 --- a/bindings/python/apidefs/gcc-ILP32/ns3_module_internet_stack.py +++ b/bindings/python/apidefs/gcc-ILP32/ns3_module_internet_stack.py @@ -151,6 +151,8 @@ def register_types(module): module.add_class('Ipv4MulticastRoute', parent=root_module['ns3::SimpleRefCount< ns3::Ipv4MulticastRoute, ns3::empty, ns3::DefaultDeleter >']) ## ipv4-raw-socket-factory.h: ns3::Ipv4RawSocketFactory [class] module.add_class('Ipv4RawSocketFactory', parent=root_module['ns3::SocketFactory']) + ## ipv4-raw-socket-impl.h: ns3::Ipv4RawSocketImpl [class] + module.add_class('Ipv4RawSocketImpl', parent=root_module['ns3::Socket']) ## ipv4-route.h: ns3::Ipv4Route [class] module.add_class('Ipv4Route', parent=root_module['ns3::SimpleRefCount< ns3::Ipv4Route, ns3::empty, ns3::DefaultDeleter >']) ## ipv4-routing-protocol.h: ns3::Ipv4RoutingProtocol [class] @@ -344,6 +346,7 @@ def register_methods(root_module): register_Ns3Ipv4L4Protocol_methods(root_module, root_module['ns3::Ipv4L4Protocol']) register_Ns3Ipv4MulticastRoute_methods(root_module, root_module['ns3::Ipv4MulticastRoute']) register_Ns3Ipv4RawSocketFactory_methods(root_module, root_module['ns3::Ipv4RawSocketFactory']) + register_Ns3Ipv4RawSocketImpl_methods(root_module, root_module['ns3::Ipv4RawSocketImpl']) register_Ns3Ipv4Route_methods(root_module, root_module['ns3::Ipv4Route']) register_Ns3Ipv4RoutingProtocol_methods(root_module, root_module['ns3::Ipv4RoutingProtocol']) register_Ns3Ipv6_methods(root_module, root_module['ns3::Ipv6']) @@ -3332,6 +3335,11 @@ def register_Ns3Ipv4_methods(root_module, cls): 'ns3::TypeId', [], is_static=True) + ## ipv4.h: void ns3::Ipv4::Insert(ns3::Ptr protocol) [member function] + cls.add_method('Insert', + 'void', + [param('ns3::Ptr< ns3::Ipv4L4Protocol >', 'protocol')], + is_pure_virtual=True, is_virtual=True) ## ipv4.h: bool ns3::Ipv4::IsDestinationAddress(ns3::Ipv4Address address, uint32_t iif) const [member function] cls.add_method('IsDestinationAddress', 'bool', @@ -3357,6 +3365,11 @@ def register_Ns3Ipv4_methods(root_module, cls): 'ns3::Ipv4Address', [param('ns3::Ptr< ns3::NetDevice const >', 'device'), param('ns3::Ipv4Address', 'dst'), param('ns3::Ipv4InterfaceAddress::InterfaceAddressScope_e', 'scope')], is_pure_virtual=True, is_virtual=True) + ## ipv4.h: void ns3::Ipv4::Send(ns3::Ptr packet, ns3::Ipv4Address source, ns3::Ipv4Address destination, uint8_t protocol, ns3::Ptr route) [member function] + cls.add_method('Send', + 'void', + [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Ipv4Address', 'source'), param('ns3::Ipv4Address', 'destination'), param('uint8_t', 'protocol'), param('ns3::Ptr< ns3::Ipv4Route >', 'route')], + is_pure_virtual=True, is_virtual=True) ## ipv4.h: void ns3::Ipv4::SetDown(uint32_t interface) [member function] cls.add_method('SetDown', 'void', @@ -3538,7 +3551,8 @@ def register_Ns3Ipv4L3Protocol_methods(root_module, cls): ## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::Insert(ns3::Ptr protocol) [member function] cls.add_method('Insert', 'void', - [param('ns3::Ptr< ns3::Ipv4L4Protocol >', 'protocol')]) + [param('ns3::Ptr< ns3::Ipv4L4Protocol >', 'protocol')], + is_virtual=True) ## ipv4-l3-protocol.h: ns3::Ptr ns3::Ipv4L3Protocol::GetProtocol(int protocolNumber) const [member function] cls.add_method('GetProtocol', 'ns3::Ptr< ns3::Ipv4L4Protocol >', @@ -3559,7 +3573,8 @@ def register_Ns3Ipv4L3Protocol_methods(root_module, cls): ## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::Send(ns3::Ptr packet, ns3::Ipv4Address source, ns3::Ipv4Address destination, uint8_t protocol, ns3::Ptr route) [member function] cls.add_method('Send', 'void', - [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Ipv4Address', 'source'), param('ns3::Ipv4Address', 'destination'), param('uint8_t', 'protocol'), param('ns3::Ptr< ns3::Ipv4Route >', 'route')]) + [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Ipv4Address', 'source'), param('ns3::Ipv4Address', 'destination'), param('uint8_t', 'protocol'), param('ns3::Ptr< ns3::Ipv4Route >', 'route')], + is_virtual=True) ## ipv4-l3-protocol.h: void ns3::Ipv4L3Protocol::SendWithHeader(ns3::Ptr packet, ns3::Ipv4Header ipHeader, ns3::Ptr route) [member function] cls.add_method('SendWithHeader', 'void', @@ -3797,6 +3812,130 @@ def register_Ns3Ipv4RawSocketFactory_methods(root_module, cls): is_static=True) return +def register_Ns3Ipv4RawSocketImpl_methods(root_module, cls): + ## ipv4-raw-socket-impl.h: ns3::Ipv4RawSocketImpl::Ipv4RawSocketImpl(ns3::Ipv4RawSocketImpl const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv4RawSocketImpl const &', 'arg0')]) + ## ipv4-raw-socket-impl.h: ns3::Ipv4RawSocketImpl::Ipv4RawSocketImpl() [constructor] + cls.add_constructor([]) + ## ipv4-raw-socket-impl.h: int ns3::Ipv4RawSocketImpl::Bind(ns3::Address const & address) [member function] + cls.add_method('Bind', + 'int', + [param('ns3::Address const &', 'address')], + is_virtual=True) + ## ipv4-raw-socket-impl.h: int ns3::Ipv4RawSocketImpl::Bind() [member function] + cls.add_method('Bind', + 'int', + [], + is_virtual=True) + ## ipv4-raw-socket-impl.h: int ns3::Ipv4RawSocketImpl::Close() [member function] + cls.add_method('Close', + 'int', + [], + is_virtual=True) + ## ipv4-raw-socket-impl.h: int ns3::Ipv4RawSocketImpl::Connect(ns3::Address const & address) [member function] + cls.add_method('Connect', + 'int', + [param('ns3::Address const &', 'address')], + is_virtual=True) + ## ipv4-raw-socket-impl.h: bool ns3::Ipv4RawSocketImpl::ForwardUp(ns3::Ptr p, ns3::Ipv4Header ipHeader, ns3::Ptr incomingInterface) [member function] + cls.add_method('ForwardUp', + 'bool', + [param('ns3::Ptr< ns3::Packet const >', 'p'), param('ns3::Ipv4Header', 'ipHeader'), param('ns3::Ptr< ns3::Ipv4Interface >', 'incomingInterface')]) + ## ipv4-raw-socket-impl.h: bool ns3::Ipv4RawSocketImpl::GetAllowBroadcast() const [member function] + cls.add_method('GetAllowBroadcast', + 'bool', + [], + is_const=True, is_virtual=True) + ## ipv4-raw-socket-impl.h: ns3::Socket::SocketErrno ns3::Ipv4RawSocketImpl::GetErrno() const [member function] + cls.add_method('GetErrno', + 'ns3::Socket::SocketErrno', + [], + is_const=True, is_virtual=True) + ## ipv4-raw-socket-impl.h: ns3::Ptr ns3::Ipv4RawSocketImpl::GetNode() const [member function] + cls.add_method('GetNode', + 'ns3::Ptr< ns3::Node >', + [], + is_const=True, is_virtual=True) + ## ipv4-raw-socket-impl.h: uint32_t ns3::Ipv4RawSocketImpl::GetRxAvailable() const [member function] + cls.add_method('GetRxAvailable', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## ipv4-raw-socket-impl.h: int ns3::Ipv4RawSocketImpl::GetSockName(ns3::Address & address) const [member function] + cls.add_method('GetSockName', + 'int', + [param('ns3::Address &', 'address')], + is_const=True, is_virtual=True) + ## ipv4-raw-socket-impl.h: ns3::Socket::SocketType ns3::Ipv4RawSocketImpl::GetSocketType() const [member function] + cls.add_method('GetSocketType', + 'ns3::Socket::SocketType', + [], + is_const=True, is_virtual=True) + ## ipv4-raw-socket-impl.h: uint32_t ns3::Ipv4RawSocketImpl::GetTxAvailable() const [member function] + cls.add_method('GetTxAvailable', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## ipv4-raw-socket-impl.h: static ns3::TypeId ns3::Ipv4RawSocketImpl::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## ipv4-raw-socket-impl.h: int ns3::Ipv4RawSocketImpl::Listen() [member function] + cls.add_method('Listen', + 'int', + [], + is_virtual=True) + ## ipv4-raw-socket-impl.h: ns3::Ptr ns3::Ipv4RawSocketImpl::Recv(uint32_t maxSize, uint32_t flags) [member function] + cls.add_method('Recv', + 'ns3::Ptr< ns3::Packet >', + [param('uint32_t', 'maxSize'), param('uint32_t', 'flags')], + is_virtual=True) + ## ipv4-raw-socket-impl.h: ns3::Ptr ns3::Ipv4RawSocketImpl::RecvFrom(uint32_t maxSize, uint32_t flags, ns3::Address & fromAddress) [member function] + cls.add_method('RecvFrom', + 'ns3::Ptr< ns3::Packet >', + [param('uint32_t', 'maxSize'), param('uint32_t', 'flags'), param('ns3::Address &', 'fromAddress')], + is_virtual=True) + ## ipv4-raw-socket-impl.h: int ns3::Ipv4RawSocketImpl::Send(ns3::Ptr p, uint32_t flags) [member function] + cls.add_method('Send', + 'int', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('uint32_t', 'flags')], + is_virtual=True) + ## ipv4-raw-socket-impl.h: int ns3::Ipv4RawSocketImpl::SendTo(ns3::Ptr p, uint32_t flags, ns3::Address const & toAddress) [member function] + cls.add_method('SendTo', + 'int', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('uint32_t', 'flags'), param('ns3::Address const &', 'toAddress')], + is_virtual=True) + ## ipv4-raw-socket-impl.h: bool ns3::Ipv4RawSocketImpl::SetAllowBroadcast(bool allowBroadcast) [member function] + cls.add_method('SetAllowBroadcast', + 'bool', + [param('bool', 'allowBroadcast')], + is_virtual=True) + ## ipv4-raw-socket-impl.h: void ns3::Ipv4RawSocketImpl::SetNode(ns3::Ptr node) [member function] + cls.add_method('SetNode', + 'void', + [param('ns3::Ptr< ns3::Node >', 'node')]) + ## ipv4-raw-socket-impl.h: void ns3::Ipv4RawSocketImpl::SetProtocol(uint16_t protocol) [member function] + cls.add_method('SetProtocol', + 'void', + [param('uint16_t', 'protocol')]) + ## ipv4-raw-socket-impl.h: int ns3::Ipv4RawSocketImpl::ShutdownRecv() [member function] + cls.add_method('ShutdownRecv', + 'int', + [], + is_virtual=True) + ## ipv4-raw-socket-impl.h: int ns3::Ipv4RawSocketImpl::ShutdownSend() [member function] + cls.add_method('ShutdownSend', + 'int', + [], + is_virtual=True) + ## ipv4-raw-socket-impl.h: void ns3::Ipv4RawSocketImpl::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='private', is_virtual=True) + return + def register_Ns3Ipv4Route_methods(root_module, cls): cls.add_output_stream_operator() ## ipv4-route.h: ns3::Ipv4Route::Ipv4Route(ns3::Ipv4Route const & arg0) [copy constructor] diff --git a/bindings/python/apidefs/gcc-ILP32/ns3_module_network.py b/bindings/python/apidefs/gcc-ILP32/ns3_module_network.py index 0288870d9..c6525f097 100644 --- a/bindings/python/apidefs/gcc-ILP32/ns3_module_network.py +++ b/bindings/python/apidefs/gcc-ILP32/ns3_module_network.py @@ -244,12 +244,12 @@ def register_types(module): typehandlers.add_type_alias('ns3::SequenceNumber< unsigned int, int >', 'ns3::SequenceNumber32') typehandlers.add_type_alias('ns3::SequenceNumber< unsigned int, int >*', 'ns3::SequenceNumber32*') typehandlers.add_type_alias('ns3::SequenceNumber< unsigned int, int >&', 'ns3::SequenceNumber32&') - typehandlers.add_type_alias('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ns3::PhyMacRxEndErrorCallback') - typehandlers.add_type_alias('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >*', 'ns3::PhyMacRxEndErrorCallback*') - typehandlers.add_type_alias('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >&', 'ns3::PhyMacRxEndErrorCallback&') typehandlers.add_type_alias('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ns3::PhyMacTxEndCallback') typehandlers.add_type_alias('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >*', 'ns3::PhyMacTxEndCallback*') typehandlers.add_type_alias('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >&', 'ns3::PhyMacTxEndCallback&') + typehandlers.add_type_alias('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ns3::PhyMacRxEndErrorCallback') + typehandlers.add_type_alias('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >*', 'ns3::PhyMacRxEndErrorCallback*') + typehandlers.add_type_alias('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >&', 'ns3::PhyMacRxEndErrorCallback&') typehandlers.add_type_alias('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ns3::PhyMacRxEndOkCallback') typehandlers.add_type_alias('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >*', 'ns3::PhyMacRxEndOkCallback*') typehandlers.add_type_alias('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >&', 'ns3::PhyMacRxEndOkCallback&') diff --git a/bindings/python/apidefs/gcc-ILP32/ns3_module_spectrum.py b/bindings/python/apidefs/gcc-ILP32/ns3_module_spectrum.py index fc5607a51..6a88b4b14 100644 --- a/bindings/python/apidefs/gcc-ILP32/ns3_module_spectrum.py +++ b/bindings/python/apidefs/gcc-ILP32/ns3_module_spectrum.py @@ -86,15 +86,15 @@ def register_types(module): typehandlers.add_type_alias('std::map< unsigned int, ns3::TxSpectrumModelInfo, std::less< unsigned int >, std::allocator< std::pair< unsigned int const, ns3::TxSpectrumModelInfo > > >', 'ns3::TxSpectrumModelInfoMap_t') typehandlers.add_type_alias('std::map< unsigned int, ns3::TxSpectrumModelInfo, std::less< unsigned int >, std::allocator< std::pair< unsigned int const, ns3::TxSpectrumModelInfo > > >*', 'ns3::TxSpectrumModelInfoMap_t*') typehandlers.add_type_alias('std::map< unsigned int, ns3::TxSpectrumModelInfo, std::less< unsigned int >, std::allocator< std::pair< unsigned int const, ns3::TxSpectrumModelInfo > > >&', 'ns3::TxSpectrumModelInfoMap_t&') + typehandlers.add_type_alias('std::vector< ns3::BandInfo, std::allocator< ns3::BandInfo > >', 'ns3::Bands') + typehandlers.add_type_alias('std::vector< ns3::BandInfo, std::allocator< ns3::BandInfo > >*', 'ns3::Bands*') + typehandlers.add_type_alias('std::vector< ns3::BandInfo, std::allocator< ns3::BandInfo > >&', 'ns3::Bands&') typehandlers.add_type_alias('std::map< unsigned int, ns3::RxSpectrumModelInfo, std::less< unsigned int >, std::allocator< std::pair< unsigned int const, ns3::RxSpectrumModelInfo > > >', 'ns3::RxSpectrumModelInfoMap_t') typehandlers.add_type_alias('std::map< unsigned int, ns3::RxSpectrumModelInfo, std::less< unsigned int >, std::allocator< std::pair< unsigned int const, ns3::RxSpectrumModelInfo > > >*', 'ns3::RxSpectrumModelInfoMap_t*') typehandlers.add_type_alias('std::map< unsigned int, ns3::RxSpectrumModelInfo, std::less< unsigned int >, std::allocator< std::pair< unsigned int const, ns3::RxSpectrumModelInfo > > >&', 'ns3::RxSpectrumModelInfoMap_t&') typehandlers.add_type_alias('uint32_t', 'ns3::SpectrumModelUid_t') typehandlers.add_type_alias('uint32_t*', 'ns3::SpectrumModelUid_t*') typehandlers.add_type_alias('uint32_t&', 'ns3::SpectrumModelUid_t&') - typehandlers.add_type_alias('std::vector< ns3::BandInfo, std::allocator< ns3::BandInfo > >', 'ns3::Bands') - typehandlers.add_type_alias('std::vector< ns3::BandInfo, std::allocator< ns3::BandInfo > >*', 'ns3::Bands*') - typehandlers.add_type_alias('std::vector< ns3::BandInfo, std::allocator< ns3::BandInfo > >&', 'ns3::Bands&') ## Register a nested module for the namespace Config diff --git a/bindings/python/apidefs/gcc-ILP32/ns3_module_wifi.py b/bindings/python/apidefs/gcc-ILP32/ns3_module_wifi.py index 6f291da57..202d8a026 100644 --- a/bindings/python/apidefs/gcc-ILP32/ns3_module_wifi.py +++ b/bindings/python/apidefs/gcc-ILP32/ns3_module_wifi.py @@ -9,14 +9,14 @@ def register_types(module): module.add_enum('WifiPreamble', ['WIFI_PREAMBLE_LONG', 'WIFI_PREAMBLE_SHORT']) ## wifi-mode.h: ns3::WifiModulationClass [enumeration] module.add_enum('WifiModulationClass', ['WIFI_MOD_CLASS_UNKNOWN', 'WIFI_MOD_CLASS_IR', 'WIFI_MOD_CLASS_FHSS', 'WIFI_MOD_CLASS_DSSS', 'WIFI_MOD_CLASS_ERP_PBCC', 'WIFI_MOD_CLASS_DSSS_OFDM', 'WIFI_MOD_CLASS_ERP_OFDM', 'WIFI_MOD_CLASS_OFDM', 'WIFI_MOD_CLASS_HT']) - ## wifi-phy-standard.h: ns3::WifiPhyStandard [enumeration] - module.add_enum('WifiPhyStandard', ['WIFI_PHY_STANDARD_80211a', 'WIFI_PHY_STANDARD_80211b', 'WIFI_PHY_STANDARD_80211g', 'WIFI_PHY_STANDARD_80211_10Mhz', 'WIFI_PHY_STANDARD_80211_5Mhz', 'WIFI_PHY_STANDARD_holland', 'WIFI_PHY_STANDARD_80211p_CCH', 'WIFI_PHY_STANDARD_80211p_SCH']) ## qos-utils.h: ns3::AcIndex [enumeration] module.add_enum('AcIndex', ['AC_BE', 'AC_BK', 'AC_VI', 'AC_VO', 'AC_BE_NQOS', 'AC_UNDEF']) ## ctrl-headers.h: ns3::BlockAckType [enumeration] module.add_enum('BlockAckType', ['BASIC_BLOCK_ACK', 'COMPRESSED_BLOCK_ACK', 'MULTI_TID_BLOCK_ACK']) ## qos-tag.h: ns3::UserPriority [enumeration] module.add_enum('UserPriority', ['UP_BK', 'UP_BE', 'UP_EE', 'UP_CL', 'UP_VI', 'UP_VO', 'UP_NC']) + ## wifi-phy-standard.h: ns3::WifiPhyStandard [enumeration] + module.add_enum('WifiPhyStandard', ['WIFI_PHY_STANDARD_80211a', 'WIFI_PHY_STANDARD_80211b', 'WIFI_PHY_STANDARD_80211g', 'WIFI_PHY_STANDARD_80211_10Mhz', 'WIFI_PHY_STANDARD_80211_5Mhz', 'WIFI_PHY_STANDARD_holland', 'WIFI_PHY_STANDARD_80211p_CCH', 'WIFI_PHY_STANDARD_80211p_SCH']) ## wifi-mode.h: ns3::WifiCodeRate [enumeration] module.add_enum('WifiCodeRate', ['WIFI_CODE_RATE_UNDEFINED', 'WIFI_CODE_RATE_3_4', 'WIFI_CODE_RATE_2_3', 'WIFI_CODE_RATE_1_2']) ## edca-txop-n.h: ns3::TypeOfStation [enumeration] @@ -204,9 +204,6 @@ def register_types(module): ## dca-txop.h: ns3::DcaTxop [class] module.add_class('DcaTxop', parent=root_module['ns3::Dcf']) module.add_container('ns3::WifiModeList', 'ns3::WifiMode', container_type='vector') - typehandlers.add_type_alias('std::vector< ns3::WifiMode, std::allocator< ns3::WifiMode > >', 'ns3::WifiModeList') - typehandlers.add_type_alias('std::vector< ns3::WifiMode, std::allocator< ns3::WifiMode > >*', 'ns3::WifiModeList*') - typehandlers.add_type_alias('std::vector< ns3::WifiMode, std::allocator< ns3::WifiMode > >&', 'ns3::WifiModeList&') typehandlers.add_type_alias('uint8_t', 'ns3::WifiInformationElementId') typehandlers.add_type_alias('uint8_t*', 'ns3::WifiInformationElementId*') typehandlers.add_type_alias('uint8_t&', 'ns3::WifiInformationElementId&') @@ -216,6 +213,9 @@ def register_types(module): typehandlers.add_type_alias('std::vector< ns3::RateInfo, std::allocator< ns3::RateInfo > >', 'ns3::MinstrelRate') typehandlers.add_type_alias('std::vector< ns3::RateInfo, std::allocator< ns3::RateInfo > >*', 'ns3::MinstrelRate*') typehandlers.add_type_alias('std::vector< ns3::RateInfo, std::allocator< ns3::RateInfo > >&', 'ns3::MinstrelRate&') + typehandlers.add_type_alias('std::vector< ns3::WifiMode, std::allocator< ns3::WifiMode > >', 'ns3::WifiModeList') + typehandlers.add_type_alias('std::vector< ns3::WifiMode, std::allocator< ns3::WifiMode > >*', 'ns3::WifiModeList*') + typehandlers.add_type_alias('std::vector< ns3::WifiMode, std::allocator< ns3::WifiMode > >&', 'ns3::WifiModeList&') typehandlers.add_type_alias('std::vector< std::vector< unsigned int, std::allocator< unsigned int > >, std::allocator< std::vector< unsigned int, std::allocator< unsigned int > > > >', 'ns3::SampleRate') typehandlers.add_type_alias('std::vector< std::vector< unsigned int, std::allocator< unsigned int > >, std::allocator< std::vector< unsigned int, std::allocator< unsigned int > > > >*', 'ns3::SampleRate*') typehandlers.add_type_alias('std::vector< std::vector< unsigned int, std::allocator< unsigned int > >, std::allocator< std::vector< unsigned int, std::allocator< unsigned int > > > >&', 'ns3::SampleRate&') diff --git a/bindings/python/apidefs/gcc-ILP32/ns3modulegen_generated.py b/bindings/python/apidefs/gcc-ILP32/ns3modulegen_generated.py index 8cfd52583..856825b3d 100644 --- a/bindings/python/apidefs/gcc-ILP32/ns3modulegen_generated.py +++ b/bindings/python/apidefs/gcc-ILP32/ns3modulegen_generated.py @@ -36,6 +36,7 @@ import ns3_module_virtual_net_device import ns3_module_wifi import ns3_module_wimax import ns3_module_aodv +import ns3_module_click import ns3_module_flow_monitor import ns3_module_nix_vector_routing import ns3_module_ping6 @@ -327,6 +328,17 @@ def register_types(module): ns3_module_aodv__local.register_types(module) root_module.end_section('ns3_module_aodv') + root_module.begin_section('ns3_module_click') + ns3_module_click.register_types(module) + + try: + import ns3_module_click__local + except ImportError: + pass + else: + ns3_module_click__local.register_types(module) + + root_module.end_section('ns3_module_click') root_module.begin_section('ns3_module_flow_monitor') ns3_module_flow_monitor.register_types(module) @@ -912,6 +924,17 @@ def register_methods(root_module): ns3_module_aodv__local.register_methods(root_module) root_module.end_section('ns3_module_aodv') + root_module.begin_section('ns3_module_click') + ns3_module_click.register_methods(root_module) + + try: + import ns3_module_click__local + except ImportError: + pass + else: + ns3_module_click__local.register_methods(root_module) + + root_module.end_section('ns3_module_click') root_module.begin_section('ns3_module_flow_monitor') ns3_module_flow_monitor.register_methods(root_module) @@ -1389,6 +1412,17 @@ def register_functions(root_module): ns3_module_aodv__local.register_functions(root_module) root_module.end_section('ns3_module_aodv') + root_module.begin_section('ns3_module_click') + ns3_module_click.register_functions(root_module) + + try: + import ns3_module_click__local + except ImportError: + pass + else: + ns3_module_click__local.register_functions(root_module) + + root_module.end_section('ns3_module_click') root_module.begin_section('ns3_module_flow_monitor') ns3_module_flow_monitor.register_functions(root_module) diff --git a/src/internet-stack/ipv4.h b/src/internet-stack/ipv4.h index 2ad16a228..549c88727 100644 --- a/src/internet-stack/ipv4.h +++ b/src/internet-stack/ipv4.h @@ -24,7 +24,9 @@ #include "ns3/object.h" #include "ns3/socket.h" #include "ns3/callback.h" +#include "ns3/ipv4-l4-protocol.h" #include "ns3/ipv4-address.h" +#include "ipv4-route.h" #include "ipv4-interface-address.h" namespace ns3 { @@ -128,6 +130,27 @@ public: */ virtual int32_t GetInterfaceForAddress (Ipv4Address address) const = 0; + /** + * \param packet packet to send + * \param source source address of packet + * \param destination address of packet + * \param protocol number of packet + * \param route route entry + * + * Higher-level layers call this method to send a packet + * down the stack to the MAC and PHY layers. + */ + virtual void Send (Ptr packet, Ipv4Address source, + Ipv4Address destination, uint8_t protocol, Ptr route) = 0; + + /** + * \param protocol a pointer to the protocol to add to this L4 Demux. + * + * Adds a protocol to an internal list of L4 protocols. + * + */ + virtual void Insert(Ptr protocol) = 0; + /** * \brief Determine whether address and interface corresponding to * received packet can be accepted for local delivery diff --git a/src/internet-stack/tcp-l4-protocol.cc b/src/internet-stack/tcp-l4-protocol.cc index c8664c9a2..47c1fb689 100644 --- a/src/internet-stack/tcp-l4-protocol.cc +++ b/src/internet-stack/tcp-l4-protocol.cc @@ -112,7 +112,7 @@ TcpL4Protocol::NotifyNewAggregate () Ptr node = this->GetObject (); if (node != 0) { - Ptr ipv4 = this->GetObject (); + Ptr ipv4 = this->GetObject (); if (ipv4 != 0) { this->SetNode (node); @@ -120,7 +120,7 @@ TcpL4Protocol::NotifyNewAggregate () Ptr tcpFactory = CreateObject (); tcpFactory->SetTcp (this); node->AggregateObject (tcpFactory); - this->SetDownTarget (MakeCallback(&Ipv4L3Protocol::Send, ipv4)); + this->SetDownTarget (MakeCallback(&Ipv4::Send, ipv4)); } } } @@ -320,8 +320,7 @@ TcpL4Protocol::Send (Ptr packet, packet->AddHeader (tcpHeader); - Ptr ipv4 = - m_node->GetObject (); + Ptr ipv4 = m_node->GetObject (); if (ipv4 != 0) { Ipv4Header header; @@ -366,8 +365,8 @@ TcpL4Protocol::SendPacket (Ptr packet, const TcpHeader &outgoing, packet->AddHeader (outgoingHeader); - Ptr ipv4 = - m_node->GetObject (); + Ptr ipv4 = + m_node->GetObject (); if (ipv4 != 0) { Ipv4Header header; diff --git a/src/internet-stack/udp-l4-protocol.cc b/src/internet-stack/udp-l4-protocol.cc index 0066495b6..0723a2e19 100644 --- a/src/internet-stack/udp-l4-protocol.cc +++ b/src/internet-stack/udp-l4-protocol.cc @@ -87,7 +87,7 @@ UdpL4Protocol::NotifyNewAggregate () Ptr node = this->GetObject (); if (node != 0) { - Ptr ipv4 = this->GetObject (); + Ptr ipv4 = this->GetObject (); if (ipv4 != 0) { this->SetNode (node); @@ -95,7 +95,7 @@ UdpL4Protocol::NotifyNewAggregate () Ptr udpFactory = CreateObject (); udpFactory->SetUdp (this); node->AggregateObject (udpFactory); - this->SetDownTarget (MakeCallback(&Ipv4L3Protocol::Send, ipv4)); + this->SetDownTarget (MakeCallback(&Ipv4::Send, ipv4)); } } } diff --git a/src/internet-stack/wscript b/src/internet-stack/wscript index 9a00677ff..f0c918cb3 100644 --- a/src/internet-stack/wscript +++ b/src/internet-stack/wscript @@ -184,6 +184,7 @@ def build(bld): 'tcp-l4-protocol.h', 'icmpv4-l4-protocol.h', 'ipv4-l4-protocol.h', + 'ipv4-raw-socket-impl.h', 'arp-header.h', 'arp-cache.h', 'icmpv6-l4-protocol.h', diff --git a/src/wscript b/src/wscript index 550c78ef4..957e95b6d 100644 --- a/src/wscript +++ b/src/wscript @@ -40,6 +40,7 @@ all_modules = ( 'routing/list-routing', 'routing/aodv', 'routing/dsdv', + 'routing/click', 'mobility', 'devices/wifi', 'helper', @@ -69,6 +70,7 @@ all_modules = ( def set_options(opt): opt.sub_options('core') + opt.sub_options('routing/click') opt.add_option('--enable-rpath', help=("Link programs with rpath" @@ -89,6 +91,7 @@ def configure(conf): conf.sub_config('internet-stack') conf.sub_config('helper') conf.sub_config('test') + conf.sub_config('routing/click') blddir = os.path.abspath(os.path.join(conf.blddir, conf.env.variant())) conf.env.append_value('NS3_MODULE_PATH', blddir) diff --git a/test.py b/test.py index 4a933eeed..f1961c3d2 100755 --- a/test.py +++ b/test.py @@ -46,11 +46,13 @@ interesting_config_items = [ "ENABLE_REAL_TIME", "ENABLE_EXAMPLES", "ENABLE_PYTHON_BINDINGS", + "ENABLE_CLICK", ] NSC_ENABLED = False ENABLE_REAL_TIME = False ENABLE_EXAMPLES = True +ENABLE_CLICK = False # # If the user has constrained us to run certain kinds of tests, we can tell waf @@ -177,6 +179,8 @@ example_tests = [ ("examples/wireless/wifi-simple-interference", "True", "True"), ("examples/wireless/wifi-wired-bridging", "True", "True"), + ("src/routing/click/examples/nsclick-simple-lan", "ENABLE_CLICK == True", "True"), + ("examples/wimax/wimax-simple", "True", "True"), ("examples/wimax/wimax-ipv4", "True", "True"), ("examples/wimax/wimax-multicast", "True", "True"),