1.1 --- a/bindings/python/apidefs/gcc-ILP32/ns3_module_core.py Mon Nov 02 10:49:39 2009 -0500
1.2 +++ b/bindings/python/apidefs/gcc-ILP32/ns3_module_core.py Mon Nov 02 10:56:30 2009 -0500
1.3 @@ -273,6 +273,7 @@
1.4 root_module = module.get_root()
1.5
1.6 module.add_container('std::vector< ns3::Ptr< ns3::dot11s::IeBeaconTimingUnit > >', 'ns3::Ptr< ns3::dot11s::IeBeaconTimingUnit >', container_type='vector')
1.7 + module.add_container('std::vector< ns3::Ptr< ns3::dot11s::PeerLink > >', 'ns3::Ptr< ns3::dot11s::PeerLink >', container_type='vector')
1.8
1.9 def register_types_ns3_flame(module):
1.10 root_module = module.get_root()
2.1 --- a/bindings/python/apidefs/gcc-ILP32/ns3_module_dot11s.py Mon Nov 02 10:49:39 2009 -0500
2.2 +++ b/bindings/python/apidefs/gcc-ILP32/ns3_module_dot11s.py Mon Nov 02 10:56:30 2009 -0500
2.3 @@ -599,6 +599,11 @@
2.4 cls.add_method('SetLocalAid',
2.5 'void',
2.6 [param('uint16_t', 'aid')])
2.7 + ## peer-link.h: uint16_t ns3::dot11s::PeerLink::GetPeerAid() const [member function]
2.8 + cls.add_method('GetPeerAid',
2.9 + 'uint16_t',
2.10 + [],
2.11 + is_const=True)
2.12 ## peer-link.h: void ns3::dot11s::PeerLink::SetBeaconTimingElement(ns3::dot11s::IeBeaconTiming beaconTiming) [member function]
2.13 cls.add_method('SetBeaconTimingElement',
2.14 'void',
2.15 @@ -675,14 +680,15 @@
2.16 cls.add_method('FindPeerLink',
2.17 'ns3::Ptr< ns3::dot11s::PeerLink >',
2.18 [param('uint32_t', 'interface'), param('ns3::Mac48Address', 'peerAddress')])
2.19 - ## peer-management-protocol.h: std::vector<ns3::Mac48Address,std::allocator<ns3::Mac48Address> > ns3::dot11s::PeerManagementProtocol::GetActiveLinks(uint32_t interface) [member function]
2.20 - cls.add_method('GetActiveLinks',
2.21 - 'std::vector< ns3::Mac48Address >',
2.22 - [param('uint32_t', 'interface')])
2.23 ## peer-management-protocol.h: ns3::Mac48Address ns3::dot11s::PeerManagementProtocol::GetAddress() [member function]
2.24 cls.add_method('GetAddress',
2.25 'ns3::Mac48Address',
2.26 [])
2.27 + ## peer-management-protocol.h: bool ns3::dot11s::PeerManagementProtocol::GetBeaconCollisionAvoidance() const [member function]
2.28 + cls.add_method('GetBeaconCollisionAvoidance',
2.29 + 'bool',
2.30 + [],
2.31 + is_const=True)
2.32 ## peer-management-protocol.h: ns3::Ptr<ns3::dot11s::IeBeaconTiming> ns3::dot11s::PeerManagementProtocol::GetBeaconTimingElement(uint32_t interface) [member function]
2.33 cls.add_method('GetBeaconTimingElement',
2.34 'ns3::Ptr< ns3::dot11s::IeBeaconTiming >',
2.35 @@ -696,6 +702,16 @@
2.36 cls.add_method('GetNumberOfLinks',
2.37 'uint8_t',
2.38 [])
2.39 + ## peer-management-protocol.h: std::vector<ns3::Ptr<ns3::dot11s::PeerLink>,std::allocator<ns3::Ptr<ns3::dot11s::PeerLink> > > ns3::dot11s::PeerManagementProtocol::GetPeerLinks() const [member function]
2.40 + cls.add_method('GetPeerLinks',
2.41 + 'std::vector< ns3::Ptr< ns3::dot11s::PeerLink > >',
2.42 + [],
2.43 + is_const=True)
2.44 + ## peer-management-protocol.h: std::vector<ns3::Mac48Address,std::allocator<ns3::Mac48Address> > ns3::dot11s::PeerManagementProtocol::GetPeers(uint32_t interface) const [member function]
2.45 + cls.add_method('GetPeers',
2.46 + 'std::vector< ns3::Mac48Address >',
2.47 + [param('uint32_t', 'interface')],
2.48 + is_const=True)
2.49 ## peer-management-protocol.h: static ns3::TypeId ns3::dot11s::PeerManagementProtocol::GetTypeId() [member function]
2.50 cls.add_method('GetTypeId',
2.51 'ns3::TypeId',
2.52 @@ -709,6 +725,14 @@
2.53 cls.add_method('IsActiveLink',
2.54 'bool',
2.55 [param('uint32_t', 'interface'), param('ns3::Mac48Address', 'peerAddress')])
2.56 + ## peer-management-protocol.h: void ns3::dot11s::PeerManagementProtocol::NotifyBeaconSent(uint32_t interface, ns3::Time beaconInterval) [member function]
2.57 + cls.add_method('NotifyBeaconSent',
2.58 + 'void',
2.59 + [param('uint32_t', 'interface'), param('ns3::Time', 'beaconInterval')])
2.60 + ## peer-management-protocol.h: void ns3::dot11s::PeerManagementProtocol::ReceiveBeacon(uint32_t interface, ns3::Mac48Address peerAddress, ns3::Time beaconInterval, ns3::Ptr<ns3::dot11s::IeBeaconTiming> beaconTiming) [member function]
2.61 + cls.add_method('ReceiveBeacon',
2.62 + 'void',
2.63 + [param('uint32_t', 'interface'), param('ns3::Mac48Address', 'peerAddress'), param('ns3::Time', 'beaconInterval'), param('ns3::Ptr< ns3::dot11s::IeBeaconTiming >', 'beaconTiming')])
2.64 ## peer-management-protocol.h: void ns3::dot11s::PeerManagementProtocol::ReceivePeerLinkFrame(uint32_t interface, ns3::Mac48Address peerAddress, ns3::Mac48Address peerMeshPointAddress, uint16_t aid, ns3::dot11s::IePeerManagement peerManagementElement, ns3::dot11s::IeConfiguration meshConfig) [member function]
2.65 cls.add_method('ReceivePeerLinkFrame',
2.66 'void',
2.67 @@ -722,6 +746,10 @@
2.68 cls.add_method('ResetStats',
2.69 'void',
2.70 [])
2.71 + ## peer-management-protocol.h: void ns3::dot11s::PeerManagementProtocol::SetBeaconCollisionAvoidance(bool enable) [member function]
2.72 + cls.add_method('SetBeaconCollisionAvoidance',
2.73 + 'void',
2.74 + [param('bool', 'enable')])
2.75 ## peer-management-protocol.h: void ns3::dot11s::PeerManagementProtocol::SetMeshId(std::string s) [member function]
2.76 cls.add_method('SetMeshId',
2.77 'void',
2.78 @@ -738,10 +766,6 @@
2.79 cls.add_method('TransmissionSuccess',
2.80 'void',
2.81 [param('uint32_t', 'interface'), param('ns3::Mac48Address const', 'peerAddress')])
2.82 - ## peer-management-protocol.h: void ns3::dot11s::PeerManagementProtocol::UpdatePeerBeaconTiming(uint32_t interface, bool meshBeacon, ns3::dot11s::IeBeaconTiming timingElement, ns3::Mac48Address peerAddress, ns3::Time receivingTime, ns3::Time beaconInterval) [member function]
2.83 - cls.add_method('UpdatePeerBeaconTiming',
2.84 - 'void',
2.85 - [param('uint32_t', 'interface'), param('bool', 'meshBeacon'), param('ns3::dot11s::IeBeaconTiming', 'timingElement'), param('ns3::Mac48Address', 'peerAddress'), param('ns3::Time', 'receivingTime'), param('ns3::Time', 'beaconInterval')])
2.86 return
2.87
2.88 def register_functions(root_module):
3.1 --- a/bindings/python/apidefs/gcc-ILP32/ns3_module_helper.py Mon Nov 02 10:49:39 2009 -0500
3.2 +++ b/bindings/python/apidefs/gcc-ILP32/ns3_module_helper.py Mon Nov 02 10:56:30 2009 -0500
3.3 @@ -650,10 +650,10 @@
3.4 cls.add_method('Add',
3.5 'void',
3.6 [param('ns3::Ptr< ns3::Ipv4 >', 'ipv4'), param('uint32_t', 'interface')])
3.7 - ## ipv4-interface-container.h: void ns3::Ipv4InterfaceContainer::Add(std::pair<ns3::Ptr<ns3::Ipv4>,unsigned int> arg0) [member function]
3.8 + ## ipv4-interface-container.h: void ns3::Ipv4InterfaceContainer::Add(std::pair<ns3::Ptr<ns3::Ipv4>,unsigned int> ipInterfacePair) [member function]
3.9 cls.add_method('Add',
3.10 'void',
3.11 - [param('std::pair< ns3::Ptr< ns3::Ipv4 >, unsigned int >', 'arg0')])
3.12 + [param('std::pair< ns3::Ptr< ns3::Ipv4 >, unsigned int >', 'ipInterfacePair')])
3.13 ## ipv4-interface-container.h: void ns3::Ipv4InterfaceContainer::Add(std::string ipv4Name, uint32_t interface) [member function]
3.14 cls.add_method('Add',
3.15 'void',
4.1 --- a/bindings/python/apidefs/gcc-ILP32/ns3_module_mesh.py Mon Nov 02 10:49:39 2009 -0500
4.2 +++ b/bindings/python/apidefs/gcc-ILP32/ns3_module_mesh.py Mon Nov 02 10:56:30 2009 -0500
4.3 @@ -122,6 +122,11 @@
4.4 cls.add_method('CreatePacket',
4.5 'ns3::Ptr< ns3::Packet >',
4.6 [])
4.7 + ## mesh-wifi-beacon.h: ns3::Time ns3::MeshWifiBeacon::GetBeaconInterval() const [member function]
4.8 + cls.add_method('GetBeaconInterval',
4.9 + 'ns3::Time',
4.10 + [],
4.11 + is_const=True)
4.12 return
4.13
4.14 def register_Ns3WifiInformationElement_methods(root_module, cls):
5.1 --- a/bindings/python/apidefs/gcc-ILP32/ns3modulegen_generated.py Mon Nov 02 10:49:39 2009 -0500
5.2 +++ b/bindings/python/apidefs/gcc-ILP32/ns3modulegen_generated.py Mon Nov 02 10:56:30 2009 -0500
5.3 @@ -17,29 +17,29 @@
5.4 import ns3_module_test
5.5 import ns3_module_mobility
5.6 import ns3_module_common
5.7 +import ns3_module_node
5.8 import ns3_module_contrib
5.9 -import ns3_module_node
5.10 -import ns3_module_tap_bridge
5.11 -import ns3_module_v4ping
5.12 -import ns3_module_static_routing
5.13 -import ns3_module_packet_sink
5.14 -import ns3_module_stats
5.15 -import ns3_module_onoff
5.16 import ns3_module_point_to_point
5.17 import ns3_module_internet_stack
5.18 +import ns3_module_tap_bridge
5.19 import ns3_module_csma
5.20 +import ns3_module_wifi
5.21 +import ns3_module_static_routing
5.22 +import ns3_module_v4ping
5.23 +import ns3_module_virtual_net_device
5.24 +import ns3_module_packet_sink
5.25 +import ns3_module_global_routing
5.26 +import ns3_module_stats
5.27 import ns3_module_list_routing
5.28 -import ns3_module_virtual_net_device
5.29 -import ns3_module_wifi
5.30 import ns3_module_emu
5.31 import ns3_module_bridge
5.32 -import ns3_module_global_routing
5.33 +import ns3_module_onoff
5.34 import ns3_module_udp_echo
5.35 +import ns3_module_ping6
5.36 import ns3_module_nix_vector_routing
5.37 import ns3_module_olsr
5.38 +import ns3_module_flow_monitor
5.39 import ns3_module_radvd
5.40 -import ns3_module_ping6
5.41 -import ns3_module_flow_monitor
5.42 import ns3_module_mesh
5.43 import ns3_module_helper
5.44 import ns3_module_dot11s
5.45 @@ -107,6 +107,17 @@
5.46 ns3_module_common__local.register_types(module)
5.47
5.48 root_module.end_section('ns3_module_common')
5.49 + root_module.begin_section('ns3_module_node')
5.50 + ns3_module_node.register_types(module)
5.51 +
5.52 + try:
5.53 + import ns3_module_node__local
5.54 + except ImportError:
5.55 + pass
5.56 + else:
5.57 + ns3_module_node__local.register_types(module)
5.58 +
5.59 + root_module.end_section('ns3_module_node')
5.60 root_module.begin_section('ns3_module_contrib')
5.61 ns3_module_contrib.register_types(module)
5.62
5.63 @@ -118,83 +129,6 @@
5.64 ns3_module_contrib__local.register_types(module)
5.65
5.66 root_module.end_section('ns3_module_contrib')
5.67 - root_module.begin_section('ns3_module_node')
5.68 - ns3_module_node.register_types(module)
5.69 -
5.70 - try:
5.71 - import ns3_module_node__local
5.72 - except ImportError:
5.73 - pass
5.74 - else:
5.75 - ns3_module_node__local.register_types(module)
5.76 -
5.77 - root_module.end_section('ns3_module_node')
5.78 - root_module.begin_section('ns3_module_tap_bridge')
5.79 - ns3_module_tap_bridge.register_types(module)
5.80 -
5.81 - try:
5.82 - import ns3_module_tap_bridge__local
5.83 - except ImportError:
5.84 - pass
5.85 - else:
5.86 - ns3_module_tap_bridge__local.register_types(module)
5.87 -
5.88 - root_module.end_section('ns3_module_tap_bridge')
5.89 - root_module.begin_section('ns3_module_v4ping')
5.90 - ns3_module_v4ping.register_types(module)
5.91 -
5.92 - try:
5.93 - import ns3_module_v4ping__local
5.94 - except ImportError:
5.95 - pass
5.96 - else:
5.97 - ns3_module_v4ping__local.register_types(module)
5.98 -
5.99 - root_module.end_section('ns3_module_v4ping')
5.100 - root_module.begin_section('ns3_module_static_routing')
5.101 - ns3_module_static_routing.register_types(module)
5.102 -
5.103 - try:
5.104 - import ns3_module_static_routing__local
5.105 - except ImportError:
5.106 - pass
5.107 - else:
5.108 - ns3_module_static_routing__local.register_types(module)
5.109 -
5.110 - root_module.end_section('ns3_module_static_routing')
5.111 - root_module.begin_section('ns3_module_packet_sink')
5.112 - ns3_module_packet_sink.register_types(module)
5.113 -
5.114 - try:
5.115 - import ns3_module_packet_sink__local
5.116 - except ImportError:
5.117 - pass
5.118 - else:
5.119 - ns3_module_packet_sink__local.register_types(module)
5.120 -
5.121 - root_module.end_section('ns3_module_packet_sink')
5.122 - root_module.begin_section('ns3_module_stats')
5.123 - ns3_module_stats.register_types(module)
5.124 -
5.125 - try:
5.126 - import ns3_module_stats__local
5.127 - except ImportError:
5.128 - pass
5.129 - else:
5.130 - ns3_module_stats__local.register_types(module)
5.131 -
5.132 - root_module.end_section('ns3_module_stats')
5.133 - root_module.begin_section('ns3_module_onoff')
5.134 - ns3_module_onoff.register_types(module)
5.135 -
5.136 - try:
5.137 - import ns3_module_onoff__local
5.138 - except ImportError:
5.139 - pass
5.140 - else:
5.141 - ns3_module_onoff__local.register_types(module)
5.142 -
5.143 - root_module.end_section('ns3_module_onoff')
5.144 root_module.begin_section('ns3_module_point_to_point')
5.145 ns3_module_point_to_point.register_types(module)
5.146
5.147 @@ -217,6 +151,17 @@
5.148 ns3_module_internet_stack__local.register_types(module)
5.149
5.150 root_module.end_section('ns3_module_internet_stack')
5.151 + root_module.begin_section('ns3_module_tap_bridge')
5.152 + ns3_module_tap_bridge.register_types(module)
5.153 +
5.154 + try:
5.155 + import ns3_module_tap_bridge__local
5.156 + except ImportError:
5.157 + pass
5.158 + else:
5.159 + ns3_module_tap_bridge__local.register_types(module)
5.160 +
5.161 + root_module.end_section('ns3_module_tap_bridge')
5.162 root_module.begin_section('ns3_module_csma')
5.163 ns3_module_csma.register_types(module)
5.164
5.165 @@ -228,6 +173,83 @@
5.166 ns3_module_csma__local.register_types(module)
5.167
5.168 root_module.end_section('ns3_module_csma')
5.169 + root_module.begin_section('ns3_module_wifi')
5.170 + ns3_module_wifi.register_types(module)
5.171 +
5.172 + try:
5.173 + import ns3_module_wifi__local
5.174 + except ImportError:
5.175 + pass
5.176 + else:
5.177 + ns3_module_wifi__local.register_types(module)
5.178 +
5.179 + root_module.end_section('ns3_module_wifi')
5.180 + root_module.begin_section('ns3_module_static_routing')
5.181 + ns3_module_static_routing.register_types(module)
5.182 +
5.183 + try:
5.184 + import ns3_module_static_routing__local
5.185 + except ImportError:
5.186 + pass
5.187 + else:
5.188 + ns3_module_static_routing__local.register_types(module)
5.189 +
5.190 + root_module.end_section('ns3_module_static_routing')
5.191 + root_module.begin_section('ns3_module_v4ping')
5.192 + ns3_module_v4ping.register_types(module)
5.193 +
5.194 + try:
5.195 + import ns3_module_v4ping__local
5.196 + except ImportError:
5.197 + pass
5.198 + else:
5.199 + ns3_module_v4ping__local.register_types(module)
5.200 +
5.201 + root_module.end_section('ns3_module_v4ping')
5.202 + root_module.begin_section('ns3_module_virtual_net_device')
5.203 + ns3_module_virtual_net_device.register_types(module)
5.204 +
5.205 + try:
5.206 + import ns3_module_virtual_net_device__local
5.207 + except ImportError:
5.208 + pass
5.209 + else:
5.210 + ns3_module_virtual_net_device__local.register_types(module)
5.211 +
5.212 + root_module.end_section('ns3_module_virtual_net_device')
5.213 + root_module.begin_section('ns3_module_packet_sink')
5.214 + ns3_module_packet_sink.register_types(module)
5.215 +
5.216 + try:
5.217 + import ns3_module_packet_sink__local
5.218 + except ImportError:
5.219 + pass
5.220 + else:
5.221 + ns3_module_packet_sink__local.register_types(module)
5.222 +
5.223 + root_module.end_section('ns3_module_packet_sink')
5.224 + root_module.begin_section('ns3_module_global_routing')
5.225 + ns3_module_global_routing.register_types(module)
5.226 +
5.227 + try:
5.228 + import ns3_module_global_routing__local
5.229 + except ImportError:
5.230 + pass
5.231 + else:
5.232 + ns3_module_global_routing__local.register_types(module)
5.233 +
5.234 + root_module.end_section('ns3_module_global_routing')
5.235 + root_module.begin_section('ns3_module_stats')
5.236 + ns3_module_stats.register_types(module)
5.237 +
5.238 + try:
5.239 + import ns3_module_stats__local
5.240 + except ImportError:
5.241 + pass
5.242 + else:
5.243 + ns3_module_stats__local.register_types(module)
5.244 +
5.245 + root_module.end_section('ns3_module_stats')
5.246 root_module.begin_section('ns3_module_list_routing')
5.247 ns3_module_list_routing.register_types(module)
5.248
5.249 @@ -239,28 +261,6 @@
5.250 ns3_module_list_routing__local.register_types(module)
5.251
5.252 root_module.end_section('ns3_module_list_routing')
5.253 - root_module.begin_section('ns3_module_virtual_net_device')
5.254 - ns3_module_virtual_net_device.register_types(module)
5.255 -
5.256 - try:
5.257 - import ns3_module_virtual_net_device__local
5.258 - except ImportError:
5.259 - pass
5.260 - else:
5.261 - ns3_module_virtual_net_device__local.register_types(module)
5.262 -
5.263 - root_module.end_section('ns3_module_virtual_net_device')
5.264 - root_module.begin_section('ns3_module_wifi')
5.265 - ns3_module_wifi.register_types(module)
5.266 -
5.267 - try:
5.268 - import ns3_module_wifi__local
5.269 - except ImportError:
5.270 - pass
5.271 - else:
5.272 - ns3_module_wifi__local.register_types(module)
5.273 -
5.274 - root_module.end_section('ns3_module_wifi')
5.275 root_module.begin_section('ns3_module_emu')
5.276 ns3_module_emu.register_types(module)
5.277
5.278 @@ -283,17 +283,17 @@
5.279 ns3_module_bridge__local.register_types(module)
5.280
5.281 root_module.end_section('ns3_module_bridge')
5.282 - root_module.begin_section('ns3_module_global_routing')
5.283 - ns3_module_global_routing.register_types(module)
5.284 + root_module.begin_section('ns3_module_onoff')
5.285 + ns3_module_onoff.register_types(module)
5.286
5.287 try:
5.288 - import ns3_module_global_routing__local
5.289 + import ns3_module_onoff__local
5.290 except ImportError:
5.291 pass
5.292 else:
5.293 - ns3_module_global_routing__local.register_types(module)
5.294 + ns3_module_onoff__local.register_types(module)
5.295
5.296 - root_module.end_section('ns3_module_global_routing')
5.297 + root_module.end_section('ns3_module_onoff')
5.298 root_module.begin_section('ns3_module_udp_echo')
5.299 ns3_module_udp_echo.register_types(module)
5.300
5.301 @@ -305,6 +305,17 @@
5.302 ns3_module_udp_echo__local.register_types(module)
5.303
5.304 root_module.end_section('ns3_module_udp_echo')
5.305 + root_module.begin_section('ns3_module_ping6')
5.306 + ns3_module_ping6.register_types(module)
5.307 +
5.308 + try:
5.309 + import ns3_module_ping6__local
5.310 + except ImportError:
5.311 + pass
5.312 + else:
5.313 + ns3_module_ping6__local.register_types(module)
5.314 +
5.315 + root_module.end_section('ns3_module_ping6')
5.316 root_module.begin_section('ns3_module_nix_vector_routing')
5.317 ns3_module_nix_vector_routing.register_types(module)
5.318
5.319 @@ -327,6 +338,17 @@
5.320 ns3_module_olsr__local.register_types(module)
5.321
5.322 root_module.end_section('ns3_module_olsr')
5.323 + root_module.begin_section('ns3_module_flow_monitor')
5.324 + ns3_module_flow_monitor.register_types(module)
5.325 +
5.326 + try:
5.327 + import ns3_module_flow_monitor__local
5.328 + except ImportError:
5.329 + pass
5.330 + else:
5.331 + ns3_module_flow_monitor__local.register_types(module)
5.332 +
5.333 + root_module.end_section('ns3_module_flow_monitor')
5.334 root_module.begin_section('ns3_module_radvd')
5.335 ns3_module_radvd.register_types(module)
5.336
5.337 @@ -338,28 +360,6 @@
5.338 ns3_module_radvd__local.register_types(module)
5.339
5.340 root_module.end_section('ns3_module_radvd')
5.341 - root_module.begin_section('ns3_module_ping6')
5.342 - ns3_module_ping6.register_types(module)
5.343 -
5.344 - try:
5.345 - import ns3_module_ping6__local
5.346 - except ImportError:
5.347 - pass
5.348 - else:
5.349 - ns3_module_ping6__local.register_types(module)
5.350 -
5.351 - root_module.end_section('ns3_module_ping6')
5.352 - root_module.begin_section('ns3_module_flow_monitor')
5.353 - ns3_module_flow_monitor.register_types(module)
5.354 -
5.355 - try:
5.356 - import ns3_module_flow_monitor__local
5.357 - except ImportError:
5.358 - pass
5.359 - else:
5.360 - ns3_module_flow_monitor__local.register_types(module)
5.361 -
5.362 - root_module.end_section('ns3_module_flow_monitor')
5.363 root_module.begin_section('ns3_module_mesh')
5.364 ns3_module_mesh.register_types(module)
5.365
5.366 @@ -549,6 +549,17 @@
5.367 ns3_module_common__local.register_methods(root_module)
5.368
5.369 root_module.end_section('ns3_module_common')
5.370 + root_module.begin_section('ns3_module_node')
5.371 + ns3_module_node.register_methods(root_module)
5.372 +
5.373 + try:
5.374 + import ns3_module_node__local
5.375 + except ImportError:
5.376 + pass
5.377 + else:
5.378 + ns3_module_node__local.register_methods(root_module)
5.379 +
5.380 + root_module.end_section('ns3_module_node')
5.381 root_module.begin_section('ns3_module_contrib')
5.382 ns3_module_contrib.register_methods(root_module)
5.383
5.384 @@ -560,83 +571,6 @@
5.385 ns3_module_contrib__local.register_methods(root_module)
5.386
5.387 root_module.end_section('ns3_module_contrib')
5.388 - root_module.begin_section('ns3_module_node')
5.389 - ns3_module_node.register_methods(root_module)
5.390 -
5.391 - try:
5.392 - import ns3_module_node__local
5.393 - except ImportError:
5.394 - pass
5.395 - else:
5.396 - ns3_module_node__local.register_methods(root_module)
5.397 -
5.398 - root_module.end_section('ns3_module_node')
5.399 - root_module.begin_section('ns3_module_tap_bridge')
5.400 - ns3_module_tap_bridge.register_methods(root_module)
5.401 -
5.402 - try:
5.403 - import ns3_module_tap_bridge__local
5.404 - except ImportError:
5.405 - pass
5.406 - else:
5.407 - ns3_module_tap_bridge__local.register_methods(root_module)
5.408 -
5.409 - root_module.end_section('ns3_module_tap_bridge')
5.410 - root_module.begin_section('ns3_module_v4ping')
5.411 - ns3_module_v4ping.register_methods(root_module)
5.412 -
5.413 - try:
5.414 - import ns3_module_v4ping__local
5.415 - except ImportError:
5.416 - pass
5.417 - else:
5.418 - ns3_module_v4ping__local.register_methods(root_module)
5.419 -
5.420 - root_module.end_section('ns3_module_v4ping')
5.421 - root_module.begin_section('ns3_module_static_routing')
5.422 - ns3_module_static_routing.register_methods(root_module)
5.423 -
5.424 - try:
5.425 - import ns3_module_static_routing__local
5.426 - except ImportError:
5.427 - pass
5.428 - else:
5.429 - ns3_module_static_routing__local.register_methods(root_module)
5.430 -
5.431 - root_module.end_section('ns3_module_static_routing')
5.432 - root_module.begin_section('ns3_module_packet_sink')
5.433 - ns3_module_packet_sink.register_methods(root_module)
5.434 -
5.435 - try:
5.436 - import ns3_module_packet_sink__local
5.437 - except ImportError:
5.438 - pass
5.439 - else:
5.440 - ns3_module_packet_sink__local.register_methods(root_module)
5.441 -
5.442 - root_module.end_section('ns3_module_packet_sink')
5.443 - root_module.begin_section('ns3_module_stats')
5.444 - ns3_module_stats.register_methods(root_module)
5.445 -
5.446 - try:
5.447 - import ns3_module_stats__local
5.448 - except ImportError:
5.449 - pass
5.450 - else:
5.451 - ns3_module_stats__local.register_methods(root_module)
5.452 -
5.453 - root_module.end_section('ns3_module_stats')
5.454 - root_module.begin_section('ns3_module_onoff')
5.455 - ns3_module_onoff.register_methods(root_module)
5.456 -
5.457 - try:
5.458 - import ns3_module_onoff__local
5.459 - except ImportError:
5.460 - pass
5.461 - else:
5.462 - ns3_module_onoff__local.register_methods(root_module)
5.463 -
5.464 - root_module.end_section('ns3_module_onoff')
5.465 root_module.begin_section('ns3_module_point_to_point')
5.466 ns3_module_point_to_point.register_methods(root_module)
5.467
5.468 @@ -659,6 +593,17 @@
5.469 ns3_module_internet_stack__local.register_methods(root_module)
5.470
5.471 root_module.end_section('ns3_module_internet_stack')
5.472 + root_module.begin_section('ns3_module_tap_bridge')
5.473 + ns3_module_tap_bridge.register_methods(root_module)
5.474 +
5.475 + try:
5.476 + import ns3_module_tap_bridge__local
5.477 + except ImportError:
5.478 + pass
5.479 + else:
5.480 + ns3_module_tap_bridge__local.register_methods(root_module)
5.481 +
5.482 + root_module.end_section('ns3_module_tap_bridge')
5.483 root_module.begin_section('ns3_module_csma')
5.484 ns3_module_csma.register_methods(root_module)
5.485
5.486 @@ -670,6 +615,83 @@
5.487 ns3_module_csma__local.register_methods(root_module)
5.488
5.489 root_module.end_section('ns3_module_csma')
5.490 + root_module.begin_section('ns3_module_wifi')
5.491 + ns3_module_wifi.register_methods(root_module)
5.492 +
5.493 + try:
5.494 + import ns3_module_wifi__local
5.495 + except ImportError:
5.496 + pass
5.497 + else:
5.498 + ns3_module_wifi__local.register_methods(root_module)
5.499 +
5.500 + root_module.end_section('ns3_module_wifi')
5.501 + root_module.begin_section('ns3_module_static_routing')
5.502 + ns3_module_static_routing.register_methods(root_module)
5.503 +
5.504 + try:
5.505 + import ns3_module_static_routing__local
5.506 + except ImportError:
5.507 + pass
5.508 + else:
5.509 + ns3_module_static_routing__local.register_methods(root_module)
5.510 +
5.511 + root_module.end_section('ns3_module_static_routing')
5.512 + root_module.begin_section('ns3_module_v4ping')
5.513 + ns3_module_v4ping.register_methods(root_module)
5.514 +
5.515 + try:
5.516 + import ns3_module_v4ping__local
5.517 + except ImportError:
5.518 + pass
5.519 + else:
5.520 + ns3_module_v4ping__local.register_methods(root_module)
5.521 +
5.522 + root_module.end_section('ns3_module_v4ping')
5.523 + root_module.begin_section('ns3_module_virtual_net_device')
5.524 + ns3_module_virtual_net_device.register_methods(root_module)
5.525 +
5.526 + try:
5.527 + import ns3_module_virtual_net_device__local
5.528 + except ImportError:
5.529 + pass
5.530 + else:
5.531 + ns3_module_virtual_net_device__local.register_methods(root_module)
5.532 +
5.533 + root_module.end_section('ns3_module_virtual_net_device')
5.534 + root_module.begin_section('ns3_module_packet_sink')
5.535 + ns3_module_packet_sink.register_methods(root_module)
5.536 +
5.537 + try:
5.538 + import ns3_module_packet_sink__local
5.539 + except ImportError:
5.540 + pass
5.541 + else:
5.542 + ns3_module_packet_sink__local.register_methods(root_module)
5.543 +
5.544 + root_module.end_section('ns3_module_packet_sink')
5.545 + root_module.begin_section('ns3_module_global_routing')
5.546 + ns3_module_global_routing.register_methods(root_module)
5.547 +
5.548 + try:
5.549 + import ns3_module_global_routing__local
5.550 + except ImportError:
5.551 + pass
5.552 + else:
5.553 + ns3_module_global_routing__local.register_methods(root_module)
5.554 +
5.555 + root_module.end_section('ns3_module_global_routing')
5.556 + root_module.begin_section('ns3_module_stats')
5.557 + ns3_module_stats.register_methods(root_module)
5.558 +
5.559 + try:
5.560 + import ns3_module_stats__local
5.561 + except ImportError:
5.562 + pass
5.563 + else:
5.564 + ns3_module_stats__local.register_methods(root_module)
5.565 +
5.566 + root_module.end_section('ns3_module_stats')
5.567 root_module.begin_section('ns3_module_list_routing')
5.568 ns3_module_list_routing.register_methods(root_module)
5.569
5.570 @@ -681,28 +703,6 @@
5.571 ns3_module_list_routing__local.register_methods(root_module)
5.572
5.573 root_module.end_section('ns3_module_list_routing')
5.574 - root_module.begin_section('ns3_module_virtual_net_device')
5.575 - ns3_module_virtual_net_device.register_methods(root_module)
5.576 -
5.577 - try:
5.578 - import ns3_module_virtual_net_device__local
5.579 - except ImportError:
5.580 - pass
5.581 - else:
5.582 - ns3_module_virtual_net_device__local.register_methods(root_module)
5.583 -
5.584 - root_module.end_section('ns3_module_virtual_net_device')
5.585 - root_module.begin_section('ns3_module_wifi')
5.586 - ns3_module_wifi.register_methods(root_module)
5.587 -
5.588 - try:
5.589 - import ns3_module_wifi__local
5.590 - except ImportError:
5.591 - pass
5.592 - else:
5.593 - ns3_module_wifi__local.register_methods(root_module)
5.594 -
5.595 - root_module.end_section('ns3_module_wifi')
5.596 root_module.begin_section('ns3_module_emu')
5.597 ns3_module_emu.register_methods(root_module)
5.598
5.599 @@ -725,17 +725,17 @@
5.600 ns3_module_bridge__local.register_methods(root_module)
5.601
5.602 root_module.end_section('ns3_module_bridge')
5.603 - root_module.begin_section('ns3_module_global_routing')
5.604 - ns3_module_global_routing.register_methods(root_module)
5.605 + root_module.begin_section('ns3_module_onoff')
5.606 + ns3_module_onoff.register_methods(root_module)
5.607
5.608 try:
5.609 - import ns3_module_global_routing__local
5.610 + import ns3_module_onoff__local
5.611 except ImportError:
5.612 pass
5.613 else:
5.614 - ns3_module_global_routing__local.register_methods(root_module)
5.615 + ns3_module_onoff__local.register_methods(root_module)
5.616
5.617 - root_module.end_section('ns3_module_global_routing')
5.618 + root_module.end_section('ns3_module_onoff')
5.619 root_module.begin_section('ns3_module_udp_echo')
5.620 ns3_module_udp_echo.register_methods(root_module)
5.621
5.622 @@ -747,6 +747,17 @@
5.623 ns3_module_udp_echo__local.register_methods(root_module)
5.624
5.625 root_module.end_section('ns3_module_udp_echo')
5.626 + root_module.begin_section('ns3_module_ping6')
5.627 + ns3_module_ping6.register_methods(root_module)
5.628 +
5.629 + try:
5.630 + import ns3_module_ping6__local
5.631 + except ImportError:
5.632 + pass
5.633 + else:
5.634 + ns3_module_ping6__local.register_methods(root_module)
5.635 +
5.636 + root_module.end_section('ns3_module_ping6')
5.637 root_module.begin_section('ns3_module_nix_vector_routing')
5.638 ns3_module_nix_vector_routing.register_methods(root_module)
5.639
5.640 @@ -769,6 +780,17 @@
5.641 ns3_module_olsr__local.register_methods(root_module)
5.642
5.643 root_module.end_section('ns3_module_olsr')
5.644 + root_module.begin_section('ns3_module_flow_monitor')
5.645 + ns3_module_flow_monitor.register_methods(root_module)
5.646 +
5.647 + try:
5.648 + import ns3_module_flow_monitor__local
5.649 + except ImportError:
5.650 + pass
5.651 + else:
5.652 + ns3_module_flow_monitor__local.register_methods(root_module)
5.653 +
5.654 + root_module.end_section('ns3_module_flow_monitor')
5.655 root_module.begin_section('ns3_module_radvd')
5.656 ns3_module_radvd.register_methods(root_module)
5.657
5.658 @@ -780,28 +802,6 @@
5.659 ns3_module_radvd__local.register_methods(root_module)
5.660
5.661 root_module.end_section('ns3_module_radvd')
5.662 - root_module.begin_section('ns3_module_ping6')
5.663 - ns3_module_ping6.register_methods(root_module)
5.664 -
5.665 - try:
5.666 - import ns3_module_ping6__local
5.667 - except ImportError:
5.668 - pass
5.669 - else:
5.670 - ns3_module_ping6__local.register_methods(root_module)
5.671 -
5.672 - root_module.end_section('ns3_module_ping6')
5.673 - root_module.begin_section('ns3_module_flow_monitor')
5.674 - ns3_module_flow_monitor.register_methods(root_module)
5.675 -
5.676 - try:
5.677 - import ns3_module_flow_monitor__local
5.678 - except ImportError:
5.679 - pass
5.680 - else:
5.681 - ns3_module_flow_monitor__local.register_methods(root_module)
5.682 -
5.683 - root_module.end_section('ns3_module_flow_monitor')
5.684 root_module.begin_section('ns3_module_mesh')
5.685 ns3_module_mesh.register_methods(root_module)
5.686
5.687 @@ -1039,6 +1039,17 @@
5.688 ns3_module_common__local.register_functions(root_module)
5.689
5.690 root_module.end_section('ns3_module_common')
5.691 + root_module.begin_section('ns3_module_node')
5.692 + ns3_module_node.register_functions(root_module)
5.693 +
5.694 + try:
5.695 + import ns3_module_node__local
5.696 + except ImportError:
5.697 + pass
5.698 + else:
5.699 + ns3_module_node__local.register_functions(root_module)
5.700 +
5.701 + root_module.end_section('ns3_module_node')
5.702 root_module.begin_section('ns3_module_contrib')
5.703 ns3_module_contrib.register_functions(root_module)
5.704
5.705 @@ -1050,83 +1061,6 @@
5.706 ns3_module_contrib__local.register_functions(root_module)
5.707
5.708 root_module.end_section('ns3_module_contrib')
5.709 - root_module.begin_section('ns3_module_node')
5.710 - ns3_module_node.register_functions(root_module)
5.711 -
5.712 - try:
5.713 - import ns3_module_node__local
5.714 - except ImportError:
5.715 - pass
5.716 - else:
5.717 - ns3_module_node__local.register_functions(root_module)
5.718 -
5.719 - root_module.end_section('ns3_module_node')
5.720 - root_module.begin_section('ns3_module_tap_bridge')
5.721 - ns3_module_tap_bridge.register_functions(root_module)
5.722 -
5.723 - try:
5.724 - import ns3_module_tap_bridge__local
5.725 - except ImportError:
5.726 - pass
5.727 - else:
5.728 - ns3_module_tap_bridge__local.register_functions(root_module)
5.729 -
5.730 - root_module.end_section('ns3_module_tap_bridge')
5.731 - root_module.begin_section('ns3_module_v4ping')
5.732 - ns3_module_v4ping.register_functions(root_module)
5.733 -
5.734 - try:
5.735 - import ns3_module_v4ping__local
5.736 - except ImportError:
5.737 - pass
5.738 - else:
5.739 - ns3_module_v4ping__local.register_functions(root_module)
5.740 -
5.741 - root_module.end_section('ns3_module_v4ping')
5.742 - root_module.begin_section('ns3_module_static_routing')
5.743 - ns3_module_static_routing.register_functions(root_module)
5.744 -
5.745 - try:
5.746 - import ns3_module_static_routing__local
5.747 - except ImportError:
5.748 - pass
5.749 - else:
5.750 - ns3_module_static_routing__local.register_functions(root_module)
5.751 -
5.752 - root_module.end_section('ns3_module_static_routing')
5.753 - root_module.begin_section('ns3_module_packet_sink')
5.754 - ns3_module_packet_sink.register_functions(root_module)
5.755 -
5.756 - try:
5.757 - import ns3_module_packet_sink__local
5.758 - except ImportError:
5.759 - pass
5.760 - else:
5.761 - ns3_module_packet_sink__local.register_functions(root_module)
5.762 -
5.763 - root_module.end_section('ns3_module_packet_sink')
5.764 - root_module.begin_section('ns3_module_stats')
5.765 - ns3_module_stats.register_functions(root_module)
5.766 -
5.767 - try:
5.768 - import ns3_module_stats__local
5.769 - except ImportError:
5.770 - pass
5.771 - else:
5.772 - ns3_module_stats__local.register_functions(root_module)
5.773 -
5.774 - root_module.end_section('ns3_module_stats')
5.775 - root_module.begin_section('ns3_module_onoff')
5.776 - ns3_module_onoff.register_functions(root_module)
5.777 -
5.778 - try:
5.779 - import ns3_module_onoff__local
5.780 - except ImportError:
5.781 - pass
5.782 - else:
5.783 - ns3_module_onoff__local.register_functions(root_module)
5.784 -
5.785 - root_module.end_section('ns3_module_onoff')
5.786 root_module.begin_section('ns3_module_point_to_point')
5.787 ns3_module_point_to_point.register_functions(root_module)
5.788
5.789 @@ -1149,6 +1083,17 @@
5.790 ns3_module_internet_stack__local.register_functions(root_module)
5.791
5.792 root_module.end_section('ns3_module_internet_stack')
5.793 + root_module.begin_section('ns3_module_tap_bridge')
5.794 + ns3_module_tap_bridge.register_functions(root_module)
5.795 +
5.796 + try:
5.797 + import ns3_module_tap_bridge__local
5.798 + except ImportError:
5.799 + pass
5.800 + else:
5.801 + ns3_module_tap_bridge__local.register_functions(root_module)
5.802 +
5.803 + root_module.end_section('ns3_module_tap_bridge')
5.804 root_module.begin_section('ns3_module_csma')
5.805 ns3_module_csma.register_functions(root_module)
5.806
5.807 @@ -1160,6 +1105,83 @@
5.808 ns3_module_csma__local.register_functions(root_module)
5.809
5.810 root_module.end_section('ns3_module_csma')
5.811 + root_module.begin_section('ns3_module_wifi')
5.812 + ns3_module_wifi.register_functions(root_module)
5.813 +
5.814 + try:
5.815 + import ns3_module_wifi__local
5.816 + except ImportError:
5.817 + pass
5.818 + else:
5.819 + ns3_module_wifi__local.register_functions(root_module)
5.820 +
5.821 + root_module.end_section('ns3_module_wifi')
5.822 + root_module.begin_section('ns3_module_static_routing')
5.823 + ns3_module_static_routing.register_functions(root_module)
5.824 +
5.825 + try:
5.826 + import ns3_module_static_routing__local
5.827 + except ImportError:
5.828 + pass
5.829 + else:
5.830 + ns3_module_static_routing__local.register_functions(root_module)
5.831 +
5.832 + root_module.end_section('ns3_module_static_routing')
5.833 + root_module.begin_section('ns3_module_v4ping')
5.834 + ns3_module_v4ping.register_functions(root_module)
5.835 +
5.836 + try:
5.837 + import ns3_module_v4ping__local
5.838 + except ImportError:
5.839 + pass
5.840 + else:
5.841 + ns3_module_v4ping__local.register_functions(root_module)
5.842 +
5.843 + root_module.end_section('ns3_module_v4ping')
5.844 + root_module.begin_section('ns3_module_virtual_net_device')
5.845 + ns3_module_virtual_net_device.register_functions(root_module)
5.846 +
5.847 + try:
5.848 + import ns3_module_virtual_net_device__local
5.849 + except ImportError:
5.850 + pass
5.851 + else:
5.852 + ns3_module_virtual_net_device__local.register_functions(root_module)
5.853 +
5.854 + root_module.end_section('ns3_module_virtual_net_device')
5.855 + root_module.begin_section('ns3_module_packet_sink')
5.856 + ns3_module_packet_sink.register_functions(root_module)
5.857 +
5.858 + try:
5.859 + import ns3_module_packet_sink__local
5.860 + except ImportError:
5.861 + pass
5.862 + else:
5.863 + ns3_module_packet_sink__local.register_functions(root_module)
5.864 +
5.865 + root_module.end_section('ns3_module_packet_sink')
5.866 + root_module.begin_section('ns3_module_global_routing')
5.867 + ns3_module_global_routing.register_functions(root_module)
5.868 +
5.869 + try:
5.870 + import ns3_module_global_routing__local
5.871 + except ImportError:
5.872 + pass
5.873 + else:
5.874 + ns3_module_global_routing__local.register_functions(root_module)
5.875 +
5.876 + root_module.end_section('ns3_module_global_routing')
5.877 + root_module.begin_section('ns3_module_stats')
5.878 + ns3_module_stats.register_functions(root_module)
5.879 +
5.880 + try:
5.881 + import ns3_module_stats__local
5.882 + except ImportError:
5.883 + pass
5.884 + else:
5.885 + ns3_module_stats__local.register_functions(root_module)
5.886 +
5.887 + root_module.end_section('ns3_module_stats')
5.888 root_module.begin_section('ns3_module_list_routing')
5.889 ns3_module_list_routing.register_functions(root_module)
5.890
5.891 @@ -1171,28 +1193,6 @@
5.892 ns3_module_list_routing__local.register_functions(root_module)
5.893
5.894 root_module.end_section('ns3_module_list_routing')
5.895 - root_module.begin_section('ns3_module_virtual_net_device')
5.896 - ns3_module_virtual_net_device.register_functions(root_module)
5.897 -
5.898 - try:
5.899 - import ns3_module_virtual_net_device__local
5.900 - except ImportError:
5.901 - pass
5.902 - else:
5.903 - ns3_module_virtual_net_device__local.register_functions(root_module)
5.904 -
5.905 - root_module.end_section('ns3_module_virtual_net_device')
5.906 - root_module.begin_section('ns3_module_wifi')
5.907 - ns3_module_wifi.register_functions(root_module)
5.908 -
5.909 - try:
5.910 - import ns3_module_wifi__local
5.911 - except ImportError:
5.912 - pass
5.913 - else:
5.914 - ns3_module_wifi__local.register_functions(root_module)
5.915 -
5.916 - root_module.end_section('ns3_module_wifi')
5.917 root_module.begin_section('ns3_module_emu')
5.918 ns3_module_emu.register_functions(root_module)
5.919
5.920 @@ -1215,17 +1215,17 @@
5.921 ns3_module_bridge__local.register_functions(root_module)
5.922
5.923 root_module.end_section('ns3_module_bridge')
5.924 - root_module.begin_section('ns3_module_global_routing')
5.925 - ns3_module_global_routing.register_functions(root_module)
5.926 + root_module.begin_section('ns3_module_onoff')
5.927 + ns3_module_onoff.register_functions(root_module)
5.928
5.929 try:
5.930 - import ns3_module_global_routing__local
5.931 + import ns3_module_onoff__local
5.932 except ImportError:
5.933 pass
5.934 else:
5.935 - ns3_module_global_routing__local.register_functions(root_module)
5.936 + ns3_module_onoff__local.register_functions(root_module)
5.937
5.938 - root_module.end_section('ns3_module_global_routing')
5.939 + root_module.end_section('ns3_module_onoff')
5.940 root_module.begin_section('ns3_module_udp_echo')
5.941 ns3_module_udp_echo.register_functions(root_module)
5.942
5.943 @@ -1237,6 +1237,17 @@
5.944 ns3_module_udp_echo__local.register_functions(root_module)
5.945
5.946 root_module.end_section('ns3_module_udp_echo')
5.947 + root_module.begin_section('ns3_module_ping6')
5.948 + ns3_module_ping6.register_functions(root_module)
5.949 +
5.950 + try:
5.951 + import ns3_module_ping6__local
5.952 + except ImportError:
5.953 + pass
5.954 + else:
5.955 + ns3_module_ping6__local.register_functions(root_module)
5.956 +
5.957 + root_module.end_section('ns3_module_ping6')
5.958 root_module.begin_section('ns3_module_nix_vector_routing')
5.959 ns3_module_nix_vector_routing.register_functions(root_module)
5.960
5.961 @@ -1259,6 +1270,17 @@
5.962 ns3_module_olsr__local.register_functions(root_module)
5.963
5.964 root_module.end_section('ns3_module_olsr')
5.965 + root_module.begin_section('ns3_module_flow_monitor')
5.966 + ns3_module_flow_monitor.register_functions(root_module)
5.967 +
5.968 + try:
5.969 + import ns3_module_flow_monitor__local
5.970 + except ImportError:
5.971 + pass
5.972 + else:
5.973 + ns3_module_flow_monitor__local.register_functions(root_module)
5.974 +
5.975 + root_module.end_section('ns3_module_flow_monitor')
5.976 root_module.begin_section('ns3_module_radvd')
5.977 ns3_module_radvd.register_functions(root_module)
5.978
5.979 @@ -1270,28 +1292,6 @@
5.980 ns3_module_radvd__local.register_functions(root_module)
5.981
5.982 root_module.end_section('ns3_module_radvd')
5.983 - root_module.begin_section('ns3_module_ping6')
5.984 - ns3_module_ping6.register_functions(root_module)
5.985 -
5.986 - try:
5.987 - import ns3_module_ping6__local
5.988 - except ImportError:
5.989 - pass
5.990 - else:
5.991 - ns3_module_ping6__local.register_functions(root_module)
5.992 -
5.993 - root_module.end_section('ns3_module_ping6')
5.994 - root_module.begin_section('ns3_module_flow_monitor')
5.995 - ns3_module_flow_monitor.register_functions(root_module)
5.996 -
5.997 - try:
5.998 - import ns3_module_flow_monitor__local
5.999 - except ImportError:
5.1000 - pass
5.1001 - else:
5.1002 - ns3_module_flow_monitor__local.register_functions(root_module)
5.1003 -
5.1004 - root_module.end_section('ns3_module_flow_monitor')
5.1005 root_module.begin_section('ns3_module_mesh')
5.1006 ns3_module_mesh.register_functions(root_module)
5.1007
6.1 --- a/bindings/python/apidefs/gcc-LP64/ns3_module_core.py Mon Nov 02 10:49:39 2009 -0500
6.2 +++ b/bindings/python/apidefs/gcc-LP64/ns3_module_core.py Mon Nov 02 10:56:30 2009 -0500
6.3 @@ -273,6 +273,7 @@
6.4 root_module = module.get_root()
6.5
6.6 module.add_container('std::vector< ns3::Ptr< ns3::dot11s::IeBeaconTimingUnit > >', 'ns3::Ptr< ns3::dot11s::IeBeaconTimingUnit >', container_type='vector')
6.7 + module.add_container('std::vector< ns3::Ptr< ns3::dot11s::PeerLink > >', 'ns3::Ptr< ns3::dot11s::PeerLink >', container_type='vector')
6.8
6.9 def register_types_ns3_flame(module):
6.10 root_module = module.get_root()
7.1 --- a/bindings/python/apidefs/gcc-LP64/ns3_module_dot11s.py Mon Nov 02 10:49:39 2009 -0500
7.2 +++ b/bindings/python/apidefs/gcc-LP64/ns3_module_dot11s.py Mon Nov 02 10:56:30 2009 -0500
7.3 @@ -599,6 +599,11 @@
7.4 cls.add_method('SetLocalAid',
7.5 'void',
7.6 [param('uint16_t', 'aid')])
7.7 + ## peer-link.h: uint16_t ns3::dot11s::PeerLink::GetPeerAid() const [member function]
7.8 + cls.add_method('GetPeerAid',
7.9 + 'uint16_t',
7.10 + [],
7.11 + is_const=True)
7.12 ## peer-link.h: void ns3::dot11s::PeerLink::SetBeaconTimingElement(ns3::dot11s::IeBeaconTiming beaconTiming) [member function]
7.13 cls.add_method('SetBeaconTimingElement',
7.14 'void',
7.15 @@ -675,14 +680,15 @@
7.16 cls.add_method('FindPeerLink',
7.17 'ns3::Ptr< ns3::dot11s::PeerLink >',
7.18 [param('uint32_t', 'interface'), param('ns3::Mac48Address', 'peerAddress')])
7.19 - ## peer-management-protocol.h: std::vector<ns3::Mac48Address,std::allocator<ns3::Mac48Address> > ns3::dot11s::PeerManagementProtocol::GetActiveLinks(uint32_t interface) [member function]
7.20 - cls.add_method('GetActiveLinks',
7.21 - 'std::vector< ns3::Mac48Address >',
7.22 - [param('uint32_t', 'interface')])
7.23 ## peer-management-protocol.h: ns3::Mac48Address ns3::dot11s::PeerManagementProtocol::GetAddress() [member function]
7.24 cls.add_method('GetAddress',
7.25 'ns3::Mac48Address',
7.26 [])
7.27 + ## peer-management-protocol.h: bool ns3::dot11s::PeerManagementProtocol::GetBeaconCollisionAvoidance() const [member function]
7.28 + cls.add_method('GetBeaconCollisionAvoidance',
7.29 + 'bool',
7.30 + [],
7.31 + is_const=True)
7.32 ## peer-management-protocol.h: ns3::Ptr<ns3::dot11s::IeBeaconTiming> ns3::dot11s::PeerManagementProtocol::GetBeaconTimingElement(uint32_t interface) [member function]
7.33 cls.add_method('GetBeaconTimingElement',
7.34 'ns3::Ptr< ns3::dot11s::IeBeaconTiming >',
7.35 @@ -696,6 +702,16 @@
7.36 cls.add_method('GetNumberOfLinks',
7.37 'uint8_t',
7.38 [])
7.39 + ## peer-management-protocol.h: std::vector<ns3::Ptr<ns3::dot11s::PeerLink>,std::allocator<ns3::Ptr<ns3::dot11s::PeerLink> > > ns3::dot11s::PeerManagementProtocol::GetPeerLinks() const [member function]
7.40 + cls.add_method('GetPeerLinks',
7.41 + 'std::vector< ns3::Ptr< ns3::dot11s::PeerLink > >',
7.42 + [],
7.43 + is_const=True)
7.44 + ## peer-management-protocol.h: std::vector<ns3::Mac48Address,std::allocator<ns3::Mac48Address> > ns3::dot11s::PeerManagementProtocol::GetPeers(uint32_t interface) const [member function]
7.45 + cls.add_method('GetPeers',
7.46 + 'std::vector< ns3::Mac48Address >',
7.47 + [param('uint32_t', 'interface')],
7.48 + is_const=True)
7.49 ## peer-management-protocol.h: static ns3::TypeId ns3::dot11s::PeerManagementProtocol::GetTypeId() [member function]
7.50 cls.add_method('GetTypeId',
7.51 'ns3::TypeId',
7.52 @@ -709,6 +725,14 @@
7.53 cls.add_method('IsActiveLink',
7.54 'bool',
7.55 [param('uint32_t', 'interface'), param('ns3::Mac48Address', 'peerAddress')])
7.56 + ## peer-management-protocol.h: void ns3::dot11s::PeerManagementProtocol::NotifyBeaconSent(uint32_t interface, ns3::Time beaconInterval) [member function]
7.57 + cls.add_method('NotifyBeaconSent',
7.58 + 'void',
7.59 + [param('uint32_t', 'interface'), param('ns3::Time', 'beaconInterval')])
7.60 + ## peer-management-protocol.h: void ns3::dot11s::PeerManagementProtocol::ReceiveBeacon(uint32_t interface, ns3::Mac48Address peerAddress, ns3::Time beaconInterval, ns3::Ptr<ns3::dot11s::IeBeaconTiming> beaconTiming) [member function]
7.61 + cls.add_method('ReceiveBeacon',
7.62 + 'void',
7.63 + [param('uint32_t', 'interface'), param('ns3::Mac48Address', 'peerAddress'), param('ns3::Time', 'beaconInterval'), param('ns3::Ptr< ns3::dot11s::IeBeaconTiming >', 'beaconTiming')])
7.64 ## peer-management-protocol.h: void ns3::dot11s::PeerManagementProtocol::ReceivePeerLinkFrame(uint32_t interface, ns3::Mac48Address peerAddress, ns3::Mac48Address peerMeshPointAddress, uint16_t aid, ns3::dot11s::IePeerManagement peerManagementElement, ns3::dot11s::IeConfiguration meshConfig) [member function]
7.65 cls.add_method('ReceivePeerLinkFrame',
7.66 'void',
7.67 @@ -722,6 +746,10 @@
7.68 cls.add_method('ResetStats',
7.69 'void',
7.70 [])
7.71 + ## peer-management-protocol.h: void ns3::dot11s::PeerManagementProtocol::SetBeaconCollisionAvoidance(bool enable) [member function]
7.72 + cls.add_method('SetBeaconCollisionAvoidance',
7.73 + 'void',
7.74 + [param('bool', 'enable')])
7.75 ## peer-management-protocol.h: void ns3::dot11s::PeerManagementProtocol::SetMeshId(std::string s) [member function]
7.76 cls.add_method('SetMeshId',
7.77 'void',
7.78 @@ -738,10 +766,6 @@
7.79 cls.add_method('TransmissionSuccess',
7.80 'void',
7.81 [param('uint32_t', 'interface'), param('ns3::Mac48Address const', 'peerAddress')])
7.82 - ## peer-management-protocol.h: void ns3::dot11s::PeerManagementProtocol::UpdatePeerBeaconTiming(uint32_t interface, bool meshBeacon, ns3::dot11s::IeBeaconTiming timingElement, ns3::Mac48Address peerAddress, ns3::Time receivingTime, ns3::Time beaconInterval) [member function]
7.83 - cls.add_method('UpdatePeerBeaconTiming',
7.84 - 'void',
7.85 - [param('uint32_t', 'interface'), param('bool', 'meshBeacon'), param('ns3::dot11s::IeBeaconTiming', 'timingElement'), param('ns3::Mac48Address', 'peerAddress'), param('ns3::Time', 'receivingTime'), param('ns3::Time', 'beaconInterval')])
7.86 return
7.87
7.88 def register_functions(root_module):
8.1 --- a/bindings/python/apidefs/gcc-LP64/ns3_module_helper.py Mon Nov 02 10:49:39 2009 -0500
8.2 +++ b/bindings/python/apidefs/gcc-LP64/ns3_module_helper.py Mon Nov 02 10:56:30 2009 -0500
8.3 @@ -650,10 +650,10 @@
8.4 cls.add_method('Add',
8.5 'void',
8.6 [param('ns3::Ptr< ns3::Ipv4 >', 'ipv4'), param('uint32_t', 'interface')])
8.7 - ## ipv4-interface-container.h: void ns3::Ipv4InterfaceContainer::Add(std::pair<ns3::Ptr<ns3::Ipv4>,unsigned int> arg0) [member function]
8.8 + ## ipv4-interface-container.h: void ns3::Ipv4InterfaceContainer::Add(std::pair<ns3::Ptr<ns3::Ipv4>,unsigned int> ipInterfacePair) [member function]
8.9 cls.add_method('Add',
8.10 'void',
8.11 - [param('std::pair< ns3::Ptr< ns3::Ipv4 >, unsigned int >', 'arg0')])
8.12 + [param('std::pair< ns3::Ptr< ns3::Ipv4 >, unsigned int >', 'ipInterfacePair')])
8.13 ## ipv4-interface-container.h: void ns3::Ipv4InterfaceContainer::Add(std::string ipv4Name, uint32_t interface) [member function]
8.14 cls.add_method('Add',
8.15 'void',
9.1 --- a/bindings/python/apidefs/gcc-LP64/ns3_module_mesh.py Mon Nov 02 10:49:39 2009 -0500
9.2 +++ b/bindings/python/apidefs/gcc-LP64/ns3_module_mesh.py Mon Nov 02 10:56:30 2009 -0500
9.3 @@ -122,6 +122,11 @@
9.4 cls.add_method('CreatePacket',
9.5 'ns3::Ptr< ns3::Packet >',
9.6 [])
9.7 + ## mesh-wifi-beacon.h: ns3::Time ns3::MeshWifiBeacon::GetBeaconInterval() const [member function]
9.8 + cls.add_method('GetBeaconInterval',
9.9 + 'ns3::Time',
9.10 + [],
9.11 + is_const=True)
9.12 return
9.13
9.14 def register_Ns3WifiInformationElement_methods(root_module, cls):
10.1 --- a/bindings/python/apidefs/gcc-LP64/ns3modulegen_generated.py Mon Nov 02 10:49:39 2009 -0500
10.2 +++ b/bindings/python/apidefs/gcc-LP64/ns3modulegen_generated.py Mon Nov 02 10:56:30 2009 -0500
10.3 @@ -17,29 +17,29 @@
10.4 import ns3_module_test
10.5 import ns3_module_mobility
10.6 import ns3_module_common
10.7 +import ns3_module_node
10.8 import ns3_module_contrib
10.9 -import ns3_module_node
10.10 -import ns3_module_tap_bridge
10.11 -import ns3_module_v4ping
10.12 -import ns3_module_static_routing
10.13 -import ns3_module_packet_sink
10.14 -import ns3_module_stats
10.15 -import ns3_module_onoff
10.16 import ns3_module_point_to_point
10.17 import ns3_module_internet_stack
10.18 +import ns3_module_tap_bridge
10.19 import ns3_module_csma
10.20 +import ns3_module_wifi
10.21 +import ns3_module_static_routing
10.22 +import ns3_module_v4ping
10.23 +import ns3_module_virtual_net_device
10.24 +import ns3_module_packet_sink
10.25 +import ns3_module_global_routing
10.26 +import ns3_module_stats
10.27 import ns3_module_list_routing
10.28 -import ns3_module_virtual_net_device
10.29 -import ns3_module_wifi
10.30 import ns3_module_emu
10.31 import ns3_module_bridge
10.32 -import ns3_module_global_routing
10.33 +import ns3_module_onoff
10.34 import ns3_module_udp_echo
10.35 +import ns3_module_ping6
10.36 import ns3_module_nix_vector_routing
10.37 import ns3_module_olsr
10.38 +import ns3_module_flow_monitor
10.39 import ns3_module_radvd
10.40 -import ns3_module_ping6
10.41 -import ns3_module_flow_monitor
10.42 import ns3_module_mesh
10.43 import ns3_module_helper
10.44 import ns3_module_dot11s
10.45 @@ -107,6 +107,17 @@
10.46 ns3_module_common__local.register_types(module)
10.47
10.48 root_module.end_section('ns3_module_common')
10.49 + root_module.begin_section('ns3_module_node')
10.50 + ns3_module_node.register_types(module)
10.51 +
10.52 + try:
10.53 + import ns3_module_node__local
10.54 + except ImportError:
10.55 + pass
10.56 + else:
10.57 + ns3_module_node__local.register_types(module)
10.58 +
10.59 + root_module.end_section('ns3_module_node')
10.60 root_module.begin_section('ns3_module_contrib')
10.61 ns3_module_contrib.register_types(module)
10.62
10.63 @@ -118,83 +129,6 @@
10.64 ns3_module_contrib__local.register_types(module)
10.65
10.66 root_module.end_section('ns3_module_contrib')
10.67 - root_module.begin_section('ns3_module_node')
10.68 - ns3_module_node.register_types(module)
10.69 -
10.70 - try:
10.71 - import ns3_module_node__local
10.72 - except ImportError:
10.73 - pass
10.74 - else:
10.75 - ns3_module_node__local.register_types(module)
10.76 -
10.77 - root_module.end_section('ns3_module_node')
10.78 - root_module.begin_section('ns3_module_tap_bridge')
10.79 - ns3_module_tap_bridge.register_types(module)
10.80 -
10.81 - try:
10.82 - import ns3_module_tap_bridge__local
10.83 - except ImportError:
10.84 - pass
10.85 - else:
10.86 - ns3_module_tap_bridge__local.register_types(module)
10.87 -
10.88 - root_module.end_section('ns3_module_tap_bridge')
10.89 - root_module.begin_section('ns3_module_v4ping')
10.90 - ns3_module_v4ping.register_types(module)
10.91 -
10.92 - try:
10.93 - import ns3_module_v4ping__local
10.94 - except ImportError:
10.95 - pass
10.96 - else:
10.97 - ns3_module_v4ping__local.register_types(module)
10.98 -
10.99 - root_module.end_section('ns3_module_v4ping')
10.100 - root_module.begin_section('ns3_module_static_routing')
10.101 - ns3_module_static_routing.register_types(module)
10.102 -
10.103 - try:
10.104 - import ns3_module_static_routing__local
10.105 - except ImportError:
10.106 - pass
10.107 - else:
10.108 - ns3_module_static_routing__local.register_types(module)
10.109 -
10.110 - root_module.end_section('ns3_module_static_routing')
10.111 - root_module.begin_section('ns3_module_packet_sink')
10.112 - ns3_module_packet_sink.register_types(module)
10.113 -
10.114 - try:
10.115 - import ns3_module_packet_sink__local
10.116 - except ImportError:
10.117 - pass
10.118 - else:
10.119 - ns3_module_packet_sink__local.register_types(module)
10.120 -
10.121 - root_module.end_section('ns3_module_packet_sink')
10.122 - root_module.begin_section('ns3_module_stats')
10.123 - ns3_module_stats.register_types(module)
10.124 -
10.125 - try:
10.126 - import ns3_module_stats__local
10.127 - except ImportError:
10.128 - pass
10.129 - else:
10.130 - ns3_module_stats__local.register_types(module)
10.131 -
10.132 - root_module.end_section('ns3_module_stats')
10.133 - root_module.begin_section('ns3_module_onoff')
10.134 - ns3_module_onoff.register_types(module)
10.135 -
10.136 - try:
10.137 - import ns3_module_onoff__local
10.138 - except ImportError:
10.139 - pass
10.140 - else:
10.141 - ns3_module_onoff__local.register_types(module)
10.142 -
10.143 - root_module.end_section('ns3_module_onoff')
10.144 root_module.begin_section('ns3_module_point_to_point')
10.145 ns3_module_point_to_point.register_types(module)
10.146
10.147 @@ -217,6 +151,17 @@
10.148 ns3_module_internet_stack__local.register_types(module)
10.149
10.150 root_module.end_section('ns3_module_internet_stack')
10.151 + root_module.begin_section('ns3_module_tap_bridge')
10.152 + ns3_module_tap_bridge.register_types(module)
10.153 +
10.154 + try:
10.155 + import ns3_module_tap_bridge__local
10.156 + except ImportError:
10.157 + pass
10.158 + else:
10.159 + ns3_module_tap_bridge__local.register_types(module)
10.160 +
10.161 + root_module.end_section('ns3_module_tap_bridge')
10.162 root_module.begin_section('ns3_module_csma')
10.163 ns3_module_csma.register_types(module)
10.164
10.165 @@ -228,6 +173,83 @@
10.166 ns3_module_csma__local.register_types(module)
10.167
10.168 root_module.end_section('ns3_module_csma')
10.169 + root_module.begin_section('ns3_module_wifi')
10.170 + ns3_module_wifi.register_types(module)
10.171 +
10.172 + try:
10.173 + import ns3_module_wifi__local
10.174 + except ImportError:
10.175 + pass
10.176 + else:
10.177 + ns3_module_wifi__local.register_types(module)
10.178 +
10.179 + root_module.end_section('ns3_module_wifi')
10.180 + root_module.begin_section('ns3_module_static_routing')
10.181 + ns3_module_static_routing.register_types(module)
10.182 +
10.183 + try:
10.184 + import ns3_module_static_routing__local
10.185 + except ImportError:
10.186 + pass
10.187 + else:
10.188 + ns3_module_static_routing__local.register_types(module)
10.189 +
10.190 + root_module.end_section('ns3_module_static_routing')
10.191 + root_module.begin_section('ns3_module_v4ping')
10.192 + ns3_module_v4ping.register_types(module)
10.193 +
10.194 + try:
10.195 + import ns3_module_v4ping__local
10.196 + except ImportError:
10.197 + pass
10.198 + else:
10.199 + ns3_module_v4ping__local.register_types(module)
10.200 +
10.201 + root_module.end_section('ns3_module_v4ping')
10.202 + root_module.begin_section('ns3_module_virtual_net_device')
10.203 + ns3_module_virtual_net_device.register_types(module)
10.204 +
10.205 + try:
10.206 + import ns3_module_virtual_net_device__local
10.207 + except ImportError:
10.208 + pass
10.209 + else:
10.210 + ns3_module_virtual_net_device__local.register_types(module)
10.211 +
10.212 + root_module.end_section('ns3_module_virtual_net_device')
10.213 + root_module.begin_section('ns3_module_packet_sink')
10.214 + ns3_module_packet_sink.register_types(module)
10.215 +
10.216 + try:
10.217 + import ns3_module_packet_sink__local
10.218 + except ImportError:
10.219 + pass
10.220 + else:
10.221 + ns3_module_packet_sink__local.register_types(module)
10.222 +
10.223 + root_module.end_section('ns3_module_packet_sink')
10.224 + root_module.begin_section('ns3_module_global_routing')
10.225 + ns3_module_global_routing.register_types(module)
10.226 +
10.227 + try:
10.228 + import ns3_module_global_routing__local
10.229 + except ImportError:
10.230 + pass
10.231 + else:
10.232 + ns3_module_global_routing__local.register_types(module)
10.233 +
10.234 + root_module.end_section('ns3_module_global_routing')
10.235 + root_module.begin_section('ns3_module_stats')
10.236 + ns3_module_stats.register_types(module)
10.237 +
10.238 + try:
10.239 + import ns3_module_stats__local
10.240 + except ImportError:
10.241 + pass
10.242 + else:
10.243 + ns3_module_stats__local.register_types(module)
10.244 +
10.245 + root_module.end_section('ns3_module_stats')
10.246 root_module.begin_section('ns3_module_list_routing')
10.247 ns3_module_list_routing.register_types(module)
10.248
10.249 @@ -239,28 +261,6 @@
10.250 ns3_module_list_routing__local.register_types(module)
10.251
10.252 root_module.end_section('ns3_module_list_routing')
10.253 - root_module.begin_section('ns3_module_virtual_net_device')
10.254 - ns3_module_virtual_net_device.register_types(module)
10.255 -
10.256 - try:
10.257 - import ns3_module_virtual_net_device__local
10.258 - except ImportError:
10.259 - pass
10.260 - else:
10.261 - ns3_module_virtual_net_device__local.register_types(module)
10.262 -
10.263 - root_module.end_section('ns3_module_virtual_net_device')
10.264 - root_module.begin_section('ns3_module_wifi')
10.265 - ns3_module_wifi.register_types(module)
10.266 -
10.267 - try:
10.268 - import ns3_module_wifi__local
10.269 - except ImportError:
10.270 - pass
10.271 - else:
10.272 - ns3_module_wifi__local.register_types(module)
10.273 -
10.274 - root_module.end_section('ns3_module_wifi')
10.275 root_module.begin_section('ns3_module_emu')
10.276 ns3_module_emu.register_types(module)
10.277
10.278 @@ -283,17 +283,17 @@
10.279 ns3_module_bridge__local.register_types(module)
10.280
10.281 root_module.end_section('ns3_module_bridge')
10.282 - root_module.begin_section('ns3_module_global_routing')
10.283 - ns3_module_global_routing.register_types(module)
10.284 + root_module.begin_section('ns3_module_onoff')
10.285 + ns3_module_onoff.register_types(module)
10.286
10.287 try:
10.288 - import ns3_module_global_routing__local
10.289 + import ns3_module_onoff__local
10.290 except ImportError:
10.291 pass
10.292 else:
10.293 - ns3_module_global_routing__local.register_types(module)
10.294 + ns3_module_onoff__local.register_types(module)
10.295
10.296 - root_module.end_section('ns3_module_global_routing')
10.297 + root_module.end_section('ns3_module_onoff')
10.298 root_module.begin_section('ns3_module_udp_echo')
10.299 ns3_module_udp_echo.register_types(module)
10.300
10.301 @@ -305,6 +305,17 @@
10.302 ns3_module_udp_echo__local.register_types(module)
10.303
10.304 root_module.end_section('ns3_module_udp_echo')
10.305 + root_module.begin_section('ns3_module_ping6')
10.306 + ns3_module_ping6.register_types(module)
10.307 +
10.308 + try:
10.309 + import ns3_module_ping6__local
10.310 + except ImportError:
10.311 + pass
10.312 + else:
10.313 + ns3_module_ping6__local.register_types(module)
10.314 +
10.315 + root_module.end_section('ns3_module_ping6')
10.316 root_module.begin_section('ns3_module_nix_vector_routing')
10.317 ns3_module_nix_vector_routing.register_types(module)
10.318
10.319 @@ -327,6 +338,17 @@
10.320 ns3_module_olsr__local.register_types(module)
10.321
10.322 root_module.end_section('ns3_module_olsr')
10.323 + root_module.begin_section('ns3_module_flow_monitor')
10.324 + ns3_module_flow_monitor.register_types(module)
10.325 +
10.326 + try:
10.327 + import ns3_module_flow_monitor__local
10.328 + except ImportError:
10.329 + pass
10.330 + else:
10.331 + ns3_module_flow_monitor__local.register_types(module)
10.332 +
10.333 + root_module.end_section('ns3_module_flow_monitor')
10.334 root_module.begin_section('ns3_module_radvd')
10.335 ns3_module_radvd.register_types(module)
10.336
10.337 @@ -338,28 +360,6 @@
10.338 ns3_module_radvd__local.register_types(module)
10.339
10.340 root_module.end_section('ns3_module_radvd')
10.341 - root_module.begin_section('ns3_module_ping6')
10.342 - ns3_module_ping6.register_types(module)
10.343 -
10.344 - try:
10.345 - import ns3_module_ping6__local
10.346 - except ImportError:
10.347 - pass
10.348 - else:
10.349 - ns3_module_ping6__local.register_types(module)
10.350 -
10.351 - root_module.end_section('ns3_module_ping6')
10.352 - root_module.begin_section('ns3_module_flow_monitor')
10.353 - ns3_module_flow_monitor.register_types(module)
10.354 -
10.355 - try:
10.356 - import ns3_module_flow_monitor__local
10.357 - except ImportError:
10.358 - pass
10.359 - else:
10.360 - ns3_module_flow_monitor__local.register_types(module)
10.361 -
10.362 - root_module.end_section('ns3_module_flow_monitor')
10.363 root_module.begin_section('ns3_module_mesh')
10.364 ns3_module_mesh.register_types(module)
10.365
10.366 @@ -549,6 +549,17 @@
10.367 ns3_module_common__local.register_methods(root_module)
10.368
10.369 root_module.end_section('ns3_module_common')
10.370 + root_module.begin_section('ns3_module_node')
10.371 + ns3_module_node.register_methods(root_module)
10.372 +
10.373 + try:
10.374 + import ns3_module_node__local
10.375 + except ImportError:
10.376 + pass
10.377 + else:
10.378 + ns3_module_node__local.register_methods(root_module)
10.379 +
10.380 + root_module.end_section('ns3_module_node')
10.381 root_module.begin_section('ns3_module_contrib')
10.382 ns3_module_contrib.register_methods(root_module)
10.383
10.384 @@ -560,83 +571,6 @@
10.385 ns3_module_contrib__local.register_methods(root_module)
10.386
10.387 root_module.end_section('ns3_module_contrib')
10.388 - root_module.begin_section('ns3_module_node')
10.389 - ns3_module_node.register_methods(root_module)
10.390 -
10.391 - try:
10.392 - import ns3_module_node__local
10.393 - except ImportError:
10.394 - pass
10.395 - else:
10.396 - ns3_module_node__local.register_methods(root_module)
10.397 -
10.398 - root_module.end_section('ns3_module_node')
10.399 - root_module.begin_section('ns3_module_tap_bridge')
10.400 - ns3_module_tap_bridge.register_methods(root_module)
10.401 -
10.402 - try:
10.403 - import ns3_module_tap_bridge__local
10.404 - except ImportError:
10.405 - pass
10.406 - else:
10.407 - ns3_module_tap_bridge__local.register_methods(root_module)
10.408 -
10.409 - root_module.end_section('ns3_module_tap_bridge')
10.410 - root_module.begin_section('ns3_module_v4ping')
10.411 - ns3_module_v4ping.register_methods(root_module)
10.412 -
10.413 - try:
10.414 - import ns3_module_v4ping__local
10.415 - except ImportError:
10.416 - pass
10.417 - else:
10.418 - ns3_module_v4ping__local.register_methods(root_module)
10.419 -
10.420 - root_module.end_section('ns3_module_v4ping')
10.421 - root_module.begin_section('ns3_module_static_routing')
10.422 - ns3_module_static_routing.register_methods(root_module)
10.423 -
10.424 - try:
10.425 - import ns3_module_static_routing__local
10.426 - except ImportError:
10.427 - pass
10.428 - else:
10.429 - ns3_module_static_routing__local.register_methods(root_module)
10.430 -
10.431 - root_module.end_section('ns3_module_static_routing')
10.432 - root_module.begin_section('ns3_module_packet_sink')
10.433 - ns3_module_packet_sink.register_methods(root_module)
10.434 -
10.435 - try:
10.436 - import ns3_module_packet_sink__local
10.437 - except ImportError:
10.438 - pass
10.439 - else:
10.440 - ns3_module_packet_sink__local.register_methods(root_module)
10.441 -
10.442 - root_module.end_section('ns3_module_packet_sink')
10.443 - root_module.begin_section('ns3_module_stats')
10.444 - ns3_module_stats.register_methods(root_module)
10.445 -
10.446 - try:
10.447 - import ns3_module_stats__local
10.448 - except ImportError:
10.449 - pass
10.450 - else:
10.451 - ns3_module_stats__local.register_methods(root_module)
10.452 -
10.453 - root_module.end_section('ns3_module_stats')
10.454 - root_module.begin_section('ns3_module_onoff')
10.455 - ns3_module_onoff.register_methods(root_module)
10.456 -
10.457 - try:
10.458 - import ns3_module_onoff__local
10.459 - except ImportError:
10.460 - pass
10.461 - else:
10.462 - ns3_module_onoff__local.register_methods(root_module)
10.463 -
10.464 - root_module.end_section('ns3_module_onoff')
10.465 root_module.begin_section('ns3_module_point_to_point')
10.466 ns3_module_point_to_point.register_methods(root_module)
10.467
10.468 @@ -659,6 +593,17 @@
10.469 ns3_module_internet_stack__local.register_methods(root_module)
10.470
10.471 root_module.end_section('ns3_module_internet_stack')
10.472 + root_module.begin_section('ns3_module_tap_bridge')
10.473 + ns3_module_tap_bridge.register_methods(root_module)
10.474 +
10.475 + try:
10.476 + import ns3_module_tap_bridge__local
10.477 + except ImportError:
10.478 + pass
10.479 + else:
10.480 + ns3_module_tap_bridge__local.register_methods(root_module)
10.481 +
10.482 + root_module.end_section('ns3_module_tap_bridge')
10.483 root_module.begin_section('ns3_module_csma')
10.484 ns3_module_csma.register_methods(root_module)
10.485
10.486 @@ -670,6 +615,83 @@
10.487 ns3_module_csma__local.register_methods(root_module)
10.488
10.489 root_module.end_section('ns3_module_csma')
10.490 + root_module.begin_section('ns3_module_wifi')
10.491 + ns3_module_wifi.register_methods(root_module)
10.492 +
10.493 + try:
10.494 + import ns3_module_wifi__local
10.495 + except ImportError:
10.496 + pass
10.497 + else:
10.498 + ns3_module_wifi__local.register_methods(root_module)
10.499 +
10.500 + root_module.end_section('ns3_module_wifi')
10.501 + root_module.begin_section('ns3_module_static_routing')
10.502 + ns3_module_static_routing.register_methods(root_module)
10.503 +
10.504 + try:
10.505 + import ns3_module_static_routing__local
10.506 + except ImportError:
10.507 + pass
10.508 + else:
10.509 + ns3_module_static_routing__local.register_methods(root_module)
10.510 +
10.511 + root_module.end_section('ns3_module_static_routing')
10.512 + root_module.begin_section('ns3_module_v4ping')
10.513 + ns3_module_v4ping.register_methods(root_module)
10.514 +
10.515 + try:
10.516 + import ns3_module_v4ping__local
10.517 + except ImportError:
10.518 + pass
10.519 + else:
10.520 + ns3_module_v4ping__local.register_methods(root_module)
10.521 +
10.522 + root_module.end_section('ns3_module_v4ping')
10.523 + root_module.begin_section('ns3_module_virtual_net_device')
10.524 + ns3_module_virtual_net_device.register_methods(root_module)
10.525 +
10.526 + try:
10.527 + import ns3_module_virtual_net_device__local
10.528 + except ImportError:
10.529 + pass
10.530 + else:
10.531 + ns3_module_virtual_net_device__local.register_methods(root_module)
10.532 +
10.533 + root_module.end_section('ns3_module_virtual_net_device')
10.534 + root_module.begin_section('ns3_module_packet_sink')
10.535 + ns3_module_packet_sink.register_methods(root_module)
10.536 +
10.537 + try:
10.538 + import ns3_module_packet_sink__local
10.539 + except ImportError:
10.540 + pass
10.541 + else:
10.542 + ns3_module_packet_sink__local.register_methods(root_module)
10.543 +
10.544 + root_module.end_section('ns3_module_packet_sink')
10.545 + root_module.begin_section('ns3_module_global_routing')
10.546 + ns3_module_global_routing.register_methods(root_module)
10.547 +
10.548 + try:
10.549 + import ns3_module_global_routing__local
10.550 + except ImportError:
10.551 + pass
10.552 + else:
10.553 + ns3_module_global_routing__local.register_methods(root_module)
10.554 +
10.555 + root_module.end_section('ns3_module_global_routing')
10.556 + root_module.begin_section('ns3_module_stats')
10.557 + ns3_module_stats.register_methods(root_module)
10.558 +
10.559 + try:
10.560 + import ns3_module_stats__local
10.561 + except ImportError:
10.562 + pass
10.563 + else:
10.564 + ns3_module_stats__local.register_methods(root_module)
10.565 +
10.566 + root_module.end_section('ns3_module_stats')
10.567 root_module.begin_section('ns3_module_list_routing')
10.568 ns3_module_list_routing.register_methods(root_module)
10.569
10.570 @@ -681,28 +703,6 @@
10.571 ns3_module_list_routing__local.register_methods(root_module)
10.572
10.573 root_module.end_section('ns3_module_list_routing')
10.574 - root_module.begin_section('ns3_module_virtual_net_device')
10.575 - ns3_module_virtual_net_device.register_methods(root_module)
10.576 -
10.577 - try:
10.578 - import ns3_module_virtual_net_device__local
10.579 - except ImportError:
10.580 - pass
10.581 - else:
10.582 - ns3_module_virtual_net_device__local.register_methods(root_module)
10.583 -
10.584 - root_module.end_section('ns3_module_virtual_net_device')
10.585 - root_module.begin_section('ns3_module_wifi')
10.586 - ns3_module_wifi.register_methods(root_module)
10.587 -
10.588 - try:
10.589 - import ns3_module_wifi__local
10.590 - except ImportError:
10.591 - pass
10.592 - else:
10.593 - ns3_module_wifi__local.register_methods(root_module)
10.594 -
10.595 - root_module.end_section('ns3_module_wifi')
10.596 root_module.begin_section('ns3_module_emu')
10.597 ns3_module_emu.register_methods(root_module)
10.598
10.599 @@ -725,17 +725,17 @@
10.600 ns3_module_bridge__local.register_methods(root_module)
10.601
10.602 root_module.end_section('ns3_module_bridge')
10.603 - root_module.begin_section('ns3_module_global_routing')
10.604 - ns3_module_global_routing.register_methods(root_module)
10.605 + root_module.begin_section('ns3_module_onoff')
10.606 + ns3_module_onoff.register_methods(root_module)
10.607
10.608 try:
10.609 - import ns3_module_global_routing__local
10.610 + import ns3_module_onoff__local
10.611 except ImportError:
10.612 pass
10.613 else:
10.614 - ns3_module_global_routing__local.register_methods(root_module)
10.615 + ns3_module_onoff__local.register_methods(root_module)
10.616
10.617 - root_module.end_section('ns3_module_global_routing')
10.618 + root_module.end_section('ns3_module_onoff')
10.619 root_module.begin_section('ns3_module_udp_echo')
10.620 ns3_module_udp_echo.register_methods(root_module)
10.621
10.622 @@ -747,6 +747,17 @@
10.623 ns3_module_udp_echo__local.register_methods(root_module)
10.624
10.625 root_module.end_section('ns3_module_udp_echo')
10.626 + root_module.begin_section('ns3_module_ping6')
10.627 + ns3_module_ping6.register_methods(root_module)
10.628 +
10.629 + try:
10.630 + import ns3_module_ping6__local
10.631 + except ImportError:
10.632 + pass
10.633 + else:
10.634 + ns3_module_ping6__local.register_methods(root_module)
10.635 +
10.636 + root_module.end_section('ns3_module_ping6')
10.637 root_module.begin_section('ns3_module_nix_vector_routing')
10.638 ns3_module_nix_vector_routing.register_methods(root_module)
10.639
10.640 @@ -769,6 +780,17 @@
10.641 ns3_module_olsr__local.register_methods(root_module)
10.642
10.643 root_module.end_section('ns3_module_olsr')
10.644 + root_module.begin_section('ns3_module_flow_monitor')
10.645 + ns3_module_flow_monitor.register_methods(root_module)
10.646 +
10.647 + try:
10.648 + import ns3_module_flow_monitor__local
10.649 + except ImportError:
10.650 + pass
10.651 + else:
10.652 + ns3_module_flow_monitor__local.register_methods(root_module)
10.653 +
10.654 + root_module.end_section('ns3_module_flow_monitor')
10.655 root_module.begin_section('ns3_module_radvd')
10.656 ns3_module_radvd.register_methods(root_module)
10.657
10.658 @@ -780,28 +802,6 @@
10.659 ns3_module_radvd__local.register_methods(root_module)
10.660
10.661 root_module.end_section('ns3_module_radvd')
10.662 - root_module.begin_section('ns3_module_ping6')
10.663 - ns3_module_ping6.register_methods(root_module)
10.664 -
10.665 - try:
10.666 - import ns3_module_ping6__local
10.667 - except ImportError:
10.668 - pass
10.669 - else:
10.670 - ns3_module_ping6__local.register_methods(root_module)
10.671 -
10.672 - root_module.end_section('ns3_module_ping6')
10.673 - root_module.begin_section('ns3_module_flow_monitor')
10.674 - ns3_module_flow_monitor.register_methods(root_module)
10.675 -
10.676 - try:
10.677 - import ns3_module_flow_monitor__local
10.678 - except ImportError:
10.679 - pass
10.680 - else:
10.681 - ns3_module_flow_monitor__local.register_methods(root_module)
10.682 -
10.683 - root_module.end_section('ns3_module_flow_monitor')
10.684 root_module.begin_section('ns3_module_mesh')
10.685 ns3_module_mesh.register_methods(root_module)
10.686
10.687 @@ -1039,6 +1039,17 @@
10.688 ns3_module_common__local.register_functions(root_module)
10.689
10.690 root_module.end_section('ns3_module_common')
10.691 + root_module.begin_section('ns3_module_node')
10.692 + ns3_module_node.register_functions(root_module)
10.693 +
10.694 + try:
10.695 + import ns3_module_node__local
10.696 + except ImportError:
10.697 + pass
10.698 + else:
10.699 + ns3_module_node__local.register_functions(root_module)
10.700 +
10.701 + root_module.end_section('ns3_module_node')
10.702 root_module.begin_section('ns3_module_contrib')
10.703 ns3_module_contrib.register_functions(root_module)
10.704
10.705 @@ -1050,83 +1061,6 @@
10.706 ns3_module_contrib__local.register_functions(root_module)
10.707
10.708 root_module.end_section('ns3_module_contrib')
10.709 - root_module.begin_section('ns3_module_node')
10.710 - ns3_module_node.register_functions(root_module)
10.711 -
10.712 - try:
10.713 - import ns3_module_node__local
10.714 - except ImportError:
10.715 - pass
10.716 - else:
10.717 - ns3_module_node__local.register_functions(root_module)
10.718 -
10.719 - root_module.end_section('ns3_module_node')
10.720 - root_module.begin_section('ns3_module_tap_bridge')
10.721 - ns3_module_tap_bridge.register_functions(root_module)
10.722 -
10.723 - try:
10.724 - import ns3_module_tap_bridge__local
10.725 - except ImportError:
10.726 - pass
10.727 - else:
10.728 - ns3_module_tap_bridge__local.register_functions(root_module)
10.729 -
10.730 - root_module.end_section('ns3_module_tap_bridge')
10.731 - root_module.begin_section('ns3_module_v4ping')
10.732 - ns3_module_v4ping.register_functions(root_module)
10.733 -
10.734 - try:
10.735 - import ns3_module_v4ping__local
10.736 - except ImportError:
10.737 - pass
10.738 - else:
10.739 - ns3_module_v4ping__local.register_functions(root_module)
10.740 -
10.741 - root_module.end_section('ns3_module_v4ping')
10.742 - root_module.begin_section('ns3_module_static_routing')
10.743 - ns3_module_static_routing.register_functions(root_module)
10.744 -
10.745 - try:
10.746 - import ns3_module_static_routing__local
10.747 - except ImportError:
10.748 - pass
10.749 - else:
10.750 - ns3_module_static_routing__local.register_functions(root_module)
10.751 -
10.752 - root_module.end_section('ns3_module_static_routing')
10.753 - root_module.begin_section('ns3_module_packet_sink')
10.754 - ns3_module_packet_sink.register_functions(root_module)
10.755 -
10.756 - try:
10.757 - import ns3_module_packet_sink__local
10.758 - except ImportError:
10.759 - pass
10.760 - else:
10.761 - ns3_module_packet_sink__local.register_functions(root_module)
10.762 -
10.763 - root_module.end_section('ns3_module_packet_sink')
10.764 - root_module.begin_section('ns3_module_stats')
10.765 - ns3_module_stats.register_functions(root_module)
10.766 -
10.767 - try:
10.768 - import ns3_module_stats__local
10.769 - except ImportError:
10.770 - pass
10.771 - else:
10.772 - ns3_module_stats__local.register_functions(root_module)
10.773 -
10.774 - root_module.end_section('ns3_module_stats')
10.775 - root_module.begin_section('ns3_module_onoff')
10.776 - ns3_module_onoff.register_functions(root_module)
10.777 -
10.778 - try:
10.779 - import ns3_module_onoff__local
10.780 - except ImportError:
10.781 - pass
10.782 - else:
10.783 - ns3_module_onoff__local.register_functions(root_module)
10.784 -
10.785 - root_module.end_section('ns3_module_onoff')
10.786 root_module.begin_section('ns3_module_point_to_point')
10.787 ns3_module_point_to_point.register_functions(root_module)
10.788
10.789 @@ -1149,6 +1083,17 @@
10.790 ns3_module_internet_stack__local.register_functions(root_module)
10.791
10.792 root_module.end_section('ns3_module_internet_stack')
10.793 + root_module.begin_section('ns3_module_tap_bridge')
10.794 + ns3_module_tap_bridge.register_functions(root_module)
10.795 +
10.796 + try:
10.797 + import ns3_module_tap_bridge__local
10.798 + except ImportError:
10.799 + pass
10.800 + else:
10.801 + ns3_module_tap_bridge__local.register_functions(root_module)
10.802 +
10.803 + root_module.end_section('ns3_module_tap_bridge')
10.804 root_module.begin_section('ns3_module_csma')
10.805 ns3_module_csma.register_functions(root_module)
10.806
10.807 @@ -1160,6 +1105,83 @@
10.808 ns3_module_csma__local.register_functions(root_module)
10.809
10.810 root_module.end_section('ns3_module_csma')
10.811 + root_module.begin_section('ns3_module_wifi')
10.812 + ns3_module_wifi.register_functions(root_module)
10.813 +
10.814 + try:
10.815 + import ns3_module_wifi__local
10.816 + except ImportError:
10.817 + pass
10.818 + else:
10.819 + ns3_module_wifi__local.register_functions(root_module)
10.820 +
10.821 + root_module.end_section('ns3_module_wifi')
10.822 + root_module.begin_section('ns3_module_static_routing')
10.823 + ns3_module_static_routing.register_functions(root_module)
10.824 +
10.825 + try:
10.826 + import ns3_module_static_routing__local
10.827 + except ImportError:
10.828 + pass
10.829 + else:
10.830 + ns3_module_static_routing__local.register_functions(root_module)
10.831 +
10.832 + root_module.end_section('ns3_module_static_routing')
10.833 + root_module.begin_section('ns3_module_v4ping')
10.834 + ns3_module_v4ping.register_functions(root_module)
10.835 +
10.836 + try:
10.837 + import ns3_module_v4ping__local
10.838 + except ImportError:
10.839 + pass
10.840 + else:
10.841 + ns3_module_v4ping__local.register_functions(root_module)
10.842 +
10.843 + root_module.end_section('ns3_module_v4ping')
10.844 + root_module.begin_section('ns3_module_virtual_net_device')
10.845 + ns3_module_virtual_net_device.register_functions(root_module)
10.846 +
10.847 + try:
10.848 + import ns3_module_virtual_net_device__local
10.849 + except ImportError:
10.850 + pass
10.851 + else:
10.852 + ns3_module_virtual_net_device__local.register_functions(root_module)
10.853 +
10.854 + root_module.end_section('ns3_module_virtual_net_device')
10.855 + root_module.begin_section('ns3_module_packet_sink')
10.856 + ns3_module_packet_sink.register_functions(root_module)
10.857 +
10.858 + try:
10.859 + import ns3_module_packet_sink__local
10.860 + except ImportError:
10.861 + pass
10.862 + else:
10.863 + ns3_module_packet_sink__local.register_functions(root_module)
10.864 +
10.865 + root_module.end_section('ns3_module_packet_sink')
10.866 + root_module.begin_section('ns3_module_global_routing')
10.867 + ns3_module_global_routing.register_functions(root_module)
10.868 +
10.869 + try:
10.870 + import ns3_module_global_routing__local
10.871 + except ImportError:
10.872 + pass
10.873 + else:
10.874 + ns3_module_global_routing__local.register_functions(root_module)
10.875 +
10.876 + root_module.end_section('ns3_module_global_routing')
10.877 + root_module.begin_section('ns3_module_stats')
10.878 + ns3_module_stats.register_functions(root_module)
10.879 +
10.880 + try:
10.881 + import ns3_module_stats__local
10.882 + except ImportError:
10.883 + pass
10.884 + else:
10.885 + ns3_module_stats__local.register_functions(root_module)
10.886 +
10.887 + root_module.end_section('ns3_module_stats')
10.888 root_module.begin_section('ns3_module_list_routing')
10.889 ns3_module_list_routing.register_functions(root_module)
10.890
10.891 @@ -1171,28 +1193,6 @@
10.892 ns3_module_list_routing__local.register_functions(root_module)
10.893
10.894 root_module.end_section('ns3_module_list_routing')
10.895 - root_module.begin_section('ns3_module_virtual_net_device')
10.896 - ns3_module_virtual_net_device.register_functions(root_module)
10.897 -
10.898 - try:
10.899 - import ns3_module_virtual_net_device__local
10.900 - except ImportError:
10.901 - pass
10.902 - else:
10.903 - ns3_module_virtual_net_device__local.register_functions(root_module)
10.904 -
10.905 - root_module.end_section('ns3_module_virtual_net_device')
10.906 - root_module.begin_section('ns3_module_wifi')
10.907 - ns3_module_wifi.register_functions(root_module)
10.908 -
10.909 - try:
10.910 - import ns3_module_wifi__local
10.911 - except ImportError:
10.912 - pass
10.913 - else:
10.914 - ns3_module_wifi__local.register_functions(root_module)
10.915 -
10.916 - root_module.end_section('ns3_module_wifi')
10.917 root_module.begin_section('ns3_module_emu')
10.918 ns3_module_emu.register_functions(root_module)
10.919
10.920 @@ -1215,17 +1215,17 @@
10.921 ns3_module_bridge__local.register_functions(root_module)
10.922
10.923 root_module.end_section('ns3_module_bridge')
10.924 - root_module.begin_section('ns3_module_global_routing')
10.925 - ns3_module_global_routing.register_functions(root_module)
10.926 + root_module.begin_section('ns3_module_onoff')
10.927 + ns3_module_onoff.register_functions(root_module)
10.928
10.929 try:
10.930 - import ns3_module_global_routing__local
10.931 + import ns3_module_onoff__local
10.932 except ImportError:
10.933 pass
10.934 else:
10.935 - ns3_module_global_routing__local.register_functions(root_module)
10.936 + ns3_module_onoff__local.register_functions(root_module)
10.937
10.938 - root_module.end_section('ns3_module_global_routing')
10.939 + root_module.end_section('ns3_module_onoff')
10.940 root_module.begin_section('ns3_module_udp_echo')
10.941 ns3_module_udp_echo.register_functions(root_module)
10.942
10.943 @@ -1237,6 +1237,17 @@
10.944 ns3_module_udp_echo__local.register_functions(root_module)
10.945
10.946 root_module.end_section('ns3_module_udp_echo')
10.947 + root_module.begin_section('ns3_module_ping6')
10.948 + ns3_module_ping6.register_functions(root_module)
10.949 +
10.950 + try:
10.951 + import ns3_module_ping6__local
10.952 + except ImportError:
10.953 + pass
10.954 + else:
10.955 + ns3_module_ping6__local.register_functions(root_module)
10.956 +
10.957 + root_module.end_section('ns3_module_ping6')
10.958 root_module.begin_section('ns3_module_nix_vector_routing')
10.959 ns3_module_nix_vector_routing.register_functions(root_module)
10.960
10.961 @@ -1259,6 +1270,17 @@
10.962 ns3_module_olsr__local.register_functions(root_module)
10.963
10.964 root_module.end_section('ns3_module_olsr')
10.965 + root_module.begin_section('ns3_module_flow_monitor')
10.966 + ns3_module_flow_monitor.register_functions(root_module)
10.967 +
10.968 + try:
10.969 + import ns3_module_flow_monitor__local
10.970 + except ImportError:
10.971 + pass
10.972 + else:
10.973 + ns3_module_flow_monitor__local.register_functions(root_module)
10.974 +
10.975 + root_module.end_section('ns3_module_flow_monitor')
10.976 root_module.begin_section('ns3_module_radvd')
10.977 ns3_module_radvd.register_functions(root_module)
10.978
10.979 @@ -1270,28 +1292,6 @@
10.980 ns3_module_radvd__local.register_functions(root_module)
10.981
10.982 root_module.end_section('ns3_module_radvd')
10.983 - root_module.begin_section('ns3_module_ping6')
10.984 - ns3_module_ping6.register_functions(root_module)
10.985 -
10.986 - try:
10.987 - import ns3_module_ping6__local
10.988 - except ImportError:
10.989 - pass
10.990 - else:
10.991 - ns3_module_ping6__local.register_functions(root_module)
10.992 -
10.993 - root_module.end_section('ns3_module_ping6')
10.994 - root_module.begin_section('ns3_module_flow_monitor')
10.995 - ns3_module_flow_monitor.register_functions(root_module)
10.996 -
10.997 - try:
10.998 - import ns3_module_flow_monitor__local
10.999 - except ImportError:
10.1000 - pass
10.1001 - else:
10.1002 - ns3_module_flow_monitor__local.register_functions(root_module)
10.1003 -
10.1004 - root_module.end_section('ns3_module_flow_monitor')
10.1005 root_module.begin_section('ns3_module_mesh')
10.1006 ns3_module_mesh.register_functions(root_module)
10.1007
11.1 --- a/doc/build.txt Mon Nov 02 10:49:39 2009 -0500
11.2 +++ b/doc/build.txt Mon Nov 02 10:56:30 2009 -0500
11.3 @@ -7,10 +7,10 @@
11.4
11.5 === Installing Waf ===
11.6
11.7 -The top-level ns-3 directory should contain a current waf script.
11.8 -
11.9 -Note: we're using a WAF version based on WAF 1.5.x. The source code
11.10 -can be retrieved from the followin URL:
11.11 +The top-level ns-3 directory should contain a current waf script, so
11.12 +there is no need to have WAF installed in the system. We are using
11.13 +some extensions to WAF, which can be found in the 'waf-tools'
11.14 +directory. The upstream location for these WAF extensions is:
11.15
11.16 https://code.launchpad.net/~gjc/waf/cmd
11.17
12.1 --- a/examples/mesh/mesh.cc Mon Nov 02 10:49:39 2009 -0500
12.2 +++ b/examples/mesh/mesh.cc Mon Nov 02 10:56:30 2009 -0500
12.3 @@ -158,7 +158,16 @@
12.4 * mesh point device
12.5 */
12.6 mesh = MeshHelper::Default ();
12.7 - mesh.SetStackInstaller (m_stack, "Root", Mac48AddressValue (Mac48Address (m_root.c_str ())));
12.8 + if (!Mac48Address (m_root.c_str ()).IsBroadcast ())
12.9 + {
12.10 + mesh.SetStackInstaller (m_stack, "Root", Mac48AddressValue (Mac48Address (m_root.c_str ())));
12.11 + }
12.12 + else
12.13 + {
12.14 + //If root is not set, we do not use "Root" attribute, because it
12.15 + //is specified only for 11s
12.16 + mesh.SetStackInstaller (m_stack);
12.17 + }
12.18 if (m_chan)
12.19 {
12.20 mesh.SetSpreadInterfaceChannels (MeshHelper::SPREAD_CHANNELS);
13.1 --- a/src/common/pcap-file-test-suite.cc Mon Nov 02 10:49:39 2009 -0500
13.2 +++ b/src/common/pcap-file-test-suite.cc Mon Nov 02 10:56:30 2009 -0500
13.3 @@ -12,6 +12,8 @@
13.4 * You should have received a copy of the GNU General Public License
13.5 * along with this program; if not, write to the Free Software
13.6 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
13.7 + *
13.8 + * Author: Craig Dowell (craigdo@ee.washington.edu)
13.9 */
13.10
13.11 #include <iostream>
13.12 @@ -948,6 +950,62 @@
13.13 return false;
13.14 }
13.15
13.16 +// ===========================================================================
13.17 +// Test case to make sure that the Pcap::Diff method works as expected
13.18 +// ===========================================================================
13.19 +class DiffTestCase : public TestCase
13.20 +{
13.21 +public:
13.22 + DiffTestCase ();
13.23 +
13.24 +private:
13.25 + virtual bool DoRun (void);
13.26 +};
13.27 +
13.28 +DiffTestCase::DiffTestCase ()
13.29 + : TestCase ("Check that PcapFile::Diff works as expected")
13.30 +{
13.31 +}
13.32 +
13.33 +bool
13.34 +DiffTestCase::DoRun (void)
13.35 +{
13.36 + //
13.37 + // Check that PcapDiff(file, file) is false
13.38 + //
13.39 + std::string filename = NS_TEST_SOURCEDIR + "known.pcap";
13.40 + uint32_t sec(0), usec(0);
13.41 + bool diff = PcapFile::Diff (filename, filename, sec, usec);
13.42 + NS_TEST_EXPECT_MSG_EQ (diff, false, "PcapDiff(file, file) must always be false");
13.43 +
13.44 + //
13.45 + // Create different PCAP file (with the same timestamps, but different packets) and check that it is indeed different
13.46 + //
13.47 + std::string filename2 = "different.pcap";
13.48 + PcapFile f;
13.49 +
13.50 + bool err = f.Open (filename2, "w");
13.51 + NS_TEST_ASSERT_MSG_EQ (err, false, "Open (" << filename2 << ", \"w\") returns error");
13.52 + err = f.Init (1, N_PACKET_BYTES);
13.53 + NS_TEST_ASSERT_MSG_EQ (err, false, "Init (1, " << N_PACKET_BYTES << ") returns error");
13.54 +
13.55 + for (uint32_t i = 0; i < N_KNOWN_PACKETS; ++i)
13.56 + {
13.57 + PacketEntry const & p = knownPackets[i];
13.58 +
13.59 + err = f.Write (p.tsSec, p.tsUsec, (uint8_t const *)p.data, p.origLen);
13.60 + NS_TEST_EXPECT_MSG_EQ (err, false, "Write must not fail");
13.61 + }
13.62 + f.Close ();
13.63 +
13.64 + diff = PcapFile::Diff (filename, filename2, sec, usec);
13.65 + NS_TEST_EXPECT_MSG_EQ (diff, true, "PcapDiff(file, file2) must be true");
13.66 + NS_TEST_EXPECT_MSG_EQ (sec, 2, "Files are different from 2.3696 seconds");
13.67 + NS_TEST_EXPECT_MSG_EQ (usec, 3696, "Files are different from 2.3696 seconds");
13.68 +
13.69 + return GetErrorStatus();
13.70 +}
13.71 +
13.72 class PcapFileTestSuite : public TestSuite
13.73 {
13.74 public:
13.75 @@ -963,6 +1021,7 @@
13.76 AddTestCase (new FileHeaderTestCase);
13.77 AddTestCase (new RecordHeaderTestCase);
13.78 AddTestCase (new ReadFileTestCase);
13.79 + AddTestCase (new DiffTestCase);
13.80 }
13.81
13.82 PcapFileTestSuite pcapFileTestSuite;
14.1 --- a/src/common/pcap-file.cc Mon Nov 02 10:49:39 2009 -0500
14.2 +++ b/src/common/pcap-file.cc Mon Nov 02 10:56:30 2009 -0500
14.3 @@ -14,14 +14,16 @@
14.4 * You should have received a copy of the GNU General Public License
14.5 * along with this program; if not, write to the Free Software
14.6 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
14.7 + *
14.8 + * Author: Craig Dowell (craigdo@ee.washington.edu)
14.9 */
14.10
14.11 #include <iostream>
14.12 #include <stdio.h>
14.13 #include <stdlib.h>
14.14 +#include <cstring>
14.15
14.16 #include "pcap-file.h"
14.17 -
14.18 //
14.19 // This file is used as part of the ns-3 test framework, so please refrain from
14.20 // adding any ns-3 specific constructs such as Packet to this file.
14.21 @@ -516,4 +518,65 @@
14.22 return false;
14.23 }
14.24
14.25 +bool
14.26 +PcapFile::Diff (std::string const & f1, std::string const & f2,
14.27 + uint32_t & sec, uint32_t & usec,
14.28 + uint32_t snapLen)
14.29 +{
14.30 + PcapFile pcap[2];
14.31 + for (int i = 0; i < 2; ++i)
14.32 + {
14.33 + std::string const & file = (i == 0) ? f1 : f2;
14.34 + bool err = pcap[i].Open (file, "r");
14.35 + if (err)
14.36 + {
14.37 + // Can't open file
14.38 + return true;
14.39 + }
14.40 + }
14.41 +
14.42 + uint8_t data[2][snapLen];
14.43 + uint32_t tsSec[2], tsUsec[2], inclLen[2], origLen[2], readLen[2];
14.44 + bool err[2];
14.45 + bool diff(false);
14.46 +
14.47 + while (1)
14.48 + {
14.49 + for (int i = 0; i < 2; ++i)
14.50 + err[i] = pcap[i].Read (data[i], snapLen, tsSec[i], tsUsec[i], inclLen[i], origLen[i], readLen[i]);
14.51 +
14.52 + sec = tsSec[0];
14.53 + usec = tsUsec[0];
14.54 +
14.55 + if (err[0] != err[1])
14.56 + {
14.57 + diff = true; // Read status doesn't match
14.58 + break;
14.59 + }
14.60 +
14.61 + if (err[0]) break; // nothing left
14.62 +
14.63 + if (tsSec[0] != tsSec[1] || tsUsec[0] != tsUsec[1])
14.64 + {
14.65 + diff = true; // Next packet timestamps do not match
14.66 + break;
14.67 + }
14.68 +
14.69 + if (readLen[0] != readLen[1])
14.70 + {
14.71 + diff = true; // Packet lengths do not match
14.72 + break;
14.73 + }
14.74 +
14.75 + if (std::memcmp(data[0], data[1], readLen[0]) != 0)
14.76 + {
14.77 + diff = true; // Packet data do not match
14.78 + break;
14.79 + }
14.80 + }
14.81 + pcap[0].Close ();
14.82 + pcap[1].Close ();
14.83 + return diff;
14.84 +}
14.85 +
14.86 } //namespace ns3
15.1 --- a/src/common/pcap-file.h Mon Nov 02 10:49:39 2009 -0500
15.2 +++ b/src/common/pcap-file.h Mon Nov 02 10:56:30 2009 -0500
15.3 @@ -14,6 +14,8 @@
15.4 * You should have received a copy of the GNU General Public License
15.5 * along with this program; if not, write to the Free Software
15.6 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15.7 + *
15.8 + * Author: Craig Dowell (craigdo@ee.washington.edu)
15.9 */
15.10
15.11 #ifndef PCAP_FILE_H
15.12 @@ -125,7 +127,7 @@
15.13 * time zone from UTC/GMT. For example, Pacific Standard Time in the US is
15.14 * GMT-8, so one would enter -8 for that correction. Defaults to 0 (UTC).
15.15 *
15.16 - * \returns false if the open succeeds, true otherwise.
15.17 + * \return false if the open succeeds, true otherwise.
15.18 *
15.19 * \warning Calling this method on an existing file will result in the loss
15.20 * any existing data.
15.21 @@ -135,8 +137,31 @@
15.22 int32_t timeZoneCorrection = ZONE_DEFAULT,
15.23 bool swapMode = false);
15.24
15.25 + /**
15.26 + * \brief Write next packet to file
15.27 + *
15.28 + * \param tsSec Packet timestamp, seconds
15.29 + * \param tsUsec Packet timestamp, microseconds
15.30 + * \param data Data buffer
15.31 + * \param totalLen Total packet length
15.32 + *
15.33 + * \return true on error, false otherwise
15.34 + */
15.35 bool Write (uint32_t tsSec, uint32_t tsUsec, uint8_t const * const data, uint32_t totalLen);
15.36
15.37 + /**
15.38 + * \brief Read next packet from file
15.39 + *
15.40 + * \param data [out] Data buffer
15.41 + * \param maxBytes Allocated data buffer size
15.42 + * \param tsSec [out] Packet timestamp, seconds
15.43 + * \param tsUsec [out] Packet timestamp, microseconds
15.44 + * \param inclLen [out] Included length
15.45 + * \param origLen [out] Original length
15.46 + * \param readLen [out] Number of bytes read
15.47 + *
15.48 + * \return true if read failed, false otherwise
15.49 + */
15.50 bool Read (uint8_t * const data,
15.51 uint32_t maxBytes,
15.52 uint32_t &tsSec,
15.53 @@ -154,6 +179,21 @@
15.54 uint32_t GetSigFigs (void);
15.55 uint32_t GetSnapLen (void);
15.56 uint32_t GetDataLinkType (void);
15.57 +
15.58 + /**
15.59 + * \brief Compare two PCAP files packet-by-packet
15.60 + *
15.61 + * \return true if files are different, false otherwise
15.62 + *
15.63 + * \param f1 First PCAP file name
15.64 + * \param f2 Second PCAP file name
15.65 + * \param sec [out] Time stamp of first different packet, seconds. Undefined if files doesn't differ.
15.66 + * \param uses [out] Time stamp of first different packet, microseconds. Undefined if files doesn't differ.
15.67 + * \param snapLen Snap length (if used)
15.68 + */
15.69 + static bool Diff (std::string const & f1, std::string const & f2,
15.70 + uint32_t & sec, uint32_t & usec,
15.71 + uint32_t snapLen = SNAPLEN_DEFAULT);
15.72
15.73 private:
15.74 typedef struct {
16.1 --- a/src/core/system-wall-clock-ms.h Mon Nov 02 10:49:39 2009 -0500
16.2 +++ b/src/core/system-wall-clock-ms.h Mon Nov 02 10:56:30 2009 -0500
16.3 @@ -21,10 +21,13 @@
16.4 #ifndef SYSTEM_WALL_CLOCK_MS_H
16.5 #define SYSTEM_WALL_CLOCK_MS_H
16.6
16.7 +#include <stdint.h>
16.8 +
16.9 namespace ns3 {
16.10
16.11 /**
16.12 - * \brief measure wall-clock time in milliseconds
16.13 + * \brief measure elapsed time in milliseconds
16.14 + *
16.15 */
16.16 class SystemWallClockMs {
16.17 public:
16.18 @@ -36,13 +39,39 @@
16.19 */
16.20 void Start (void);
16.21 /**
16.22 - * \returns the measured elapsed wall clock time since
16.23 - * ns3::SystemWallClockMs::start was invoked.
16.24 + * \brief Stop measuring the time since Start() was called.
16.25 + * \returns the measured elapsed wall clock time (in milliseconds) since
16.26 + * ns3::SystemWallClockMs::Start was invoked.
16.27 *
16.28 - * It is possible to start a new measurement with ns3::SystemWallClockMs::start
16.29 + * It is possible to start a new measurement with ns3::SystemWallClockMs::Start
16.30 * after this method returns.
16.31 + *
16.32 + * Returns int64_t to avoid dependency on clock_t in ns-3 code.
16.33 */
16.34 - unsigned long long End (void);
16.35 + int64_t End (void);
16.36 +
16.37 + /**
16.38 + * \returns the measured elapsed wall clock time (in milliseconds) since
16.39 + * ns3::SystemWallClockMs::Start was invoked.
16.40 + *
16.41 + * Returns int64_t to avoid dependency on clock_t in ns-3 code.
16.42 + */
16.43 + int64_t GetElapsedReal (void) const;
16.44 + /**
16.45 + * \returns the measured elapsed 'user' wall clock time (in milliseconds) since
16.46 + * ns3::SystemWallClockMs::Start was invoked.
16.47 + *
16.48 + * Returns int64_t to avoid dependency on clock_t in ns-3 code.
16.49 + */
16.50 + int64_t GetElapsedUser (void) const;
16.51 + /**
16.52 + * \returns the measured elapsed 'system' wall clock time (in milliseconds) since
16.53 + * ns3::SystemWallClockMs::Start was invoked.
16.54 + *
16.55 + * Returns int64_t to avoid dependency on clock_t in ns-3 code.
16.56 + */
16.57 + int64_t GetElapsedSystem (void) const;
16.58 +
16.59 private:
16.60 class SystemWallClockMsPrivate *m_priv;
16.61 };
17.1 --- a/src/core/test.cc Mon Nov 02 10:49:39 2009 -0500
17.2 +++ b/src/core/test.cc Mon Nov 02 10:56:30 2009 -0500
17.3 @@ -262,7 +262,7 @@
17.4 void
17.5 TestCase::DoReportStart (void)
17.6 {
17.7 - m_startTime = times (&m_startTimes);
17.8 + m_msClock.Start ();
17.9
17.10 if (m_ofs == 0)
17.11 {
17.12 @@ -319,26 +319,21 @@
17.13 void
17.14 TestCase::DoReportEnd (void)
17.15 {
17.16 - static long ticksPerSecond = sysconf (_SC_CLK_TCK);
17.17 + m_msClock.End ();
17.18
17.19 if (m_ofs == 0)
17.20 {
17.21 return;
17.22 }
17.23
17.24 - struct tms endTimes;
17.25 - clock_t endTime = times (&endTimes);
17.26 -
17.27 - clock_t elapsed = endTime - m_startTime;
17.28 - clock_t elapsedUsr = endTimes.tms_utime - m_startTimes.tms_utime;
17.29 - clock_t elapsedSys = endTimes.tms_stime - m_startTimes.tms_stime;
17.30 -
17.31 - (*m_ofs).precision (2);
17.32 + (*m_ofs).precision (3);
17.33 *m_ofs << std::fixed;
17.34
17.35 - *m_ofs << " <CaseTime>" << "real " << static_cast<double> (elapsed) / ticksPerSecond
17.36 - << " user " << static_cast<double> (elapsedUsr) / ticksPerSecond
17.37 - << " system " << static_cast<double> (elapsedSys) / ticksPerSecond
17.38 + const double MS_PER_SEC = 1000.;
17.39 +
17.40 + *m_ofs << " <CaseTime>" << "real " << m_msClock.GetElapsedReal () / MS_PER_SEC
17.41 + << " user " << m_msClock.GetElapsedUser () / MS_PER_SEC
17.42 + << " system " << m_msClock.GetElapsedSystem () / MS_PER_SEC
17.43 << "</CaseTime>" << std::endl;
17.44
17.45 *m_ofs << " </TestCase>" << std::endl;
17.46 @@ -523,8 +518,8 @@
17.47 void
17.48 TestSuite::DoReportStart (void)
17.49 {
17.50 - m_startTime = times (&m_startTimes);
17.51 -
17.52 + m_msClock.Start ();
17.53 +
17.54 if (m_ofs == 0)
17.55 {
17.56 return;
17.57 @@ -556,25 +551,21 @@
17.58 void
17.59 TestSuite::DoReportEnd (void)
17.60 {
17.61 - static long ticksPerSecond = sysconf (_SC_CLK_TCK);
17.62 -
17.63 + m_msClock.End ();
17.64 +
17.65 if (m_ofs == 0)
17.66 {
17.67 return;
17.68 }
17.69 - struct tms endTimes;
17.70 - clock_t endTime = times (&endTimes);
17.71
17.72 - clock_t elapsed = endTime - m_startTime;
17.73 - clock_t elapsedUsr = endTimes.tms_utime - m_startTimes.tms_utime;
17.74 - clock_t elapsedSys = endTimes.tms_stime - m_startTimes.tms_stime;
17.75 -
17.76 - (*m_ofs).precision (2);
17.77 + (*m_ofs).precision (3);
17.78 *m_ofs << std::fixed;
17.79
17.80 - *m_ofs << " <SuiteTime>" << "real " << static_cast<double> (elapsed) / ticksPerSecond
17.81 - << " user " << static_cast<double> (elapsedUsr) / ticksPerSecond
17.82 - << " system " << static_cast<double> (elapsedSys) / ticksPerSecond
17.83 + const double MS_PER_SEC = 1000.;
17.84 +
17.85 + *m_ofs << " <SuiteTime>" << "real " << m_msClock.GetElapsedReal () / MS_PER_SEC
17.86 + << " user " << m_msClock.GetElapsedUser () / MS_PER_SEC
17.87 + << " system " << m_msClock.GetElapsedSystem () / MS_PER_SEC
17.88 << "</SuiteTime>" << std::endl;
17.89
17.90 *m_ofs << "</TestSuite>" << std::endl;
18.1 --- a/src/core/test.h Mon Nov 02 10:49:39 2009 -0500
18.2 +++ b/src/core/test.h Mon Nov 02 10:56:30 2009 -0500
18.3 @@ -27,7 +27,10 @@
18.4 #include <list>
18.5 #include <limits>
18.6 #include <stdint.h>
18.7 -#include <sys/times.h>
18.8 +
18.9 +#include "ns3/system-wall-clock-ms.h"
18.10 +
18.11 +
18.12 //
18.13 // Note on below macros:
18.14 //
18.15 @@ -821,6 +824,7 @@
18.16 TestCase (TestCase& tc);
18.17 TestCase& operator= (TestCase& tc);
18.18
18.19 + SystemWallClockMs m_msClock;
18.20 std::string m_name;
18.21 bool m_verbose;
18.22 bool m_continueOnFailure;
18.23 @@ -828,8 +832,6 @@
18.24 std::string m_basedir;
18.25 std::ofstream *m_ofs;
18.26 bool m_error;
18.27 - clock_t m_startTime;
18.28 - struct tms m_startTimes;
18.29 };
18.30
18.31 /**
18.32 @@ -1057,6 +1059,7 @@
18.33 TestSuite (TestSuite& ts);
18.34 TestSuite& operator= (TestSuite& ts);
18.35
18.36 + SystemWallClockMs m_msClock;
18.37 std::string m_name;
18.38 bool m_verbose;
18.39 bool m_continueOnFailure;
18.40 @@ -1064,10 +1067,7 @@
18.41 std::ofstream *m_ofs;
18.42 bool m_error;
18.43 TestType m_type;
18.44 -
18.45 - clock_t m_startTime;
18.46 - struct tms m_startTimes;
18.47 -
18.48 +
18.49 typedef std::vector<TestCase *> TestCaseVector_t;
18.50 TestCaseVector_t m_tests;
18.51 };
19.1 --- a/src/core/unix-system-wall-clock-ms.cc Mon Nov 02 10:49:39 2009 -0500
19.2 +++ b/src/core/unix-system-wall-clock-ms.cc Mon Nov 02 10:56:30 2009 -0500
19.3 @@ -19,36 +19,105 @@
19.4 */
19.5
19.6 #include "system-wall-clock-ms.h"
19.7 -#include <sys/time.h>
19.8 +#include "abort.h"
19.9 +#include <sys/times.h>
19.10
19.11 namespace ns3 {
19.12
19.13 class SystemWallClockMsPrivate {
19.14 public:
19.15 void Start (void);
19.16 - unsigned long long End (void);
19.17 + int64_t End (void);
19.18 + int64_t GetElapsedReal (void) const;
19.19 + int64_t GetElapsedUser (void) const;
19.20 + int64_t GetElapsedSystem (void) const;
19.21 +
19.22 private:
19.23 - struct timeval m_startTv;
19.24 - struct timeval m_endTv;
19.25 + struct tms m_startTimes;
19.26 + clock_t m_startTime;
19.27 + int64_t m_elapsedReal;
19.28 + int64_t m_elapsedUser;
19.29 + int64_t m_elapsedSystem;
19.30 };
19.31
19.32 void
19.33 SystemWallClockMsPrivate::Start (void)
19.34 {
19.35 - struct timezone tz;
19.36 - gettimeofday (&m_startTv, &tz);
19.37 + m_startTime = times (&m_startTimes);
19.38 }
19.39
19.40 -unsigned long long
19.41 +int64_t
19.42 SystemWallClockMsPrivate::End (void)
19.43 {
19.44 - struct timezone tz;
19.45 - gettimeofday (&m_endTv, &tz);
19.46 - unsigned long long end = m_endTv.tv_sec *1000 + m_endTv.tv_usec / 1000;
19.47 - unsigned long long start = m_startTv.tv_sec *1000 + m_startTv.tv_usec / 1000;
19.48 - return end - start;
19.49 + //
19.50 + // We need to return the number of milliseconds that have elapsed in some
19.51 + // reasonably portable way. The underlying function that we will use returns
19.52 + // a number of elapsed ticks. We can look up the number of ticks per second
19.53 + // from the system configuration.
19.54 + //
19.55 + // Conceptually, we need to find the number of elapsed clock ticks and then
19.56 + // multiply the result by the milliseconds per clock tick (or divide by clock
19.57 + // ticks per millisecond). Integer dividing by clock ticks per millisecond
19.58 + // is bad since this number is fractional on most machines and would result
19.59 + // in divide by zero errors due to integer rounding.
19.60 + //
19.61 + // Multiplying by milliseconds per clock tick works up to a clock resolution
19.62 + // of 1000 ticks per second. If we go past this point, we begin to get zero
19.63 + // elapsed times when millisecondsPerTick becomes fractional and another
19.64 + // rounding error appears.
19.65 + //
19.66 + // So rounding errors using integers can bite you from both direction. Since
19.67 + // all of our targets have math coprocessors, why not just use doubles
19.68 + // internally? Works fine, lasts a long time.
19.69 + //
19.70 + // If millisecondsPerTick becomes fractional, and an elapsed time greater than
19.71 + // a milliscond is measured, the function will work as expected. If an elapsed
19.72 + // time is measured that turns out to be less than a millisecond, we'll just
19.73 + // return zero which would, I think, also will be expected.
19.74 + //
19.75 + static int64_t ticksPerSecond = sysconf (_SC_CLK_TCK);
19.76 + static double millisecondsPerTick = 1000. / ticksPerSecond;
19.77 +
19.78 + //
19.79 + // If sysconf () fails, we have no idea how to do the required conversion to ms.
19.80 + //
19.81 + NS_ABORT_MSG_IF (ticksPerSecond == -1, "SystemWallClockMsPrivate(): Cannot sysconf (_SC_CLK_TCK)");
19.82 +
19.83 + struct tms endTimes;
19.84 + clock_t endTime = times (&endTimes);
19.85 +
19.86 + double tmp;
19.87 +
19.88 + tmp = static_cast<double> (endTime - m_startTime) * millisecondsPerTick;
19.89 + m_elapsedReal = static_cast<int64_t> (tmp);
19.90 +
19.91 + tmp = static_cast<double> (endTimes.tms_utime - m_startTimes.tms_utime) * millisecondsPerTick;
19.92 + m_elapsedUser = static_cast<int64_t> (tmp);
19.93 +
19.94 + tmp = static_cast<double> (endTimes.tms_stime - m_startTimes.tms_stime) * millisecondsPerTick;
19.95 + m_elapsedSystem = static_cast<int64_t> (tmp);
19.96 +
19.97 + return m_elapsedReal;
19.98 }
19.99
19.100 +int64_t
19.101 +SystemWallClockMsPrivate::GetElapsedReal (void) const
19.102 +{
19.103 + return m_elapsedReal;
19.104 +}
19.105 +
19.106 +int64_t
19.107 +SystemWallClockMsPrivate::GetElapsedUser (void) const
19.108 +{
19.109 + return m_elapsedUser;
19.110 +}
19.111 +
19.112 +int64_t
19.113 +SystemWallClockMsPrivate::GetElapsedSystem (void) const
19.114 +{
19.115 + return m_elapsedSystem;
19.116 +}
19.117 +
19.118 SystemWallClockMs::SystemWallClockMs ()
19.119 : m_priv (new SystemWallClockMsPrivate ())
19.120 {}
19.121 @@ -64,10 +133,29 @@
19.122 {
19.123 m_priv->Start ();
19.124 }
19.125 -unsigned long long
19.126 +
19.127 +int64_t
19.128 SystemWallClockMs::End (void)
19.129 {
19.130 return m_priv->End ();
19.131 }
19.132
19.133 +int64_t
19.134 +SystemWallClockMs::GetElapsedReal (void) const
19.135 +{
19.136 + return m_priv->GetElapsedReal ();
19.137 +}
19.138 +
19.139 +int64_t
19.140 +SystemWallClockMs::GetElapsedUser (void) const
19.141 +{
19.142 + return m_priv->GetElapsedUser ();
19.143 +}
19.144 +
19.145 +int64_t
19.146 +SystemWallClockMs::GetElapsedSystem (void) const
19.147 +{
19.148 + return m_priv->GetElapsedSystem ();
19.149 +}
19.150 +
19.151 }; // namespace ns3
20.1 --- a/src/core/win32-system-wall-clock-ms.cc Mon Nov 02 10:49:39 2009 -0500
20.2 +++ b/src/core/win32-system-wall-clock-ms.cc Mon Nov 02 10:56:30 2009 -0500
20.3 @@ -20,26 +20,97 @@
20.4
20.5 #include "system-wall-clock-ms.h"
20.6
20.7 +#include <time.h>
20.8 +
20.9 namespace ns3 {
20.10
20.11 class SystemWallClockMsPrivate {
20.12 public:
20.13 void Start (void);
20.14 - unsigned long long End (void);
20.15 + int64_t End (void);
20.16 + int64_t GetElapsedReal (void) const;
20.17 + int64_t GetElapsedUser (void) const;
20.18 + int64_t GetElapsedSystem (void) const;
20.19 +
20.20 private:
20.21 + clock_t m_startTime;
20.22 + int64_t m_elapsedReal;
20.23 + int64_t m_elapsedUser;
20.24 + int64_t m_elapsedSystem;
20.25 };
20.26
20.27 void
20.28 SystemWallClockMsPrivate::Start (void)
20.29 {
20.30 + m_startTime = clock ();
20.31 }
20.32
20.33 -unsigned long long
20.34 +int64_t
20.35 SystemWallClockMsPrivate::End (void)
20.36 {
20.37 - return 0;
20.38 + //
20.39 + // We need to return the number of milliseconds that have elapsed in some
20.40 + // reasonably portable way. The underlying function that we will use returns
20.41 + // a number of elapsed ticks. We can look up the number of ticks per second
20.42 + // from the system configuration.
20.43 + //
20.44 + // Conceptually, we need to find the number of elapsed clock ticks and then
20.45 + // multiply the result by the milliseconds per clock tick (or just as easily
20.46 + // divide by clock ticks per millisecond). Integer dividing by clock ticks
20.47 + // per millisecond is bad since this number is fractional on most machines
20.48 + // and would result in divide by zero errors due to integer rounding.
20.49 + //
20.50 + // Multiplying by milliseconds per clock tick works up to a clock resolution
20.51 + // of 1000 ticks per second. If we go past this point, we begin to get zero
20.52 + // elapsed times when millisecondsPerTick becomes fractional and another
20.53 + // rounding error appears.
20.54 + //
20.55 + // So rounding errors using integers can bite you from two direction. Since
20.56 + // all of our targets have math coprocessors, why not just use doubles
20.57 + // internally? Works fine, lasts a long time.
20.58 + //
20.59 + // If millisecondsPerTick becomes fractional, and an elapsed time greater than
20.60 + // a milliscond is measured, the function will work as expected. If an elapsed
20.61 + // time is measured that turns out to be less than a millisecond, we'll just
20.62 + // return zero which would, I think, also will be expected.
20.63 + //
20.64 + static int64_t ticksPerSecond = CLOCKS_PER_SEC;
20.65 + static double millisecondsPerTick = 1000. / ticksPerSecond;
20.66 +
20.67 + clock_t endTime = clock ();
20.68 +
20.69 + double tmp;
20.70 +
20.71 + tmp = static_cast<double> (endTime - m_startTime) * millisecondsPerTick;
20.72 + m_elapsedReal = static_cast<int64_t> (tmp);
20.73 +
20.74 + //
20.75 + // Nothing like this in MinGW, for example.
20.76 + //
20.77 + m_elapsedUser = 0;
20.78 + m_elapsedSystem = 0;
20.79 +
20.80 + return m_elapsedReal;
20.81 }
20.82
20.83 +int64_t
20.84 +SystemWallClockMsPrivate::GetElapsedReal (void) const
20.85 +{
20.86 + return m_elapsedReal;
20.87 +}
20.88 +
20.89 +int64_t
20.90 +SystemWallClockMsPrivate::GetElapsedUser (void) const
20.91 +{
20.92 + return m_elapsedUser;
20.93 +}
20.94 +
20.95 +int64_t
20.96 +SystemWallClockMsPrivate::GetElapsedSystem (void) const
20.97 +{
20.98 + return m_elapsedSystem;
20.99 +}
20.100 +
20.101 SystemWallClockMs::SystemWallClockMs ()
20.102 : m_priv (new SystemWallClockMsPrivate ())
20.103 {}
20.104 @@ -55,10 +126,29 @@
20.105 {
20.106 m_priv->Start ();
20.107 }
20.108 -unsigned long long
20.109 +
20.110 +int64_t
20.111 SystemWallClockMs::End (void)
20.112 {
20.113 return m_priv->End ();
20.114 }
20.115
20.116 +int64_t
20.117 +SystemWallClockMs::GetElapsedReal (void) const
20.118 +{
20.119 + return m_priv->GetElapsedReal ();
20.120 +}
20.121 +
20.122 +int64_t
20.123 +SystemWallClockMs::GetElapsedUser (void) const
20.124 +{
20.125 + return m_priv->GetElapsedUser ();
20.126 +}
20.127 +
20.128 +int64_t
20.129 +SystemWallClockMs::GetElapsedSystem (void) const
20.130 +{
20.131 + return m_priv->GetElapsedSystem ();
20.132 +}
20.133 +
20.134 }; // namespace ns3
21.1 --- a/src/devices/mesh/dot11s/airtime-metric.cc Mon Nov 02 10:49:39 2009 -0500
21.2 +++ b/src/devices/mesh/dot11s/airtime-metric.cc Mon Nov 02 10:56:30 2009 -0500
21.3 @@ -31,7 +31,7 @@
21.4 .SetParent<Object> ()
21.5 .AddConstructor<AirtimeLinkMetricCalculator> ()
21.6 .AddAttribute ( "OverheadNanosec",
21.7 - "Overhead expressed in nanoseconds:DIFS+ 2* SIFS + 2* PREAMBLE + 2* ACK",
21.8 + "Overhead expressed in nanoseconds:DIFS+ SIFS + 2 * PREAMBLE + ACK",
21.9 UintegerValue (108000),
21.10 MakeUintegerAccessor (&AirtimeLinkMetricCalculator::m_overheadNanosec),
21.11 MakeUintegerChecker<uint32_t> (1)
21.12 @@ -80,9 +80,9 @@
21.13
21.14 WifiRemoteStation * station = mac->GetStationManager ()->Lookup (peerAddress);
21.15 NS_ASSERT (station != 0);
21.16 - Ptr<Packet> test_frame = Create<Packet> (m_testLength + m_headerLength + m_meshHeaderLength);
21.17 + Ptr<Packet> test_frame = Create<Packet> (m_testLength + m_meshHeaderLength);
21.18 uint32_t rate =
21.19 - station->GetDataMode (test_frame, m_testLength + m_headerLength + m_meshHeaderLength).GetDataRate ();
21.20 + station->GetDataMode (test_frame, m_testLength + m_meshHeaderLength).GetDataRate ();
21.21 uint32_t payload_nanosec = (uint32_t) (
21.22 (double) ((m_testLength + m_meshHeaderLength) * 8 /*octets -> bits*/) * sec2ns / ((double) rate));
21.23 uint32_t header_nanosec = (uint32_t) ((double) (m_headerLength * 8 /*octets -> bits*/* sec2ns)
22.1 --- a/src/devices/mesh/dot11s/airtime-metric.h Mon Nov 02 10:49:39 2009 -0500
22.2 +++ b/src/devices/mesh/dot11s/airtime-metric.h Mon Nov 02 10:56:30 2009 -0500
22.3 @@ -45,13 +45,13 @@
22.4 static TypeId GetTypeId ();
22.5 uint32_t CalculateMetric (Mac48Address peerAddress, Ptr<MeshWifiInterfaceMac> mac);
22.6 private:
22.7 - //\brief Overhead expressed in nanoseconds:DIFS+ 2* SIFS + 2*PREAMBLE + 2* ACK
22.8 + /// Overhead expressed in nanoseconds:DIFS + SIFS + 2 * PREAMBLE + ACK
22.9 uint32_t m_overheadNanosec;
22.10 - ///\brief Bt value
22.11 + /// Bt value
22.12 uint32_t m_testLength;
22.13 - ///\brief header length (used in overhead)
22.14 + /// header length (used in overhead)
22.15 uint16_t m_headerLength;
22.16 - ///\brief meshHeader length (6 octets usually)
22.17 + /// meshHeader length (minimum 6 octets)
22.18 uint16_t m_meshHeaderLength;
22.19 };
22.20 } //namespace dot11s
23.1 --- a/src/devices/mesh/dot11s/hwmp-protocol.cc Mon Nov 02 10:49:39 2009 -0500
23.2 +++ b/src/devices/mesh/dot11s/hwmp-protocol.cc Mon Nov 02 10:56:30 2009 -0500
23.3 @@ -33,6 +33,7 @@
23.4 #include "airtime-metric.h"
23.5 #include "ie-dot11s-preq.h"
23.6 #include "ie-dot11s-prep.h"
23.7 +#include "ns3/trace-source-accessor.h"
23.8 #include "ie-dot11s-perr.h"
23.9
23.10 NS_LOG_COMPONENT_DEFINE ("HwmpProtocol");
23.11 @@ -157,7 +158,13 @@
23.12 MakeBooleanAccessor (
23.13 &HwmpProtocol::m_rfFlag),
23.14 MakeBooleanChecker ()
23.15 - );
23.16 + )
23.17 + .AddTraceSource ( "RouteDiscoveryTime",
23.18 + "The time of route discovery procedure",
23.19 + MakeTraceSourceAccessor (
23.20 + &HwmpProtocol::m_routeDiscoveryTimeCallback)
23.21 + )
23.22 + ;
23.23 return tid;
23.24 }
23.25
23.26 @@ -201,14 +208,14 @@
23.27 HwmpProtocol::DoDispose ()
23.28 {
23.29 NS_LOG_FUNCTION_NOARGS ();
23.30 - for (std::map<Mac48Address, EventId>::iterator i = m_preqTimeouts.begin (); i != m_preqTimeouts.end (); i ++)
23.31 + for (std::map<Mac48Address, PreqEvent>::iterator i = m_preqTimeouts.begin (); i != m_preqTimeouts.end (); i ++)
23.32 {
23.33 - i->second.Cancel ();
23.34 + i->second.preqTimeout.Cancel ();
23.35 }
23.36 m_proactivePreqTimer.Cancel();
23.37 m_preqTimeouts.clear ();
23.38 m_lastDataSeqno.clear ();
23.39 - m_lastHwmpSeqno.clear ();
23.40 + m_hwmpSeqnoMetricDatabase.clear ();
23.41 m_interfaces.clear ();
23.42 m_rqueue.clear ();
23.43 m_rtable = 0;
23.44 @@ -313,7 +320,7 @@
23.45 {
23.46 NS_ASSERT(destination != Mac48Address::GetBroadcast ());
23.47 HwmpRtable::LookupResult result = m_rtable->LookupReactive (destination);
23.48 - NS_LOG_DEBUG("Requested src = "<<source<<", dst = "<<destination<<", I am "<<GetAddress ()<<", RA = "<<result.retransmitter);
23.49 + NS_LOG_DEBUG ("Requested src = "<<source<<", dst = "<<destination<<", I am "<<GetAddress ()<<", RA = "<<result.retransmitter);
23.50 if (result.retransmitter == Mac48Address::GetBroadcast ())
23.51 {
23.52 result = m_rtable->LookupProactive ();
23.53 @@ -392,31 +399,24 @@
23.54 {
23.55 preq.IncrementMetric (metric);
23.56 //acceptance cretirea:
23.57 - std::map<Mac48Address, uint32_t>::const_iterator i = m_lastHwmpSeqno.find (preq.GetOriginatorAddress());
23.58 - if (i == m_lastHwmpSeqno.end ())
23.59 + std::map<Mac48Address, std::pair<uint32_t, uint32_t> >::const_iterator i = m_hwmpSeqnoMetricDatabase.find (
23.60 + preq.GetOriginatorAddress ());
23.61 + if (i != m_hwmpSeqnoMetricDatabase.end ())
23.62 {
23.63 - m_lastHwmpSeqno[preq.GetOriginatorAddress ()] = preq.GetOriginatorSeqNumber ();
23.64 - m_lastHwmpMetric[preq.GetOriginatorAddress ()] = preq.GetMetric ();
23.65 - }
23.66 - else
23.67 - {
23.68 - if ((int32_t)(i->second - preq.GetOriginatorSeqNumber ()) > 0)
23.69 + if ((int32_t)(i->second.first - preq.GetOriginatorSeqNumber ()) > 0)
23.70 {
23.71 return;
23.72 }
23.73 - if (i->second == preq.GetOriginatorSeqNumber ())
23.74 + if (i->second.first == preq.GetOriginatorSeqNumber ())
23.75 {
23.76 - //find metric
23.77 - std::map<Mac48Address, uint32_t>::const_iterator j = m_lastHwmpMetric.find (preq.GetOriginatorAddress());
23.78 - NS_ASSERT (j != m_lastHwmpSeqno.end ());
23.79 - if (j->second <= preq.GetMetric ())
23.80 + if (i->second.second <= preq.GetMetric ())
23.81 {
23.82 return;
23.83 }
23.84 }
23.85 - m_lastHwmpSeqno[preq.GetOriginatorAddress ()] = preq.GetOriginatorSeqNumber ();
23.86 - m_lastHwmpMetric[preq.GetOriginatorAddress ()] = preq.GetMetric ();
23.87 }
23.88 + m_hwmpSeqnoMetricDatabase[preq.GetOriginatorAddress ()] = std::make_pair (preq.GetOriginatorSeqNumber (), preq.GetMetric ());
23.89 +
23.90 NS_LOG_DEBUG("I am " << GetAddress () << "Accepted preq from address" << from << ", preq:" << preq);
23.91 std::vector<Ptr<DestinationAddressUnit> > destinations = preq.GetDestinationList ();
23.92 //Add reactive path to originator:
23.93 @@ -477,6 +477,15 @@
23.94 preq.GetOriginatorSeqNumber ()
23.95 );
23.96 ProactivePathResolved ();
23.97 + m_rtable->AddReactivePath (
23.98 + preq.GetOriginatorAddress (),
23.99 + from,
23.100 + interface,
23.101 + preq.GetMetric (),
23.102 + MicroSeconds (preq.GetLifetime () * 1024),
23.103 + preq.GetOriginatorSeqNumber ()
23.104 + );
23.105 + ReactivePathResolved (preq.GetOriginatorAddress ());
23.106 }
23.107 if (!preq.IsNeedNotPrep ())
23.108 {
23.109 @@ -559,25 +568,16 @@
23.110 {
23.111 prep.IncrementMetric (metric);
23.112 //acceptance cretirea:
23.113 - std::map<Mac48Address, uint32_t>::const_iterator i = m_lastHwmpSeqno.find (prep.GetOriginatorAddress ());
23.114 - if (i == m_lastHwmpSeqno.end ())
23.115 + std::map<Mac48Address, std::pair<uint32_t, uint32_t> >::const_iterator i = m_hwmpSeqnoMetricDatabase.find (
23.116 + prep.GetOriginatorAddress ());
23.117 + if ((i != m_hwmpSeqnoMetricDatabase.end ()) && ((int32_t)(i->second.first - prep.GetOriginatorSeqNumber ()) > 0))
23.118 {
23.119 - m_lastHwmpSeqno[prep.GetOriginatorAddress ()] = prep.GetOriginatorSeqNumber ();
23.120 + return;
23.121 }
23.122 - else
23.123 - {
23.124 - if ((int32_t)(i->second - prep.GetOriginatorSeqNumber ()) > 0)
23.125 - {
23.126 - return;
23.127 - }
23.128 - else
23.129 - {
23.130 - m_lastHwmpSeqno[prep.GetOriginatorAddress ()] = prep.GetOriginatorSeqNumber ();
23.131 - }
23.132 - }
23.133 + m_hwmpSeqnoMetricDatabase[prep.GetOriginatorAddress ()] = std::make_pair (prep.GetOriginatorSeqNumber (), prep.GetMetric ());
23.134 //update routing info
23.135 //Now add a path to destination and add precursor to source
23.136 - NS_LOG_DEBUG("I am " << GetAddress () << ", received prep from " << prep.GetOriginatorAddress () << ", receiver was:" << from);
23.137 + NS_LOG_DEBUG ("I am " << GetAddress () << ", received prep from " << prep.GetOriginatorAddress () << ", receiver was:" << from);
23.138 HwmpRtable::LookupResult result = m_rtable->LookupReactive (prep.GetDestinationAddress ());
23.139 //Add a reactive path only if it is better than existing:
23.140 if (
23.141 @@ -620,11 +620,6 @@
23.142 }
23.143 if (result.retransmitter == Mac48Address::GetBroadcast ())
23.144 {
23.145 - //try to look for default route
23.146 - result = m_rtable->LookupProactive ();
23.147 - }
23.148 - if (result.retransmitter == Mac48Address::GetBroadcast ())
23.149 - {
23.150 return;
23.151 }
23.152 //Forward PREP
23.153 @@ -772,7 +767,7 @@
23.154 void
23.155 HwmpProtocol::InitiatePathError(PathError perr)
23.156 {
23.157 - for (HwmpProtocolMacMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++)
23.158 + for (HwmpProtocolMacMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++)
23.159 {
23.160 std::vector<Mac48Address> receivers_for_interface;
23.161 for (unsigned int j = 0; j < perr.receivers.size (); j ++)
23.162 @@ -788,7 +783,7 @@
23.163 void
23.164 HwmpProtocol::ForwardPathError(PathError perr)
23.165 {
23.166 - for (HwmpProtocolMacMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++)
23.167 + for (HwmpProtocolMacMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++)
23.168 {
23.169 std::vector<Mac48Address> receivers_for_interface;
23.170 for (unsigned int j = 0; j < perr.receivers.size (); j ++)
23.171 @@ -904,6 +899,12 @@
23.172 void
23.173 HwmpProtocol::ReactivePathResolved (Mac48Address dst)
23.174 {
23.175 + std::map<Mac48Address, PreqEvent>::iterator i = m_preqTimeouts.find (dst);
23.176 + if (i != m_preqTimeouts.end ())
23.177 + {
23.178 + m_routeDiscoveryTimeCallback (Simulator::Now () - i->second.whenScheduled);
23.179 + }
23.180 +
23.181 HwmpRtable::LookupResult result = m_rtable->LookupReactive (dst);
23.182 NS_ASSERT(result.retransmitter != Mac48Address::GetBroadcast ());
23.183 //Send all packets stored for this destination
23.184 @@ -950,12 +951,13 @@
23.185 bool
23.186 HwmpProtocol::ShouldSendPreq (Mac48Address dst)
23.187 {
23.188 - std::map<Mac48Address, EventId>::const_iterator i = m_preqTimeouts.find (dst);
23.189 + std::map<Mac48Address, PreqEvent>::const_iterator i = m_preqTimeouts.find (dst);
23.190 if (i == m_preqTimeouts.end ())
23.191 {
23.192 - m_preqTimeouts[dst] = Simulator::Schedule (
23.193 + m_preqTimeouts[dst].preqTimeout = Simulator::Schedule (
23.194 m_dot11MeshHWMPnetDiameterTraversalTime * Scalar (2),
23.195 &HwmpProtocol::RetryPathDiscovery, this, dst, 1);
23.196 + m_preqTimeouts[dst].whenScheduled = Simulator::Now ();
23.197 return true;
23.198 }
23.199 return false;
23.200 @@ -970,8 +972,8 @@
23.201 }
23.202 if (result.retransmitter != Mac48Address::GetBroadcast ())
23.203 {
23.204 - std::map<Mac48Address, EventId>::iterator i = m_preqTimeouts.find (dst);
23.205 - NS_ASSERT (i != m_preqTimeouts.end ());
23.206 + std::map<Mac48Address, PreqEvent>::iterator i = m_preqTimeouts.find (dst);
23.207 + NS_ASSERT (i != m_preqTimeouts.end ());
23.208 m_preqTimeouts.erase (i);
23.209 return;
23.210 }
23.211 @@ -986,8 +988,9 @@
23.212 packet.reply (false, packet.pkt, packet.src, packet.dst, packet.protocol, HwmpRtable::MAX_METRIC);
23.213 packet = DequeueFirstPacketByDst (dst);
23.214 }
23.215 - std::map<Mac48Address, EventId>::iterator i = m_preqTimeouts.find (dst);
23.216 - NS_ASSERT (i != m_preqTimeouts.end ());
23.217 + std::map<Mac48Address, PreqEvent>::iterator i = m_preqTimeouts.find (dst);
23.218 + NS_ASSERT (i != m_preqTimeouts.end ());
23.219 + m_routeDiscoveryTimeCallback (Simulator::Now () - i->second.whenScheduled);
23.220 m_preqTimeouts.erase (i);
23.221 return;
23.222 }
23.223 @@ -997,7 +1000,7 @@
23.224 {
23.225 i->second->RequestDestination (dst, originator_seqno, dst_seqno);
23.226 }
23.227 - m_preqTimeouts[dst] = Simulator::Schedule (
23.228 + m_preqTimeouts[dst].preqTimeout = Simulator::Schedule (
23.229 Scalar (2 * (numOfRetry + 1)) * m_dot11MeshHWMPnetDiameterTraversalTime,
23.230 &HwmpProtocol::RetryPathDiscovery, this, dst, numOfRetry);
23.231 }
23.232 @@ -1009,7 +1012,6 @@
23.233 Time randomStart = Seconds (coefficient.GetValue ());
23.234 m_proactivePreqTimer = Simulator::Schedule (randomStart, &HwmpProtocol::SendProactivePreq, this);
23.235 NS_LOG_DEBUG ("ROOT IS: " << m_address);
23.236 - SendProactivePreq ();
23.237 m_isRoot = true;
23.238 }
23.239 void
23.240 @@ -1112,7 +1114,7 @@
23.241 "totalDropped=\"" << totalDropped << "\" "
23.242 "initiatedPreq=\"" << initiatedPreq << "\" "
23.243 "initiatedPrep=\"" << initiatedPrep << "\" "
23.244 - "initiatedPerr=\"" << initiatedPerr << "\"" << std::endl;
23.245 + "initiatedPerr=\"" << initiatedPerr << "\"/>" << std::endl;
23.246 }
23.247 void
23.248 HwmpProtocol::Report (std::ostream & os) const
24.1 --- a/src/devices/mesh/dot11s/hwmp-protocol.h Mon Nov 02 10:49:39 2009 -0500
24.2 +++ b/src/devices/mesh/dot11s/hwmp-protocol.h Mon Nov 02 10:56:30 2009 -0500
24.3 @@ -24,6 +24,7 @@
24.4 #include "ns3/mesh-l2-routing-protocol.h"
24.5 #include "ns3/nstime.h"
24.6 #include "ns3/event-id.h"
24.7 +#include "ns3/traced-value.h"
24.8 #include <vector>
24.9 #include <map>
24.10
24.11 @@ -156,6 +157,8 @@
24.12 */
24.13 bool DropDataFrame (uint32_t seqno, Mac48Address source);
24.14 //\}
24.15 + /// Route discovery time:
24.16 + TracedCallback<Time> m_routeDiscoveryTimeCallback;
24.17 ///\name Methods related to Queue/Dequeue procedures
24.18 ///\{
24.19 bool QueuePacket (QueuedPacket packet);
24.20 @@ -225,18 +228,20 @@
24.21 ///\{
24.22 /// Data sequence number database
24.23 std::map<Mac48Address, uint32_t> m_lastDataSeqno;
24.24 - /// DSN databse
24.25 - std::map<Mac48Address, uint32_t> m_lastHwmpSeqno;
24.26 - /// Metric database
24.27 - std::map<Mac48Address, uint32_t> m_lastHwmpMetric;
24.28 + /// keeps HWMP seqno (first in pair) and HWMP metric (second in pair) for each address
24.29 + std::map<Mac48Address, std::pair<uint32_t, uint32_t> > m_hwmpSeqnoMetricDatabase;
24.30 ///\}
24.31
24.32 /// Routing table
24.33 Ptr<HwmpRtable> m_rtable;
24.34
24.35 ///\name Timers:
24.36 - ///\{
24.37 - std::map<Mac48Address, EventId> m_preqTimeouts;
24.38 + //\{
24.39 + struct PreqEvent {
24.40 + EventId preqTimeout;
24.41 + Time whenScheduled;
24.42 + };
24.43 + std::map<Mac48Address, PreqEvent> m_preqTimeouts;
24.44 EventId m_proactivePreqTimer;
24.45 /// Random start in Proactive PREQ propagation
24.46 Time m_randomStart;
25.1 --- a/src/devices/mesh/dot11s/ie-dot11s-beacon-timing.cc Mon Nov 02 10:49:39 2009 -0500
25.2 +++ b/src/devices/mesh/dot11s/ie-dot11s-beacon-timing.cc Mon Nov 02 10:56:30 2009 -0500
25.3 @@ -77,9 +77,7 @@
25.4 return m_neighbours;
25.5 }
25.6 void
25.7 -IeBeaconTiming::AddNeighboursTimingElementUnit (uint16_t aid, Time last_beacon, //MicroSeconds!
25.8 - Time beacon_interval //MicroSeconds!
25.9 -)
25.10 +IeBeaconTiming::AddNeighboursTimingElementUnit (uint16_t aid, Time last_beacon, Time beacon_interval)
25.11 {
25.12 if (m_numOfUnits == 50)
25.13 {
26.1 --- a/src/devices/mesh/dot11s/peer-link.cc Mon Nov 02 10:49:39 2009 -0500
26.2 +++ b/src/devices/mesh/dot11s/peer-link.cc Mon Nov 02 10:56:30 2009 -0500
26.3 @@ -94,6 +94,10 @@
26.4 m_peerMeshPointAddress (Mac48Address::GetBroadcast ()),
26.5 m_localLinkId (0),
26.6 m_peerLinkId (0),
26.7 + m_assocId (0),
26.8 + m_peerAssocId (0),
26.9 + m_lastBeacon (Seconds (0)),
26.10 + m_beaconInterval (Seconds (0)),
26.11 m_packetFail (0),
26.12 m_state (IDLE),
26.13 m_retryCounter (0),
26.14 @@ -188,6 +192,12 @@
26.15 {
26.16 return m_assocId;
26.17 }
26.18 +uint16_t
26.19 +PeerLink::GetPeerAid () const
26.20 +{
26.21 + return m_peerAssocId;
26.22 +}
26.23 +
26.24 Time
26.25 PeerLink::GetLastBeacon () const
26.26 {
27.1 --- a/src/devices/mesh/dot11s/peer-link.h Mon Nov 02 10:49:39 2009 -0500
27.2 +++ b/src/devices/mesh/dot11s/peer-link.h Mon Nov 02 10:56:30 2009 -0500
27.3 @@ -74,11 +74,9 @@
27.4 void SetPeerMeshPointAddress (Mac48Address macaddr);
27.5 void SetInterface (uint32_t interface);
27.6 void SetLocalLinkId (uint16_t id);
27.7 - //void SetPeerLinkId (uint16_t id);
27.8 void SetLocalAid (uint16_t aid);
27.9 - //void SetPeerAid (uint16_t aid);
27.10 + uint16_t GetPeerAid () const;
27.11 void SetBeaconTimingElement (IeBeaconTiming beaconTiming);
27.12 - //void SetPeerLinkDescriptorElement (IePeerManagement peerLinkElement);
27.13 Mac48Address GetPeerAddress () const;
27.14 uint16_t GetLocalAid () const;
27.15 Time GetLastBeacon () const;
28.1 --- a/src/devices/mesh/dot11s/peer-management-protocol-mac.cc Mon Nov 02 10:49:39 2009 -0500
28.2 +++ b/src/devices/mesh/dot11s/peer-management-protocol-mac.cc Mon Nov 02 10:56:30 2009 -0500
28.3 @@ -69,22 +69,16 @@
28.4 {
28.5 MgtBeaconHeader beacon_hdr;
28.6 packet->RemoveHeader (beacon_hdr);
28.7 - //meshId.FindFirst (myBeacon);
28.8 - bool meshBeacon = false;
28.9 WifiInformationElementVector elements;
28.10 packet->RemoveHeader(elements);
28.11 Ptr<IeBeaconTiming> beaconTiming = DynamicCast<IeBeaconTiming> (elements.FindFirst (IE11S_BEACON_TIMING));
28.12 Ptr<IeMeshId> meshId = DynamicCast<IeMeshId> (elements.FindFirst (IE11S_MESH_ID));
28.13
28.14 - if ((beaconTiming != 0) && (meshId != 0))
28.15 + if ((meshId != 0) && (m_protocol->GetMeshId ()->IsEqual (*meshId)))
28.16 {
28.17 - if (m_protocol->GetMeshId ()->IsEqual (*meshId))
28.18 - {
28.19 - meshBeacon = true;
28.20 - }
28.21 + m_protocol->ReceiveBeacon (m_ifIndex, header.GetAddr2 (), MicroSeconds (
28.22 + beacon_hdr.GetBeaconIntervalUs ()), beaconTiming);
28.23 }
28.24 - m_protocol->UpdatePeerBeaconTiming (m_ifIndex, meshBeacon, *beaconTiming, header.GetAddr2 (),
28.25 - Simulator::Now (), MicroSeconds (beacon_hdr.GetBeaconIntervalUs ()));
28.26 // Beacon shall not be dropeed. May be needed to another plugins
28.27 return true;
28.28 }
28.29 @@ -190,9 +184,13 @@
28.30 void
28.31 PeerManagementProtocolMac::UpdateBeacon (MeshWifiBeacon & beacon) const
28.32 {
28.33 - Ptr<IeBeaconTiming> beaconTiming = m_protocol->GetBeaconTimingElement (m_ifIndex);
28.34 - beacon.AddInformationElement (beaconTiming);
28.35 + if (m_protocol->GetBeaconCollisionAvoidance ())
28.36 + {
28.37 + Ptr<IeBeaconTiming> beaconTiming = m_protocol->GetBeaconTimingElement (m_ifIndex);
28.38 + beacon.AddInformationElement (beaconTiming);
28.39 + }
28.40 beacon.AddInformationElement (m_protocol->GetMeshId ());
28.41 + m_protocol->NotifyBeaconSent (m_ifIndex, beacon.GetBeaconInterval ());
28.42 }
28.43
28.44 void
28.45 @@ -269,14 +267,6 @@
28.46 return Mac48Address::Mac48Address ();
28.47 }
28.48 }
28.49 -std::pair<Time, Time>
28.50 -PeerManagementProtocolMac::GetBeaconInfo () const
28.51 -{
28.52 - std::pair<Time, Time> retval;
28.53 - retval.first = m_parent->GetTbtt ();
28.54 - retval.second = m_parent->GetBeaconInterval ();
28.55 - return retval;
28.56 -}
28.57 void
28.58 PeerManagementProtocolMac::SetBeaconShift (Time shift)
28.59 {
29.1 --- a/src/devices/mesh/dot11s/peer-management-protocol-mac.h Mon Nov 02 10:49:39 2009 -0500
29.2 +++ b/src/devices/mesh/dot11s/peer-management-protocol-mac.h Mon Nov 02 10:56:30 2009 -0500
29.3 @@ -86,15 +86,8 @@
29.4 ///// Closes link when a proper number of successive transmissions have failed
29.5 void TxError (WifiMacHeader const &hdr);
29.6 void TxOk (WifiMacHeader const &hdr);
29.7 - ///\name BCA functionallity:
29.8 - ///\{
29.9 - ///\brief Fills TBTT and beacon interval. Needed by BCA
29.10 - ///functionallity
29.11 - ///\param first in retval is TBTT
29.12 - ///\param second in retval is beacon interval
29.13 - std::pair<Time, Time> GetBeaconInfo () const;
29.14 + ///BCA functionallity:
29.15 void SetBeaconShift (Time shift);
29.16 - ///\}
29.17 void SetPeerManagerProtcol (Ptr<PeerManagementProtocol> protocol);
29.18 void SendPeerLinkManagementFrame (
29.19 Mac48Address peerAddress,
30.1 --- a/src/devices/mesh/dot11s/peer-management-protocol.cc Mon Nov 02 10:49:39 2009 -0500
30.2 +++ b/src/devices/mesh/dot11s/peer-management-protocol.cc Mon Nov 02 10:56:30 2009 -0500
30.3 @@ -55,18 +55,25 @@
30.4 &PeerManagementProtocol::m_maxNumberOfPeerLinks),
30.5 MakeUintegerChecker<uint8_t> ()
30.6 )
30.7 - .AddAttribute ( "MaxBeaconLossForBeaconTiming",
30.8 - "If maximum number of beacons were lost, station will not included in beacon timing element",
30.9 - UintegerValue (3),
30.10 + .AddAttribute ( "MaxBeaconShiftValue",
30.11 + "Maximum number of TUs for beacon shifting",
30.12 + UintegerValue (15),
30.13 MakeUintegerAccessor (
30.14 - &PeerManagementProtocol::m_maxBeaconLostForBeaconTiming),
30.15 - MakeUintegerChecker<uint8_t> ()
30.16 + &PeerManagementProtocol::m_maxBeaconShift),
30.17 + MakeUintegerChecker<uint16_t> ()
30.18 )
30.19 + .AddAttribute ( "EnableBeaconCollisionAvoidance",
30.20 + "Enable/Disable Beacon collision avoidance.",
30.21 + BooleanValue (true),
30.22 + MakeBooleanAccessor (
30.23 + &PeerManagementProtocol::SetBeaconCollisionAvoidance, &PeerManagementProtocol::GetBeaconCollisionAvoidance),
30.24 + MakeBooleanChecker ()
30.25 + )
30.26 ;
30.27 return tid;
30.28 }
30.29 PeerManagementProtocol::PeerManagementProtocol () :
30.30 - m_lastAssocId (0), m_lastLocalLinkId (1), m_maxBeaconLostForBeaconTiming (3)
30.31 + m_lastAssocId (0), m_lastLocalLinkId (1), m_enableBca (true), m_maxBeaconShift (15)
30.32 {
30.33 }
30.34 PeerManagementProtocol::~PeerManagementProtocol ()
30.35 @@ -87,13 +94,6 @@
30.36 j->second.clear ();
30.37 }
30.38 m_peerLinks.clear ();
30.39 - //cleaning beacon structures:
30.40 - for (BeaconInfoMap::iterator i = m_neighbourBeacons.begin (); i != m_neighbourBeacons.end (); i++)
30.41 - {
30.42 - i->second.clear ();
30.43 - }
30.44 - m_neighbourBeacons.clear ();
30.45 -
30.46 m_plugins.clear ();
30.47 }
30.48
30.49 @@ -128,89 +128,33 @@
30.50 Ptr<IeBeaconTiming>
30.51 PeerManagementProtocol::GetBeaconTimingElement (uint32_t interface)
30.52 {
30.53 + if (!GetBeaconCollisionAvoidance ())
30.54 + {
30.55 + return 0;
30.56 + }
30.57 Ptr<IeBeaconTiming> retval = Create<IeBeaconTiming> ();
30.58 - BeaconInfoMap::iterator i = m_neighbourBeacons.find (interface);
30.59 - if (i == m_neighbourBeacons.end ())
30.60 + PeerLinksMap::iterator iface = m_peerLinks.find (interface);
30.61 + NS_ASSERT (iface != m_peerLinks.end ());
30.62 + for (PeerLinksOnInterface::iterator i = iface->second.begin (); i != iface->second.end (); i++)
30.63 {
30.64 - return retval;
30.65 - }
30.66 - bool cleaned = false;
30.67 - while (!cleaned)
30.68 - {
30.69 - BeaconsOnInterface::iterator start = i->second.begin ();
30.70 - for (BeaconsOnInterface::iterator j = start; j != i->second.end (); j++)
30.71 + //If we do not know peer Assoc Id, we shall not add any info
30.72 + //to a beacon timing element
30.73 + if ((*i)->GetBeaconInterval () == Seconds (0))
30.74 {
30.75 - //check beacon loss and make a timing element
30.76 - //if last beacon was m_maxBeaconLostForBeaconTiming beacons ago - we do not put it to the
30.77 - //timing element
30.78 - if ((j->second.referenceTbtt + j->second.beaconInterval * Scalar (m_maxBeaconLostForBeaconTiming))
30.79 - < Simulator::Now ())
30.80 - {
30.81 - start = j;
30.82 - i->second.erase (j);
30.83 - break;
30.84 - }
30.85 + //No beacon was received, do not include to the beacon timing element
30.86 + continue;
30.87 }
30.88 - cleaned = true;
30.89 - }
30.90 - for (BeaconsOnInterface::const_iterator j = i->second.begin (); j != i->second.end (); j++)
30.91 - {
30.92 - retval->AddNeighboursTimingElementUnit (j->second.aid, j->second.referenceTbtt,
30.93 - j->second.beaconInterval);
30.94 + retval->AddNeighboursTimingElementUnit ((*i)->GetLocalAid (), (*i)->GetLastBeacon (),
30.95 + (*i)->GetBeaconInterval ());
30.96 }
30.97 return retval;
30.98 }
30.99 -
30.100 void
30.101 -PeerManagementProtocol::FillBeaconInfo (uint32_t interface, Mac48Address peerAddress, Time receivingTime,
30.102 - Time beaconInterval)
30.103 +PeerManagementProtocol::ReceiveBeacon (uint32_t interface, Mac48Address peerAddress, Time beaconInterval, Ptr<IeBeaconTiming> timingElement)
30.104 {
30.105 - BeaconInfoMap::iterator i = m_neighbourBeacons.find (interface);
30.106 - if (i == m_neighbourBeacons.end ())
30.107 - {
30.108 - BeaconsOnInterface newMap;
30.109 - m_neighbourBeacons[interface] = newMap;
30.110 - }
30.111 - i = m_neighbourBeacons.find (interface);
30.112 - BeaconsOnInterface::iterator j = i->second.find (peerAddress);
30.113 - if (j == i->second.end ())
30.114 - {
30.115 - BeaconInfo newInfo;
30.116 - newInfo.referenceTbtt = receivingTime;
30.117 - newInfo.beaconInterval = beaconInterval;
30.118 - newInfo.aid = m_lastAssocId++;
30.119 - if (m_lastAssocId == 0xff)
30.120 - {
30.121 - m_lastAssocId = 0;
30.122 - }
30.123 - i->second[peerAddress] = newInfo;
30.124 - }
30.125 - else
30.126 - {
30.127 - j->second.referenceTbtt = receivingTime;
30.128 - j->second.beaconInterval = beaconInterval;
30.129 - }
30.130 -}
30.131 -
30.132 -void
30.133 -PeerManagementProtocol::UpdatePeerBeaconTiming (uint32_t interface, bool meshBeacon,
30.134 - IeBeaconTiming timingElement, Mac48Address peerAddress, Time receivingTime, Time beaconInterval)
30.135 -{
30.136 - FillBeaconInfo (interface, peerAddress, receivingTime, beaconInterval);
30.137 - if (!meshBeacon)
30.138 - {
30.139 - return;
30.140 - }
30.141 - //BCA:
30.142 - PeerManagementProtocolMacMap::iterator plugin = m_plugins.find (interface);
30.143 - NS_ASSERT (plugin != m_plugins.end ());
30.144 - Time shift = GetNextBeaconShift (interface);
30.145 - if (TimeToTu (shift) != 0)
30.146 - {
30.147 - plugin->second->SetBeaconShift (shift);
30.148 - }
30.149 //PM STATE Machine
30.150 //Check that a given beacon is not from our interface
30.151 + Simulator::Schedule (beaconInterval - TuToTime (m_maxBeaconShift + 1), &PeerManagementProtocol::DoShiftBeacon, this, interface);
30.152 for (PeerManagementProtocolMacMap::const_iterator i = m_plugins.begin (); i != m_plugins.end (); i++)
30.153 {
30.154 if (i->second->GetAddress () == peerAddress)
30.155 @@ -219,21 +163,19 @@
30.156 }
30.157 }
30.158 Ptr<PeerLink> peerLink = FindPeerLink (interface, peerAddress);
30.159 - if (peerLink != 0)
30.160 - {
30.161 - peerLink->SetBeaconTimingElement (timingElement);
30.162 - peerLink->SetBeaconInformation (receivingTime, beaconInterval);
30.163 - }
30.164 - else
30.165 + if (peerLink == 0)
30.166 {
30.167 if (ShouldSendOpen (interface, peerAddress))
30.168 {
30.169 - peerLink = InitiateLink (interface, peerAddress, Mac48Address::GetBroadcast (), receivingTime,
30.170 - beaconInterval);
30.171 - peerLink->SetBeaconTimingElement (timingElement);
30.172 + peerLink = InitiateLink (interface, peerAddress, Mac48Address::GetBroadcast ());
30.173 peerLink->MLMEActivePeerLinkOpen ();
30.174 }
30.175 }
30.176 + peerLink->SetBeaconInformation (Simulator::Now (), beaconInterval);
30.177 + if (GetBeaconCollisionAvoidance ())
30.178 + {
30.179 + peerLink->SetBeaconTimingElement (*PeekPointer (timingElement));
30.180 + }
30.181 }
30.182
30.183 void
30.184 @@ -248,8 +190,7 @@
30.185 bool reject = !(ShouldAcceptOpen (interface, peerAddress, reasonCode));
30.186 if (peerLink == 0)
30.187 {
30.188 - peerLink = InitiateLink (interface, peerAddress, peerMeshPointAddress, Simulator::Now (), Seconds (
30.189 - 1.0));
30.190 + peerLink = InitiateLink (interface, peerAddress, peerMeshPointAddress);
30.191 }
30.192 if (!reject)
30.193 {
30.194 @@ -307,26 +248,9 @@
30.195 }
30.196 Ptr<PeerLink>
30.197 PeerManagementProtocol::InitiateLink (uint32_t interface, Mac48Address peerAddress,
30.198 - Mac48Address peerMeshPointAddress, Time lastBeacon, Time beaconInterval)
30.199 + Mac48Address peerMeshPointAddress)
30.200 {
30.201 Ptr<PeerLink> new_link = CreateObject<PeerLink> ();
30.202 - if (m_lastLocalLinkId == 0xff)
30.203 - {
30.204 - m_lastLocalLinkId = 0;
30.205 - }
30.206 - //find a beacon entry
30.207 - BeaconInfoMap::iterator beaconsOnInterface = m_neighbourBeacons.find (interface);
30.208 - if (beaconsOnInterface == m_neighbourBeacons.end ())
30.209 - {
30.210 - FillBeaconInfo (interface, peerAddress, lastBeacon, beaconInterval);
30.211 - }
30.212 - beaconsOnInterface = m_neighbourBeacons.find (interface);
30.213 - BeaconsOnInterface::iterator beacon = beaconsOnInterface->second.find (peerAddress);
30.214 - if (beacon == beaconsOnInterface->second.end ())
30.215 - {
30.216 - FillBeaconInfo (interface, peerAddress, lastBeacon, beaconInterval);
30.217 - }
30.218 - beacon = beaconsOnInterface->second.find (peerAddress);
30.219 //find a peer link - it must not exist
30.220 if (FindPeerLink (interface, peerAddress) != 0)
30.221 {
30.222 @@ -337,17 +261,17 @@
30.223 NS_ASSERT (plugin != m_plugins.end ());
30.224 PeerLinksMap::iterator iface = m_peerLinks.find (interface);
30.225 NS_ASSERT (iface != m_peerLinks.end ());
30.226 - new_link->SetLocalAid (beacon->second.aid);
30.227 + new_link->SetLocalAid (m_lastAssocId++);
30.228 new_link->SetInterface (interface);
30.229 new_link->SetLocalLinkId (m_lastLocalLinkId++);
30.230 new_link->SetPeerAddress (peerAddress);
30.231 new_link->SetPeerMeshPointAddress (peerMeshPointAddress);
30.232 - new_link->SetBeaconInformation (lastBeacon, beaconInterval);
30.233 new_link->SetMacPlugin (plugin->second);
30.234 new_link->MLMESetSignalStatusCallback (MakeCallback (&PeerManagementProtocol::PeerLinkStatus, this));
30.235 iface->second.push_back (new_link);
30.236 return new_link;
30.237 }
30.238 +
30.239 Ptr<PeerLink>
30.240 PeerManagementProtocol::FindPeerLink (uint32_t interface, Mac48Address peerAddress)
30.241 {
30.242 @@ -377,13 +301,14 @@
30.243 {
30.244 m_peerStatusCallback = cb;
30.245 }
30.246 +
30.247 std::vector<Mac48Address>
30.248 -PeerManagementProtocol::GetActiveLinks (uint32_t interface)
30.249 +PeerManagementProtocol::GetPeers (uint32_t interface) const
30.250 {
30.251 std::vector<Mac48Address> retval;
30.252 - PeerLinksMap::iterator iface = m_peerLinks.find (interface);
30.253 + PeerLinksMap::const_iterator iface = m_peerLinks.find (interface);
30.254 NS_ASSERT (iface != m_peerLinks.end ());
30.255 - for (PeerLinksOnInterface::iterator i = iface->second.begin (); i != iface->second.end (); i++)
30.256 + for (PeerLinksOnInterface::const_iterator i = iface->second.begin (); i != iface->second.end (); i++)
30.257 {
30.258 if ((*i)->LinkIsEstab ())
30.259 {
30.260 @@ -392,6 +317,21 @@
30.261 }
30.262 return retval;
30.263 }
30.264 +
30.265 +std::vector< Ptr<PeerLink> >
30.266 +PeerManagementProtocol::GetPeerLinks () const
30.267 +{
30.268 + std::vector< Ptr<PeerLink> > links;
30.269 +
30.270 + for (PeerLinksMap::const_iterator iface = m_peerLinks.begin (); iface != m_peerLinks.end (); ++iface)
30.271 + {
30.272 + for (PeerLinksOnInterface::const_iterator i = iface->second.begin ();
30.273 + i != iface->second.end (); i++)
30.274 + if ((*i)->LinkIsEstab ())
30.275 + links.push_back (*i);
30.276 + }
30.277 + return links;
30.278 +}
30.279 bool
30.280 PeerManagementProtocol::IsActiveLink (uint32_t interface, Mac48Address peerAddress)
30.281 {
30.282 @@ -407,6 +347,7 @@
30.283 {
30.284 return (m_stats.linksTotal <= m_maxNumberOfPeerLinks);
30.285 }
30.286 +
30.287 bool
30.288 PeerManagementProtocol::ShouldAcceptOpen (uint32_t interface, Mac48Address peerAddress,
30.289 PmpReasonCode & reasonCode)
30.290 @@ -418,56 +359,70 @@
30.291 }
30.292 return true;
30.293 }
30.294 -Time
30.295 -PeerManagementProtocol::GetNextBeaconShift (uint32_t interface)
30.296 +
30.297 +void
30.298 +PeerManagementProtocol::DoShiftBeacon (uint32_t interface)
30.299 {
30.300 - //REMINDER:: in timing element 1) last beacon reception time is measured in units of 256 microseconds
30.301 - // 2) beacon interval is mesured in units of 1024 microseconds
30.302 - // 3) hereafter TU = 1024 microseconds
30.303 - //So, the shift is a random integer variable uniformly distributed in [-15;-1] U [1;15]
30.304 - static int maxShift = 15;
30.305 - static int minShift = 1;
30.306 - UniformVariable randomSign (-1, 1);
30.307 - UniformVariable randomShift (minShift, maxShift);
30.308 + if (!GetBeaconCollisionAvoidance ())
30.309 + {
30.310 + return;
30.311 + }
30.312 + // If beacon interval is equal to the neighbor's one and one o more beacons received
30.313 + // by my neighbor coincide with my beacon - apply random uniformly distributed shift from
30.314 + // [-m_maxBeaconShift, m_maxBeaconShift] except 0.
30.315 + UniformVariable beaconShift (-m_maxBeaconShift, m_maxBeaconShift);
30.316 PeerLinksMap::iterator iface = m_peerLinks.find (interface);
30.317 NS_ASSERT (iface != m_peerLinks.end ());
30.318 - PeerManagementProtocolMacMap::iterator plugin = m_plugins.find (interface);
30.319 + PeerManagementProtocolMacMap::const_iterator plugin = m_plugins.find (interface);
30.320 NS_ASSERT (plugin != m_plugins.end ());
30.321 - std::pair<Time, Time> myBeacon = plugin->second->GetBeaconInfo ();
30.322 - if (Simulator::Now () + TuToTime (maxShift) > myBeacon.first + myBeacon.second)
30.323 + std::map<uint32_t, Time>::const_iterator lastBeacon = m_lastBeacon.find (interface);
30.324 + std::map<uint32_t, Time>::const_iterator beaconInterval = m_beaconInterval.find (interface);
30.325 + if ((lastBeacon == m_lastBeacon.end ()) || (beaconInterval == m_beaconInterval.end ()))
30.326 {
30.327 - return MicroSeconds (0);
30.328 + return;
30.329 + }
30.330 + if (TuToTime (m_maxBeaconShift) > m_beaconInterval[interface])
30.331 + {
30.332 + NS_FATAL_ERROR ("Wrong beacon shift parameters");
30.333 + return;
30.334 }
30.335 for (PeerLinksOnInterface::iterator i = iface->second.begin (); i != iface->second.end (); i++)
30.336 {
30.337 IeBeaconTiming::NeighboursTimingUnitsList neighbours;
30.338 - if ((*i)->LinkIsIdle ())
30.339 - {
30.340 - continue;
30.341 - }
30.342 neighbours = (*i)->GetBeaconTimingElement ().GetNeighboursTimingElementsList ();
30.343 //Going through all my timing elements and detecting future beacon collisions
30.344 for (IeBeaconTiming::NeighboursTimingUnitsList::const_iterator j = neighbours.begin (); j
30.345 != neighbours.end (); j++)
30.346 {
30.347 - //We apply MBAC only if beacon Intervals are equal
30.348 - if ((*j)->GetBeaconInterval () == TimeToTu (myBeacon.second))
30.349 + if ((*i)->GetPeerAid () == (*j)->GetAid ())
30.350 {
30.351 - //Apply MBCA if future beacons may coinside
30.352 - if ((TimeToTu (myBeacon.first) - ((*j)->GetLastBeacon () / 4)) % ((*j)->GetBeaconInterval ())
30.353 - == 0)
30.354 + // I am present at neighbour's list of neighbors
30.355 + continue;
30.356 + }
30.357 + //Beacon interval is stored in TU's
30.358 + if (((*j)->GetBeaconInterval ()) != TimeToTu (beaconInterval->second))
30.359 + {
30.360 + continue;
30.361 + }
30.362 + //Timing element keeps beacon receiving times in 256us units, TU=1024us
30.363 + if ((int) ((int)(*j)->GetLastBeacon () / 4 - (int)TimeToTu (lastBeacon->second)) % TimeToTu (
30.364 + beaconInterval->second)
30.365 + != 0)
30.366 + {
30.367 + continue;
30.368 + }
30.369 + int shift = 0;
30.370 + do
30.371 {
30.372 - int beaconShift = randomShift.GetInteger (minShift, maxShift) * ((randomSign.GetValue ()
30.373 - >= 0) ? 1 : -1);
30.374 - NS_LOG_DEBUG ("Apply MBCA: Shift value = " << beaconShift << " beacon TUs");
30.375 - //Do not shift to the past!
30.376 - return (TuToTime (beaconShift) + Simulator::Now () < myBeacon.first) ? TuToTime (
30.377 - beaconShift) : TuToTime (0);
30.378 + shift = (int) beaconShift.GetValue ();
30.379 }
30.380 - }
30.381 + while (shift == 0);
30.382 + PeerManagementProtocolMacMap::iterator plugin = m_plugins.find (interface);
30.383 + NS_ASSERT (plugin != m_plugins.end ());
30.384 + plugin->second->SetBeaconShift (TuToTime (shift));
30.385 + return;
30.386 }
30.387 }
30.388 - return MicroSeconds (0);
30.389 }
30.390 Time
30.391 PeerManagementProtocol::TuToTime (uint32_t x)
30.392 @@ -533,6 +488,12 @@
30.393 {
30.394 return m_address;
30.395 }
30.396 +void
30.397 +PeerManagementProtocol::NotifyBeaconSent (uint32_t interface, Time beaconInterval)
30.398 +{
30.399 + m_lastBeacon[interface] = Simulator::Now ();
30.400 + m_beaconInterval[interface] = beaconInterval;
30.401 +}
30.402 PeerManagementProtocol::Statistics::Statistics (uint16_t t) :
30.403 linksTotal (t), linksOpened (0), linksClosed (0)
30.404 {
30.405 @@ -574,6 +535,16 @@
30.406 }
30.407 }
30.408
30.409 +void
30.410 +PeerManagementProtocol::SetBeaconCollisionAvoidance (bool enable)
30.411 +{
30.412 + m_enableBca = enable;
30.413 +}
30.414 +bool
30.415 +PeerManagementProtocol::GetBeaconCollisionAvoidance () const
30.416 +{
30.417 + return m_enableBca;
30.418 +}
30.419 } // namespace dot11s
30.420 } //namespace ns3
30.421
31.1 --- a/src/devices/mesh/dot11s/peer-management-protocol.h Mon Nov 02 10:49:39 2009 -0500
31.2 +++ b/src/devices/mesh/dot11s/peer-management-protocol.h Mon Nov 02 10:56:30 2009 -0500
31.3 @@ -74,25 +74,13 @@
31.4 */
31.5 Ptr<IeBeaconTiming> GetBeaconTimingElement (uint32_t interface);
31.6 /**
31.7 - * \brief When we receive a beacon from peer-station, we remember
31.8 - * its beacon timing element (needed for peer choosing mechanism),
31.9 - * and remember beacon timers - last beacon and beacon interval to
31.10 - * detect beacon loss and cancel links
31.11 - * \param interface is a interface on which beacon was received
31.12 - * \param meshBeacon indicates whether the beacon is mesh beacon or not.
31.13 - * \param timingElement is a timing element of remote beacon
31.14 - * \param peerAddress is an address where a beacon was received from
31.15 - * \param receivingTime is a time when beacon was received
31.16 - * \param beaconInterval is a beacon interval of received beacon
31.17 + * \brief To initiate peer link we must notify about received beacon
31.18 + * \param interface the interface where a beacon was received from
31.19 + * \param peerAddress address of station, which sent a beacon
31.20 + * \param beaconInterval beacon interval (needed by beacon loss counter)
31.21 + * \param beaconTiming beacon timing element (needed by BCA)
31.22 */
31.23 - void UpdatePeerBeaconTiming (
31.24 - uint32_t interface,
31.25 - bool meshBeacon,
31.26 - IeBeaconTiming timingElement,
31.27 - Mac48Address peerAddress,
31.28 - Time receivingTime,
31.29 - Time beaconInterval
31.30 - );
31.31 + void ReceiveBeacon (uint32_t interface, Mac48Address peerAddress, Time beaconInterval, Ptr<IeBeaconTiming> beaconTiming);
31.32 //\}
31.33 /**
31.34 * \brief Methods that handle Peer link management frames
31.35 @@ -137,16 +125,26 @@
31.36 */
31.37 bool IsActiveLink (uint32_t interface, Mac48Address peerAddress);
31.38 //\}
31.39 - ///\brief Needed by external module to do MLME
31.40 + ///\name Interface to other protocols (MLME)
31.41 + //\{
31.42 + /// Set peer link status change callback
31.43 + void SetPeerLinkStatusCallback (Callback<void, Mac48Address, Mac48Address, uint32_t, bool> cb);
31.44 + /// Find active peer link by my interface and peer interface MAC
31.45 Ptr<PeerLink> FindPeerLink (uint32_t interface, Mac48Address peerAddress);
31.46 - void SetPeerLinkStatusCallback (Callback<void, Mac48Address, Mac48Address, uint32_t, bool> cb);
31.47 - std::vector<Mac48Address> GetActiveLinks (uint32_t interface);
31.48 - ///\brief needed by plugins to set global source address
31.49 + /// Get list of all active peer links
31.50 + std::vector < Ptr<PeerLink> > GetPeerLinks () const;
31.51 + /// Get list of active peers of my given interface
31.52 + std::vector<Mac48Address> GetPeers (uint32_t interface) const;
31.53 + /// Get mesh point address. TODO this used by plugins only. Now MAC plugins can ask MP addrress directly from main MAC
31.54 Mac48Address GetAddress ();
31.55 - ///\brief Needed to fill mesh configuration
31.56 uint8_t GetNumberOfLinks ();
31.57 void SetMeshId (std::string s);
31.58 Ptr<IeMeshId> GetMeshId () const;
31.59 + /// Enable or disable beacon collision avoidance
31.60 + void SetBeaconCollisionAvoidance (bool enable);
31.61 + bool GetBeaconCollisionAvoidance () const;
31.62 + /// Notify about beacon send event, needed to schedule BCA
31.63 + void NotifyBeaconSent (uint32_t interface, Time beaconInterval);
31.64 ///\brief: Report statistics
31.65 void Report (std::ostream &) const;
31.66 void ResetStats ();
31.67 @@ -177,16 +175,10 @@
31.68 PeerManagementProtocol& operator= (const PeerManagementProtocol &);
31.69 PeerManagementProtocol (const PeerManagementProtocol &);
31.70
31.71 - /**
31.72 - * \brief Fills information of received beacon. Needed to form own beacon timing element
31.73 - */
31.74 - void FillBeaconInfo (uint32_t interface, Mac48Address peerAddress, Time receivingTime, Time beaconInterval);
31.75 Ptr<PeerLink> InitiateLink (
31.76 uint32_t interface,
31.77 Mac48Address peerAddress,
31.78 - Mac48Address peerMeshPointAddress,
31.79 - Time lastBeacon,
31.80 - Time beaconInterval
31.81 + Mac48Address peerMeshPointAddress
31.82 );
31.83 /**
31.84 * \name External peer-chooser
31.85 @@ -200,7 +192,7 @@
31.86 */
31.87 void PeerLinkStatus (uint32_t interface, Mac48Address peerAddress, Mac48Address peerMeshPointAddres, PeerLink::PeerState ostate, PeerLink::PeerState nstate);
31.88 ///\brief BCA
31.89 - Time GetNextBeaconShift (uint32_t interface);
31.90 + void DoShiftBeacon (uint32_t interface);
31.91 /**
31.92 * \name Time<-->TU converters:
31.93 * \{
31.94 @@ -212,16 +204,19 @@
31.95 PeerManagementProtocolMacMap m_plugins;
31.96 Mac48Address m_address;
31.97 Ptr<IeMeshId> m_meshId;
31.98 - /**
31.99 - * \name Information related to beacons:
31.100 - * \{
31.101 - */
31.102 - BeaconInfoMap m_neighbourBeacons;
31.103 - ///\}
31.104 +
31.105 uint16_t m_lastAssocId;
31.106 uint16_t m_lastLocalLinkId;
31.107 uint8_t m_maxNumberOfPeerLinks;
31.108 - uint8_t m_maxBeaconLostForBeaconTiming;
31.109 + /// Flag which enables BCA
31.110 + bool m_enableBca;
31.111 + /// Beacon can be shifted at [-m_maxBeaconShift; +m_maxBeaconShift] TUs
31.112 + uint16_t m_maxBeaconShift;
31.113 + ///Last beacon at each interface
31.114 + std::map<uint32_t, Time> m_lastBeacon;
31.115 + ///Beacon interval at each interface
31.116 + std::map<uint32_t, Time> m_beaconInterval;
31.117 +
31.118 /**
31.119 * \name Peer Links
31.120 * \{
32.1 --- a/src/devices/mesh/flame/flame-protocol-mac.cc Mon Nov 02 10:49:39 2009 -0500
32.2 +++ b/src/devices/mesh/flame/flame-protocol-mac.cc Mon Nov 02 10:56:30 2009 -0500
32.3 @@ -31,6 +31,8 @@
32.4 }
32.5 FlameProtocolMac::~FlameProtocolMac ()
32.6 {
32.7 + m_protocol = 0;
32.8 + m_parent = 0;
32.9 }
32.10 void
32.11 FlameProtocolMac::SetParent (Ptr<MeshWifiInterfaceMac> parent)
33.1 --- a/src/devices/mesh/flame/flame-protocol.cc Mon Nov 02 10:49:39 2009 -0500
33.2 +++ b/src/devices/mesh/flame/flame-protocol.cc Mon Nov 02 10:56:30 2009 -0500
33.3 @@ -127,7 +127,7 @@
33.4 return tid;
33.5 }
33.6 FlameProtocol::FlameProtocol () :
33.7 - m_address (Mac48Address ()), m_broadcastInterval (Seconds (5)), m_lastBroadcast (Simulator::Now ()),
33.8 + m_address (Mac48Address ()), m_broadcastInterval (Seconds (5)), m_lastBroadcast (Seconds (0)),
33.9 m_maxCost (32), m_myLastSeqno (1), m_rtable (CreateObject<FlameRtable> ())
33.10 {
33.11 }
33.12 @@ -137,6 +137,9 @@
33.13 void
33.14 FlameProtocol::DoDispose ()
33.15 {
33.16 + m_interfaces.clear ();
33.17 + m_rtable = 0;
33.18 + m_mp = 0;
33.19 }
33.20 bool
33.21 FlameProtocol::RequestRoute (uint32_t sourceIface, const Mac48Address source, const Mac48Address destination,
33.22 @@ -224,8 +227,12 @@
33.23 m_stats.totalDropped++;
33.24 return false;
33.25 }
33.26 + tag.receiver = result.retransmitter;
33.27 }
33.28 - tag.receiver = result.retransmitter;
33.29 + else
33.30 + {
33.31 + tag.receiver = Mac48Address::GetBroadcast ();
33.32 + }
33.33 if (result.retransmitter == Mac48Address::GetBroadcast ())
33.34 {
33.35 m_stats.txBroadcast++;
33.36 @@ -262,19 +269,21 @@
33.37 }
33.38 FlameHeader flameHdr;
33.39 packet->RemoveHeader (flameHdr);
33.40 - if ((destination == GetAddress ()) && (m_lastBroadcast + m_broadcastInterval < Simulator::Now ()))
33.41 - {
33.42 - Ptr<Packet> packet = Create<Packet> ();
33.43 - m_mp->Send(packet, Mac48Address::GetBroadcast (), 0);
33.44 - m_lastBroadcast = Simulator::Now ();
33.45 - }
33.46 - NS_ASSERT (protocolType == FLAME_PROTOCOL);
33.47 - protocolType = flameHdr.GetProtocol ();
33.48 - if ((HandleDataFrame (flameHdr.GetSeqno (), source, flameHdr, tag.transmitter, fromIface))
33.49 - || packet->GetSize () == 0)
33.50 + if (HandleDataFrame (flameHdr.GetSeqno (), source, flameHdr, tag.transmitter, fromIface))
33.51 {
33.52 return false;
33.53 }
33.54 + // Start PATH_UPDATE procedure if destination is our own address and last broadcast was sent more
33.55 + // than broadcast interval ago or was not sent at all
33.56 + if ((destination == GetAddress ()) && ((m_lastBroadcast + m_broadcastInterval < Simulator::Now ())
33.57 + || (m_lastBroadcast == Seconds (0))))
33.58 + {
33.59 + Ptr<Packet> packet = Create<Packet> ();
33.60 + m_mp->Send (packet, Mac48Address::GetBroadcast (), 0);
33.61 + m_lastBroadcast = Simulator::Now ();
33.62 + }
33.63 + NS_ASSERT (protocolType == FLAME_PROTOCOL);
33.64 + protocolType = flameHdr.GetProtocol ();
33.65 return true;
33.66 }
33.67 bool
34.1 --- a/src/devices/mesh/mesh-wifi-beacon.cc Mon Nov 02 10:49:39 2009 -0500
34.2 +++ b/src/devices/mesh/mesh-wifi-beacon.cc Mon Nov 02 10:56:30 2009 -0500
34.3 @@ -35,6 +35,11 @@
34.4 m_elements.AddInformationElement (ie);
34.5 }
34.6
34.7 +Time
34.8 +MeshWifiBeacon::GetBeaconInterval () const
34.9 +{
34.10 + return MicroSeconds (m_header.GetBeaconIntervalUs ());
34.11 +}
34.12
34.13 Ptr<Packet>
34.14 MeshWifiBeacon::CreatePacket ()
35.1 --- a/src/devices/mesh/mesh-wifi-beacon.h Mon Nov 02 10:49:39 2009 -0500
35.2 +++ b/src/devices/mesh/mesh-wifi-beacon.h Mon Nov 02 10:56:30 2009 -0500
35.3 @@ -58,6 +58,8 @@
35.4 * \param mpAddress is mesh point address
35.5 */
35.6 WifiMacHeader CreateHeader (Mac48Address address, Mac48Address mpAddress);
35.7 + ///Returns a beacon interval of wifi beacon
35.8 + Time GetBeaconInterval () const;
35.9 /// Create frame = { beacon header + all information elements sorted by ElementId () }
35.10 Ptr<Packet> CreatePacket ();
35.11
36.1 --- a/src/helper/dot11s-installer.cc Mon Nov 02 10:49:39 2009 -0500
36.2 +++ b/src/helper/dot11s-installer.cc Mon Nov 02 10:56:30 2009 -0500
36.3 @@ -75,7 +75,7 @@
36.4 //Install interaction between HWMP and Peer management protocol:
36.5 //PeekPointer()'s to avoid circular Ptr references
36.6 pmp->SetPeerLinkStatusCallback (MakeCallback (&HwmpProtocol::PeerLinkStatus, PeekPointer (hwmp)));
36.7 - hwmp->SetNeighboursCallback (MakeCallback (&PeerManagementProtocol::GetActiveLinks, PeekPointer (pmp)));
36.8 + hwmp->SetNeighboursCallback (MakeCallback (&PeerManagementProtocol::GetPeers, PeekPointer (pmp)));
36.9 return true;
36.10 }
36.11 void
37.1 --- a/src/helper/qos-wifi-mac-helper.cc Mon Nov 02 10:49:39 2009 -0500
37.2 +++ b/src/helper/qos-wifi-mac-helper.cc Mon Nov 02 10:56:30 2009 -0500
37.3 @@ -27,14 +27,7 @@
37.4 namespace ns3 {
37.5
37.6 QosWifiMacHelper::QosWifiMacHelper ()
37.7 -{
37.8 - ObjectFactory defaultAggregator;
37.9 - defaultAggregator.SetTypeId ("ns3::MsduStandardAggregator");
37.10 - m_aggregators.insert (std::make_pair (AC_VO, defaultAggregator));
37.11 - m_aggregators.insert (std::make_pair (AC_VI, defaultAggregator));
37.12 - m_aggregators.insert (std::make_pair (AC_BE, defaultAggregator));
37.13 - m_aggregators.insert (std::make_pair (AC_BK, defaultAggregator));
37.14 -}
37.15 +{}