diff --git a/RELEASE_NOTES b/RELEASE_NOTES index dbad6ae3f..82103acf0 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -29,6 +29,7 @@ Bugs fixed - Bug 1736 - default dot11EDCATableMSDULifetime - Bug 1929 - TcpL4Protocol::Send must indicate the source address to routing (if known) - Bug 2108 - Erroneous implementation in InterferenceHelper +- Bug 2124 - UdpSocketImpl::ShutdownRecv doesn't stop the Ipv[4,6]EndPointDemux - Bug 2126 - LrWpanNetDevice silently accepts no mobility on the node - Bug 2130 - Allow SimpleChannel to simulate hidden terminals. - Bug 2135 - TCP doesn't honor the socket's output interface diff --git a/src/internet/bindings/callbacks_list.py b/src/internet/bindings/callbacks_list.py index 66ecb312f..e79862acf 100644 --- a/src/internet/bindings/callbacks_list.py +++ b/src/internet/bindings/callbacks_list.py @@ -1,8 +1,6 @@ callback_classes = [ ['void', 'ns3::Ipv6Address', 'unsigned char', 'unsigned char', 'unsigned char', 'unsigned int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::Ipv4Address', 'unsigned char', 'unsigned char', 'unsigned char', 'unsigned int', '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::Ipv4Header', 'unsigned short', 'ns3::Ptr', '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::Ptr', 'unsigned int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::Ptr', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], diff --git a/src/internet/bindings/modulegen__gcc_ILP32.py b/src/internet/bindings/modulegen__gcc_ILP32.py index 85fdfa92d..08db52f82 100644 --- a/src/internet/bindings/modulegen__gcc_ILP32.py +++ b/src/internet/bindings/modulegen__gcc_ILP32.py @@ -120,8 +120,6 @@ def register_types(module): module.add_class('Ipv4AddressGenerator') ## ipv4-address-helper.h (module 'internet'): ns3::Ipv4AddressHelper [class] module.add_class('Ipv4AddressHelper') - ## ipv4-end-point.h (module 'internet'): ns3::Ipv4EndPoint [class] - module.add_class('Ipv4EndPoint') ## ipv4-interface-address.h (module 'internet'): ns3::Ipv4InterfaceAddress [class] module.add_class('Ipv4InterfaceAddress') ## ipv4-interface-address.h (module 'internet'): ns3::Ipv4InterfaceAddress::InterfaceAddressScope_e [enumeration] @@ -847,7 +845,6 @@ def register_methods(root_module): register_Ns3Ipv4Address_methods(root_module, root_module['ns3::Ipv4Address']) register_Ns3Ipv4AddressGenerator_methods(root_module, root_module['ns3::Ipv4AddressGenerator']) register_Ns3Ipv4AddressHelper_methods(root_module, root_module['ns3::Ipv4AddressHelper']) - register_Ns3Ipv4EndPoint_methods(root_module, root_module['ns3::Ipv4EndPoint']) register_Ns3Ipv4InterfaceAddress_methods(root_module, root_module['ns3::Ipv4InterfaceAddress']) register_Ns3Ipv4InterfaceContainer_methods(root_module, root_module['ns3::Ipv4InterfaceContainer']) register_Ns3Ipv4Mask_methods(root_module, root_module['ns3::Ipv4Mask']) @@ -2515,65 +2512,6 @@ def register_Ns3Ipv4AddressHelper_methods(root_module, cls): [param('ns3::Ipv4Address', 'network'), param('ns3::Ipv4Mask', 'mask'), param('ns3::Ipv4Address', 'base', default_value='"0.0.0.1"')]) return -def register_Ns3Ipv4EndPoint_methods(root_module, cls): - ## ipv4-end-point.h (module 'internet'): ns3::Ipv4EndPoint::Ipv4EndPoint(ns3::Ipv4EndPoint const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Ipv4EndPoint const &', 'arg0')]) - ## ipv4-end-point.h (module 'internet'): ns3::Ipv4EndPoint::Ipv4EndPoint(ns3::Ipv4Address address, uint16_t port) [constructor] - cls.add_constructor([param('ns3::Ipv4Address', 'address'), param('uint16_t', 'port')]) - ## ipv4-end-point.h (module 'internet'): void ns3::Ipv4EndPoint::BindToNetDevice(ns3::Ptr netdevice) [member function] - cls.add_method('BindToNetDevice', - 'void', - [param('ns3::Ptr< ns3::NetDevice >', 'netdevice')]) - ## ipv4-end-point.h (module 'internet'): void ns3::Ipv4EndPoint::ForwardIcmp(ns3::Ipv4Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo) [member function] - cls.add_method('ForwardIcmp', - 'void', - [param('ns3::Ipv4Address', 'icmpSource'), param('uint8_t', 'icmpTtl'), param('uint8_t', 'icmpType'), param('uint8_t', 'icmpCode'), param('uint32_t', 'icmpInfo')]) - ## ipv4-end-point.h (module 'internet'): void ns3::Ipv4EndPoint::ForwardUp(ns3::Ptr p, ns3::Ipv4Header const & header, uint16_t sport, ns3::Ptr incomingInterface) [member function] - cls.add_method('ForwardUp', - 'void', - [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('uint16_t', 'sport'), param('ns3::Ptr< ns3::Ipv4Interface >', 'incomingInterface')]) - ## ipv4-end-point.h (module 'internet'): ns3::Ptr ns3::Ipv4EndPoint::GetBoundNetDevice() [member function] - cls.add_method('GetBoundNetDevice', - 'ns3::Ptr< ns3::NetDevice >', - []) - ## ipv4-end-point.h (module 'internet'): ns3::Ipv4Address ns3::Ipv4EndPoint::GetLocalAddress() [member function] - cls.add_method('GetLocalAddress', - 'ns3::Ipv4Address', - []) - ## ipv4-end-point.h (module 'internet'): uint16_t ns3::Ipv4EndPoint::GetLocalPort() [member function] - cls.add_method('GetLocalPort', - 'uint16_t', - []) - ## ipv4-end-point.h (module 'internet'): ns3::Ipv4Address ns3::Ipv4EndPoint::GetPeerAddress() [member function] - cls.add_method('GetPeerAddress', - 'ns3::Ipv4Address', - []) - ## ipv4-end-point.h (module 'internet'): uint16_t ns3::Ipv4EndPoint::GetPeerPort() [member function] - cls.add_method('GetPeerPort', - 'uint16_t', - []) - ## ipv4-end-point.h (module 'internet'): void ns3::Ipv4EndPoint::SetDestroyCallback(ns3::Callback callback) [member function] - cls.add_method('SetDestroyCallback', - 'void', - [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) - ## ipv4-end-point.h (module 'internet'): void ns3::Ipv4EndPoint::SetIcmpCallback(ns3::Callback callback) [member function] - cls.add_method('SetIcmpCallback', - 'void', - [param('ns3::Callback< void, ns3::Ipv4Address, unsigned char, unsigned char, unsigned char, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) - ## ipv4-end-point.h (module 'internet'): void ns3::Ipv4EndPoint::SetLocalAddress(ns3::Ipv4Address address) [member function] - cls.add_method('SetLocalAddress', - 'void', - [param('ns3::Ipv4Address', 'address')]) - ## ipv4-end-point.h (module 'internet'): void ns3::Ipv4EndPoint::SetPeer(ns3::Ipv4Address address, uint16_t port) [member function] - cls.add_method('SetPeer', - 'void', - [param('ns3::Ipv4Address', 'address'), param('uint16_t', 'port')]) - ## ipv4-end-point.h (module 'internet'): void ns3::Ipv4EndPoint::SetRxCallback(ns3::Callback, ns3::Ipv4Header, unsigned short, ns3::Ptr, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] - cls.add_method('SetRxCallback', - 'void', - [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::Ipv4Header, unsigned short, ns3::Ptr< ns3::Ipv4Interface >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) - return - def register_Ns3Ipv4InterfaceAddress_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_output_stream_operator() @@ -4223,10 +4161,10 @@ def register_Ns3PcapFile_methods(root_module, cls): cls.add_method('Close', 'void', []) - ## pcap-file.h (module 'network'): static bool ns3::PcapFile::Diff(std::string const & f1, std::string const & f2, uint32_t & sec, uint32_t & usec, uint32_t snapLen=ns3::PcapFile::SNAPLEN_DEFAULT) [member function] + ## pcap-file.h (module 'network'): static bool ns3::PcapFile::Diff(std::string const & f1, std::string const & f2, uint32_t & sec, uint32_t & usec, uint32_t & packets, uint32_t snapLen=ns3::PcapFile::SNAPLEN_DEFAULT) [member function] cls.add_method('Diff', 'bool', - [param('std::string const &', 'f1'), param('std::string const &', 'f2'), param('uint32_t &', 'sec'), param('uint32_t &', 'usec'), param('uint32_t', 'snapLen', default_value='ns3::PcapFile::SNAPLEN_DEFAULT')], + [param('std::string const &', 'f1'), param('std::string const &', 'f2'), param('uint32_t &', 'sec'), param('uint32_t &', 'usec'), param('uint32_t &', 'packets'), param('uint32_t', 'snapLen', default_value='ns3::PcapFile::SNAPLEN_DEFAULT')], is_static=True) ## pcap-file.h (module 'network'): bool ns3::PcapFile::Eof() const [member function] cls.add_method('Eof', @@ -14710,7 +14648,7 @@ def register_Ns3NetDevice_methods(root_module, cls): cls.add_constructor([]) ## net-device.h (module 'network'): ns3::NetDevice::NetDevice(ns3::NetDevice const & arg0) [copy constructor] cls.add_constructor([param('ns3::NetDevice const &', 'arg0')]) - ## net-device.h (module 'network'): void ns3::NetDevice::AddLinkChangeCallback(ns3::Callback callback) [member function] + ## net-device.h (module 'network'): void ns3::NetDevice::AddLinkChangeCallback(ns3::Callback callback) [member function] cls.add_method('AddLinkChangeCallback', 'void', [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], @@ -16112,7 +16050,7 @@ def register_Ns3BridgeNetDevice_methods(root_module, cls): cls.add_method('AddBridgePort', 'void', [param('ns3::Ptr< ns3::NetDevice >', 'bridgePort')]) - ## bridge-net-device.h (module 'bridge'): void ns3::BridgeNetDevice::AddLinkChangeCallback(ns3::Callback callback) [member function] + ## bridge-net-device.h (module 'bridge'): void ns3::BridgeNetDevice::AddLinkChangeCallback(ns3::Callback callback) [member function] cls.add_method('AddLinkChangeCallback', 'void', [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], @@ -16905,7 +16843,7 @@ def register_Ns3LoopbackNetDevice_methods(root_module, cls): cls.add_constructor([param('ns3::LoopbackNetDevice const &', 'arg0')]) ## loopback-net-device.h (module 'internet'): ns3::LoopbackNetDevice::LoopbackNetDevice() [constructor] cls.add_constructor([]) - ## loopback-net-device.h (module 'internet'): void ns3::LoopbackNetDevice::AddLinkChangeCallback(ns3::Callback callback) [member function] + ## loopback-net-device.h (module 'internet'): void ns3::LoopbackNetDevice::AddLinkChangeCallback(ns3::Callback callback) [member function] cls.add_method('AddLinkChangeCallback', 'void', [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], diff --git a/src/internet/bindings/modulegen__gcc_LP64.py b/src/internet/bindings/modulegen__gcc_LP64.py index 85fdfa92d..08db52f82 100644 --- a/src/internet/bindings/modulegen__gcc_LP64.py +++ b/src/internet/bindings/modulegen__gcc_LP64.py @@ -120,8 +120,6 @@ def register_types(module): module.add_class('Ipv4AddressGenerator') ## ipv4-address-helper.h (module 'internet'): ns3::Ipv4AddressHelper [class] module.add_class('Ipv4AddressHelper') - ## ipv4-end-point.h (module 'internet'): ns3::Ipv4EndPoint [class] - module.add_class('Ipv4EndPoint') ## ipv4-interface-address.h (module 'internet'): ns3::Ipv4InterfaceAddress [class] module.add_class('Ipv4InterfaceAddress') ## ipv4-interface-address.h (module 'internet'): ns3::Ipv4InterfaceAddress::InterfaceAddressScope_e [enumeration] @@ -847,7 +845,6 @@ def register_methods(root_module): register_Ns3Ipv4Address_methods(root_module, root_module['ns3::Ipv4Address']) register_Ns3Ipv4AddressGenerator_methods(root_module, root_module['ns3::Ipv4AddressGenerator']) register_Ns3Ipv4AddressHelper_methods(root_module, root_module['ns3::Ipv4AddressHelper']) - register_Ns3Ipv4EndPoint_methods(root_module, root_module['ns3::Ipv4EndPoint']) register_Ns3Ipv4InterfaceAddress_methods(root_module, root_module['ns3::Ipv4InterfaceAddress']) register_Ns3Ipv4InterfaceContainer_methods(root_module, root_module['ns3::Ipv4InterfaceContainer']) register_Ns3Ipv4Mask_methods(root_module, root_module['ns3::Ipv4Mask']) @@ -2515,65 +2512,6 @@ def register_Ns3Ipv4AddressHelper_methods(root_module, cls): [param('ns3::Ipv4Address', 'network'), param('ns3::Ipv4Mask', 'mask'), param('ns3::Ipv4Address', 'base', default_value='"0.0.0.1"')]) return -def register_Ns3Ipv4EndPoint_methods(root_module, cls): - ## ipv4-end-point.h (module 'internet'): ns3::Ipv4EndPoint::Ipv4EndPoint(ns3::Ipv4EndPoint const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Ipv4EndPoint const &', 'arg0')]) - ## ipv4-end-point.h (module 'internet'): ns3::Ipv4EndPoint::Ipv4EndPoint(ns3::Ipv4Address address, uint16_t port) [constructor] - cls.add_constructor([param('ns3::Ipv4Address', 'address'), param('uint16_t', 'port')]) - ## ipv4-end-point.h (module 'internet'): void ns3::Ipv4EndPoint::BindToNetDevice(ns3::Ptr netdevice) [member function] - cls.add_method('BindToNetDevice', - 'void', - [param('ns3::Ptr< ns3::NetDevice >', 'netdevice')]) - ## ipv4-end-point.h (module 'internet'): void ns3::Ipv4EndPoint::ForwardIcmp(ns3::Ipv4Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo) [member function] - cls.add_method('ForwardIcmp', - 'void', - [param('ns3::Ipv4Address', 'icmpSource'), param('uint8_t', 'icmpTtl'), param('uint8_t', 'icmpType'), param('uint8_t', 'icmpCode'), param('uint32_t', 'icmpInfo')]) - ## ipv4-end-point.h (module 'internet'): void ns3::Ipv4EndPoint::ForwardUp(ns3::Ptr p, ns3::Ipv4Header const & header, uint16_t sport, ns3::Ptr incomingInterface) [member function] - cls.add_method('ForwardUp', - 'void', - [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('uint16_t', 'sport'), param('ns3::Ptr< ns3::Ipv4Interface >', 'incomingInterface')]) - ## ipv4-end-point.h (module 'internet'): ns3::Ptr ns3::Ipv4EndPoint::GetBoundNetDevice() [member function] - cls.add_method('GetBoundNetDevice', - 'ns3::Ptr< ns3::NetDevice >', - []) - ## ipv4-end-point.h (module 'internet'): ns3::Ipv4Address ns3::Ipv4EndPoint::GetLocalAddress() [member function] - cls.add_method('GetLocalAddress', - 'ns3::Ipv4Address', - []) - ## ipv4-end-point.h (module 'internet'): uint16_t ns3::Ipv4EndPoint::GetLocalPort() [member function] - cls.add_method('GetLocalPort', - 'uint16_t', - []) - ## ipv4-end-point.h (module 'internet'): ns3::Ipv4Address ns3::Ipv4EndPoint::GetPeerAddress() [member function] - cls.add_method('GetPeerAddress', - 'ns3::Ipv4Address', - []) - ## ipv4-end-point.h (module 'internet'): uint16_t ns3::Ipv4EndPoint::GetPeerPort() [member function] - cls.add_method('GetPeerPort', - 'uint16_t', - []) - ## ipv4-end-point.h (module 'internet'): void ns3::Ipv4EndPoint::SetDestroyCallback(ns3::Callback callback) [member function] - cls.add_method('SetDestroyCallback', - 'void', - [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) - ## ipv4-end-point.h (module 'internet'): void ns3::Ipv4EndPoint::SetIcmpCallback(ns3::Callback callback) [member function] - cls.add_method('SetIcmpCallback', - 'void', - [param('ns3::Callback< void, ns3::Ipv4Address, unsigned char, unsigned char, unsigned char, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) - ## ipv4-end-point.h (module 'internet'): void ns3::Ipv4EndPoint::SetLocalAddress(ns3::Ipv4Address address) [member function] - cls.add_method('SetLocalAddress', - 'void', - [param('ns3::Ipv4Address', 'address')]) - ## ipv4-end-point.h (module 'internet'): void ns3::Ipv4EndPoint::SetPeer(ns3::Ipv4Address address, uint16_t port) [member function] - cls.add_method('SetPeer', - 'void', - [param('ns3::Ipv4Address', 'address'), param('uint16_t', 'port')]) - ## ipv4-end-point.h (module 'internet'): void ns3::Ipv4EndPoint::SetRxCallback(ns3::Callback, ns3::Ipv4Header, unsigned short, ns3::Ptr, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function] - cls.add_method('SetRxCallback', - 'void', - [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::Ipv4Header, unsigned short, ns3::Ptr< ns3::Ipv4Interface >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) - return - def register_Ns3Ipv4InterfaceAddress_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_output_stream_operator() @@ -4223,10 +4161,10 @@ def register_Ns3PcapFile_methods(root_module, cls): cls.add_method('Close', 'void', []) - ## pcap-file.h (module 'network'): static bool ns3::PcapFile::Diff(std::string const & f1, std::string const & f2, uint32_t & sec, uint32_t & usec, uint32_t snapLen=ns3::PcapFile::SNAPLEN_DEFAULT) [member function] + ## pcap-file.h (module 'network'): static bool ns3::PcapFile::Diff(std::string const & f1, std::string const & f2, uint32_t & sec, uint32_t & usec, uint32_t & packets, uint32_t snapLen=ns3::PcapFile::SNAPLEN_DEFAULT) [member function] cls.add_method('Diff', 'bool', - [param('std::string const &', 'f1'), param('std::string const &', 'f2'), param('uint32_t &', 'sec'), param('uint32_t &', 'usec'), param('uint32_t', 'snapLen', default_value='ns3::PcapFile::SNAPLEN_DEFAULT')], + [param('std::string const &', 'f1'), param('std::string const &', 'f2'), param('uint32_t &', 'sec'), param('uint32_t &', 'usec'), param('uint32_t &', 'packets'), param('uint32_t', 'snapLen', default_value='ns3::PcapFile::SNAPLEN_DEFAULT')], is_static=True) ## pcap-file.h (module 'network'): bool ns3::PcapFile::Eof() const [member function] cls.add_method('Eof', @@ -14710,7 +14648,7 @@ def register_Ns3NetDevice_methods(root_module, cls): cls.add_constructor([]) ## net-device.h (module 'network'): ns3::NetDevice::NetDevice(ns3::NetDevice const & arg0) [copy constructor] cls.add_constructor([param('ns3::NetDevice const &', 'arg0')]) - ## net-device.h (module 'network'): void ns3::NetDevice::AddLinkChangeCallback(ns3::Callback callback) [member function] + ## net-device.h (module 'network'): void ns3::NetDevice::AddLinkChangeCallback(ns3::Callback callback) [member function] cls.add_method('AddLinkChangeCallback', 'void', [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], @@ -16112,7 +16050,7 @@ def register_Ns3BridgeNetDevice_methods(root_module, cls): cls.add_method('AddBridgePort', 'void', [param('ns3::Ptr< ns3::NetDevice >', 'bridgePort')]) - ## bridge-net-device.h (module 'bridge'): void ns3::BridgeNetDevice::AddLinkChangeCallback(ns3::Callback callback) [member function] + ## bridge-net-device.h (module 'bridge'): void ns3::BridgeNetDevice::AddLinkChangeCallback(ns3::Callback callback) [member function] cls.add_method('AddLinkChangeCallback', 'void', [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], @@ -16905,7 +16843,7 @@ def register_Ns3LoopbackNetDevice_methods(root_module, cls): cls.add_constructor([param('ns3::LoopbackNetDevice const &', 'arg0')]) ## loopback-net-device.h (module 'internet'): ns3::LoopbackNetDevice::LoopbackNetDevice() [constructor] cls.add_constructor([]) - ## loopback-net-device.h (module 'internet'): void ns3::LoopbackNetDevice::AddLinkChangeCallback(ns3::Callback callback) [member function] + ## loopback-net-device.h (module 'internet'): void ns3::LoopbackNetDevice::AddLinkChangeCallback(ns3::Callback callback) [member function] cls.add_method('AddLinkChangeCallback', 'void', [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], diff --git a/src/internet/model/ipv4-end-point-demux.cc b/src/internet/model/ipv4-end-point-demux.cc index 7e06770eb..a150a0797 100644 --- a/src/internet/model/ipv4-end-point-demux.cc +++ b/src/internet/model/ipv4-end-point-demux.cc @@ -207,10 +207,19 @@ Ipv4EndPointDemux::Lookup (Ipv4Address daddr, uint16_t dport, for (EndPointsI i = m_endPoints.begin (); i != m_endPoints.end (); i++) { Ipv4EndPoint* endP = *i; + NS_LOG_DEBUG ("Looking at endpoint dport=" << endP->GetLocalPort () << " daddr=" << endP->GetLocalAddress () << " sport=" << endP->GetPeerPort () << " saddr=" << endP->GetPeerAddress ()); + + if (!endP->IsRxEnabled ()) + { + NS_LOG_LOGIC ("Skipping endpoint " << &endP + << " because endpoint can not receive packets"); + continue; + } + if (endP->GetLocalPort () != dport) { NS_LOG_LOGIC ("Skipping endpoint " << &endP diff --git a/src/internet/model/ipv4-end-point-demux.h b/src/internet/model/ipv4-end-point-demux.h index 7cb0e0d90..8baaaa92c 100644 --- a/src/internet/model/ipv4-end-point-demux.h +++ b/src/internet/model/ipv4-end-point-demux.h @@ -78,6 +78,15 @@ public: /** * \brief lookup for a match with all the parameters. + * + * The function will return a list of most-matching EndPoints, in this order: + * -# Full match + * -# All but local address + * -# Only local port and local address match + * -# Only local port match + * + * EndPoint with disabled Rx are skipped. + * * \param daddr destination address to test * \param dport destination port to test * \param saddr source address to test diff --git a/src/internet/model/ipv4-end-point.cc b/src/internet/model/ipv4-end-point.cc index 3967e5f9b..51c5e2029 100644 --- a/src/internet/model/ipv4-end-point.cc +++ b/src/internet/model/ipv4-end-point.cc @@ -31,10 +31,12 @@ Ipv4EndPoint::Ipv4EndPoint (Ipv4Address address, uint16_t port) : m_localAddr (address), m_localPort (port), m_peerAddr (Ipv4Address::GetAny ()), - m_peerPort (0) + m_peerPort (0), + m_rxEnabled (true) { NS_LOG_FUNCTION (this << address << port); } + Ipv4EndPoint::~Ipv4EndPoint () { NS_LOG_FUNCTION (this); @@ -67,18 +69,21 @@ Ipv4EndPoint::GetLocalPort (void) NS_LOG_FUNCTION (this); return m_localPort; } + Ipv4Address Ipv4EndPoint::GetPeerAddress (void) { NS_LOG_FUNCTION (this); return m_peerAddr; } + uint16_t Ipv4EndPoint::GetPeerPort (void) { NS_LOG_FUNCTION (this); return m_peerPort; } + void Ipv4EndPoint::SetPeer (Ipv4Address address, uint16_t port) { @@ -108,6 +113,7 @@ Ipv4EndPoint::SetRxCallback (Callback, Ipv4Header, uint16_t, Pt NS_LOG_FUNCTION (this << &callback); m_rxCallback = callback; } + void Ipv4EndPoint::SetIcmpCallback (Callback callback) { @@ -134,6 +140,7 @@ Ipv4EndPoint::ForwardUp (Ptr p, const Ipv4Header& header, uint16_t sport incomingInterface); } } + void Ipv4EndPoint::DoForwardUp (Ptr p, const Ipv4Header& header, uint16_t sport, Ptr incomingInterface) @@ -159,6 +166,7 @@ Ipv4EndPoint::ForwardIcmp (Ipv4Address icmpSource, uint8_t icmpTtl, icmpSource, icmpTtl, icmpType, icmpCode, icmpInfo); } } + void Ipv4EndPoint::DoForwardIcmp (Ipv4Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, @@ -172,4 +180,16 @@ Ipv4EndPoint::DoForwardIcmp (Ipv4Address icmpSource, uint8_t icmpTtl, } } +void +Ipv4EndPoint::SetRxEnabled (bool enabled) +{ + m_rxEnabled = enabled; +} + +bool +Ipv4EndPoint::IsRxEnabled () +{ + return m_rxEnabled; +} + } // namespace ns3 diff --git a/src/internet/model/ipv4-end-point.h b/src/internet/model/ipv4-end-point.h index c8dea7ae1..b85788a27 100644 --- a/src/internet/model/ipv4-end-point.h +++ b/src/internet/model/ipv4-end-point.h @@ -168,6 +168,18 @@ public: uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo); + /** + * \brief Enable or Disable the endpoint Rx capability. + * \param enabled true if Rx is enabled + */ + void SetRxEnabled (bool enabled); + + /** + * \brief Checks if the endpoint can receive packets. + * \returns true if the endpoint can receive packets. + */ + bool IsRxEnabled (void); + private: /** * \brief ForwardUp wrapper. @@ -229,6 +241,11 @@ private: * \brief The destroy callback. */ Callback m_destroyCallback; + + /** + * \brief true if the endpoint can receive packets. + */ + bool m_rxEnabled; }; } // namespace ns3 diff --git a/src/internet/model/ipv6-end-point-demux.cc b/src/internet/model/ipv6-end-point-demux.cc index fc75eaf52..d03383313 100644 --- a/src/internet/model/ipv6-end-point-demux.cc +++ b/src/internet/model/ipv6-end-point-demux.cc @@ -182,10 +182,19 @@ Ipv6EndPointDemux::EndPoints Ipv6EndPointDemux::Lookup (Ipv6Address daddr, uint1 for (EndPointsI i = m_endPoints.begin (); i != m_endPoints.end (); i++) { Ipv6EndPoint* endP = *i; + NS_LOG_DEBUG ("Looking at endpoint dport=" << endP->GetLocalPort () << " daddr=" << endP->GetLocalAddress () << " sport=" << endP->GetPeerPort () << " saddr=" << endP->GetPeerAddress ()); + + if (!endP->IsRxEnabled ()) + { + NS_LOG_LOGIC ("Skipping endpoint " << &endP + << " because endpoint can not receive packets"); + continue; + } + if (endP->GetLocalPort () != dport) { NS_LOG_LOGIC ("Skipping endpoint " << &endP diff --git a/src/internet/model/ipv6-end-point-demux.h b/src/internet/model/ipv6-end-point-demux.h index 1320a153f..987485446 100644 --- a/src/internet/model/ipv6-end-point-demux.h +++ b/src/internet/model/ipv6-end-point-demux.h @@ -67,6 +67,15 @@ public: /** * \brief lookup for a match with all the parameters. + * + * The function will return a list of most-matching EndPoints, in this order: + * -# Full match + * -# All but local address + * -# Only local port and local address match + * -# Only local port match + * + * EndPoint with disabled Rx are skipped. + * * \param dst destination address to test * \param dport destination port to test * \param src source address to test diff --git a/src/internet/model/ipv6-end-point.cc b/src/internet/model/ipv6-end-point.cc index 374b80925..862816469 100644 --- a/src/internet/model/ipv6-end-point.cc +++ b/src/internet/model/ipv6-end-point.cc @@ -33,7 +33,8 @@ Ipv6EndPoint::Ipv6EndPoint (Ipv6Address addr, uint16_t port) : m_localAddr (addr), m_localPort (port), m_peerAddr (Ipv6Address::GetAny ()), - m_peerPort (0) + m_peerPort (0), + m_rxEnabled (true) { } @@ -140,5 +141,16 @@ void Ipv6EndPoint::DoForwardIcmp (Ipv6Address src, uint8_t ttl, uint8_t type, m_icmpCallback (src, ttl, type, code, info); } +void Ipv6EndPoint::SetRxEnabled (bool enabled) +{ + m_rxEnabled = enabled; +} + +bool Ipv6EndPoint::IsRxEnabled () +{ + return m_rxEnabled; +} + + } /* namespace ns3 */ diff --git a/src/internet/model/ipv6-end-point.h b/src/internet/model/ipv6-end-point.h index 2a3bd6870..5c10fe28d 100644 --- a/src/internet/model/ipv6-end-point.h +++ b/src/internet/model/ipv6-end-point.h @@ -177,6 +177,18 @@ public: void ForwardIcmp (Ipv6Address src, uint8_t ttl, uint8_t type, uint8_t code, uint32_t info); + /** + * \brief Enable or Disable the endpoint Rx capability. + * \param enabled true if Rx is enabled + */ + void SetRxEnabled (bool enabled); + + /** + * \brief Checks if the endpoint can receive packets. + * \returns true if the endpoint can receive packets. + */ + bool IsRxEnabled (void); + private: /** * \brief ForwardUp wrapper. @@ -237,6 +249,11 @@ private: * \brief The destroy callback. */ Callback m_destroyCallback; + + /** + * \brief true if the endpoint can receive packets. + */ + bool m_rxEnabled; }; } /* namespace ns3 */ diff --git a/src/internet/model/udp-socket-impl.cc b/src/internet/model/udp-socket-impl.cc index 5f54d4054..a636afa45 100644 --- a/src/internet/model/udp-socket-impl.cc +++ b/src/internet/model/udp-socket-impl.cc @@ -329,6 +329,14 @@ UdpSocketImpl::ShutdownRecv (void) { NS_LOG_FUNCTION_NOARGS (); m_shutdownRecv = true; + if (m_endPoint) + { + m_endPoint->SetRxEnabled (false); + } + if (m_endPoint6) + { + m_endPoint6->SetRxEnabled (false); + } return 0; } diff --git a/src/internet/test/ipv6-dual-stack-test-suite.cc b/src/internet/test/ipv6-dual-stack-test-suite.cc index 6445a5230..67ca416c2 100644 --- a/src/internet/test/ipv6-dual-stack-test-suite.cc +++ b/src/internet/test/ipv6-dual-stack-test-suite.cc @@ -37,7 +37,6 @@ #include "ns3/uinteger.h" #include "ns3/log.h" -#include "ns3/ipv4-end-point.h" #include "ns3/arp-l3-protocol.h" #include "ns3/ipv4-l3-protocol.h" #include "ns3/ipv6-l3-protocol.h" diff --git a/src/internet/test/tcp-test.cc b/src/internet/test/tcp-test.cc index a80f8ef79..e227b52c7 100644 --- a/src/internet/test/tcp-test.cc +++ b/src/internet/test/tcp-test.cc @@ -38,7 +38,6 @@ #include "ns3/uinteger.h" #include "ns3/log.h" -#include "ns3/ipv4-end-point.h" #include "ns3/arp-l3-protocol.h" #include "ns3/ipv4-l3-protocol.h" #include "ns3/ipv6-l3-protocol.h" diff --git a/src/internet/test/tcp-timestamp-test.cc b/src/internet/test/tcp-timestamp-test.cc index 718053c11..02b65ca66 100644 --- a/src/internet/test/tcp-timestamp-test.cc +++ b/src/internet/test/tcp-timestamp-test.cc @@ -36,7 +36,6 @@ #include "ns3/log.h" #include "ns3/tcp-socket-base.h" -#include "ns3/ipv4-end-point.h" #include "ns3/arp-l3-protocol.h" #include "ns3/ipv4-l3-protocol.h" #include "ns3/ipv6-l3-protocol.h" diff --git a/src/internet/test/tcp-wscaling-test.cc b/src/internet/test/tcp-wscaling-test.cc index d4fc38129..395b4b722 100644 --- a/src/internet/test/tcp-wscaling-test.cc +++ b/src/internet/test/tcp-wscaling-test.cc @@ -39,7 +39,6 @@ #include "ns3/uinteger.h" #include "ns3/log.h" -#include "ns3/ipv4-end-point.h" #include "ns3/arp-l3-protocol.h" #include "ns3/ipv4-l3-protocol.h" #include "ns3/ipv6-l3-protocol.h" diff --git a/src/internet/wscript b/src/internet/wscript index 10fde6339..618bff841 100644 --- a/src/internet/wscript +++ b/src/internet/wscript @@ -263,7 +263,6 @@ def build(bld): 'model/ipv4-interface.h', 'model/ipv4-l3-protocol.h', 'model/ipv6-l3-protocol.h', - 'model/ipv4-end-point.h', 'model/ipv6-extension.h', 'model/ipv6-extension-demux.h', 'model/ipv6-extension-header.h',