├── simulation ├── VERSION ├── mix │ └── flow_tcp_0.txt ├── bindings │ └── python │ │ ├── ns │ │ └── _placeholder_ │ │ ├── ns3 │ │ └── _placeholder_ │ │ ├── ns__init__.py │ │ ├── pch │ │ └── _placeholder_ │ │ ├── waf │ │ ├── ns3__init__.py │ │ └── my_extra_api_definitions.py ├── waf.bat ├── src │ ├── mpi │ │ ├── waf │ │ ├── examples │ │ │ ├── waf │ │ │ └── wscript │ │ └── bindings │ │ │ └── callbacks_list.py │ ├── core │ │ ├── waf │ │ ├── model │ │ │ ├── empty.h │ │ │ ├── string.cc │ │ │ ├── ref-count-base.cc │ │ │ ├── deprecated.h │ │ │ ├── simulator-impl.cc │ │ │ ├── int-to-type.h │ │ │ ├── unused.h │ │ │ ├── default-deleter.h │ │ │ ├── string.h │ │ │ ├── type-name.cc │ │ │ ├── make-event.cc │ │ │ ├── type-name.h │ │ │ └── trace-source-accessor.cc │ │ ├── bindings │ │ │ ├── callbacks_list.py │ │ │ ├── core.py │ │ │ └── scan-header.h │ │ └── test │ │ │ └── examples-to-run.py │ ├── internet │ │ ├── waf │ │ ├── doc │ │ │ ├── ipv4.rst │ │ │ ├── ipv6.rst │ │ │ ├── routing.dia │ │ │ ├── internet-node-recv.dia │ │ │ ├── internet-node-send.dia │ │ │ ├── routing-specialization.dia │ │ │ └── internet.h │ │ ├── model │ │ │ └── rdma.h │ │ ├── examples │ │ │ └── wscript │ │ └── test │ │ │ └── examples-to-run.py │ ├── mobility │ │ ├── waf │ │ ├── bindings │ │ │ └── callbacks_list.py │ │ ├── model │ │ │ └── mobility.h │ │ ├── examples │ │ │ └── wscript │ │ └── test │ │ │ └── examples-to-run.py │ ├── netanim │ │ ├── waf │ │ ├── examples │ │ │ └── waf │ │ ├── doc │ │ │ ├── figures │ │ │ │ ├── Persist.pdf │ │ │ │ ├── Persist.png │ │ │ │ ├── SimTime.pdf │ │ │ │ ├── SimTime.png │ │ │ │ ├── Dumbbell.pdf │ │ │ │ ├── Dumbbell.png │ │ │ │ ├── Precision.pdf │ │ │ │ ├── Precision.png │ │ │ │ ├── Wireless.pdf │ │ │ │ ├── Wireless.png │ │ │ │ ├── FastForward.pdf │ │ │ │ ├── FastForward.png │ │ │ │ ├── PacketStats.png │ │ │ │ ├── Trajectory.pdf │ │ │ │ ├── Trajectory.png │ │ │ │ ├── WithPrecision.pdf │ │ │ │ ├── WithPrecision.png │ │ │ │ ├── PacketStatistics.pdf │ │ │ │ ├── PacketStatistics.png │ │ │ │ ├── WithoutPrecision.pdf │ │ │ │ ├── WithoutPrecision.png │ │ │ │ ├── UpdateRateInterval.pdf │ │ │ │ └── UpdateRateInterval.png │ │ │ └── animation-dumbbell.pdf │ │ ├── bindings │ │ │ └── callbacks_list.py │ │ ├── test │ │ │ └── examples-to-run.py │ │ └── wscript │ ├── network │ │ ├── waf │ │ ├── doc │ │ │ ├── simple.rst │ │ │ ├── node.dia │ │ │ ├── packet.dia │ │ │ ├── sockets-overview.dia │ │ │ └── network.h │ │ ├── test │ │ │ ├── known.pcap │ │ │ └── examples-to-run.py │ │ ├── bindings │ │ │ └── scan-header.h │ │ ├── model │ │ │ ├── chunk.cc │ │ │ ├── header.cc │ │ │ ├── trailer.cc │ │ │ ├── chunk.h │ │ │ └── tag.cc │ │ ├── examples │ │ │ └── wscript │ │ ├── utils │ │ │ └── sgi-hashmap.h │ │ └── helper │ │ │ └── leaky-bucket-helper.cc │ ├── click │ │ ├── waf │ │ ├── bindings │ │ │ └── callbacks_list.py │ │ ├── test │ │ │ └── examples-to-run.py │ │ └── examples │ │ │ └── wscript │ ├── csma-layout │ │ ├── waf │ │ ├── examples │ │ │ ├── waf │ │ │ └── wscript │ │ ├── wscript │ │ └── bindings │ │ │ └── callbacks_list.py │ ├── csma │ │ ├── waf │ │ ├── examples │ │ │ ├── waf │ │ │ └── wscript │ │ ├── bindings │ │ │ ├── scan-header.h │ │ │ ├── modulegen_customizations.py │ │ │ └── callbacks_list.py │ │ ├── wscript │ │ └── test │ │ │ └── examples-to-run.py │ ├── emu │ │ ├── waf │ │ ├── examples │ │ │ ├── waf │ │ │ └── wscript │ │ ├── bindings │ │ │ ├── modulegen_customizations.py │ │ │ └── callbacks_list.py │ │ ├── test │ │ │ └── examples-to-run.py │ │ └── model │ │ │ └── emu-encode-decode.h │ ├── mesh │ │ ├── waf │ │ ├── examples │ │ │ ├── waf │ │ │ └── wscript │ │ ├── doc │ │ │ ├── MeshArchitecture.png │ │ │ └── mesh.rst │ │ └── test │ │ │ ├── dot11s │ │ │ ├── pmp-regression-test-0-1.pcap │ │ │ ├── pmp-regression-test-1-1.pcap │ │ │ ├── hwmp-proactive-regression-test-0-1.pcap │ │ │ ├── hwmp-proactive-regression-test-1-1.pcap │ │ │ ├── hwmp-proactive-regression-test-2-1.pcap │ │ │ ├── hwmp-proactive-regression-test-3-1.pcap │ │ │ ├── hwmp-proactive-regression-test-4-1.pcap │ │ │ ├── hwmp-reactive-regression-test-0-1.pcap │ │ │ ├── hwmp-reactive-regression-test-1-1.pcap │ │ │ ├── hwmp-reactive-regression-test-2-1.pcap │ │ │ ├── hwmp-reactive-regression-test-3-1.pcap │ │ │ ├── hwmp-reactive-regression-test-4-1.pcap │ │ │ ├── hwmp-reactive-regression-test-5-1.pcap │ │ │ ├── hwmp-simplest-regression-test-0-1.pcap │ │ │ ├── hwmp-simplest-regression-test-1-1.pcap │ │ │ ├── hwmp-target-flags-regression-test-0-1.pcap │ │ │ ├── hwmp-target-flags-regression-test-1-1.pcap │ │ │ ├── hwmp-target-flags-regression-test-2-1.pcap │ │ │ └── hwmp-target-flags-regression-test-3-1.pcap │ │ │ ├── flame │ │ │ ├── flame-regression-test-0-1.pcap │ │ │ ├── flame-regression-test-1-1.pcap │ │ │ └── flame-regression-test-2-1.pcap │ │ │ └── examples-to-run.py │ ├── olsr │ │ ├── waf │ │ ├── test │ │ │ ├── bug780-0-0.pcap │ │ │ ├── bug780-1-0.pcap │ │ │ ├── bug780-2-0.pcap │ │ │ ├── olsr-tc-regression-test-0-1.pcap │ │ │ ├── olsr-tc-regression-test-1-1.pcap │ │ │ ├── olsr-tc-regression-test-2-1.pcap │ │ │ ├── olsr-hello-regression-test-0-1.pcap │ │ │ ├── olsr-hello-regression-test-1-1.pcap │ │ │ └── examples-to-run.py │ │ ├── examples │ │ │ └── wscript │ │ └── bindings │ │ │ └── callbacks_list.py │ ├── wifi │ │ ├── waf │ │ ├── bindings │ │ │ ├── scan-header.h │ │ │ └── modulegen_customizations.py │ │ ├── doc │ │ │ ├── snir.dia │ │ │ └── WifiArchitecture.dia │ │ ├── examples │ │ │ └── wscript │ │ └── test │ │ │ └── examples-to-run.py │ ├── aodv │ │ ├── waf │ │ ├── test │ │ │ ├── bug-606-test-0-0.pcap │ │ │ ├── bug-606-test-1-0.pcap │ │ │ ├── bug-606-test-2-0.pcap │ │ │ ├── tcp-chain-test-0-0.pcap │ │ │ ├── tcp-chain-test-9-0.pcap │ │ │ ├── udp-chain-test-0-0.pcap │ │ │ ├── udp-chain-test-9-0.pcap │ │ │ ├── aodv-chain-regression-test-0-0.pcap │ │ │ ├── aodv-chain-regression-test-1-0.pcap │ │ │ ├── aodv-chain-regression-test-2-0.pcap │ │ │ ├── aodv-chain-regression-test-3-0.pcap │ │ │ ├── aodv-chain-regression-test-4-0.pcap │ │ │ └── examples-to-run.py │ │ └── examples │ │ │ └── wscript │ ├── bridge │ │ ├── waf │ │ ├── doc │ │ │ └── bridge.rst │ │ ├── bindings │ │ │ └── callbacks_list.py │ │ ├── examples │ │ │ └── wscript │ │ ├── wscript │ │ └── test │ │ │ └── examples-to-run.py │ ├── lte │ │ ├── examples │ │ │ └── waf │ │ ├── doc │ │ │ ├── source │ │ │ │ ├── replace.txt │ │ │ │ ├── lte.rst │ │ │ │ ├── index.rst │ │ │ │ ├── rlc_buffer_status_report_downlink.seqdiag │ │ │ │ └── rlc_buffer_status_report_uplink.seqdiag │ │ │ └── rescale-pdf.sh │ │ ├── test │ │ │ └── reference │ │ │ │ ├── lte-mcs-index.pdf │ │ │ │ ├── lte-mcs-index.png │ │ │ │ ├── gain_freespace.m │ │ │ │ ├── lte-mcs-index.dat │ │ │ │ ├── print_C_vector.m │ │ │ │ ├── lte-mcs-index.gnuplot │ │ │ │ ├── bernuolliDistribution.m │ │ │ │ ├── generate_test_data_lte_spectrum_model.m │ │ │ │ ├── generate_test_data_lte_spectrum_value_noise.m │ │ │ │ ├── lte_link_budget.m │ │ │ │ └── lte_pathloss.m │ │ ├── AUTHORS │ │ └── model │ │ │ ├── lte-rlc-sap.cc │ │ │ ├── lte-pdcp-sap.cc │ │ │ ├── ff-mac-csched-sap.cc │ │ │ ├── ff-mac-sched-sap.cc │ │ │ ├── lte-ue-cmac-sap.cc │ │ │ ├── lte-mac-sap.cc │ │ │ ├── lte-enb-cmac-sap.cc │ │ │ ├── lte-ue-phy-sap.cc │ │ │ ├── lte-enb-phy-sap.cc │ │ │ └── lte-rlc-sequence-number.cc │ ├── openflow │ │ ├── waf │ │ ├── examples │ │ │ └── wscript │ │ └── test │ │ │ └── examples-to-run.py │ ├── tap-bridge │ │ ├── waf │ │ ├── examples │ │ │ ├── waf │ │ │ ├── lxc-left.conf │ │ │ ├── lxc-right.conf │ │ │ ├── virtual-network-teardown.sh │ │ │ ├── virtual-network-setup.sh │ │ │ └── wscript │ │ ├── doc │ │ │ └── tap.h │ │ ├── bindings │ │ │ ├── modulegen_customizations.py │ │ │ └── callbacks_list.py │ │ ├── test │ │ │ └── examples-to-run.py │ │ └── model │ │ │ └── tap-encode-decode.h │ ├── test │ │ ├── perf │ │ │ ├── waf │ │ │ └── wscript │ │ ├── ns3tcp │ │ │ ├── response-vectors │ │ │ │ ├── ns3tcp-interop-response-vectors.pcap │ │ │ │ ├── ns3tcp-state0-response-vectors.pcap │ │ │ │ ├── ns3tcp-state1-response-vectors.pcap │ │ │ │ ├── ns3tcp-state2-response-vectors.pcap │ │ │ │ ├── ns3tcp-state3-response-vectors.pcap │ │ │ │ ├── ns3tcp-state4-response-vectors.pcap │ │ │ │ ├── ns3tcp-state5-response-vectors.pcap │ │ │ │ ├── ns3tcp-state6-response-vectors.pcap │ │ │ │ ├── ns3tcp-state7-response-vectors.pcap │ │ │ │ ├── ns3tcp-state8-response-vectors.pcap │ │ │ │ ├── ns3tcp-loss-Reno0-response-vectors.pcap │ │ │ │ ├── ns3tcp-loss-Reno1-response-vectors.pcap │ │ │ │ ├── ns3tcp-loss-Reno2-response-vectors.pcap │ │ │ │ ├── ns3tcp-loss-Reno3-response-vectors.pcap │ │ │ │ ├── ns3tcp-loss-Reno4-response-vectors.pcap │ │ │ │ ├── ns3tcp-loss-NewReno0-response-vectors.pcap │ │ │ │ ├── ns3tcp-loss-NewReno1-response-vectors.pcap │ │ │ │ ├── ns3tcp-loss-NewReno2-response-vectors.pcap │ │ │ │ ├── ns3tcp-loss-NewReno3-response-vectors.pcap │ │ │ │ ├── ns3tcp-loss-NewReno4-response-vectors.pcap │ │ │ │ ├── ns3tcp-loss-Tahoe0-response-vectors.pcap │ │ │ │ ├── ns3tcp-loss-Tahoe1-response-vectors.pcap │ │ │ │ ├── ns3tcp-loss-Tahoe2-response-vectors.pcap │ │ │ │ ├── ns3tcp-loss-Tahoe3-response-vectors.pcap │ │ │ │ └── ns3tcp-loss-Tahoe4-response-vectors.pcap │ │ │ └── ns3tcp.h │ │ └── ns3wifi │ │ │ └── ns3wifi.h │ ├── point-to-point-layout │ │ ├── waf │ │ ├── wscript │ │ └── bindings │ │ │ └── callbacks_list.py │ ├── point-to-point │ │ ├── waf │ │ ├── bindings │ │ │ ├── scan-header.h │ │ │ ├── modulegen_customizations.py │ │ │ └── callbacks_list.py │ │ ├── examples │ │ │ └── wscript │ │ └── model │ │ │ ├── pint.h │ │ │ └── rdma-driver.h │ ├── spectrum │ │ ├── examples │ │ │ ├── waf │ │ │ └── wscript │ │ ├── test │ │ │ └── examples-to-run.py │ │ └── model │ │ │ ├── spectrum-model-300kHz-300GHz-log.h │ │ │ └── spectrum-model-ism2400MHz-res1MHz.h │ ├── stats │ │ ├── bindings │ │ │ ├── callbacks_list.py │ │ │ └── modulegen_customizations.py │ │ └── doc │ │ │ ├── Wifi-default.png │ │ │ └── Stat-framework-arch.png │ ├── tools │ │ ├── bindings │ │ │ └── callbacks_list.py │ │ ├── examples │ │ │ └── wscript │ │ ├── test │ │ │ └── examples-to-run.py │ │ └── wscript │ ├── wimax │ │ ├── examples │ │ │ ├── waf │ │ │ ├── wimax-ipv4.cc │ │ │ └── wscript │ │ ├── doc │ │ │ └── WimaxArchitecture.dia │ │ ├── test │ │ │ └── examples-to-run.py │ │ ├── bindings │ │ │ └── callbacks_list.py │ │ └── model │ │ │ └── bvec.h │ ├── antenna │ │ ├── bindings │ │ │ └── callbacks_list.py │ │ ├── doc │ │ │ ├── source │ │ │ │ ├── replace.txt │ │ │ │ ├── figures │ │ │ │ │ └── antenna-coordinate-system.dia │ │ │ │ ├── antenna.rst │ │ │ │ ├── index.rst │ │ │ │ └── antenna-user.rst │ │ │ └── rescale-pdf.sh │ │ └── wscript │ ├── nix-vector-routing │ │ ├── waf │ │ ├── examples │ │ │ └── wscript │ │ ├── wscript │ │ └── test │ │ │ └── examples-to-run.py │ ├── topology-read │ │ ├── examples │ │ │ ├── waf │ │ │ ├── wscript │ │ │ └── Inet_small_toposample.txt │ │ ├── bindings │ │ │ └── callbacks_list.py │ │ ├── test │ │ │ └── examples-to-run.py │ │ ├── doc │ │ │ └── topology.h │ │ └── wscript │ ├── virtual-net-device │ │ ├── waf │ │ ├── examples │ │ │ └── wscript │ │ ├── wscript │ │ ├── test │ │ │ └── examples-to-run.py │ │ └── bindings │ │ │ └── callbacks_list.py │ ├── config-store │ │ ├── bindings │ │ │ ├── callbacks_list.py │ │ │ └── modulegen_customizations.py │ │ ├── doc │ │ │ └── README │ │ ├── examples │ │ │ └── wscript │ │ ├── test │ │ │ └── examples-to-run.py │ │ └── model │ │ │ ├── file-config.cc │ │ │ ├── file-config.h │ │ │ ├── xml-config.h │ │ │ └── raw-text-config.h │ ├── propagation │ │ ├── bindings │ │ │ ├── callbacks_list.py │ │ │ ├── scan-header.h │ │ │ └── modulegen_customizations.py │ │ ├── test │ │ │ ├── reference │ │ │ │ ├── loss_Kun_2_6GHz.m │ │ │ │ ├── loss_OH_suburban.m │ │ │ │ ├── loss_COST231_large_cities_urban.m │ │ │ │ ├── loss_OH_openareas.m │ │ │ │ ├── loss_OH_small_cities_urban.m │ │ │ │ ├── loss_COST231_small_cities_urban.m │ │ │ │ ├── loss_OH_large_cities_urban.m │ │ │ │ └── loss_ITU1411_LOS.m │ │ │ └── examples-to-run.py │ │ └── examples │ │ │ └── wscript │ ├── flow-monitor │ │ ├── waf │ │ ├── examples │ │ │ └── wscript │ │ ├── doc │ │ │ └── flow-monitor.rst │ │ ├── test │ │ │ └── examples-to-run.py │ │ ├── bindings │ │ │ └── callbacks_list.py │ │ └── wscript │ ├── buildings │ │ ├── doc │ │ │ ├── source │ │ │ │ ├── replace.txt │ │ │ │ ├── index.rst │ │ │ │ ├── buildings.rst │ │ │ │ └── buildings-references.rst │ │ │ └── rescale-pdf.sh │ │ ├── bindings │ │ │ └── callbacks_list.py │ │ ├── examples │ │ │ └── wscript │ │ └── test │ │ │ ├── examples-to-run.py │ │ │ └── reference │ │ │ └── loss_ITU1238.m │ ├── applications │ │ ├── waf │ │ ├── doc │ │ │ ├── applications.rst │ │ │ └── applications.h │ │ └── bindings │ │ │ ├── modulegen_customizations.py │ │ │ └── scan-header.h │ ├── visualizer │ │ ├── visualizer │ │ │ └── __init__.py │ │ ├── examples │ │ │ └── readme.txt │ │ ├── doc │ │ │ └── readme.txt │ │ ├── model │ │ │ ├── visualizer-ideas.txt │ │ │ └── dummy-file-for-static-builds.cc │ │ └── bindings │ │ │ └── callbacks_list.py │ ├── uan │ │ ├── doc │ │ │ └── auvmobility-classes.dia │ │ ├── examples │ │ │ └── wscript │ │ ├── test │ │ │ └── examples-to-run.py │ │ ├── bindings │ │ │ └── callbacks_list.py │ │ └── model │ │ │ ├── uan-mac.cc │ │ │ └── uan-transducer.cc │ ├── dsdv │ │ ├── examples │ │ │ └── wscript │ │ └── wscript │ ├── dsr │ │ └── examples │ │ │ └── wscript │ └── energy │ │ ├── examples │ │ └── wscript │ │ ├── bindings │ │ └── callbacks_list.py │ │ └── test │ │ └── examples-to-run.py ├── utils │ ├── waf │ ├── generate-distributions.pl │ ├── .ns3rc │ ├── rescale-pdf.sh │ └── test-runner.cc ├── examples │ ├── waf │ └── tutorial │ │ ├── waf │ │ ├── examples-to-run.py │ │ └── hello-simulator.cc ├── waf ├── ns3 │ └── _placeholder_ ├── testpy.supp ├── Makefile └── scratch │ ├── scratch-simulator.cc │ └── subdir │ └── scratch-simulator-subdir.cc ├── analysis ├── sim-setting.h ├── trace-format.h ├── Makefile └── trace_reader.cpp └── traffic_gen ├── AliStorage2019.txt ├── WebSearch_distribution.txt ├── FbHdp_distribution.txt └── README.md /simulation/VERSION: -------------------------------------------------------------------------------- 1 | 3.18 2 | -------------------------------------------------------------------------------- /simulation/mix/flow_tcp_0.txt: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /simulation/bindings/python/ns/_placeholder_: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /simulation/bindings/python/ns3/_placeholder_: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /simulation/bindings/python/ns__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /simulation/waf.bat: -------------------------------------------------------------------------------- 1 | @python -x waf %* & exit /b 2 | -------------------------------------------------------------------------------- /simulation/src/mpi/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../waf "$@" -------------------------------------------------------------------------------- /simulation/utils/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/bindings/python/pch/_placeholder_: -------------------------------------------------------------------------------- 1 | placeholder 2 | -------------------------------------------------------------------------------- /simulation/examples/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/core/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../waf "$@" -------------------------------------------------------------------------------- /simulation/src/internet/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../waf "$@" -------------------------------------------------------------------------------- /simulation/src/mobility/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../waf "$@" -------------------------------------------------------------------------------- /simulation/src/netanim/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../waf "$@" -------------------------------------------------------------------------------- /simulation/src/network/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../waf "$@" -------------------------------------------------------------------------------- /simulation/bindings/python/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../waf "$@" -------------------------------------------------------------------------------- /simulation/src/click/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/csma-layout/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../waf "$@" -------------------------------------------------------------------------------- /simulation/src/csma/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/emu/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/mesh/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/olsr/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/wifi/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/examples/tutorial/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/aodv/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/bridge/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/csma/examples/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/emu/examples/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/lte/examples/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/mesh/examples/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/mpi/examples/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/openflow/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/tap-bridge/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/test/perf/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../../waf "$@" 2 | -------------------------------------------------------------------------------- /analysis/sim-setting.h: -------------------------------------------------------------------------------- 1 | ../simulation/src/point-to-point/helper/sim-setting.h -------------------------------------------------------------------------------- /analysis/trace-format.h: -------------------------------------------------------------------------------- 1 | ../simulation/src/point-to-point/model/trace-format.h -------------------------------------------------------------------------------- /simulation/src/netanim/examples/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/point-to-point-layout/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../waf "$@" -------------------------------------------------------------------------------- /simulation/src/point-to-point/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/spectrum/examples/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/stats/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ] 3 | -------------------------------------------------------------------------------- /simulation/src/tools/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ] 3 | -------------------------------------------------------------------------------- /simulation/src/wimax/examples/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/antenna/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ] 3 | -------------------------------------------------------------------------------- /simulation/src/csma-layout/examples/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/nix-vector-routing/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/tap-bridge/examples/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/topology-read/examples/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/virtual-net-device/waf: -------------------------------------------------------------------------------- 1 | exec "`dirname "$0"`"/../../../waf "$@" 2 | -------------------------------------------------------------------------------- /simulation/src/config-store/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ] 3 | -------------------------------------------------------------------------------- /simulation/src/propagation/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ] 3 | -------------------------------------------------------------------------------- /simulation/src/flow-monitor/waf: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | exec "`dirname "$0"`"/../../../waf "$@" 3 | -------------------------------------------------------------------------------- /simulation/src/lte/doc/source/replace.txt: -------------------------------------------------------------------------------- 1 | .. |ns3| replace:: *ns-3* 2 | 3 | .. |ns2| replace:: *ns-2* 4 | -------------------------------------------------------------------------------- /simulation/src/antenna/doc/source/replace.txt: -------------------------------------------------------------------------------- 1 | .. |ns3| replace:: *ns-3* 2 | 3 | .. |ns2| replace:: *ns-2* 4 | -------------------------------------------------------------------------------- /simulation/src/buildings/doc/source/replace.txt: -------------------------------------------------------------------------------- 1 | .. |ns3| replace:: *ns-3* 2 | 3 | .. |ns2| replace:: *ns-2* 4 | -------------------------------------------------------------------------------- /simulation/waf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/waf -------------------------------------------------------------------------------- /simulation/src/internet/doc/ipv4.rst: -------------------------------------------------------------------------------- 1 | .. include:: replace.txt 2 | 3 | IPv4 4 | ---- 5 | 6 | *Placeholder chapter* 7 | -------------------------------------------------------------------------------- /simulation/src/internet/model/rdma.h: -------------------------------------------------------------------------------- 1 | #ifndef RDMA_H 2 | #define RDMA_H 3 | 4 | #define ENABLE_QP 1 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /simulation/src/internet/doc/ipv6.rst: -------------------------------------------------------------------------------- 1 | .. include:: replace.txt 2 | 3 | IPv6 4 | ---- 5 | 6 | *Placeholder chapter* 7 | 8 | -------------------------------------------------------------------------------- /simulation/src/propagation/bindings/scan-header.h: -------------------------------------------------------------------------------- 1 | #include "ns3/mobility-model.h" 2 | #include "ns3/propagation-module.h" 3 | -------------------------------------------------------------------------------- /simulation/ns3/_placeholder_: -------------------------------------------------------------------------------- 1 | This is a placeholder file used only to keep the ns3 directory present (needed for the WAF build system). 2 | -------------------------------------------------------------------------------- /simulation/src/applications/waf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/applications/waf -------------------------------------------------------------------------------- /simulation/src/visualizer/visualizer/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from core import start, register_plugin, set_bounds, add_initialization_hook 3 | 4 | -------------------------------------------------------------------------------- /simulation/src/applications/doc/applications.rst: -------------------------------------------------------------------------------- 1 | .. include:: replace.txt 2 | 3 | Applications 4 | ------------ 5 | 6 | *Placeholder chapter* 7 | -------------------------------------------------------------------------------- /simulation/src/network/doc/simple.rst: -------------------------------------------------------------------------------- 1 | .. include:: replace.txt 2 | 3 | Simple NetDevice 4 | ---------------- 5 | 6 | *Placeholder chapter* 7 | -------------------------------------------------------------------------------- /simulation/src/wifi/bindings/scan-header.h: -------------------------------------------------------------------------------- 1 | // -*- c++ -*- 2 | 3 | #include "ns3/wifi-module.h" 4 | 5 | #include "ns3/propagation-module.h" 6 | -------------------------------------------------------------------------------- /simulation/src/wifi/doc/snir.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/wifi/doc/snir.dia -------------------------------------------------------------------------------- /simulation/bindings/python/ns3__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from _ns3 import * 3 | 4 | import atexit 5 | atexit.register(Simulator.Destroy) 6 | del atexit 7 | 8 | -------------------------------------------------------------------------------- /simulation/src/config-store/doc/README: -------------------------------------------------------------------------------- 1 | The Sphinx documentation for config-store is maintained as a section 2 | in doc/manual/source/attributes.rst 3 | -------------------------------------------------------------------------------- /simulation/src/network/doc/node.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/network/doc/node.dia -------------------------------------------------------------------------------- /simulation/src/network/doc/packet.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/network/doc/packet.dia -------------------------------------------------------------------------------- /simulation/src/network/test/known.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/network/test/known.pcap -------------------------------------------------------------------------------- /simulation/src/internet/doc/routing.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/internet/doc/routing.dia -------------------------------------------------------------------------------- /simulation/src/olsr/test/bug780-0-0.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/olsr/test/bug780-0-0.pcap -------------------------------------------------------------------------------- /simulation/src/olsr/test/bug780-1-0.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/olsr/test/bug780-1-0.pcap -------------------------------------------------------------------------------- /simulation/src/olsr/test/bug780-2-0.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/olsr/test/bug780-2-0.pcap -------------------------------------------------------------------------------- /simulation/src/stats/doc/Wifi-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/stats/doc/Wifi-default.png -------------------------------------------------------------------------------- /simulation/src/csma/bindings/scan-header.h: -------------------------------------------------------------------------------- 1 | // -*- c++ -*- 2 | 3 | #include "ns3/csma-module.h" 4 | 5 | #include "ns3/queue.h" 6 | #include "ns3/error-model.h" 7 | -------------------------------------------------------------------------------- /simulation/src/wimax/examples/wimax-ipv4.cc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/wimax/examples/wimax-ipv4.cc -------------------------------------------------------------------------------- /simulation/src/aodv/test/bug-606-test-0-0.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/aodv/test/bug-606-test-0-0.pcap -------------------------------------------------------------------------------- /simulation/src/aodv/test/bug-606-test-1-0.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/aodv/test/bug-606-test-1-0.pcap -------------------------------------------------------------------------------- /simulation/src/aodv/test/bug-606-test-2-0.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/aodv/test/bug-606-test-2-0.pcap -------------------------------------------------------------------------------- /simulation/src/mesh/doc/MeshArchitecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/mesh/doc/MeshArchitecture.png -------------------------------------------------------------------------------- /simulation/src/netanim/doc/figures/Persist.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/netanim/doc/figures/Persist.pdf -------------------------------------------------------------------------------- /simulation/src/netanim/doc/figures/Persist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/netanim/doc/figures/Persist.png -------------------------------------------------------------------------------- /simulation/src/netanim/doc/figures/SimTime.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/netanim/doc/figures/SimTime.pdf -------------------------------------------------------------------------------- /simulation/src/netanim/doc/figures/SimTime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/netanim/doc/figures/SimTime.png -------------------------------------------------------------------------------- /simulation/src/uan/doc/auvmobility-classes.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/uan/doc/auvmobility-classes.dia -------------------------------------------------------------------------------- /simulation/src/wifi/bindings/modulegen_customizations.py: -------------------------------------------------------------------------------- 1 | 2 | def post_register_types(root_module): 3 | root_module.add_include('"ns3/propagation-module.h"') 4 | 5 | -------------------------------------------------------------------------------- /simulation/src/wifi/doc/WifiArchitecture.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/wifi/doc/WifiArchitecture.dia -------------------------------------------------------------------------------- /simulation/src/wimax/doc/WimaxArchitecture.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/wimax/doc/WimaxArchitecture.dia -------------------------------------------------------------------------------- /simulation/testpy.supp: -------------------------------------------------------------------------------- 1 | { 2 | Supress invalid read size errors in SendPreq() when using HwmpProtocolMac 3 | Memcheck:Addr8 4 | fun:*HwmpProtocolMac*SendPreq* 5 | } 6 | -------------------------------------------------------------------------------- /simulation/src/aodv/test/tcp-chain-test-0-0.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/aodv/test/tcp-chain-test-0-0.pcap -------------------------------------------------------------------------------- /simulation/src/aodv/test/tcp-chain-test-9-0.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/aodv/test/tcp-chain-test-9-0.pcap -------------------------------------------------------------------------------- /simulation/src/aodv/test/udp-chain-test-0-0.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/aodv/test/udp-chain-test-0-0.pcap -------------------------------------------------------------------------------- /simulation/src/aodv/test/udp-chain-test-9-0.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/aodv/test/udp-chain-test-9-0.pcap -------------------------------------------------------------------------------- /simulation/src/netanim/doc/figures/Dumbbell.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/netanim/doc/figures/Dumbbell.pdf -------------------------------------------------------------------------------- /simulation/src/netanim/doc/figures/Dumbbell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/netanim/doc/figures/Dumbbell.png -------------------------------------------------------------------------------- /simulation/src/netanim/doc/figures/Precision.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/netanim/doc/figures/Precision.pdf -------------------------------------------------------------------------------- /simulation/src/netanim/doc/figures/Precision.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/netanim/doc/figures/Precision.png -------------------------------------------------------------------------------- /simulation/src/netanim/doc/figures/Wireless.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/netanim/doc/figures/Wireless.pdf -------------------------------------------------------------------------------- /simulation/src/netanim/doc/figures/Wireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/netanim/doc/figures/Wireless.png -------------------------------------------------------------------------------- /simulation/src/network/doc/sockets-overview.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/network/doc/sockets-overview.dia -------------------------------------------------------------------------------- /simulation/src/propagation/bindings/modulegen_customizations.py: -------------------------------------------------------------------------------- 1 | 2 | def post_register_types(root_module): 3 | root_module.add_include('"ns3/mobility-model.h"') 4 | 5 | 6 | -------------------------------------------------------------------------------- /simulation/src/stats/doc/Stat-framework-arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/stats/doc/Stat-framework-arch.png -------------------------------------------------------------------------------- /traffic_gen/AliStorage2019.txt: -------------------------------------------------------------------------------- 1 | 0 0 2 | 4000 22.93 3 | 8000 69.21 4 | 16000 80.61 5 | 32000 90.47 6 | 64000 93.53 7 | 128000 96.77 8 | 256000 97.53 9 | 2000000 100 10 | -------------------------------------------------------------------------------- /simulation/src/applications/bindings/modulegen_customizations.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | def post_register_types(root_module): 4 | root_module.add_include('"ns3/network-module.h"') 5 | -------------------------------------------------------------------------------- /simulation/src/internet/doc/internet-node-recv.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/internet/doc/internet-node-recv.dia -------------------------------------------------------------------------------- /simulation/src/internet/doc/internet-node-send.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/internet/doc/internet-node-send.dia -------------------------------------------------------------------------------- /simulation/src/lte/test/reference/lte-mcs-index.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/lte/test/reference/lte-mcs-index.pdf -------------------------------------------------------------------------------- /simulation/src/lte/test/reference/lte-mcs-index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/lte/test/reference/lte-mcs-index.png -------------------------------------------------------------------------------- /simulation/src/netanim/doc/animation-dumbbell.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/netanim/doc/animation-dumbbell.pdf -------------------------------------------------------------------------------- /simulation/src/netanim/doc/figures/FastForward.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/netanim/doc/figures/FastForward.pdf -------------------------------------------------------------------------------- /simulation/src/netanim/doc/figures/FastForward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/netanim/doc/figures/FastForward.png -------------------------------------------------------------------------------- /simulation/src/netanim/doc/figures/PacketStats.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/netanim/doc/figures/PacketStats.png -------------------------------------------------------------------------------- /simulation/src/netanim/doc/figures/Trajectory.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/netanim/doc/figures/Trajectory.pdf -------------------------------------------------------------------------------- /simulation/src/netanim/doc/figures/Trajectory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/netanim/doc/figures/Trajectory.png -------------------------------------------------------------------------------- /simulation/src/netanim/doc/figures/WithPrecision.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/netanim/doc/figures/WithPrecision.pdf -------------------------------------------------------------------------------- /simulation/src/netanim/doc/figures/WithPrecision.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/netanim/doc/figures/WithPrecision.png -------------------------------------------------------------------------------- /simulation/src/point-to-point/bindings/scan-header.h: -------------------------------------------------------------------------------- 1 | // -*- c++ -*- 2 | 3 | #include "ns3/point-to-point-module.h" 4 | 5 | #include "ns3/queue.h" 6 | #include "ns3/error-model.h" 7 | -------------------------------------------------------------------------------- /simulation/src/internet/doc/routing-specialization.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/internet/doc/routing-specialization.dia -------------------------------------------------------------------------------- /simulation/src/netanim/doc/figures/PacketStatistics.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/netanim/doc/figures/PacketStatistics.pdf -------------------------------------------------------------------------------- /simulation/src/netanim/doc/figures/PacketStatistics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/netanim/doc/figures/PacketStatistics.png -------------------------------------------------------------------------------- /simulation/src/netanim/doc/figures/WithoutPrecision.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/netanim/doc/figures/WithoutPrecision.pdf -------------------------------------------------------------------------------- /simulation/src/netanim/doc/figures/WithoutPrecision.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/netanim/doc/figures/WithoutPrecision.png -------------------------------------------------------------------------------- /simulation/src/netanim/doc/figures/UpdateRateInterval.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/netanim/doc/figures/UpdateRateInterval.pdf -------------------------------------------------------------------------------- /simulation/src/netanim/doc/figures/UpdateRateInterval.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/netanim/doc/figures/UpdateRateInterval.png -------------------------------------------------------------------------------- /simulation/src/olsr/test/olsr-tc-regression-test-0-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/olsr/test/olsr-tc-regression-test-0-1.pcap -------------------------------------------------------------------------------- /simulation/src/olsr/test/olsr-tc-regression-test-1-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/olsr/test/olsr-tc-regression-test-1-1.pcap -------------------------------------------------------------------------------- /simulation/src/olsr/test/olsr-tc-regression-test-2-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/olsr/test/olsr-tc-regression-test-2-1.pcap -------------------------------------------------------------------------------- /simulation/src/aodv/test/aodv-chain-regression-test-0-0.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/aodv/test/aodv-chain-regression-test-0-0.pcap -------------------------------------------------------------------------------- /simulation/src/aodv/test/aodv-chain-regression-test-1-0.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/aodv/test/aodv-chain-regression-test-1-0.pcap -------------------------------------------------------------------------------- /simulation/src/aodv/test/aodv-chain-regression-test-2-0.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/aodv/test/aodv-chain-regression-test-2-0.pcap -------------------------------------------------------------------------------- /simulation/src/aodv/test/aodv-chain-regression-test-3-0.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/aodv/test/aodv-chain-regression-test-3-0.pcap -------------------------------------------------------------------------------- /simulation/src/aodv/test/aodv-chain-regression-test-4-0.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/aodv/test/aodv-chain-regression-test-4-0.pcap -------------------------------------------------------------------------------- /simulation/src/mesh/test/dot11s/pmp-regression-test-0-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/mesh/test/dot11s/pmp-regression-test-0-1.pcap -------------------------------------------------------------------------------- /simulation/src/mesh/test/dot11s/pmp-regression-test-1-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/mesh/test/dot11s/pmp-regression-test-1-1.pcap -------------------------------------------------------------------------------- /simulation/src/mesh/test/flame/flame-regression-test-0-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/mesh/test/flame/flame-regression-test-0-1.pcap -------------------------------------------------------------------------------- /simulation/src/mesh/test/flame/flame-regression-test-1-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/mesh/test/flame/flame-regression-test-1-1.pcap -------------------------------------------------------------------------------- /simulation/src/mesh/test/flame/flame-regression-test-2-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/mesh/test/flame/flame-regression-test-2-1.pcap -------------------------------------------------------------------------------- /simulation/src/olsr/test/olsr-hello-regression-test-0-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/olsr/test/olsr-hello-regression-test-0-1.pcap -------------------------------------------------------------------------------- /simulation/src/olsr/test/olsr-hello-regression-test-1-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/olsr/test/olsr-hello-regression-test-1-1.pcap -------------------------------------------------------------------------------- /simulation/src/csma/bindings/modulegen_customizations.py: -------------------------------------------------------------------------------- 1 | 2 | def post_register_types(root_module): 3 | root_module.add_include('"ns3/queue.h"') 4 | root_module.add_include('"ns3/error-model.h"') 5 | 6 | -------------------------------------------------------------------------------- /traffic_gen/WebSearch_distribution.txt: -------------------------------------------------------------------------------- 1 | 0 0 2 | 10000 15 3 | 20000 20 4 | 30000 30 5 | 50000 40 6 | 80000 53 7 | 200000 60 8 | 1000000 70 9 | 2000000 80 10 | 5000000 90 11 | 10000000 97 12 | 30000000 100 13 | -------------------------------------------------------------------------------- /simulation/src/antenna/doc/source/figures/antenna-coordinate-system.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/antenna/doc/source/figures/antenna-coordinate-system.dia -------------------------------------------------------------------------------- /simulation/src/mesh/test/dot11s/hwmp-proactive-regression-test-0-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/mesh/test/dot11s/hwmp-proactive-regression-test-0-1.pcap -------------------------------------------------------------------------------- /simulation/src/mesh/test/dot11s/hwmp-proactive-regression-test-1-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/mesh/test/dot11s/hwmp-proactive-regression-test-1-1.pcap -------------------------------------------------------------------------------- /simulation/src/mesh/test/dot11s/hwmp-proactive-regression-test-2-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/mesh/test/dot11s/hwmp-proactive-regression-test-2-1.pcap -------------------------------------------------------------------------------- /simulation/src/mesh/test/dot11s/hwmp-proactive-regression-test-3-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/mesh/test/dot11s/hwmp-proactive-regression-test-3-1.pcap -------------------------------------------------------------------------------- /simulation/src/mesh/test/dot11s/hwmp-proactive-regression-test-4-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/mesh/test/dot11s/hwmp-proactive-regression-test-4-1.pcap -------------------------------------------------------------------------------- /simulation/src/mesh/test/dot11s/hwmp-reactive-regression-test-0-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/mesh/test/dot11s/hwmp-reactive-regression-test-0-1.pcap -------------------------------------------------------------------------------- /simulation/src/mesh/test/dot11s/hwmp-reactive-regression-test-1-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/mesh/test/dot11s/hwmp-reactive-regression-test-1-1.pcap -------------------------------------------------------------------------------- /simulation/src/mesh/test/dot11s/hwmp-reactive-regression-test-2-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/mesh/test/dot11s/hwmp-reactive-regression-test-2-1.pcap -------------------------------------------------------------------------------- /simulation/src/mesh/test/dot11s/hwmp-reactive-regression-test-3-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/mesh/test/dot11s/hwmp-reactive-regression-test-3-1.pcap -------------------------------------------------------------------------------- /simulation/src/mesh/test/dot11s/hwmp-reactive-regression-test-4-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/mesh/test/dot11s/hwmp-reactive-regression-test-4-1.pcap -------------------------------------------------------------------------------- /simulation/src/mesh/test/dot11s/hwmp-reactive-regression-test-5-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/mesh/test/dot11s/hwmp-reactive-regression-test-5-1.pcap -------------------------------------------------------------------------------- /simulation/src/mesh/test/dot11s/hwmp-simplest-regression-test-0-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/mesh/test/dot11s/hwmp-simplest-regression-test-0-1.pcap -------------------------------------------------------------------------------- /simulation/src/mesh/test/dot11s/hwmp-simplest-regression-test-1-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/mesh/test/dot11s/hwmp-simplest-regression-test-1-1.pcap -------------------------------------------------------------------------------- /simulation/src/point-to-point/bindings/modulegen_customizations.py: -------------------------------------------------------------------------------- 1 | 2 | def post_register_types(root_module): 3 | root_module.add_include('"ns3/queue.h"') 4 | root_module.add_include('"ns3/error-model.h"') 5 | 6 | -------------------------------------------------------------------------------- /simulation/src/mesh/test/dot11s/hwmp-target-flags-regression-test-0-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/mesh/test/dot11s/hwmp-target-flags-regression-test-0-1.pcap -------------------------------------------------------------------------------- /simulation/src/mesh/test/dot11s/hwmp-target-flags-regression-test-1-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/mesh/test/dot11s/hwmp-target-flags-regression-test-1-1.pcap -------------------------------------------------------------------------------- /simulation/src/mesh/test/dot11s/hwmp-target-flags-regression-test-2-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/mesh/test/dot11s/hwmp-target-flags-regression-test-2-1.pcap -------------------------------------------------------------------------------- /simulation/src/mesh/test/dot11s/hwmp-target-flags-regression-test-3-1.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/mesh/test/dot11s/hwmp-target-flags-regression-test-3-1.pcap -------------------------------------------------------------------------------- /simulation/src/mpi/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ['void', 'ns3::Ptr', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 3 | ] 4 | -------------------------------------------------------------------------------- /simulation/src/core/model/empty.h: -------------------------------------------------------------------------------- 1 | #ifndef EMPTY_H 2 | #define EMPTY_H 3 | 4 | namespace ns3 { 5 | /** 6 | * \brief make Callback use a separate empty type 7 | */ 8 | class empty {}; 9 | } 10 | 11 | #endif /* EMPTY_H */ 12 | -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-interop-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-interop-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-state0-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-state0-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-state1-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-state1-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-state2-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-state2-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-state3-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-state3-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-state4-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-state4-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-state5-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-state5-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-state6-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-state6-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-state7-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-state7-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-state8-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-state8-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/utils/generate-distributions.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | 3 | use Math::Random qw(:all); 4 | 5 | @values = random_uniform (10000, 0, 10000000); 6 | 7 | foreach $value (@values) { 8 | print $value . "\n"; 9 | } 10 | -------------------------------------------------------------------------------- /simulation/src/core/model/string.cc: -------------------------------------------------------------------------------- 1 | #include "string.h" 2 | 3 | namespace ns3 { 4 | 5 | ATTRIBUTE_CHECKER_IMPLEMENT_WITH_NAME (String, "std::string"); 6 | ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME (std::string, String); 7 | 8 | } // namespace ns3 9 | -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-Reno0-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-Reno0-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-Reno1-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-Reno1-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-Reno2-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-Reno2-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-Reno3-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-Reno3-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-Reno4-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-Reno4-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/src/tap-bridge/doc/tap.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \defgroup tap-bridge Tap Bridge Device 3 | * 4 | * This section documents the API of the ns-3 tap-bridge module. For a 5 | * generic functional description, please refer to the ns-3 manual. 6 | */ 7 | -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-NewReno0-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-NewReno0-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-NewReno1-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-NewReno1-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-NewReno2-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-NewReno2-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-NewReno3-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-NewReno3-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-NewReno4-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-NewReno4-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-Tahoe0-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-Tahoe0-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-Tahoe1-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-Tahoe1-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-Tahoe2-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-Tahoe2-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-Tahoe3-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-Tahoe3-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-Tahoe4-response-vectors.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alibaba-edu/High-Precision-Congestion-Control/HEAD/simulation/src/test/ns3tcp/response-vectors/ns3tcp-loss-Tahoe4-response-vectors.pcap -------------------------------------------------------------------------------- /simulation/src/bridge/doc/bridge.rst: -------------------------------------------------------------------------------- 1 | .. include:: replace.txt 2 | 3 | Bridge NetDevice 4 | ---------------- 5 | 6 | *Placeholder chapter* 7 | 8 | Some examples of the use of Bridge NetDevice can be found in ``examples/csma/`` 9 | directory. 10 | -------------------------------------------------------------------------------- /simulation/src/visualizer/examples/readme.txt: -------------------------------------------------------------------------------- 1 | For activating the visualizer, with any example, just pass the option 2 | --SimulatorImplementationType=ns3::VisualSimulatorImpl to it, assuming 3 | the script uses ns-3's command line parser (class CommandLine). 4 | -------------------------------------------------------------------------------- /simulation/src/mesh/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | obj = bld.create_ns3_program('mesh', ['internet', 'mobility', 'wifi', 'mesh']) 5 | obj.source = 'mesh.cc' 6 | -------------------------------------------------------------------------------- /simulation/src/dsdv/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | obj = bld.create_ns3_program('dsdv-manet', ['wifi', 'internet', 'dsdv']) 5 | obj.source = 'dsdv-manet.cc' 6 | 7 | -------------------------------------------------------------------------------- /simulation/src/flow-monitor/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | bld.register_ns3_script('wifi-olsr-flowmon.py', ['flow-monitor', 'internet', 'wifi', 'olsr', 'applications', 'mobility']) 5 | -------------------------------------------------------------------------------- /simulation/src/aodv/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | obj = bld.create_ns3_program('aodv', 5 | ['wifi', 'internet', 'aodv']) 6 | obj.source = 'aodv.cc' 7 | -------------------------------------------------------------------------------- /simulation/src/config-store/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | 5 | obj = bld.create_ns3_program('config-store-save', ['core', 'config-store']) 6 | obj.source = 'config-store-save.cc' 7 | -------------------------------------------------------------------------------- /simulation/src/lte/doc/source/lte.rst: -------------------------------------------------------------------------------- 1 | 2 | ================================= 3 | LTE Module 4 | ================================= 5 | 6 | .. toctree:: 7 | 8 | lte-design 9 | lte-user 10 | lte-testing 11 | lte-profiling 12 | lte-references 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /simulation/src/netanim/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ['void', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 3 | ] 4 | -------------------------------------------------------------------------------- /simulation/src/network/bindings/scan-header.h: -------------------------------------------------------------------------------- 1 | // -*- c++ -*- 2 | 3 | #include "ns3/network-module.h" 4 | 5 | using namespace ns3; 6 | 7 | namespace 8 | { 9 | void __foo () 10 | { 11 | static SequenceNumber32 a; 12 | static SequenceNumber16 b; 13 | } 14 | 15 | } 16 | 17 | -------------------------------------------------------------------------------- /simulation/src/test/ns3wifi/ns3wifi.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \ingroup tests 3 | * \defgroup Ns3WifiTests ns-3 Wifi Implementation Tests 4 | * 5 | * \section Ns3WifiTestsOverview ns-3 Wifi Implementation Tests Overview 6 | * 7 | * ns-3 has a Wifi implementation and we test it a little. 8 | */ 9 | -------------------------------------------------------------------------------- /analysis/Makefile: -------------------------------------------------------------------------------- 1 | all : trace_reader 2 | 3 | trace_reader : trace_reader.cpp trace-format.h trace_filter.hpp utils.hpp sim-setting.h 4 | g++ trace_reader.cpp -o trace_reader -O3 -std=gnu++11 5 | 6 | fct_analysis: fct_analysis.cpp 7 | g++ fct_analysis.cpp -o fct_analysis -O3 -std=gnu++11 8 | -------------------------------------------------------------------------------- /simulation/src/buildings/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ['void', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 3 | ] 4 | -------------------------------------------------------------------------------- /simulation/src/core/model/ref-count-base.cc: -------------------------------------------------------------------------------- 1 | #include "ref-count-base.h" 2 | #include "log.h" 3 | 4 | NS_LOG_COMPONENT_DEFINE ("RefCountBase"); 5 | 6 | namespace ns3 { 7 | 8 | RefCountBase::~RefCountBase () 9 | { 10 | NS_LOG_FUNCTION (this); 11 | } 12 | 13 | } // namespace ns3 14 | -------------------------------------------------------------------------------- /simulation/src/csma-layout/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | obj = bld.create_ns3_program('csma-star', ['csma', 'csma-layout', 'internet', 'applications']) 5 | obj.source = 'csma-star.cc' 6 | -------------------------------------------------------------------------------- /simulation/src/mobility/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ['void', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 3 | ] 4 | -------------------------------------------------------------------------------- /simulation/src/topology-read/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ['void', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 3 | ] 4 | -------------------------------------------------------------------------------- /traffic_gen/FbHdp_distribution.txt: -------------------------------------------------------------------------------- 1 | 0 0 2 | 100 1 3 | 200 2 4 | 300 5 5 | 350 15 6 | 400 20 7 | 500 30 8 | 600 40 9 | 700 50 10 | 1000 60 11 | 2000 67 12 | 7000 70 13 | 30000 72 14 | 50000 82 15 | 80000 87 16 | 120000 90 17 | 300000 95 18 | 1000000 97.5 19 | 2000000 99 20 | 10000000 100 21 | -------------------------------------------------------------------------------- /simulation/src/test/perf/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def configure(conf): 4 | pass 5 | 6 | def build(bld): 7 | obj = bld.create_ns3_program('perf-io', ['network']) 8 | obj.source = 'perf-io.cc' 9 | 10 | 11 | -------------------------------------------------------------------------------- /simulation/src/core/model/deprecated.h: -------------------------------------------------------------------------------- 1 | #ifndef NS3_DEPRECATED_H 2 | #define NS3_DEPRECATED_H 3 | 4 | #if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ > 1) 5 | #define NS_DEPRECATED __attribute__ ((deprecated)) 6 | #else 7 | #define NS_DEPRECATED 8 | #endif 9 | 10 | #endif /* NS3_DEPRECATED_H */ 11 | -------------------------------------------------------------------------------- /simulation/src/dsr/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | obj = bld.create_ns3_program('dsr', ['core', 'network', 'internet', 'applications', 'mobility', 'config-store', 'wifi', 'dsr']) 5 | obj.source = 'dsr.cc' 6 | 7 | -------------------------------------------------------------------------------- /simulation/src/tap-bridge/examples/lxc-left.conf: -------------------------------------------------------------------------------- 1 | # Container with network virtualized using a pre-configured bridge named br-left and 2 | # veth pair virtual network devices 3 | lxc.utsname = left 4 | lxc.network.type = veth 5 | lxc.network.flags = up 6 | lxc.network.link = br-left 7 | lxc.network.ipv4 = 10.0.0.1/24 8 | -------------------------------------------------------------------------------- /simulation/src/buildings/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | obj = bld.create_ns3_program('buildings-pathloss-profiler', 5 | ['buildings']) 6 | obj.source = 'buildings-pathloss-profiler.cc' 7 | -------------------------------------------------------------------------------- /simulation/src/tap-bridge/examples/lxc-right.conf: -------------------------------------------------------------------------------- 1 | # Container with network virtualized using a pre-configured bridge named br-right and 2 | # veth pair virtual network devices 3 | lxc.utsname = right 4 | lxc.network.type = veth 5 | lxc.network.flags = up 6 | lxc.network.link = br-right 7 | lxc.network.ipv4 = 10.0.0.2/24 8 | -------------------------------------------------------------------------------- /simulation/src/antenna/doc/source/antenna.rst: -------------------------------------------------------------------------------- 1 | 2 | ##################################################### 3 | Antenna Module 4 | ##################################################### 5 | 6 | 7 | 8 | 9 | .. toctree:: 10 | 11 | antenna-design 12 | antenna-user 13 | antenna-testing 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /simulation/src/antenna/doc/source/index.rst: -------------------------------------------------------------------------------- 1 | 2 | ##################################################### 3 | Antenna Module 4 | ##################################################### 5 | 6 | 7 | 8 | 9 | .. toctree:: 10 | 11 | antenna-design 12 | antenna-user 13 | antenna-testing 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /simulation/src/openflow/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | obj = bld.create_ns3_program('openflow-switch', 5 | ['openflow', 'csma', 'internet', 'applications']) 6 | obj.source = 'openflow-switch.cc' 7 | -------------------------------------------------------------------------------- /simulation/src/network/model/chunk.cc: -------------------------------------------------------------------------------- 1 | #include "chunk.h" 2 | 3 | namespace ns3 { 4 | 5 | NS_OBJECT_ENSURE_REGISTERED (Chunk); 6 | 7 | TypeId 8 | Chunk::GetTypeId (void) 9 | { 10 | static TypeId tid = TypeId ("ns3::Chunk") 11 | .SetParent () 12 | ; 13 | return tid; 14 | } 15 | 16 | } // namespace ns3 17 | -------------------------------------------------------------------------------- /simulation/src/energy/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | if not bld.env['ENABLE_EXAMPLES']: 5 | return; 6 | 7 | obj = bld.create_ns3_program('li-ion-energy-source', ['core', 'energy']) 8 | obj.source = 'li-ion-energy-source.cc' 9 | -------------------------------------------------------------------------------- /simulation/src/tools/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | if not bld.env['ENABLE_EXAMPLES']: 5 | return; 6 | 7 | obj = bld.create_ns3_program('gnuplot-example', ['tools']) 8 | obj.source = 'gnuplot-example.cc' 9 | 10 | 11 | -------------------------------------------------------------------------------- /simulation/src/topology-read/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | obj = bld.create_ns3_program('topology-read', ['topology-read', 'internet', 'nix-vector-routing', 'point-to-point', 'applications']) 5 | obj.source = 'topology-example-sim.cc' 6 | -------------------------------------------------------------------------------- /simulation/src/applications/bindings/scan-header.h: -------------------------------------------------------------------------------- 1 | 2 | /* We need to scan the complete network module so that all address 3 | * formats are pulled, otherwise just a few basic ones are seen, and 4 | * that affects implicit conversions detected by pybindgen. */ 5 | #include "ns3/network-module.h" 6 | 7 | #include "ns3/applications-module.h" 8 | 9 | -------------------------------------------------------------------------------- /simulation/src/virtual-net-device/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | 5 | obj = bld.create_ns3_program('virtual-net-device', ['virtual-net-device', 'point-to-point', 'internet', 'applications']) 6 | obj.source = 'virtual-net-device.cc' 7 | 8 | -------------------------------------------------------------------------------- /simulation/src/mesh/doc/mesh.rst: -------------------------------------------------------------------------------- 1 | .. include:: replace.txt 2 | 3 | Mesh NetDevice 4 | -------------- 5 | 6 | *Placeholder chapter* 7 | 8 | The Mesh NetDevice based on 802.11s was added in *ns-3.6*. An overview 9 | presentation by Kirill Andreev was published at the wns-3 workshop 10 | in 2009: ``_. 11 | -------------------------------------------------------------------------------- /simulation/src/test/ns3tcp/ns3tcp.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \ingroup tests 3 | * \defgroup Ns3TcpTests ns-3 TCP Implementation Tests 4 | * 5 | * \section Ns3TcpTestsOverview ns-3 Tcp Implementation Tests Overview 6 | * 7 | * Includes tests of ns-3 TCP as well as tests involving the mix 8 | * of ns-3 and Network Simulation Cradle (nsc) TCP models. 9 | */ 10 | -------------------------------------------------------------------------------- /simulation/src/buildings/doc/source/index.rst: -------------------------------------------------------------------------------- 1 | 2 | :orphan: true 3 | 4 | ##################################################### 5 | Buildings Module 6 | ##################################################### 7 | 8 | 9 | 10 | 11 | .. toctree:: 12 | 13 | buildings-design 14 | buildings-user 15 | buildings-testing 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /simulation/src/point-to-point/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | if not bld.env['ENABLE_EXAMPLES']: 5 | return; 6 | 7 | obj = bld.create_ns3_program('main-attribute-value', ['network', 'point-to-point']) 8 | obj.source = 'main-attribute-value.cc' 9 | -------------------------------------------------------------------------------- /simulation/src/topology-read/examples/Inet_small_toposample.txt: -------------------------------------------------------------------------------- 1 | 10 9 2 | 0 5625 2473 3 | 1 4505 4098 4 | 2 9866 2148 5 | 3 8315 7088 6 | 4 8564 5989 7 | 5 2064 510 8 | 6 2942 2145 9 | 7 2646 9895 10 | 8 5051 3220 11 | 9 6715 6729 12 | 0 1 1973 13 | 0 2 4253 14 | 0 3 5341 15 | 0 5 4066 16 | 0 6 2702 17 | 0 9 4393 18 | 1 8 1033 19 | 2 7 10589 20 | 3 4 1126 21 | -------------------------------------------------------------------------------- /simulation/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile wrapper for waf 2 | 3 | all: 4 | ./waf 5 | 6 | # free free to change this part to suit your requirements 7 | configure: 8 | ./waf configure --enable-examples --enable-tests 9 | 10 | build: 11 | ./waf build 12 | 13 | install: 14 | ./waf install 15 | 16 | clean: 17 | ./waf clean 18 | 19 | distclean: 20 | ./waf distclean 21 | -------------------------------------------------------------------------------- /simulation/src/buildings/doc/source/buildings.rst: -------------------------------------------------------------------------------- 1 | 2 | ##################################################### 3 | Buildings Module 4 | ##################################################### 5 | 6 | 7 | 8 | 9 | .. toctree:: 10 | 11 | buildings-design 12 | buildings-user 13 | buildings-testing 14 | buildings-references 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /simulation/src/wifi/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | if not bld.env['ENABLE_EXAMPLES']: 5 | return; 6 | 7 | obj = bld.create_ns3_program('wifi-phy-test', 8 | ['core', 'mobility', 'network', 'wifi']) 9 | obj.source = 'wifi-phy-test.cc' 10 | -------------------------------------------------------------------------------- /simulation/src/core/model/simulator-impl.cc: -------------------------------------------------------------------------------- 1 | #include "simulator-impl.h" 2 | #include "log.h" 3 | 4 | NS_LOG_COMPONENT_DEFINE ("SimulatorImpl"); 5 | 6 | namespace ns3 { 7 | 8 | TypeId 9 | SimulatorImpl::GetTypeId (void) 10 | { 11 | static TypeId tid = TypeId ("ns3::SimulatorImpl") 12 | .SetParent () 13 | ; 14 | return tid; 15 | } 16 | 17 | } // namespace ns3 18 | -------------------------------------------------------------------------------- /simulation/src/flow-monitor/doc/flow-monitor.rst: -------------------------------------------------------------------------------- 1 | Flow Monitor 2 | ------------ 3 | 4 | *Placeholder chapter* 5 | 6 | This feature was added as contributed code (``src/contrib``) in 7 | *ns-3.6* and to the main distribution (``src/flow-monitor``) for 8 | *ns-3.7*. A paper on this feature is published in the proceedings of 9 | NSTools: ``_. 10 | -------------------------------------------------------------------------------- /simulation/src/internet/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | if not bld.env['ENABLE_EXAMPLES']: 5 | return; 6 | 7 | obj = bld.create_ns3_program('main-simple', 8 | ['network', 'internet', 'applications']) 9 | obj.source = 'main-simple.cc' 10 | -------------------------------------------------------------------------------- /simulation/src/tap-bridge/examples/virtual-network-teardown.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | lxc-destroy -n left 3 | lxc-destroy -n right 4 | ifconfig br-left down 5 | ifconfig br-right down 6 | brctl delif br-left tap-left 7 | brctl delif br-right tap-right 8 | brctl delbr br-left 9 | brctl delbr br-right 10 | ifconfig tap-left down 11 | ifconfig tap-right down 12 | tunctl -d tap-left 13 | tunctl -d tap-right 14 | -------------------------------------------------------------------------------- /simulation/src/lte/doc/source/index.rst: -------------------------------------------------------------------------------- 1 | 2 | :orphan: true 3 | 4 | .. only:: html or latex 5 | 6 | ns-3 LTE module documentation 7 | ============================= 8 | 9 | This is the stand-alone version of the ns-3 LTE module documentation. 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | lte-design 15 | lte-user 16 | lte-testing 17 | lte-profiling 18 | lte-references 19 | 20 | -------------------------------------------------------------------------------- /simulation/src/lte/doc/rescale-pdf.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | TMPDIR=/tmp 4 | 5 | TMPFILE=`mktemp` 6 | 7 | echo "\documentclass{book} 8 | \usepackage{pdfpages} 9 | \begin{document} 10 | \includepdf[width=${1},fitpaper]{${2}} 11 | \end{document}" >${TMPFILE}.tex 12 | pdflatex -output-directory /tmp ${TMPFILE}.tex >/dev/null 2>/dev/null 13 | cp ${TMPFILE}.pdf ${2} 14 | rm -f ${TMPFILE}{,.{tex,aux,log,pdf}} 15 | -------------------------------------------------------------------------------- /simulation/src/lte/test/reference/gain_freespace.m: -------------------------------------------------------------------------------- 1 | function g = gain_freespace(d, f) 2 | 3 | %% 4 | %% function g = gain_freespace(d, c) 5 | %% 6 | %% returns the gain at d meters for channel c 7 | 8 | assert(isscalar(f)); 9 | assert(f > 0); 10 | 11 | g = zeros(size(d)); 12 | g(find(d > 0)) = (3e8./(4.0.*pi.*f.*d(find(d > 0)))).^2; 13 | 14 | g(find(d <= 0)) = 1; 15 | 16 | 17 | -------------------------------------------------------------------------------- /simulation/src/antenna/doc/rescale-pdf.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | TMPDIR=/tmp 4 | 5 | TMPFILE=`mktemp` 6 | 7 | echo "\documentclass{book} 8 | \usepackage{pdfpages} 9 | \begin{document} 10 | \includepdf[width=${1},fitpaper]{${2}} 11 | \end{document}" >${TMPFILE}.tex 12 | pdflatex -output-directory /tmp ${TMPFILE}.tex >/dev/null 2>/dev/null 13 | cp ${TMPFILE}.pdf ${2} 14 | rm -f ${TMPFILE}{,.{tex,aux,log,pdf}} 15 | -------------------------------------------------------------------------------- /simulation/src/buildings/doc/rescale-pdf.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | TMPDIR=/tmp 4 | 5 | TMPFILE=`mktemp` 6 | 7 | echo "\documentclass{book} 8 | \usepackage{pdfpages} 9 | \begin{document} 10 | \includepdf[width=${1},fitpaper]{${2}} 11 | \end{document}" >${TMPFILE}.tex 12 | pdflatex -output-directory /tmp ${TMPFILE}.tex >/dev/null 2>/dev/null 13 | cp ${TMPFILE}.pdf ${2} 14 | rm -f ${TMPFILE}{,.{tex,aux,log,pdf}} 15 | -------------------------------------------------------------------------------- /simulation/src/buildings/doc/source/buildings-references.rst: -------------------------------------------------------------------------------- 1 | .. include:: replace.txt 2 | 3 | 4 | ##################################################### 5 | References 6 | ##################################################### 7 | 8 | .. [turkmani] Turkmani A.M.D., J.D. Parson and D.G. Lewis, "Radio propagation into buildings at 441, 900 and 1400 MHz", 9 | in Proc. of 4th Int. Conference on Land Mobile Radio, 1987. 10 | 11 | -------------------------------------------------------------------------------- /simulation/src/lte/test/reference/lte-mcs-index.dat: -------------------------------------------------------------------------------- 1 | # SINR MCS_index 2 | -2 0 3 | -1 0 4 | 0 2 5 | 1 2 6 | 2 2 7 | 3 4 8 | 4 4 9 | 5 6 10 | 6 6 11 | 7 8 12 | 8 8 13 | 9 10 14 | 15 | 16 | 10 12 17 | 11 12 18 | 12 14 19 | 13 14 20 | 14 16 21 | 15 18 22 | 16 18 23 | 24 | 25 | 17 20 26 | 18 20 27 | 19 22 28 | 20 22 29 | 21 24 30 | 22 24 31 | 23 26 32 | 24 26 33 | 25 28 34 | 26 28 35 | 27 28 36 | 28 28 37 | 29 28 38 | 30 28 39 | -------------------------------------------------------------------------------- /simulation/src/core/model/int-to-type.h: -------------------------------------------------------------------------------- 1 | #ifndef INT_TO_TYPE_H 2 | #define INT_TO_TYPE_H 3 | 4 | namespace ns3 { 5 | 6 | /** 7 | * This trivial template is extremely useful, as explained in 8 | * "Modern C++ Design", p29, section 2.4, 9 | * "Mapping Integral Constants to Types" 10 | */ 11 | template 12 | struct IntToType 13 | { 14 | enum v_e { value = v}; 15 | }; 16 | 17 | } // namespace ns3 18 | 19 | #endif /* INT_TO_TYPE_H */ 20 | -------------------------------------------------------------------------------- /simulation/src/propagation/test/reference/loss_Kun_2_6GHz.m: -------------------------------------------------------------------------------- 1 | function g = loss_Kun_2_6GHz (d) 2 | 3 | %% 4 | %% function g = loss_Kun_2_6GHz (d, c) 5 | %% 6 | %% returns the loss at d meters for f frequency and mobile height m and 7 | %% base station height of hb 8 | 9 | %assert(isscalar(f)); 10 | %assert(f > 0); 11 | 12 | 13 | g = zeros(size(d)); 14 | g(find(d > 0)) = 36 + 26.*log10(d); 15 | 16 | g(find(d <= 0)) = 1; 17 | -------------------------------------------------------------------------------- /simulation/src/uan/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | obj = bld.create_ns3_program('uan-cw-example', ['internet', 'mobility', 'tools', 'applications', 'uan']) 5 | obj.source = 'uan-cw-example.cc' 6 | 7 | obj = bld.create_ns3_program('uan-rc-example', ['internet', 'mobility', 'tools', 'applications', 'uan']) 8 | obj.source = 'uan-rc-example.cc' 9 | -------------------------------------------------------------------------------- /simulation/src/core/model/unused.h: -------------------------------------------------------------------------------- 1 | #ifndef UNUSED_H 2 | #define UNUSED_H 3 | 4 | #ifndef NS_UNUSED 5 | # define NS_UNUSED(x) ((void)(x)) 6 | #endif 7 | 8 | #ifndef NS_UNUSED_GLOBAL 9 | #if defined(__GNUC__) 10 | # define NS_UNUSED_GLOBAL(x) x __attribute__((unused)) 11 | #elif defined(__LCLINT__) 12 | # define NS_UNUSED_GLOBAL(x) /*@unused@*/ x 13 | #else 14 | # define NS_UNUSED_GLOBAL(x) x 15 | #endif 16 | #endif 17 | 18 | #endif /* UNUSED_H */ 19 | -------------------------------------------------------------------------------- /simulation/src/bridge/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ['bool', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 3 | ['bool', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 4 | ] 5 | -------------------------------------------------------------------------------- /simulation/src/config-store/bindings/modulegen_customizations.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | def post_register_types(root_module): 4 | enabled_features = os.environ['NS3_ENABLED_FEATURES'].split(',') 5 | # if GtkConfigStore support is disabled, disable the class wrapper 6 | if 'GtkConfigStore' not in enabled_features: 7 | try: 8 | root_module.classes.remove(root_module['ns3::GtkConfigStore']) 9 | except KeyError: 10 | pass 11 | -------------------------------------------------------------------------------- /simulation/src/emu/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | env = bld.env 5 | if env['ENABLE_EMU']: 6 | obj = bld.create_ns3_program('emu-udp-echo', ['emu', 'internet', 'applications']) 7 | obj.source = 'emu-udp-echo.cc' 8 | 9 | obj = bld.create_ns3_program('emu-ping', ['emu', 'internet', 'applications']) 10 | obj.source = 'emu-ping.cc' 11 | -------------------------------------------------------------------------------- /simulation/src/lte/test/reference/print_C_vector.m: -------------------------------------------------------------------------------- 1 | function print_C_vector (x, name) 2 | %% 3 | %% print_C_vector (x) 4 | %% 5 | %% prints to screen the C code that is needed to initialize vector x 6 | %% x is the data 7 | %% name is the name of the C variable 8 | 9 | 10 | assert (isvector(x)); 11 | for jj = 1:length(x) 12 | printf("%s[%d] = %15.12e;\n", name, jj-1, x(jj)); 13 | endfor 14 | 15 | endfunction 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /simulation/src/stats/bindings/modulegen_customizations.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | def post_register_types(root_module): 4 | enabled_features = os.environ['NS3_ENABLED_FEATURES'].split(',') 5 | 6 | # if no sqlite, the class SqliteDataOutput is disabled 7 | if 'SqliteDataOutput' not in enabled_features: 8 | try: 9 | root_module.classes.remove(root_module['ns3::SqliteDataOutput']) 10 | except KeyError: 11 | pass 12 | 13 | -------------------------------------------------------------------------------- /simulation/src/emu/bindings/modulegen_customizations.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | def post_register_types(root_module): 4 | enabled_features = os.environ['NS3_ENABLED_FEATURES'].split(',') 5 | 6 | if 'EmuNetDevice' not in enabled_features: 7 | for clsname in ['EmuNetDevice', 'EmuHelper']: 8 | root_module.classes.remove(root_module['ns3::%s' % clsname]) 9 | root_module.enums.remove(root_module['ns3::EmuNetDevice::EncapsulationMode']) 10 | 11 | -------------------------------------------------------------------------------- /simulation/src/tap-bridge/bindings/modulegen_customizations.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | def post_register_types(root_module): 4 | enabled_features = os.environ['NS3_ENABLED_FEATURES'].split(',') 5 | 6 | if 'TapBridge' not in enabled_features: 7 | for clsname in ['TapBridge', 'TapBridgeHelper', 'TapBridgeFdReader']: 8 | root_module.classes.remove(root_module['ns3::%s' % clsname]) 9 | root_module.enums.remove(root_module['ns3::TapBridge::Mode']) 10 | -------------------------------------------------------------------------------- /simulation/utils/.ns3rc: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | 3 | # A list of the modules that will be enabled when ns-3 is run. 4 | # Modules that depend on the listed modules will be enabled also. 5 | # 6 | # All modules can be enabled by choosing 'all_modules'. 7 | modules_enabled = ['all_modules'] 8 | 9 | # Set this equal to true if you want examples to be run. 10 | examples_enabled = False 11 | 12 | # Set this equal to true if you want tests to be run. 13 | tests_enabled = False 14 | -------------------------------------------------------------------------------- /simulation/src/config-store/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [ 11 | ("config-store-save", "True", "False"), 12 | ] 13 | -------------------------------------------------------------------------------- /simulation/src/core/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ['void', 'unsigned char*', 'long', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 3 | ['void', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 4 | ['bool', 'std::string', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 5 | ] 6 | -------------------------------------------------------------------------------- /simulation/src/lte/test/reference/lte-mcs-index.gnuplot: -------------------------------------------------------------------------------- 1 | set terminal postscript eps enhanced color 2 | set output 'lte-mcs-index.eps' 3 | set xlabel 'SINR [dB]' 4 | set ylabel 'MCS index' 5 | set grid 6 | set key bottom right 7 | plot 'lte-mcs-index.dat' index 0 using 1:2 title 'QPSK' with linespoints lw 4 pt 8,\ 8 | 'lte-mcs-index.dat' index 1 using 1:2 title '16QAM' with linespoints lw 4 pt 4,\ 9 | 'lte-mcs-index.dat' index 2 using 1:2 title '64QAM' with linespoints lw 4 pt 10 10 | -------------------------------------------------------------------------------- /simulation/src/network/model/header.cc: -------------------------------------------------------------------------------- 1 | #include "header.h" 2 | 3 | namespace ns3 { 4 | 5 | NS_OBJECT_ENSURE_REGISTERED (Header); 6 | 7 | Header::~Header () 8 | { 9 | } 10 | 11 | TypeId 12 | Header::GetTypeId (void) 13 | { 14 | static TypeId tid = TypeId ("ns3::Header") 15 | .SetParent () 16 | ; 17 | return tid; 18 | } 19 | 20 | std::ostream & operator << (std::ostream &os, const Header &header) 21 | { 22 | header.Print (os); 23 | return os; 24 | } 25 | 26 | } // namespace ns3 27 | -------------------------------------------------------------------------------- /simulation/src/bridge/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | 5 | obj = bld.create_ns3_program('csma-bridge', ['bridge', 'csma', 'internet']) 6 | obj.source = 'csma-bridge.cc' 7 | 8 | bld.register_ns3_script('csma-bridge.py', ['bridge', 'csma', 'internet']) 9 | 10 | obj = bld.create_ns3_program('csma-bridge-one-hop', ['bridge', 'csma', 'internet']) 11 | obj.source = 'csma-bridge-one-hop.cc' 12 | 13 | -------------------------------------------------------------------------------- /simulation/src/network/model/trailer.cc: -------------------------------------------------------------------------------- 1 | #include "trailer.h" 2 | 3 | namespace ns3 { 4 | 5 | NS_OBJECT_ENSURE_REGISTERED (Trailer); 6 | 7 | Trailer::~Trailer () 8 | { 9 | } 10 | 11 | TypeId 12 | Trailer::GetTypeId (void) 13 | { 14 | static TypeId tid = TypeId ("ns3::Trailer") 15 | .SetParent () 16 | ; 17 | return tid; 18 | } 19 | 20 | std::ostream & operator << (std::ostream &os, const Trailer &trailer) 21 | { 22 | trailer.Print (os); 23 | return os; 24 | } 25 | 26 | } // namespace ns3 27 | -------------------------------------------------------------------------------- /simulation/src/config-store/model/file-config.cc: -------------------------------------------------------------------------------- 1 | #include "file-config.h" 2 | 3 | namespace ns3 { 4 | 5 | FileConfig::~FileConfig () 6 | { 7 | } 8 | 9 | NoneFileConfig::NoneFileConfig () 10 | { 11 | } 12 | NoneFileConfig::~NoneFileConfig () 13 | { 14 | } 15 | void 16 | NoneFileConfig::SetFilename (std::string filename) 17 | {} 18 | void 19 | NoneFileConfig::Default (void) 20 | {} 21 | void 22 | NoneFileConfig::Global (void) 23 | {} 24 | void 25 | NoneFileConfig::Attributes (void) 26 | {} 27 | 28 | } // namespace ns3 29 | -------------------------------------------------------------------------------- /simulation/utils/rescale-pdf.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | TMPDIR=${TMPDIR:-/tmp} 4 | 5 | TMPFILE=`mktemp -t $(basename ${2}).XXXXXX` 6 | 7 | echo "Rescaling ${2} to ${1}" 8 | 9 | echo " 10 | \documentclass{book} 11 | \usepackage{pdfpages} 12 | \begin{document} 13 | \includepdf[width=${1},fitpaper]{${2}} 14 | \end{document} 15 | " \ 16 | >${TMPFILE}.tex 17 | 18 | pdflatex -output-directory ${TMPDIR} ${TMPFILE}.tex >/dev/null 2>/dev/null 19 | cp ${TMPFILE}.pdf ${2} 20 | rm -f ${TMPFILE}{,.{tex,aux,log,pdf}} 21 | -------------------------------------------------------------------------------- /simulation/src/olsr/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | obj = bld.create_ns3_program('simple-point-to-point-olsr', 5 | ['point-to-point', 'internet', 'olsr', 'applications', 'wifi']) 6 | obj.source = 'simple-point-to-point-olsr.cc' 7 | 8 | obj = bld.create_ns3_program('olsr-hna', 9 | ['core', 'mobility', 'wifi', 'csma', 'olsr']) 10 | obj.source = 'olsr-hna.cc' 11 | -------------------------------------------------------------------------------- /simulation/src/tap-bridge/examples/virtual-network-setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | brctl addbr br-left 3 | brctl addbr br-right 4 | tunctl -t tap-left 5 | tunctl -t tap-right 6 | ifconfig tap-left 0.0.0.0 promisc up 7 | ifconfig tap-right 0.0.0.0 promisc up 8 | brctl addif br-left tap-left 9 | ifconfig br-left up 10 | brctl addif br-right tap-right 11 | ifconfig br-right up 12 | pushd /proc/sys/net/bridge 13 | for f in bridge-nf-*; do echo 0 > $f; done 14 | popd 15 | lxc-create -n left -f lxc-left.conf 16 | lxc-create -n right -f lxc-right.conf 17 | -------------------------------------------------------------------------------- /simulation/src/antenna/doc/source/antenna-user.rst: -------------------------------------------------------------------------------- 1 | .. include:: replace.txt 2 | 3 | 4 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 | User Documentation 6 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 7 | 8 | The antenna moduled can be used with all the wireless technologies and 9 | physical layer models that support it. Currently, this includes 10 | the physical layer models based on the SpectrumPhy. Please refer to 11 | the documentation of each of these models for details. 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /simulation/src/energy/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ['void', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 3 | ['void', 'int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 4 | ['void', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 5 | ] 6 | -------------------------------------------------------------------------------- /simulation/src/nix-vector-routing/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | obj = bld.create_ns3_program('nix-simple', 5 | ['point-to-point', 'applications', 'internet', 'nix-vector-routing']) 6 | obj.source = 'nix-simple.cc' 7 | 8 | obj = bld.create_ns3_program('nms-p2p-nix', 9 | ['point-to-point', 'applications', 'internet', 'nix-vector-routing']) 10 | obj.source = 'nms-p2p-nix.cc' 11 | -------------------------------------------------------------------------------- /simulation/src/point-to-point/model/pint.h: -------------------------------------------------------------------------------- 1 | #ifndef PINT_H 2 | #define PINT_H 3 | 4 | #include 5 | 6 | namespace ns3{ 7 | class Pint{ 8 | public: 9 | static const uint32_t max_concurrent = 512; // max number of concurrent flows 10 | static double log_base, log_factor; // used for PINT 11 | static void set_log_base(double base); 12 | static int get_n_bits(); 13 | static int get_n_bytes(); 14 | static uint16_t encode_u(double u); 15 | static double decode_u(uint16_t p); 16 | }; 17 | } /* namespace ns3 */ 18 | 19 | #endif /* PINT_H */ 20 | -------------------------------------------------------------------------------- /simulation/src/wimax/examples/wscript: -------------------------------------------------------------------------------- 1 | 7## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | obj = bld.create_ns3_program( 'wimax-ipv4', ['wimax', 'internet', 'mobility', 'csma']) 5 | obj.source = 'wimax-ipv4.cc' 6 | 7 | obj = bld.create_ns3_program( 'wimax-multicast', ['wimax', 'internet', 'csma']) 8 | obj.source = 'wimax-multicast.cc' 9 | 10 | obj = bld.create_ns3_program( 'wimax-simple', ['wimax', 'internet', 'mobility']) 11 | obj.source = 'wimax-simple.cc' 12 | -------------------------------------------------------------------------------- /simulation/src/visualizer/doc/readme.txt: -------------------------------------------------------------------------------- 1 | NS-3 PyViz is a live simulation visualizer, meaning that it uses no 2 | trace files. It can be most useful for debugging purposes, i.e. to 3 | figure out if mobility models are what you expect, where packets are 4 | being dropped, etc. There's also a builtin interactive python console 5 | that can be used to debug the state of the running objects. Although 6 | it is mostly written in Python, it works both with Python and pure C++ 7 | simulations. 8 | 9 | For more information, see http://www.nsnam.org/wiki/index.php/PyViz 10 | -------------------------------------------------------------------------------- /simulation/src/network/model/chunk.h: -------------------------------------------------------------------------------- 1 | #ifndef CHUNK_H 2 | #define CHUNK_H 3 | 4 | #include "ns3/object-base.h" 5 | #include "buffer.h" 6 | 7 | namespace ns3 { 8 | 9 | /** 10 | * \ingroup packet 11 | * 12 | * \brief abstract base class for ns3::Header and ns3::Trailer 13 | */ 14 | class Chunk : public ObjectBase 15 | { 16 | public: 17 | static TypeId GetTypeId (void); 18 | 19 | virtual uint32_t Deserialize (Buffer::Iterator start) = 0; 20 | virtual void Print (std::ostream &os) const = 0; 21 | }; 22 | 23 | } // namespace ns3 24 | 25 | #endif /* CHUNK_H */ 26 | -------------------------------------------------------------------------------- /simulation/src/core/model/default-deleter.h: -------------------------------------------------------------------------------- 1 | #ifndef DEFAULT_DELETER_H 2 | #define DEFAULT_DELETER_H 3 | 4 | namespace ns3 { 5 | 6 | /** 7 | * \brief a template used to delete objects 8 | * by the *RefCount<> templates when the 9 | * last reference to an object they manage 10 | * disappears. 11 | * 12 | * \sa ns3::SimpleRefCount 13 | */ 14 | template 15 | struct DefaultDeleter 16 | { 17 | inline static void Delete (T *object) { 18 | delete object; 19 | } 20 | }; 21 | 22 | } // namespace ns3 23 | 24 | #endif /* DEFAULT_DELETER_H */ 25 | -------------------------------------------------------------------------------- /simulation/bindings/python/my_extra_api_definitions.py: -------------------------------------------------------------------------------- 1 | from pybindgen import Module, FileCodeSink, write_preamble, param, retval 2 | 3 | def register_types(module): 4 | module.add_class('MyClass') 5 | 6 | def register_methods(root_module): 7 | MyClass = root_module['MyClass'] 8 | MyClass.add_constructor([], visibility='public') 9 | MyClass.add_constructor([param('double', 's'), param('double', 'l'), param('double', 'mean')], visibility='public') 10 | 11 | def register_functions(module): 12 | module.add_function('SomeFunction', 'int', [param('int', 'xpto')]) 13 | 14 | -------------------------------------------------------------------------------- /simulation/src/propagation/test/reference/loss_OH_suburban.m: -------------------------------------------------------------------------------- 1 | function g = loss_OH_suburban(d, hb, hm, f) 2 | 3 | %% 4 | %% function g = loss_OH_suburban(d, hb, hm, f) 5 | %% 6 | %% returns the loss at d meters for f frequency and mobile height m and 7 | %% base station height of hb 8 | 9 | assert(isscalar(f)); 10 | assert(f > 0); 11 | 12 | Ch = 0.8 + (1.1*log10(f)-0.7)*hm -(1.56*log10(f)); 13 | 14 | g = zeros(size(d)); 15 | g(find(d > 0)) = 69.55 + (26.16*log10(f)) - (13.82*log10(hb)) + (44.9-(6.55*log10(hb))).*log10(d) - Ch - 2*(log10(f/28))^2 -5.4; 16 | 17 | g(find(d <= 0)) = 1; 18 | -------------------------------------------------------------------------------- /simulation/src/core/bindings/core.py: -------------------------------------------------------------------------------- 1 | 2 | # "from _core import *" doesn't work here because symbols starting 3 | # with underscore would not be imported. But they are needed because 4 | # other modules depend on them... 5 | import _core 6 | g = globals() 7 | for k,v in _core.__dict__.iteritems(): 8 | g[k] = v 9 | del g, k, v, _core 10 | 11 | 12 | # Without this, Python programs often crash because Node's are kept 13 | # alive after the Python interpreter is finalized, which leads to 14 | # crashes because some destructors call Python API. 15 | import atexit 16 | atexit.register(Simulator.Destroy) 17 | del atexit 18 | -------------------------------------------------------------------------------- /simulation/src/virtual-net-device/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | 4 | def build(bld): 5 | module = bld.create_ns3_module('virtual-net-device', ['network', 'internet']) 6 | module.source = [ 7 | 'model/virtual-net-device.cc', 8 | ] 9 | headers = bld(features='ns3header') 10 | headers.module = 'virtual-net-device' 11 | headers.source = [ 12 | 'model/virtual-net-device.h', 13 | ] 14 | 15 | if bld.env['ENABLE_EXAMPLES']: 16 | bld.recurse('examples') 17 | 18 | bld.ns3_python_bindings() 19 | -------------------------------------------------------------------------------- /simulation/src/csma-layout/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | obj = bld.create_ns3_module('csma-layout', ['csma', 'network', 'applications', 'netanim', 'point-to-point']) 5 | obj.source = [ 6 | 'model/csma-star-helper.cc', 7 | ] 8 | headers = bld(features='ns3header') 9 | headers.module = 'csma-layout' 10 | headers.source = [ 11 | 'model/csma-star-helper.h', 12 | ] 13 | 14 | if bld.env['ENABLE_EXAMPLES']: 15 | bld.recurse('examples') 16 | 17 | bld.ns3_python_bindings() 18 | 19 | -------------------------------------------------------------------------------- /simulation/src/core/model/string.h: -------------------------------------------------------------------------------- 1 | #ifndef NS3_STRING_H 2 | #define NS3_STRING_H 3 | 4 | #include 5 | #include "attribute-helper.h" 6 | 7 | namespace ns3 { 8 | 9 | /** 10 | * \ingroup attribute 11 | * 12 | * \class ns3::StringValue 13 | * \brief hold variables of type string 14 | * 15 | * This class can be used to hold variables of type string, 16 | * that is, either char * or std::string. 17 | */ 18 | 19 | ATTRIBUTE_VALUE_DEFINE_WITH_NAME (std::string, String); 20 | ATTRIBUTE_ACCESSOR_DEFINE (String); 21 | ATTRIBUTE_CHECKER_DEFINE (String); 22 | 23 | } // namespace ns3 24 | 25 | 26 | #endif /* NS3_STRING_H */ 27 | -------------------------------------------------------------------------------- /simulation/src/lte/test/reference/bernuolliDistribution.m: -------------------------------------------------------------------------------- 1 | % Generation of the quantiles of the Bernoulli distribution at 99.9% 2 | % related to phy error model test 3 | 4 | n = 1000; 5 | p_vect = [0.35 0.11 0.02 0.3 0.55 0.14]; 6 | for i=1:length(p_vect) 7 | p = p_vect(i) 8 | cdf = 0.0; 9 | kmin = 0.0; 10 | kmax = 0.0; 11 | lambda = n * p 12 | for k=1:n 13 | pk = bincoeff(n,k)* p^k * (1-p)^(n-k); 14 | cdf = cdf + pk; 15 | if cdf > 0.0005 & kmin == 0.0 16 | kmin = lambda - k 17 | end 18 | if cdf > 0.9995 & kmax == 0.0 19 | kmax = k - lambda 20 | end 21 | end 22 | 23 | end 24 | 25 | 26 | -------------------------------------------------------------------------------- /simulation/src/propagation/test/reference/loss_COST231_large_cities_urban.m: -------------------------------------------------------------------------------- 1 | function g = loss_COST231_large_cities_urban(d, hb, hm, f) 2 | 3 | %% 4 | %% function g = loss_COST231_large_cities_urban(d, c) 5 | %% 6 | %% returns the loss at d meters for f frequency and mobile height m and 7 | %% base station height of hb 8 | 9 | assert(isscalar(f)); 10 | assert(f > 0); 11 | 12 | Fhm = 3.2*(log10(11.75*hm))^2; 13 | C = 3; 14 | g = zeros(size(d)); 15 | g(find(d > 0)) = 46.3 + (33.9*log10(f)) - (13.82*log10(hb)) + (44.9-(6.55*log10(hb))).*log10(d) - Fhm + C; 16 | 17 | g(find(d <= 0)) = 1; 18 | 19 | 20 | -------------------------------------------------------------------------------- /simulation/src/propagation/test/reference/loss_OH_openareas.m: -------------------------------------------------------------------------------- 1 | function g = loss_OH_openareas (d, hb, hm, f) 2 | 3 | %% 4 | %% function g = loss_OH_openareas (d, hb, hm, f) 5 | %% 6 | %% returns the loss at d meters for f frequency and mobile height m and 7 | %% base station height of hb 8 | 9 | assert(isscalar(f)); 10 | assert(f > 0); 11 | 12 | Ch = 0.8 + (1.1*log10(f)-0.7)*hm -(1.56*log10(f)); 13 | 14 | g = zeros(size(d)); 15 | g(find(d > 0)) = 69.55 + (26.16*log10(f)) - (13.82*log10(hb)) + (44.9-(6.55*log10(hb))).*log10(d) - Ch -4.70*(log10(f))^2 + 18.33*log10(f) -40.94; 16 | 17 | g(find(d <= 0)) = 1; 18 | -------------------------------------------------------------------------------- /simulation/src/propagation/test/reference/loss_OH_small_cities_urban.m: -------------------------------------------------------------------------------- 1 | function g = loss_OH_small_cities_urban(d, hb, hm, f) 2 | 3 | %% 4 | %% function g = loss_OH_small_cities_urban(d, hb, hm, f) 5 | %% 6 | %% returns the loss at d meters for f frequency and mobile height m and 7 | %% base station height of hb 8 | 9 | assert(isscalar(f)); 10 | assert(f > 0); 11 | 12 | Ch = 0.8 + (1.1*log10(f)-0.7)*hm -(1.56*log10(f)); 13 | 14 | g = zeros(size(d)); 15 | g(find(d > 0)) = 69.55 + (26.16*log10(f)) - (13.82*log10(hb)) + (44.9-(6.55*log10(hb))).*log10(d) - Ch; 16 | 17 | g(find(d <= 0)) = 1; 18 | 19 | 20 | -------------------------------------------------------------------------------- /simulation/src/propagation/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | if not bld.env['ENABLE_EXAMPLES']: 5 | return; 6 | 7 | obj = bld.create_ns3_program('main-propagation-loss', 8 | ['core', 'mobility', 'config-store', 'tools', 'propagation']) 9 | obj.source = 'main-propagation-loss.cc' 10 | 11 | obj = bld.create_ns3_program('jakes-propagation-model-example', 12 | ['core', 'propagation']) 13 | obj.source = 'jakes-propagation-model-example.cc' 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /simulation/src/mobility/model/mobility.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @defgroup mobility Mobility 3 | */ 4 | 5 | /** 6 | * \addtogroup mobility Mobility 7 | * 8 | * The mobility support includes: 9 | * - a set of mobility models which are used to track and maintain 10 | * the "current" cartesian position and speed of an object. 11 | * 12 | * - a "course change notifier" trace source which can be used to register 13 | * listeners to the course changes of a mobility model 14 | * 15 | * - a number of helper classes which are used to place nodes and setup 16 | * mobility models (including parsers for some mobility definition formats). 17 | */ 18 | -------------------------------------------------------------------------------- /simulation/src/propagation/test/reference/loss_COST231_small_cities_urban.m: -------------------------------------------------------------------------------- 1 | function g = loss_COST231_small_cities_urban(d, hb, hm, f) 2 | 3 | %% 4 | %% function g = loss_COST231_small_cities_urban(d, c) 5 | %% 6 | %% returns the loss at d meters for f frequency and mobile height m and 7 | %% base station height of hb 8 | 9 | assert(isscalar(f)); 10 | assert(f > 0); 11 | 12 | Fhm = (1.1*log10(f)) -(0.7*hm) -(1.56*log10(f) -0.8); 13 | C = 0; 14 | g = zeros(size(d)); 15 | g(find(d > 0)) = 46.3 + (33.9*log10(f)) - (13.82*log10(hb)) + (44.9-(6.55*log10(hb))).*log10(d) - Fhm + C; 16 | 17 | g(find(d <= 0)) = 1; 18 | 19 | 20 | -------------------------------------------------------------------------------- /simulation/src/csma/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ['bool', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 3 | ['bool', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 4 | ['void', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 5 | ] 6 | -------------------------------------------------------------------------------- /simulation/src/point-to-point/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ['bool', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 3 | ['bool', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 4 | ['void', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 5 | ] 6 | -------------------------------------------------------------------------------- /simulation/src/wifi/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [] 11 | 12 | # A list of Python examples to run in order to ensure that they remain 13 | # runnable over time. Each tuple in the list contains 14 | # 15 | # (example_name, do_run). 16 | # 17 | # See test.py for more information. 18 | python_examples = [] 19 | -------------------------------------------------------------------------------- /simulation/src/energy/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [] 11 | 12 | # A list of Python examples to run in order to ensure that they remain 13 | # runnable over time. Each tuple in the list contains 14 | # 15 | # (example_name, do_run). 16 | # 17 | # See test.py for more information. 18 | python_examples = [] 19 | -------------------------------------------------------------------------------- /simulation/src/click/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ['void', 'ns3::Ptr', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 3 | ['void', 'ns3::Ptr', 'unsigned int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 4 | ['void', 'ns3::Ptr', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 5 | ['bool', 'ns3::Ptr', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 6 | ] 7 | -------------------------------------------------------------------------------- /simulation/src/propagation/test/reference/loss_OH_large_cities_urban.m: -------------------------------------------------------------------------------- 1 | function g = loss_OH_large_cities_urban(d, hb, hm, f) 2 | 3 | %% 4 | %% function g = loss_OH_large_cities_urban(d, hb, hm, f) 5 | %% 6 | %% returns the loss at d meters for f frequency and mobile height m and 7 | %% base station height of hb 8 | 9 | assert(isscalar(f)); 10 | assert(f > 0); 11 | 12 | if (f<200) 13 | Ch = 8.29*(log10(1.54*hm))^2-1.1; 14 | else 15 | Ch = 3.2*(log10(11.75*hm))^2-4.97; 16 | endif 17 | 18 | g = zeros(size(d)); 19 | g(find(d > 0)) = 69.55 + (26.16*log10(f)) - (13.82*log10(hb)) + (44.9-(6.55*log10(hb))).*log10(d) - Ch; 20 | 21 | g(find(d <= 0)) = 1; 22 | 23 | 24 | -------------------------------------------------------------------------------- /simulation/src/bridge/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | obj = bld.create_ns3_module('bridge', ['network']) 5 | obj.source = [ 6 | 'model/bridge-net-device.cc', 7 | 'model/bridge-channel.cc', 8 | 'helper/bridge-helper.cc', 9 | ] 10 | headers = bld(features='ns3header') 11 | headers.module = 'bridge' 12 | headers.source = [ 13 | 'model/bridge-net-device.h', 14 | 'model/bridge-channel.h', 15 | 'helper/bridge-helper.h', 16 | ] 17 | 18 | if bld.env['ENABLE_EXAMPLES']: 19 | bld.recurse('examples') 20 | 21 | bld.ns3_python_bindings() 22 | -------------------------------------------------------------------------------- /simulation/src/aodv/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [ 11 | ("aodv", "True", "True"), 12 | ] 13 | 14 | # A list of Python examples to run in order to ensure that they remain 15 | # runnable over time. Each tuple in the list contains 16 | # 17 | # (example_name, do_run). 18 | # 19 | # See test.py for more information. 20 | python_examples = [] 21 | -------------------------------------------------------------------------------- /simulation/src/mesh/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [ 11 | ("mesh", "True", "True"), 12 | ] 13 | 14 | # A list of Python examples to run in order to ensure that they remain 15 | # runnable over time. Each tuple in the list contains 16 | # 17 | # (example_name, do_run). 18 | # 19 | # See test.py for more information. 20 | python_examples = [] 21 | -------------------------------------------------------------------------------- /simulation/src/core/model/type-name.cc: -------------------------------------------------------------------------------- 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 2 | 3 | #include "type-name.h" 4 | 5 | namespace ns3 { 6 | 7 | #define DEF_TYPE(x) \ 8 | template <> \ 9 | std::string TypeNameGet (void) \ 10 | { \ 11 | return # x; \ 12 | } 13 | 14 | DEF_TYPE (uint8_t); 15 | DEF_TYPE (uint16_t); 16 | DEF_TYPE (uint32_t); 17 | DEF_TYPE (uint64_t); 18 | DEF_TYPE (int8_t); 19 | DEF_TYPE (int16_t); 20 | DEF_TYPE (int32_t); 21 | DEF_TYPE (int64_t); 22 | DEF_TYPE (float); 23 | DEF_TYPE (double); 24 | 25 | 26 | } // namespace ns3 27 | -------------------------------------------------------------------------------- /simulation/src/nix-vector-routing/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | module = bld.create_ns3_module('nix-vector-routing', ['internet']) 5 | module.includes = '.' 6 | module.source = [ 7 | 'model/ipv4-nix-vector-routing.cc', 8 | 'helper/ipv4-nix-vector-helper.cc', 9 | ] 10 | 11 | headers = bld(features='ns3header') 12 | headers.module = 'nix-vector-routing' 13 | headers.source = [ 14 | 'model/ipv4-nix-vector-routing.h', 15 | 'helper/ipv4-nix-vector-helper.h', 16 | ] 17 | 18 | if bld.env['ENABLE_EXAMPLES']: 19 | bld.recurse('examples') 20 | 21 | bld.ns3_python_bindings() 22 | -------------------------------------------------------------------------------- /simulation/src/internet/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [ 11 | ("main-simple", "True", "True"), 12 | ] 13 | 14 | # A list of Python examples to run in order to ensure that they remain 15 | # runnable over time. Each tuple in the list contains 16 | # 17 | # (example_name, do_run). 18 | # 19 | # See test.py for more information. 20 | python_examples = [] 21 | -------------------------------------------------------------------------------- /simulation/src/tools/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [ 11 | ("gnuplot-example", "False", "False"), 12 | ] 13 | 14 | # A list of Python examples to run in order to ensure that they remain 15 | # runnable over time. Each tuple in the list contains 16 | # 17 | # (example_name, do_run). 18 | # 19 | # See test.py for more information. 20 | python_examples = [] 21 | -------------------------------------------------------------------------------- /simulation/src/flow-monitor/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [] 11 | 12 | # A list of Python examples to run in order to ensure that they remain 13 | # runnable over time. Each tuple in the list contains 14 | # 15 | # (example_name, do_run). 16 | # 17 | # See test.py for more information. 18 | python_examples = [ 19 | ("wifi-olsr-flowmon.py", "True"), 20 | ] 21 | -------------------------------------------------------------------------------- /simulation/src/mobility/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | if not bld.env['ENABLE_EXAMPLES']: 5 | return; 6 | 7 | obj = bld.create_ns3_program('main-grid-topology', 8 | ['core', 'mobility', 'network']) 9 | obj.source = 'main-grid-topology.cc' 10 | 11 | obj = bld.create_ns3_program('main-random-topology', 12 | ['core', 'mobility']) 13 | obj.source = 'main-random-topology.cc' 14 | 15 | obj = bld.create_ns3_program('main-random-walk', 16 | ['core', 'mobility']) 17 | obj.source = 'main-random-walk.cc' 18 | 19 | -------------------------------------------------------------------------------- /simulation/src/olsr/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [ 11 | ("simple-point-to-point-olsr", "True", "True"), 12 | ] 13 | 14 | # A list of Python examples to run in order to ensure that they remain 15 | # runnable over time. Each tuple in the list contains 16 | # 17 | # (example_name, do_run). 18 | # 19 | # See test.py for more information. 20 | python_examples = [] 21 | -------------------------------------------------------------------------------- /simulation/src/propagation/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [ 11 | ("main-propagation-loss", "True", "False"), 12 | ] 13 | 14 | # A list of Python examples to run in order to ensure that they remain 15 | # runnable over time. Each tuple in the list contains 16 | # 17 | # (example_name, do_run). 18 | # 19 | # See test.py for more information. 20 | python_examples = [] 21 | -------------------------------------------------------------------------------- /simulation/src/virtual-net-device/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [ 11 | ("virtual-net-device", "True", "True"), 12 | ] 13 | 14 | # A list of Python examples to run in order to ensure that they remain 15 | # runnable over time. Each tuple in the list contains 16 | # 17 | # (example_name, do_run). 18 | # 19 | # See test.py for more information. 20 | python_examples = [] 21 | -------------------------------------------------------------------------------- /simulation/src/click/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [ 11 | ("nsclick-simple-lan", "ENABLE_CLICK == True", "False"), 12 | ] 13 | 14 | # A list of Python examples to run in order to ensure that they remain 15 | # runnable over time. Each tuple in the list contains 16 | # 17 | # (example_name, do_run). 18 | # 19 | # See test.py for more information. 20 | python_examples = [] 21 | -------------------------------------------------------------------------------- /simulation/src/openflow/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [ 11 | ("openflow-switch", "ENABLE_OPENFLOW == True", "True"), 12 | ] 13 | 14 | # A list of Python examples to run in order to ensure that they remain 15 | # runnable over time. Each tuple in the list contains 16 | # 17 | # (example_name, do_run). 18 | # 19 | # See test.py for more information. 20 | python_examples = [] 21 | -------------------------------------------------------------------------------- /simulation/src/core/model/make-event.cc: -------------------------------------------------------------------------------- 1 | #include "make-event.h" 2 | #include "log.h" 3 | 4 | NS_LOG_COMPONENT_DEFINE ("MakeEvent"); 5 | 6 | namespace ns3 { 7 | 8 | EventImpl * MakeEvent (void (*f)(void)) 9 | { 10 | NS_LOG_FUNCTION (f); 11 | // zero arg version 12 | class EventFunctionImpl0 : public EventImpl 13 | { 14 | public: 15 | typedef void (*F)(void); 16 | 17 | EventFunctionImpl0 (F function) 18 | : m_function (function) 19 | { 20 | } 21 | virtual ~EventFunctionImpl0 () 22 | { 23 | } 24 | protected: 25 | virtual void Notify (void) 26 | { 27 | (*m_function)(); 28 | } 29 | private: 30 | F m_function; 31 | } *ev = new EventFunctionImpl0 (f); 32 | return ev; 33 | } 34 | 35 | } // namespace ns3 36 | -------------------------------------------------------------------------------- /simulation/src/emu/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [ 11 | ("emu-ping", "False", "True"), 12 | ("emu-udp-echo", "False", "True"), 13 | ] 14 | 15 | # A list of Python examples to run in order to ensure that they remain 16 | # runnable over time. Each tuple in the list contains 17 | # 18 | # (example_name, do_run). 19 | # 20 | # See test.py for more information. 21 | python_examples = [] 22 | -------------------------------------------------------------------------------- /simulation/src/csma/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | obj = bld.create_ns3_module('csma', ['network', 'applications']) 5 | obj.source = [ 6 | 'model/backoff.cc', 7 | 'model/csma-net-device.cc', 8 | 'model/csma-channel.cc', 9 | 'helper/csma-helper.cc', 10 | ] 11 | headers = bld(features='ns3header') 12 | headers.module = 'csma' 13 | headers.source = [ 14 | 'model/backoff.h', 15 | 'model/csma-net-device.h', 16 | 'model/csma-channel.h', 17 | 'helper/csma-helper.h', 18 | ] 19 | 20 | if bld.env['ENABLE_EXAMPLES']: 21 | bld.recurse('examples') 22 | 23 | bld.ns3_python_bindings() 24 | -------------------------------------------------------------------------------- /simulation/src/uan/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [ 11 | ("uan-rc-example", "True", "True"), 12 | ("uan-cw-example", "True", "True"), 13 | ] 14 | 15 | # A list of Python examples to run in order to ensure that they remain 16 | # runnable over time. Each tuple in the list contains 17 | # 18 | # (example_name, do_run). 19 | # 20 | # See test.py for more information. 21 | python_examples = [] 22 | -------------------------------------------------------------------------------- /simulation/src/buildings/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 4 | 5 | # A list of C++ examples to run in order to ensure that they remain 6 | # buildable and runnable over time. Each tuple in the list contains 7 | # 8 | # (example_name, do_run, do_valgrind_run). 9 | # 10 | # See test.py for more information. 11 | cpp_examples = [ 12 | ("buildings-pathloss-profiler", "True", "True"), 13 | ] 14 | 15 | # A list of Python examples to run in order to ensure that they remain 16 | # runnable over time. Each tuple in the list contains 17 | # 18 | # (example_name, do_run). 19 | # 20 | # See test.py for more information. 21 | python_examples = [] 22 | -------------------------------------------------------------------------------- /simulation/src/buildings/test/reference/loss_ITU1238.m: -------------------------------------------------------------------------------- 1 | function g = loss_ITU1238 (d, f, n_floors, build_t) 2 | 3 | %% 4 | %% function g = loss_ITU1411_NLOS_street_canyons(d, c) 5 | %% 6 | %% returns the loss at d meters for f frequency and mobile height m and 7 | %% base station height of hb 8 | %% build_t = 0:residential; 1:office; 2:commercial 9 | 10 | assert(isscalar(f)); 11 | assert(f > 0); 12 | 13 | 14 | lambda = 300000000.0 / f; 15 | 16 | 17 | if (build_t ==1) 18 | N = 28; 19 | Lf = 4*n_floors; 20 | elseif (build_t==2) 21 | N = 30 22 | Lf = 15+4*(n_floors-1); 23 | else 24 | N = 22; 25 | Lf = 6 + 3*(n_floors-1); 26 | endif 27 | 28 | g(find(d > 0)) = 20*log10(f) + (N*log10(d)) + Lf - 28; 29 | 30 | g(find(d <= 0)) = 1; -------------------------------------------------------------------------------- /simulation/src/network/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | if not bld.env['ENABLE_EXAMPLES']: 5 | return; 6 | 7 | obj = bld.create_ns3_program('main-packet-header', ['network']) 8 | obj.source = 'main-packet-header.cc' 9 | 10 | obj = bld.create_ns3_program('main-packet-tag', ['network']) 11 | obj.source = 'main-packet-tag.cc' 12 | 13 | obj = bld.create_ns3_program('red-tests', ['point-to-point', 'internet', 'applications', 'flow-monitor']) 14 | obj.source = 'red-tests.cc' 15 | 16 | obj = bld.create_ns3_program('droptail_vs_red', ['point-to-point', 'point-to-point-layout', 'internet', 'applications']) 17 | obj.source = 'droptail_vs_red.cc' 18 | -------------------------------------------------------------------------------- /simulation/src/propagation/test/reference/loss_ITU1411_LOS.m: -------------------------------------------------------------------------------- 1 | function g = loss_ITU1411_LOS (d, hb, hm, f) 2 | 3 | %% 4 | %% function g = loss_ITU1411_LOS(d, hb, hm, f) 5 | %% 6 | %% returns the loss at d meters for f frequency and mobile height m and 7 | %% base station height of hb 8 | 9 | assert(isscalar(f)); 10 | assert(f > 0); 11 | 12 | 13 | lambda = 299792458 / f; 14 | Lbp = abs(20*log10(lambda^2/(8*pi*hb*hm))); 15 | Rbp = (4*hb*hm) / lambda; 16 | if (d<=Rbp) 17 | Ll = Lbp + 20.*log10(d./Rbp); 18 | Lu = Lbp + 20 + 25.*log10(d./Rbp); 19 | else 20 | Ll = Lbp + 40.*log10(d./Rbp); 21 | Lu = Lbp + 20 + 40.*log10(d./Rbp); 22 | endif 23 | 24 | g = zeros(size(d)); 25 | g(find(d > 0)) = (Ll.+Lu)./2; 26 | 27 | g(find(d <= 0)) = 1; 28 | -------------------------------------------------------------------------------- /simulation/src/lte/test/reference/generate_test_data_lte_spectrum_model.m: -------------------------------------------------------------------------------- 1 | 2 | clear all; 3 | close all; 4 | 5 | for nrbs = [6 15 25 50 75 100] 6 | 7 | %% earfcn = 500; 8 | %% fcMHz = 2160; 9 | 10 | earfcn = 19400; 11 | fcMHz = 1730; 12 | 13 | fc = fcMHz * 1e6; 14 | 15 | rbbw = 180e3; 16 | bw = rbbw * nrbs; 17 | 18 | fcv = linspace (fc - bw/2 + rbbw/2, fc + bw/2 - rbbw/2, nrbs); 19 | name = ["fc" num2str(fcMHz, "%d") "nrb" num2str(nrbs, "%d")]; 20 | printf("std::vector %s (%s);\n", name, num2str (length(fcv))); 21 | print_C_vector (fcv, name); 22 | printf("AddTestCase (new LteSpectrumModelTestCase (\"%s\", %d, %d, %s));\n\n", name, earfcn, nrbs, name); 23 | 24 | 25 | endfor 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /simulation/src/spectrum/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | obj = bld.create_ns3_program('adhoc-aloha-ideal-phy', 5 | ['spectrum', 'mobility']) 6 | obj.source = 'adhoc-aloha-ideal-phy.cc' 7 | 8 | obj = bld.create_ns3_program('adhoc-aloha-ideal-phy-matrix-propagation-loss-model', 9 | ['spectrum', 'mobility']) 10 | obj.source = 'adhoc-aloha-ideal-phy-matrix-propagation-loss-model.cc' 11 | 12 | obj = bld.create_ns3_program('adhoc-aloha-ideal-phy-with-microwave-oven', 13 | ['spectrum', 'mobility']) 14 | obj.source = 'adhoc-aloha-ideal-phy-with-microwave-oven.cc' 15 | 16 | 17 | -------------------------------------------------------------------------------- /simulation/src/mpi/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | obj = bld.create_ns3_program('simple-distributed', 5 | ['point-to-point', 'internet', 'nix-vector-routing', 'applications']) 6 | obj.source = 'simple-distributed.cc' 7 | 8 | obj = bld.create_ns3_program('third-distributed', 9 | ['point-to-point', 'internet', 'mobility', 'wifi', 'csma', 'applications']) 10 | obj.source = 'third-distributed.cc' 11 | 12 | obj = bld.create_ns3_program('nms-p2p-nix-distributed', 13 | ['point-to-point', 'internet', 'nix-vector-routing', 'applications']) 14 | obj.source = 'nms-p2p-nix-distributed.cc' 15 | -------------------------------------------------------------------------------- /simulation/src/nix-vector-routing/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [ 11 | ("nix-simple", "True", "True"), 12 | ("nms-p2p-nix", "False", "True"), # Takes too long to run 13 | ] 14 | 15 | # A list of Python examples to run in order to ensure that they remain 16 | # runnable over time. Each tuple in the list contains 17 | # 18 | # (example_name, do_run). 19 | # 20 | # See test.py for more information. 21 | python_examples = [] 22 | -------------------------------------------------------------------------------- /simulation/src/point-to-point-layout/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | module = bld.create_ns3_module('point-to-point-layout', ['internet', 'point-to-point', 'mobility', 'netanim']) 5 | module.includes = '.' 6 | module.source = [ 7 | 'model/point-to-point-dumbbell.cc', 8 | 'model/point-to-point-grid.cc', 9 | 'model/point-to-point-star.cc', 10 | ] 11 | 12 | headers = bld(features='ns3header') 13 | headers.module = 'point-to-point-layout' 14 | headers.source = [ 15 | 'model/point-to-point-dumbbell.h', 16 | 'model/point-to-point-grid.h', 17 | 'model/point-to-point-star.h', 18 | ] 19 | 20 | bld.ns3_python_bindings() 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /simulation/src/emu/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ['void', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 3 | ['bool', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 4 | ['bool', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 5 | ['void', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 6 | ] 7 | -------------------------------------------------------------------------------- /simulation/src/topology-read/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [ 11 | ("Inet_small_toposample.txt", "True", "True"), 12 | ("RocketFuel_toposample_1239_weights.txt", "True", "True"), 13 | ] 14 | 15 | # A list of Python examples to run in order to ensure that they remain 16 | # runnable over time. Each tuple in the list contains 17 | # 18 | # (example_name, do_run). 19 | # 20 | # See test.py for more information. 21 | python_examples = [] 22 | -------------------------------------------------------------------------------- /simulation/src/wimax/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [ 11 | ("wimax-simple", "True", "True"), 12 | ("wimax-ipv4", "True", "True"), 13 | ("wimax-multicast", "True", "True"), 14 | ] 15 | 16 | # A list of Python examples to run in order to ensure that they remain 17 | # runnable over time. Each tuple in the list contains 18 | # 19 | # (example_name, do_run). 20 | # 21 | # See test.py for more information. 22 | python_examples = [] 23 | -------------------------------------------------------------------------------- /simulation/src/bridge/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [ 11 | ("csma-bridge", "True", "True"), 12 | ("csma-bridge-one-hop", "True", "True"), 13 | ] 14 | 15 | # A list of Python examples to run in order to ensure that they remain 16 | # runnable over time. Each tuple in the list contains 17 | # 18 | # (example_name, do_run). 19 | # 20 | # See test.py for more information. 21 | python_examples = [ 22 | ("csma-bridge.py", "True"), 23 | ] 24 | -------------------------------------------------------------------------------- /simulation/src/network/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [ 11 | ("main-packet-header", "True", "True"), 12 | ("main-packet-tag", "True", "True"), 13 | ("red-tests", "True", "True"), 14 | ] 15 | 16 | # A list of Python examples to run in order to ensure that they remain 17 | # runnable over time. Each tuple in the list contains 18 | # 19 | # (example_name, do_run). 20 | # 21 | # See test.py for more information. 22 | python_examples = [] 23 | -------------------------------------------------------------------------------- /simulation/src/core/model/type-name.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 2 | 3 | #ifndef TYPE_NAME_H 4 | #define TYPE_NAME_H 5 | 6 | #include 7 | #include 8 | 9 | namespace ns3 { 10 | 11 | template 12 | std::string TypeNameGet (void) 13 | { 14 | return "unknown"; 15 | } 16 | 17 | #define DEF_TYPE(x) \ 18 | template <> \ 19 | std::string TypeNameGet (void) 20 | 21 | DEF_TYPE (uint8_t); 22 | DEF_TYPE (uint16_t); 23 | DEF_TYPE (uint32_t); 24 | DEF_TYPE (uint64_t); 25 | DEF_TYPE (int8_t); 26 | DEF_TYPE (int16_t); 27 | DEF_TYPE (int32_t); 28 | DEF_TYPE (int64_t); 29 | DEF_TYPE (float); 30 | DEF_TYPE (double); 31 | 32 | #undef DEF_TYPE 33 | 34 | } // namespace ns3 35 | 36 | #endif /* TYPE_NAME_H */ 37 | -------------------------------------------------------------------------------- /simulation/src/mobility/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [ 11 | ("main-grid-topology", "True", "True"), 12 | ("main-random-topology", "True", "True"), 13 | ("main-random-walk", "True", "True"), 14 | ] 15 | 16 | # A list of Python examples to run in order to ensure that they remain 17 | # runnable over time. Each tuple in the list contains 18 | # 19 | # (example_name, do_run). 20 | # 21 | # See test.py for more information. 22 | python_examples = [] 23 | -------------------------------------------------------------------------------- /simulation/src/virtual-net-device/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ['bool', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 3 | ['bool', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 4 | ['bool', 'ns3::Ptr', 'ns3::Address const&', 'ns3::Address const&', 'unsigned short', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 5 | ['void', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 6 | ] 7 | -------------------------------------------------------------------------------- /simulation/src/lte/test/reference/generate_test_data_lte_spectrum_value_noise.m: -------------------------------------------------------------------------------- 1 | 2 | clear all; 3 | close all; 4 | 5 | 6 | earfcn = 500; 7 | 8 | noise_psd = 1.38e-23 * 290; 9 | 10 | for nrbs = [6 15] 11 | 12 | for noise_figure_dB = [0 5 10 ] 13 | 14 | name = ["nfdB" num2str(noise_figure_dB, "%d") "earfcn" num2str(earfcn,"%d") "nrb" num2str(nrbs, "%d")]; 15 | 16 | npsdv = ones (1,nrbs) * (noise_psd * 10.^(noise_figure_dB/10)); 17 | 18 | printf("SpectrumValue %s (LteSpectrumValueHelper::GetSpectrumModel (%d, %d));\n", 19 | name, earfcn, nrbs); 20 | 21 | print_C_vector (npsdv, name); 22 | printf("AddTestCase (new LteNoisePsdTestCase (\"%s\", %d, %d, %f, %s));\n\n", name, earfcn, nrbs, noise_figure_dB, name); 23 | 24 | endfor 25 | 26 | endfor 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /simulation/src/netanim/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [ 11 | ("dumbbell-animation", "True", "False"), 12 | ("star-animation", "True", "False"), 13 | ("grid-animation", "True", "False"), 14 | ("wireless-animation", "True", "False"), 15 | ] 16 | 17 | # A list of Python examples to run in order to ensure that they remain 18 | # runnable over time. Each tuple in the list contains 19 | # 20 | # (example_name, do_run). 21 | # 22 | # See test.py for more information. 23 | python_examples = [] 24 | -------------------------------------------------------------------------------- /simulation/src/lte/doc/source/rlc_buffer_status_report_downlink.seqdiag: -------------------------------------------------------------------------------- 1 | 2 | diagram { 3 | 4 | LtePdcp -> LteRlc [label="send SDU"] 5 | LteRlc -> LteMacSapProvider [label="ReportBufferStatus ()"] 6 | LteMacSapProvider -> LteEnbMac [label="DoReportBufferStatus ()"] 7 | LteEnbMac -> FfMacSchedSapProvider [label="SchedDlRlcBufferReq ()"] 8 | FfMacSchedSapProvider -> Scheduler [label="DoSchedDlRlcBufferReq ()"] 9 | FfMacSchedSapProvider <-- Scheduler 10 | LteEnbMac <-- FfMacSchedSapProvider 11 | LteMacSapProvider <-- LteEnbMac 12 | LteRlc <-- LteMacSapProvider 13 | LtePdcp <-- LteRlc 14 | } 15 | 16 | -------------------------------------------------------------------------------- /simulation/src/config-store/model/file-config.h: -------------------------------------------------------------------------------- 1 | #ifndef FILE_CONFIG_H 2 | #define FILE_CONFIG_H 3 | 4 | #include 5 | 6 | namespace ns3 { 7 | 8 | /** 9 | * \ingroup configstore 10 | * 11 | */ 12 | class FileConfig 13 | { 14 | public: 15 | virtual ~FileConfig (); 16 | virtual void SetFilename (std::string filename) = 0; 17 | virtual void Default (void) = 0; 18 | virtual void Global (void) = 0; 19 | virtual void Attributes (void) = 0; 20 | }; 21 | 22 | /** 23 | * \ingroup configstore 24 | * 25 | */ 26 | class NoneFileConfig : public FileConfig 27 | { 28 | public: 29 | NoneFileConfig (); 30 | virtual ~NoneFileConfig (); 31 | virtual void SetFilename (std::string filename); 32 | virtual void Default (void); 33 | virtual void Global (void); 34 | virtual void Attributes (void); 35 | }; 36 | 37 | } // namespace ns3 38 | 39 | #endif /* FILE_CONFIG_H */ 40 | -------------------------------------------------------------------------------- /simulation/src/spectrum/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [ 11 | ("adhoc-aloha-ideal-phy", "True", "True"), 12 | ("adhoc-aloha-ideal-phy-with-microwave-oven", "True", "True"), 13 | ("adhoc-aloha-ideal-phy-matrix-propagation-loss-model", "True", "True"), 14 | ] 15 | 16 | # A list of Python examples to run in order to ensure that they remain 17 | # runnable over time. Each tuple in the list contains 18 | # 19 | # (example_name, do_run). 20 | # 21 | # See test.py for more information. 22 | python_examples = [] 23 | -------------------------------------------------------------------------------- /simulation/src/csma/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | obj = bld.create_ns3_program('csma-one-subnet', ['csma', 'internet']) 5 | obj.source = 'csma-one-subnet.cc' 6 | 7 | obj = bld.create_ns3_program('csma-broadcast', ['csma', 'internet']) 8 | obj.source = 'csma-broadcast.cc' 9 | 10 | obj = bld.create_ns3_program('csma-packet-socket', ['csma', 'internet']) 11 | obj.source = 'csma-packet-socket.cc' 12 | 13 | obj = bld.create_ns3_program('csma-multicast', ['csma', 'internet']) 14 | obj.source = 'csma-multicast.cc' 15 | 16 | obj = bld.create_ns3_program('csma-raw-ip-socket', ['csma', 'internet']) 17 | obj.source = 'csma-raw-ip-socket.cc' 18 | 19 | obj = bld.create_ns3_program('csma-ping', ['csma', 'internet', 'applications']) 20 | obj.source = 'csma-ping.cc' 21 | -------------------------------------------------------------------------------- /simulation/src/olsr/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ['void', 'ns3::Ptr', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 3 | ['void', 'ns3::Ptr', 'unsigned int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 4 | ['void', 'ns3::Ptr', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 5 | ['bool', 'ns3::Ptr', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 6 | ['void', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 7 | ] 8 | -------------------------------------------------------------------------------- /simulation/src/visualizer/model/visualizer-ideas.txt: -------------------------------------------------------------------------------- 1 | - Add an Attribute browser plugin, simililar to Mathieu's GtkConfigStore; 2 | - Right click on a node -> Show Attributes; 3 | - Allow editing attributes too; 4 | - List of all nodes, navigator; 5 | - Represent individual NetDevices in Nodes; 6 | - Colorize flows; possible approaches: 7 | - Apply color based on hash function of ethertype, IP packet type, L4 destination port; 8 | - Programmatically marked flows; 9 | - Packet tags? 10 | - Present a GUI to show applications and set color for each one; 11 | - Problems: 12 | > How about multiple flows? How to represent them simultaneously? 13 | - Track down a Gtk+ bug preventing tooltips from working correctly with large zoom levels; 14 | - Possibly look for embedding an ipython shell as a widget inside the 15 | main window: http://ipython.scipy.org/moin/Cookbook/EmbeddingInGTK 16 | 17 | -------------------------------------------------------------------------------- /simulation/src/csma-layout/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ['void', 'ns3::Ptr', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 3 | ['void', 'ns3::Ptr', 'unsigned int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 4 | ['void', 'ns3::Ptr', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 5 | ['bool', 'ns3::Ptr', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 6 | ['void', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 7 | ] 8 | -------------------------------------------------------------------------------- /simulation/src/flow-monitor/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ['void', 'ns3::Ptr', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 3 | ['void', 'ns3::Ptr', 'unsigned int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 4 | ['void', 'ns3::Ptr', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 5 | ['bool', 'ns3::Ptr', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 6 | ['void', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 7 | ] 8 | -------------------------------------------------------------------------------- /simulation/src/visualizer/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ['void', 'ns3::Ptr', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 3 | ['void', 'ns3::Ptr', 'unsigned int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 4 | ['void', 'ns3::Ptr', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 5 | ['bool', 'ns3::Ptr', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 6 | ['void', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 7 | ] 8 | -------------------------------------------------------------------------------- /simulation/src/point-to-point-layout/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ['void', 'ns3::Ptr', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 3 | ['void', 'ns3::Ptr', 'unsigned int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 4 | ['void', 'ns3::Ptr', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 5 | ['bool', 'ns3::Ptr', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 6 | ['void', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 7 | ] 8 | -------------------------------------------------------------------------------- /simulation/src/tap-bridge/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [ 11 | ("tap-wifi-dumbbell", "False", "True"), # Requires manual configuration 12 | ] 13 | 14 | # A list of Python examples to run in order to ensure that they remain 15 | # runnable over time. Each tuple in the list contains 16 | # 17 | # (example_name, do_run). 18 | # 19 | # See test.py for more information. 20 | python_examples = [ 21 | ("tap-csma-virtual-machine.py", "False"), # requires enable-sudo 22 | ("tap-wifi-virtual-machine.py", "False"), # requires enable-sudo 23 | ] 24 | -------------------------------------------------------------------------------- /simulation/src/lte/AUTHORS: -------------------------------------------------------------------------------- 1 | 2 | The ns-3 LTE module is the result of the development effort carried out by different people/institutions/projects. The main contributors are listed below. 3 | 4 | ==================================================== 5 | Google Summer of Code (GSoC) (2010) 6 | ==================================================== 7 | 8 | Giuseppe Piro, TELEMATICS LAB, Politecnico di Bari 9 | design and development 10 | 11 | Nicola Baldo, CTTC 12 | Marco Miozzo, CTTC 13 | supervision and GSoC project mentorship 14 | 15 | 16 | ==================================================== 17 | LTE-EPC Network simulAtor (LENA) Project (2011-12) 18 | ==================================================== 19 | 20 | Nicola Baldo, CTTC 21 | Marco Miozzo, CTTC 22 | Manuel Requena, CTTC 23 | Jaume Nin, CTTC 24 | 25 | 26 | -------------------------------------------------------------------------------- /simulation/src/core/bindings/scan-header.h: -------------------------------------------------------------------------------- 1 | // -*- c++ -*- 2 | 3 | #include "ns3/core-module.h" 4 | 5 | using namespace ns3; 6 | 7 | namespace 8 | { 9 | 10 | static inline Ptr 11 | __dummy_function_to_force_template_instantiation (Ptr obj, TypeId typeId) 12 | { 13 | return obj->GetObject (typeId); 14 | } 15 | 16 | 17 | static inline void 18 | __dummy_function_to_force_template_instantiation_v2 () 19 | { 20 | Time t1 = Seconds (1), t2 = Seconds (2), t3 = Seconds (3); 21 | t1 = t2 + t3; 22 | t1 = t2 - t3; 23 | t1 < t2; 24 | t1 <= t2; 25 | t1 == t2; 26 | t1 != t2; 27 | t1 >= t2; 28 | t1 > t2; 29 | 30 | 31 | int64x64_t s1(2), s2(3), s3; 32 | s1 = s2 + s3; 33 | s1 = s2 - s3; 34 | s1 < s2; 35 | s1 <= s2; 36 | s1 == s2; 37 | s1 != s2; 38 | s1 >= s2; 39 | s1 > s2; 40 | 41 | 42 | 43 | 44 | s3 = t1*s1; 45 | s3 = t1/s1; 46 | s3 = s1*t1; 47 | s3 = t1/t2; 48 | } 49 | 50 | } 51 | 52 | -------------------------------------------------------------------------------- /simulation/src/csma/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [ 11 | ("csma-broadcast", "True", "True"), 12 | ("csma-multicast", "True", "True"), 13 | ("csma-one-subnet", "True", "True"), 14 | ("csma-packet-socket", "True", "True"), 15 | ("csma-ping", "True", "True"), 16 | ("csma-raw-ip-socket", "True", "True"), 17 | ] 18 | 19 | # A list of Python examples to run in order to ensure that they remain 20 | # runnable over time. Each tuple in the list contains 21 | # 22 | # (example_name, do_run). 23 | # 24 | # See test.py for more information. 25 | python_examples = [] 26 | -------------------------------------------------------------------------------- /simulation/src/tap-bridge/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ['bool', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 3 | ['bool', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 4 | ['void', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 5 | ['void', 'unsigned char*', 'long', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 6 | ['void', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 7 | ] 8 | -------------------------------------------------------------------------------- /simulation/src/netanim/wscript: -------------------------------------------------------------------------------- 1 | ## -*-Mode : python; py-indent-offset : 4; indent-tabs-mode : nil; coding : utf-8; -*- 2 | 3 | import wutils 4 | 5 | # Required NetAnim version 6 | NETANIM_RELEASE_NAME = "netanim-3.103" 7 | 8 | 9 | def build (bld) : 10 | module = bld.create_ns3_module ('netanim', ['internet', 'mobility', 'wimax', 'wifi', 'csma', 'lte', 'uan']) 11 | module.includes = '.' 12 | module.source = [ 13 | 'model/animation-interface.cc', 14 | 'helper/animation-interface-helper.cc', 15 | ] 16 | netanim_test = bld.create_ns3_module_test_library('netanim') 17 | netanim_test.source = [ 18 | 'test/netanim-test.cc', 19 | ] 20 | 21 | headers = bld(features='ns3header') 22 | headers.module = 'netanim' 23 | headers.source = [ 24 | 'model/animation-interface.h', 25 | 'helper/animation-interface-helper.h', 26 | ] 27 | 28 | if (bld.env['ENABLE_EXAMPLES']) : 29 | bld.recurse('examples') 30 | 31 | -------------------------------------------------------------------------------- /simulation/src/visualizer/model/dummy-file-for-static-builds.cc: -------------------------------------------------------------------------------- 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * Copyright 2011 University of Washington 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License version 2 as 7 | * published by the Free Software Foundation; 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | * 18 | * Author: Mitch Watrous (watrous@u.washington.edu) 19 | */ 20 | 21 | // This file does nothing. 22 | -------------------------------------------------------------------------------- /simulation/src/tools/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | 5 | module = bld.create_ns3_module('tools', ['network', 'stats']) 6 | module.source = [ 7 | 'model/event-garbage-collector.cc', 8 | 'model/gnuplot.cc', 9 | 'model/delay-jitter-estimation.cc', 10 | ] 11 | 12 | module_test = bld.create_ns3_module_test_library('tools') 13 | module_test.source = [ 14 | 'test/average-test-suite.cc', 15 | 'test/event-garbage-collector-test-suite.cc', 16 | ] 17 | 18 | headers = bld(features='ns3header') 19 | headers.module = 'tools' 20 | headers.source = [ 21 | 'model/average.h', 22 | 'model/event-garbage-collector.h', 23 | 'model/gnuplot.h', 24 | 'model/delay-jitter-estimation.h', 25 | ] 26 | 27 | if (bld.env['ENABLE_EXAMPLES']): 28 | bld.recurse('examples') 29 | 30 | bld.ns3_python_bindings() 31 | -------------------------------------------------------------------------------- /simulation/src/core/test/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [ 11 | ("main-attribute-value", "True", "True"), 12 | ("main-callback", "True", "True"), 13 | ("sample-simulator", "True", "True"), 14 | ("main-ptr", "True", "True"), 15 | ("main-random-variable", "True", "False"), 16 | ("sample-random-variable", "True", "True"), 17 | ] 18 | 19 | # A list of Python examples to run in order to ensure that they remain 20 | # runnable over time. Each tuple in the list contains 21 | # 22 | # (example_name, do_run). 23 | # 24 | # See test.py for more information. 25 | python_examples = [ 26 | ("sample-simulator.py", "True"), 27 | ] 28 | -------------------------------------------------------------------------------- /traffic_gen/README.md: -------------------------------------------------------------------------------- 1 | # Traffic Generator 2 | This folder includes the scripts for generating traffic. 3 | 4 | ## Usage 5 | 6 | `python traffic_gen.py -h` for help. 7 | 8 | Example: 9 | `python traffic_gen.py -c WebSearch_distribution.txt -n 320 -l 0.3 -b 100G -t 0.1` generates traffic according to the web search flow size distribution, for 320 hosts, at 30% network load with 100Gbps host bandwidth for 0.1 seconds. 10 | 11 | The generate traffic can be directly used by the simulation. 12 | 13 | ## Traffic format 14 | The first line is the number of flows. 15 | 16 | Each line after that is a flow: ` 3 ` 17 | 18 | ## Flow size distributions 19 | We provide 4 distributions. `WebSearch_distribution.txt` and `FbHdp_distribution.txt` are the ones used in the HPCC paper. `AliStorage2019.txt` are collected from Alibaba's production distributed storage system in 2019. `GoogleRPC2008.txt` are Google's RPC size distribution before 2008. 20 | -------------------------------------------------------------------------------- /simulation/examples/tutorial/examples-to-run.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 3 | 4 | # A list of C++ examples to run in order to ensure that they remain 5 | # buildable and runnable over time. Each tuple in the list contains 6 | # 7 | # (example_name, do_run, do_valgrind_run). 8 | # 9 | # See test.py for more information. 10 | cpp_examples = [ 11 | ("first", "True", "True"), 12 | ("hello-simulator", "True", "True"), 13 | ("second", "True", "True"), 14 | ("third", "True", "True"), 15 | ("fourth", "True", "True"), 16 | ("fifth", "True", "True"), 17 | ("sixth", "True", "True"), 18 | ("seventh", "True", "True"), 19 | ] 20 | 21 | # A list of Python examples to run in order to ensure that they remain 22 | # runnable over time. Each tuple in the list contains 23 | # 24 | # (example_name, do_run). 25 | # 26 | # See test.py for more information. 27 | python_examples = [ 28 | ("first.py", "True"), 29 | ] 30 | -------------------------------------------------------------------------------- /simulation/src/lte/test/reference/lte_link_budget.m: -------------------------------------------------------------------------------- 1 | clear all; 2 | close all; 3 | 4 | %% LTE from theory to practice 5 | %% Table 22.7 Reference sensitivity. 6 | 7 | f = 2160e6; % carrier freq Hz, EARFCN = 500 (downlink) 8 | nrbs = 25; % tx bandwdith configuration in number of RBs 9 | bw = nrbs * 180000; % bandwidth in Hz, note that this is smaller than 10 | % the nominal Channel Bandwdith, see TS 36.101 fig 5.6-1 11 | kT = -174; % noise PSD in dBm / Hz 12 | n = kT + 10*log10(bw); % noise power dBm 13 | p = 30; % tx power dBm 14 | txPsd = p - 10*log10(bw); % power / bandwidth in linear units 15 | nf = 9; % receiver noise figure in dB 16 | 17 | d = logspace (0,5,100); 18 | g = 10.*log10 (gain_freespace(d,f)); % propagation gain in dB 19 | 20 | snr = p + g - n - nf; % dB 21 | %%snr = txPsd + g - kT - nf ; % dB 22 | 23 | 24 | semilogx (d, snr, ";friis;"); 25 | xlabel ("distance (m)"); 26 | ylabel ("SNR (dB)"); 27 | title ("LTE link budget"); 28 | 29 | grid on; 30 | print ("lte_link_budget.png", "-dpng"); 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /simulation/examples/tutorial/hello-simulator.cc: -------------------------------------------------------------------------------- 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License version 2 as 5 | * published by the Free Software Foundation; 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software 14 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 15 | */ 16 | 17 | #include "ns3/core-module.h" 18 | 19 | NS_LOG_COMPONENT_DEFINE ("HelloSimulator"); 20 | 21 | using namespace ns3; 22 | 23 | int 24 | main (int argc, char *argv[]) 25 | { 26 | NS_LOG_UNCOND ("Hello Simulator"); 27 | } 28 | -------------------------------------------------------------------------------- /simulation/scratch/scratch-simulator.cc: -------------------------------------------------------------------------------- 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License version 2 as 5 | * published by the Free Software Foundation; 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software 14 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 15 | */ 16 | 17 | #include "ns3/core-module.h" 18 | 19 | NS_LOG_COMPONENT_DEFINE ("ScratchSimulator"); 20 | 21 | using namespace ns3; 22 | 23 | int 24 | main (int argc, char *argv[]) 25 | { 26 | NS_LOG_UNCOND ("Scratch Simulator"); 27 | } 28 | -------------------------------------------------------------------------------- /simulation/scratch/subdir/scratch-simulator-subdir.cc: -------------------------------------------------------------------------------- 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License version 2 as 5 | * published by the Free Software Foundation; 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software 14 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 15 | */ 16 | 17 | #include "ns3/core-module.h" 18 | 19 | NS_LOG_COMPONENT_DEFINE ("ScratchSimulator"); 20 | 21 | using namespace ns3; 22 | 23 | int 24 | main (int argc, char *argv[]) 25 | { 26 | NS_LOG_UNCOND ("Scratch Simulator"); 27 | } 28 | -------------------------------------------------------------------------------- /simulation/src/tap-bridge/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | env = bld.env 5 | if env['ENABLE_TAP']: 6 | obj = bld.create_ns3_program('tap-csma', ['csma', 'tap-bridge', 'internet', 'wifi']) 7 | obj.source = 'tap-csma.cc' 8 | obj = bld.create_ns3_program('tap-csma-virtual-machine', ['csma', 'tap-bridge', 'internet']) 9 | obj.source = 'tap-csma-virtual-machine.cc' 10 | bld.register_ns3_script('tap-csma-virtual-machine.py', ['csma', 'tap-bridge', 'internet']) 11 | obj = bld.create_ns3_program('tap-wifi-virtual-machine', ['csma', 'tap-bridge', 'internet', 'wifi', 'mobility']) 12 | obj.source = 'tap-wifi-virtual-machine.cc' 13 | bld.register_ns3_script('tap-wifi-virtual-machine.py', ['csma', 'tap-bridge', 'internet', 'wifi', 'mobility']) 14 | obj = bld.create_ns3_program('tap-wifi-dumbbell', ['wifi', 'csma', 'point-to-point', 'tap-bridge', 'internet']) 15 | obj.source = 'tap-wifi-dumbbell.cc' 16 | -------------------------------------------------------------------------------- /simulation/utils/test-runner.cc: -------------------------------------------------------------------------------- 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * Copyright (c) 2009 University of Washington 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License version 2 as 7 | * published by the Free Software Foundation; 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #include "ns3/test.h" 20 | #include "ns3/nstime.h" 21 | 22 | int main (int argc, char *argv[]) 23 | { 24 | ns3::Time::ClearMarkedTimes(); 25 | return ns3::TestRunner::Run (argc, argv); 26 | } 27 | -------------------------------------------------------------------------------- /simulation/src/dsdv/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | module = bld.create_ns3_module('dsdv', ['internet', 'wifi', 'mesh', 'applications']) 5 | module.includes = '.' 6 | module.source = [ 7 | 'model/dsdv-rtable.cc', 8 | 'model/dsdv-packet-queue.cc', 9 | 'model/dsdv-packet.cc', 10 | 'model/dsdv-routing-protocol.cc', 11 | 'helper/dsdv-helper.cc', 12 | ] 13 | 14 | module_test = bld.create_ns3_module_test_library('dsdv') 15 | module_test.source = [ 16 | 'test/dsdv-testcase.cc', 17 | ] 18 | 19 | headers = bld(features='ns3header') 20 | headers.module = 'dsdv' 21 | headers.source = [ 22 | 'model/dsdv-rtable.h', 23 | 'model/dsdv-packet-queue.h', 24 | 'model/dsdv-packet.h', 25 | 'model/dsdv-routing-protocol.h', 26 | 'helper/dsdv-helper.h', 27 | ] 28 | if (bld.env['ENABLE_EXAMPLES']): 29 | bld.recurse('examples') 30 | 31 | bld.ns3_python_bindings() 32 | -------------------------------------------------------------------------------- /simulation/src/lte/test/reference/lte_pathloss.m: -------------------------------------------------------------------------------- 1 | clear all; 2 | close all; 3 | 4 | %% LTE pathloss model 5 | 6 | %% ITU1411, COST231, OH, etc. scripts are in the propagation module 7 | addpath ("../../../propagation/test/reference/"); 8 | 9 | %% ITU1238 script is in the buildings module 10 | addpath ("../../../buildings/test/reference/"); 11 | 12 | 13 | d = 104.12; 14 | fmhz = 2130; 15 | f = 2130e6; 16 | hb = 30; 17 | hm = 1; 18 | hr = 20; 19 | l = 80; 20 | b = 50; 21 | st_w = 20; 22 | phi = 45; 23 | big = 1; % metropolitan centre 24 | g = loss_ITU1411_LOS (d, hb, hm, f); 25 | printf ("Test #11: the value of ITU1411 in LOS is: %f\n", g); 26 | 27 | d = d = 500.84; 28 | g = loss_ITU1411_NLOS_over_rooftop (d, hb, hm, hr, f, l, b, st_w, phi, big); 29 | printf ("Test #10: the value of ITU1411 in NLOS over the roof-top is: %f\n", g); 30 | 31 | 32 | d = 1.50028; % km 33 | g = loss_COST231_large_cities_urban (d, hb, hm, fmhz); 34 | printf ("Test #11: the value of COST231 for large cities is: %f\n", g); 35 | 36 | 37 | %%snr = txPsd + g - kT - nf ; % dB 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /simulation/src/topology-read/doc/topology.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \defgroup topology Topology Input Readers 3 | * 4 | * \section topologyOverview Topology Input Readers Overview 5 | * 6 | * The topology modules aim at reading a topology file generated by an automatic topology generator. 7 | * 8 | * The process is divided in two steps: 9 | * - running a topology generator to build a topology file 10 | * - reading the topology file and build a ns-3 simulation 11 | * 12 | * Hence, model is focused on being able to read correctly the various topology formats. 13 | * 14 | * Currently there are three models: 15 | * - ns3::OrbisTopologyReader for Orbis 0.7 traces (http://sysnet.ucsd.edu/~pmahadevan/topo_research/topo.html) 16 | * - ns3::InetTopologyReader for Inet 3.0 traces (http://topology.eecs.umich.edu/inet/) 17 | * - ns3::RocketfuelTopologyReader for Rocketfuel traces (http://www.cs.washington.edu/research/networking/rocketfuel/) 18 | * 19 | * See the ns-3 modules manual for further informations. 20 | * 21 | * Examples can be found in the directory src/topology-read/examples/ 22 | */ 23 | -------------------------------------------------------------------------------- /simulation/src/network/doc/network.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License version 2 as 5 | * published by the Free Software Foundation; 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software 14 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 15 | * 16 | */ 17 | 18 | #ifndef NETWORK_H 19 | #define NETWORK_H 20 | 21 | /** 22 | * \defgroup network Network 23 | * 24 | * This section documents the API of the ns-3 network module. For a generic functional description, please refer to the ns-3 manual. 25 | */ 26 | 27 | #endif /* NETWORK_H */ 28 | -------------------------------------------------------------------------------- /simulation/src/internet/doc/internet.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License version 2 as 5 | * published by the Free Software Foundation; 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software 14 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 15 | * 16 | */ 17 | 18 | #ifndef INTERNET_H 19 | #define INTERNET_H 20 | 21 | /** 22 | * \defgroup internet Internet 23 | * 24 | * This section documents the API of the ns-3 internet module. For a generic functional description, please refer to the ns-3 manual. 25 | */ 26 | 27 | #endif /* INTERNET_H */ 28 | -------------------------------------------------------------------------------- /simulation/src/wimax/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ['void', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 3 | ['void', 'ns3::Ptr', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 4 | ['void', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 5 | ['bool', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 6 | ['bool', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 7 | ['void', 'bool', 'unsigned long long', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 8 | ] 9 | -------------------------------------------------------------------------------- /simulation/src/click/examples/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | obj = bld.create_ns3_program('nsclick-simple-lan', 5 | ['click', 'csma', 'internet', 'applications']) 6 | obj.source = 'nsclick-simple-lan.cc' 7 | 8 | obj = bld.create_ns3_program('nsclick-raw-wlan', 9 | ['click', 'wifi', 'internet', 'applications']) 10 | obj.source = 'nsclick-raw-wlan.cc' 11 | 12 | obj = bld.create_ns3_program('nsclick-udp-client-server-csma', 13 | ['click', 'csma', 'internet', 'applications']) 14 | obj.source = 'nsclick-udp-client-server-csma.cc' 15 | 16 | obj = bld.create_ns3_program('nsclick-udp-client-server-wifi', 17 | ['click', 'wifi', 'internet', 'applications']) 18 | obj.source = 'nsclick-udp-client-server-wifi.cc' 19 | 20 | obj = bld.create_ns3_program('nsclick-routing', 21 | ['click', 'csma', 'internet', 'applications']) 22 | obj.source = 'nsclick-routing.cc' 23 | 24 | -------------------------------------------------------------------------------- /simulation/src/config-store/model/xml-config.h: -------------------------------------------------------------------------------- 1 | #ifndef XML_CONFIG_STORE_H 2 | #define XML_CONFIG_STORE_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include "file-config.h" 8 | 9 | namespace ns3 { 10 | 11 | /** 12 | * \ingroup configstore 13 | * 14 | */ 15 | class XmlConfigSave : public FileConfig 16 | { 17 | public: 18 | XmlConfigSave (); 19 | virtual ~XmlConfigSave (); 20 | 21 | virtual void SetFilename (std::string filename); 22 | virtual void Default (void); 23 | virtual void Global (void); 24 | virtual void Attributes (void); 25 | private: 26 | xmlTextWriterPtr m_writer; 27 | }; 28 | 29 | /** 30 | * \ingroup configstore 31 | * 32 | */ 33 | class XmlConfigLoad : public FileConfig 34 | { 35 | public: 36 | XmlConfigLoad (); 37 | virtual ~XmlConfigLoad (); 38 | 39 | virtual void SetFilename (std::string filename); 40 | virtual void Default (void); 41 | virtual void Global (void); 42 | virtual void Attributes (void); 43 | private: 44 | std::string m_filename; 45 | }; 46 | 47 | } // namespace ns3 48 | 49 | #endif /* XML_CONFIG_STORE_H */ 50 | -------------------------------------------------------------------------------- /simulation/src/lte/doc/source/rlc_buffer_status_report_uplink.seqdiag: -------------------------------------------------------------------------------- 1 | 2 | diagram { 3 | 4 | LtePdcp -> LteRlc [label="send SDU"] 5 | LteRlc -> LteMacSapProvider [label="ReportBufferStatus ()"] 6 | LteMacSapProvider -> LteUeMac [label="DoReportBufferStatus ()"] 7 | LteUeMac -->> LteEnbMac [label="send ideal CTRL message"] 8 | LteMacSapProvider <-- LteUeMac 9 | LteRlc <-- LteMacSapProvider 10 | LtePdcp <-- LteRlc 11 | LteEnbMac -> FfMacSchedSapProvider [label="SchedUlMacCtrlInfoReq ()"] 12 | FfMacSchedSapProvider -> Scheduler [label="DoSchedUlMacCtrlInfoReq ()"] 13 | FfMacSchedSapProvider <-- Scheduler 14 | LteEnbMac <-- FfMacSchedSapProvider 15 | } 16 | 17 | 18 | -------------------------------------------------------------------------------- /simulation/src/config-store/model/raw-text-config.h: -------------------------------------------------------------------------------- 1 | #ifndef RAW_TEXT_CONFIG_H 2 | #define RAW_TEXT_CONFIG_H 3 | 4 | #include 5 | #include 6 | #include "file-config.h" 7 | 8 | namespace ns3 { 9 | 10 | /** 11 | * \ingroup configstore 12 | * 13 | */ 14 | class RawTextConfigSave : public FileConfig 15 | { 16 | public: 17 | RawTextConfigSave (); 18 | virtual ~RawTextConfigSave (); 19 | virtual void SetFilename (std::string filename); 20 | virtual void Default (void); 21 | virtual void Global (void); 22 | virtual void Attributes (void); 23 | private: 24 | std::ofstream *m_os; 25 | }; 26 | 27 | /** 28 | * \ingroup configstore 29 | * 30 | */ 31 | class RawTextConfigLoad : public FileConfig 32 | { 33 | public: 34 | RawTextConfigLoad (); 35 | virtual ~RawTextConfigLoad (); 36 | virtual void SetFilename (std::string filename); 37 | virtual void Default (void); 38 | virtual void Global (void); 39 | virtual void Attributes (void); 40 | private: 41 | std::string Strip (std::string value); 42 | std::ifstream *m_is; 43 | }; 44 | 45 | } // namespace ns3 46 | 47 | #endif /* RAW_TEXT_CONFIG_H */ 48 | -------------------------------------------------------------------------------- /simulation/src/topology-read/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | obj = bld.create_ns3_module('topology-read', ['network']) 5 | obj.source = [ 6 | 'model/topology-reader.cc', 7 | 'model/inet-topology-reader.cc', 8 | 'model/orbis-topology-reader.cc', 9 | 'model/rocketfuel-topology-reader.cc', 10 | 'helper/topology-reader-helper.cc', 11 | ] 12 | 13 | module_test = bld.create_ns3_module_test_library('topology-read') 14 | module_test.source = [ 15 | 'test/rocketfuel-topology-reader-test-suite.cc', 16 | ] 17 | 18 | headers = bld(features='ns3header') 19 | headers.module = 'topology-read' 20 | headers.source = [ 21 | 'model/topology-reader.h', 22 | 'model/inet-topology-reader.h', 23 | 'model/orbis-topology-reader.h', 24 | 'model/rocketfuel-topology-reader.h', 25 | 'helper/topology-reader-helper.h', 26 | ] 27 | 28 | if bld.env['ENABLE_EXAMPLES']: 29 | bld.recurse('examples') 30 | 31 | bld.ns3_python_bindings() 32 | -------------------------------------------------------------------------------- /simulation/src/applications/doc/applications.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License version 2 as 5 | * published by the Free Software Foundation; 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software 14 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 15 | * 16 | */ 17 | 18 | #ifndef APPLICATIONS_H 19 | #define APPLICATIONS_H 20 | 21 | /** 22 | * \defgroup applications Applications 23 | * 24 | * This section documents the API of the ns-3 applications module. For a generic functional description, please refer to the ns-3 manual. 25 | */ 26 | 27 | #endif /* APPLICATIONS_H */ 28 | -------------------------------------------------------------------------------- /simulation/src/antenna/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | 5 | module = bld.create_ns3_module('antenna', ['core']) 6 | 7 | module.source = [ 8 | 'model/angles.cc', 9 | 'model/antenna-model.cc', 10 | 'model/isotropic-antenna-model.cc', 11 | 'model/cosine-antenna-model.cc', 12 | 'model/parabolic-antenna-model.cc', 13 | ] 14 | 15 | module_test = bld.create_ns3_module_test_library('antenna') 16 | module_test.source = [ 17 | 'test/test-angles.cc', 18 | 'test/test-degrees-radians.cc', 19 | 'test/test-isotropic-antenna.cc', 20 | 'test/test-cosine-antenna.cc', 21 | 'test/test-parabolic-antenna.cc', 22 | ] 23 | 24 | headers = bld(features='ns3header') 25 | headers.module = 'antenna' 26 | headers.source = [ 27 | 'model/angles.h', 28 | 'model/antenna-model.h', 29 | 'model/isotropic-antenna-model.h', 30 | 'model/cosine-antenna-model.h', 31 | 'model/parabolic-antenna-model.h', 32 | ] 33 | 34 | bld.ns3_python_bindings() 35 | -------------------------------------------------------------------------------- /analysis/trace_reader.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include "trace-format.h" 6 | #include "trace_filter.hpp" 7 | #include "utils.hpp" 8 | #include "sim-setting.h" 9 | 10 | using namespace ns3; 11 | using namespace std; 12 | 13 | int main(int argc, char** argv){ 14 | if (argc != 2 && argc != 3){ 15 | printf("Usage: ./trace_reader [filter_expr]\n"); 16 | return 0; 17 | } 18 | FILE* file = fopen(argv[1], "r"); 19 | TraceFilter f; 20 | if (argc == 3){ 21 | f.parse(argv[2]); 22 | if (f.root == NULL){ 23 | printf("Invalid filter\n"); 24 | return 0; 25 | } 26 | } 27 | //printf("filter: %s\n", f.str().c_str()); 28 | 29 | // first read SimSetting 30 | SimSetting sim_setting; 31 | sim_setting.Deserialize(file); 32 | #if 0 33 | // print sim_setting 34 | for (auto i : sim_setting.port_speed) 35 | for (auto j : i.second) 36 | printf("%u,%u:%lu\n", i.first, j.first, j.second); 37 | #endif 38 | 39 | // read trace 40 | TraceFormat tr; 41 | while (tr.Deserialize(file) > 0){ 42 | if (!f.test(tr)) 43 | continue; 44 | print_trace(tr); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /simulation/src/wimax/model/bvec.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * Copyright (c) 2007,2008, 2009 INRIA, UDcast 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License version 2 as 7 | * published by the Free Software Foundation; 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | * 18 | * Author: Mohamed Amine Ismail 19 | * 20 | */ 21 | 22 | #ifndef BVEC_H 23 | #define BVEC_H 24 | 25 | #include 26 | 27 | namespace ns3 { 28 | typedef std::vector bvec; 29 | } 30 | 31 | #endif /* BVEC_H */ 32 | -------------------------------------------------------------------------------- /simulation/src/lte/model/lte-rlc-sap.cc: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License version 2 as 7 | * published by the Free Software Foundation; 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | * 18 | * Author: Manuel Requena 19 | */ 20 | 21 | #include "ns3/lte-rlc-sap.h" 22 | 23 | namespace ns3 { 24 | 25 | LteRlcSapProvider::~LteRlcSapProvider () 26 | { 27 | } 28 | 29 | LteRlcSapUser::~LteRlcSapUser () 30 | { 31 | } 32 | 33 | } // namespace ns3 34 | -------------------------------------------------------------------------------- /simulation/src/lte/model/lte-pdcp-sap.cc: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License version 2 as 7 | * published by the Free Software Foundation; 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | * 18 | * Author: Manuel Requena 19 | */ 20 | 21 | #include "ns3/lte-pdcp-sap.h" 22 | 23 | namespace ns3 { 24 | 25 | LtePdcpSapProvider::~LtePdcpSapProvider () 26 | { 27 | } 28 | 29 | LtePdcpSapUser::~LtePdcpSapUser () 30 | { 31 | } 32 | 33 | } // namespace ns3 34 | -------------------------------------------------------------------------------- /simulation/src/lte/model/ff-mac-csched-sap.cc: -------------------------------------------------------------------------------- 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License version 2 as 7 | * published by the Free Software Foundation; 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | * 18 | * Author: Manuel Requena 19 | */ 20 | 21 | #include "ff-mac-csched-sap.h" 22 | 23 | namespace ns3 { 24 | 25 | FfMacCschedSapProvider::~FfMacCschedSapProvider () 26 | { 27 | } 28 | 29 | FfMacCschedSapUser::~FfMacCschedSapUser () 30 | { 31 | } 32 | 33 | } // namespace ns3 34 | -------------------------------------------------------------------------------- /simulation/src/lte/model/ff-mac-sched-sap.cc: -------------------------------------------------------------------------------- 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License version 2 as 7 | * published by the Free Software Foundation; 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | * 18 | * Author: Manuel Requena 19 | */ 20 | 21 | #include "ff-mac-sched-sap.h" 22 | 23 | namespace ns3 { 24 | 25 | 26 | FfMacSchedSapProvider::~FfMacSchedSapProvider () 27 | { 28 | } 29 | 30 | FfMacSchedSapUser::~FfMacSchedSapUser () 31 | { 32 | } 33 | 34 | } // namespace ns3 35 | -------------------------------------------------------------------------------- /simulation/src/lte/model/lte-ue-cmac-sap.cc: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License version 2 as 7 | * published by the Free Software Foundation; 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | * 18 | * Author: Marco Miozzo 19 | */ 20 | 21 | 22 | #include "lte-ue-cmac-sap.h" 23 | 24 | 25 | namespace ns3 { 26 | 27 | 28 | LteUeCmacSapProvider::~LteUeCmacSapProvider () 29 | { 30 | } 31 | 32 | LteUeCmacSapUser::~LteUeCmacSapUser () 33 | { 34 | } 35 | 36 | } // namespace ns3 37 | -------------------------------------------------------------------------------- /simulation/src/uan/bindings/callbacks_list.py: -------------------------------------------------------------------------------- 1 | callback_classes = [ 2 | ['void', 'int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 3 | ['void', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 4 | ['void', 'ns3::Ptr', 'double', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 5 | ['void', 'ns3::Ptr', 'double', 'ns3::UanTxMode', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 6 | ['void', 'ns3::Ptr', 'ns3::UanAddress const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 7 | ['bool', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 8 | ['void', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], 9 | ] 10 | -------------------------------------------------------------------------------- /simulation/src/lte/model/lte-mac-sap.cc: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License version 2 as 7 | * published by the Free Software Foundation; 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | * 18 | * Author: Nicola Baldo 19 | */ 20 | 21 | 22 | #include "ns3/lte-mac-sap.h" 23 | 24 | 25 | namespace ns3 { 26 | 27 | 28 | LteMacSapProvider::~LteMacSapProvider () 29 | { 30 | } 31 | 32 | LteMacSapUser::~LteMacSapUser () 33 | { 34 | } 35 | 36 | 37 | 38 | 39 | } // namespace ns3 40 | -------------------------------------------------------------------------------- /simulation/src/network/model/tag.cc: -------------------------------------------------------------------------------- 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * Copyright (c) 2008 INRIA 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License version 2 as 7 | * published by the Free Software Foundation; 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | * 18 | * Author: Mathieu Lacage 19 | */ 20 | #include "tag.h" 21 | 22 | namespace ns3 { 23 | 24 | NS_OBJECT_ENSURE_REGISTERED (Tag); 25 | 26 | TypeId 27 | Tag::GetTypeId (void) 28 | { 29 | static TypeId tid = TypeId ("ns3::Tag") 30 | .SetParent () 31 | ; 32 | return tid; 33 | } 34 | 35 | 36 | } // namespace ns3 37 | -------------------------------------------------------------------------------- /simulation/src/lte/model/lte-enb-cmac-sap.cc: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License version 2 as 7 | * published by the Free Software Foundation; 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | * 18 | * Author: Marco Miozzo 19 | */ 20 | 21 | 22 | #include "lte-enb-cmac-sap.h" 23 | 24 | 25 | namespace ns3 { 26 | 27 | 28 | LteEnbCmacSapProvider::~LteEnbCmacSapProvider () 29 | { 30 | } 31 | 32 | LteEnbCmacSapUser::~LteEnbCmacSapUser () 33 | { 34 | } 35 | 36 | } // namespace ns3 37 | -------------------------------------------------------------------------------- /simulation/src/uan/model/uan-mac.cc: -------------------------------------------------------------------------------- 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * Copyright (c) 2011 University of Washington 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License version 2 as 7 | * published by the Free Software Foundation; 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | * 18 | * Author: Mitch Watrous 19 | */ 20 | 21 | #include "uan-mac.h" 22 | 23 | namespace ns3 { 24 | 25 | NS_OBJECT_ENSURE_REGISTERED (UanMac); 26 | 27 | TypeId UanMac::GetTypeId (void) 28 | { 29 | static TypeId tid = TypeId ("ns3::UanMac") 30 | .SetParent (); 31 | return tid; 32 | } 33 | 34 | } // namespace ns3 35 | -------------------------------------------------------------------------------- /simulation/src/lte/model/lte-ue-phy-sap.cc: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License version 2 as 7 | * published by the Free Software Foundation; 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | * 18 | * Author: Marco Miozzo 19 | */ 20 | 21 | 22 | #include "lte-ue-phy-sap.h" 23 | 24 | 25 | namespace ns3 { 26 | 27 | 28 | LteUePhySapProvider::~LteUePhySapProvider () 29 | { 30 | } 31 | 32 | 33 | LteUePhySapUser::~LteUePhySapUser () 34 | { 35 | } 36 | 37 | 38 | } // namespace ns3 39 | -------------------------------------------------------------------------------- /simulation/src/lte/model/lte-enb-phy-sap.cc: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License version 2 as 7 | * published by the Free Software Foundation; 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | * 18 | * Author: Marco Miozzo 19 | */ 20 | 21 | 22 | #include "lte-enb-phy-sap.h" 23 | 24 | 25 | namespace ns3 { 26 | 27 | 28 | LteEnbPhySapProvider::~LteEnbPhySapProvider () 29 | { 30 | } 31 | 32 | 33 | LteEnbPhySapUser::~LteEnbPhySapUser () 34 | { 35 | } 36 | 37 | 38 | } // namespace ns3 39 | -------------------------------------------------------------------------------- /simulation/src/emu/model/emu-encode-decode.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * Copyright (c) 2008 University of Washington 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License version 2 as 7 | * published by the Free Software Foundation; 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #ifndef EMU_ENCODE_DECODE_H 20 | #define EMU_ENCODE_DECODE_H 21 | 22 | #include 23 | 24 | namespace ns3 { 25 | 26 | std::string EmuBufferToString (uint8_t *buffer, uint32_t len); 27 | bool EmuStringToBuffer (std::string s, uint8_t *buffer, uint32_t *len); 28 | 29 | 30 | } // namespace ns3 31 | 32 | #endif /* EMU_ENCODE_DECODE_H */ 33 | 34 | -------------------------------------------------------------------------------- /simulation/src/point-to-point/model/rdma-driver.h: -------------------------------------------------------------------------------- 1 | #ifndef RDMA_DRIVER_H 2 | #define RDMA_DRIVER_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | namespace ns3 { 13 | 14 | class RdmaDriver : public Object { 15 | public: 16 | Ptr m_node; 17 | Ptr m_rdma; 18 | 19 | // trace 20 | TracedCallback > m_traceQpComplete; 21 | 22 | static TypeId GetTypeId (void); 23 | RdmaDriver(); 24 | 25 | // This function init the m_nic according to the NetDevice 26 | // So this must be called after all NICs are installed 27 | void Init(void); 28 | 29 | // Set Node 30 | void SetNode(Ptr node); 31 | 32 | // Set RdmaHw 33 | void SetRdmaHw(Ptr rdma); 34 | 35 | // add a queue pair 36 | void AddQueuePair(uint64_t size, uint16_t pg, Ipv4Address _sip, Ipv4Address _dip, uint16_t _sport, uint16_t _dport, uint32_t win, uint64_t baseRtt, Callback notifyAppFinish); 37 | 38 | // callback when qp completes 39 | void QpComplete(Ptr q); 40 | }; 41 | 42 | } // namespace ns3 43 | 44 | #endif /* RDMA_DRIVER_H */ 45 | -------------------------------------------------------------------------------- /simulation/src/core/model/trace-source-accessor.cc: -------------------------------------------------------------------------------- 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * Copyright (c) 2008 INRIA 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License version 2 as 7 | * published by the Free Software Foundation; 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | * 18 | * Authors: Mathieu Lacage 19 | */ 20 | #include "trace-source-accessor.h" 21 | #include "log.h" 22 | 23 | NS_LOG_COMPONENT_DEFINE ("TraceSourceAccessor"); 24 | 25 | namespace ns3 { 26 | 27 | TraceSourceAccessor::TraceSourceAccessor () 28 | { 29 | } 30 | TraceSourceAccessor::~TraceSourceAccessor () 31 | { 32 | } 33 | 34 | } // namespace ns3 35 | -------------------------------------------------------------------------------- /simulation/src/tap-bridge/model/tap-encode-decode.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * Copyright (c) 2009 University of Washington 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License version 2 as 7 | * published by the Free Software Foundation; 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #ifndef TAP_ENCODE_DECODE_H 20 | #define TAP_ENCODE_DECODE_H 21 | 22 | #include 23 | 24 | namespace ns3 { 25 | 26 | std::string TapBufferToString (uint8_t *buffer, uint32_t len); 27 | bool TapStringToBuffer (std::string s, uint8_t *buffer, uint32_t *len); 28 | 29 | 30 | } // namespace ns3 31 | 32 | #endif /* TAP_ENCODE_DECODE_H */ 33 | 34 | -------------------------------------------------------------------------------- /simulation/src/flow-monitor/wscript: -------------------------------------------------------------------------------- 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- 2 | 3 | def build(bld): 4 | obj = bld.create_ns3_module('flow-monitor', ['internet', 'config-store', 'tools']) 5 | obj.source = ["model/%s" % s for s in [ 6 | 'flow-monitor.cc', 7 | 'flow-classifier.cc', 8 | 'flow-probe.cc', 9 | 'ipv4-flow-classifier.cc', 10 | 'ipv4-flow-probe.cc', 11 | 'histogram.cc', 12 | ]] 13 | obj.source.append("helper/flow-monitor-helper.cc") 14 | 15 | module_test = bld.create_ns3_module_test_library('flow-monitor') 16 | module_test.source = [ 17 | 'test/histogram-test-suite.cc', 18 | ] 19 | 20 | headers = bld(features='ns3header') 21 | headers.module = 'flow-monitor' 22 | headers.source = ["model/%s" % s for s in [ 23 | 'flow-monitor.h', 24 | 'flow-probe.h', 25 | 'flow-classifier.h', 26 | 'ipv4-flow-classifier.h', 27 | 'ipv4-flow-probe.h', 28 | 'histogram.h', 29 | ]] 30 | headers.source.append("helper/flow-monitor-helper.h") 31 | 32 | if bld.env['ENABLE_EXAMPLES']: 33 | bld.recurse('examples') 34 | 35 | bld.ns3_python_bindings() 36 | -------------------------------------------------------------------------------- /simulation/src/lte/model/lte-rlc-sequence-number.cc: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * Copyright (c) 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License version 2 as 7 | * published by the Free Software Foundation; 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | * 18 | * Author: Manuel Requena 19 | */ 20 | 21 | #include "ns3/lte-rlc-sequence-number.h" 22 | 23 | namespace ns3 { 24 | 25 | 26 | std::ostream & 27 | operator<< (std::ostream& os, const SequenceNumber10 &val) 28 | { 29 | os << val.m_value; 30 | return os; 31 | } 32 | 33 | 34 | } // namespace ns3 35 | -------------------------------------------------------------------------------- /simulation/src/spectrum/model/spectrum-model-300kHz-300GHz-log.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * Copyright (c) 2009 CTTC 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License version 2 as 7 | * published by the Free Software Foundation; 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | * 18 | * Author: Nicola Baldo 19 | */ 20 | 21 | #ifndef FREQS_300KHZ_300GHZ_LOG_H 22 | #define FREQS_300KHZ_300GHZ_LOG_H 23 | 24 | 25 | #include 26 | 27 | namespace ns3 { 28 | 29 | 30 | extern Ptr SpectrumModel300Khz300GhzLog; 31 | 32 | 33 | } 34 | 35 | 36 | 37 | 38 | #endif /* FREQS_300KHZ_300GHZ_LOG_H */ 39 | -------------------------------------------------------------------------------- /simulation/src/network/utils/sgi-hashmap.h: -------------------------------------------------------------------------------- 1 | /* This code snippet was ripped out of the gcc 2 | * documentation and slightly modified to work 3 | * with gcc 4.x 4 | */ 5 | #ifndef SGI_HASHMAP_H 6 | #define SGI_HASHMAP_H 7 | 8 | /* To use gcc extensions. 9 | */ 10 | #ifdef __GNUC__ 11 | #if __GNUC__ < 3 12 | #include 13 | namespace sgi { using ::hash_map; }; // inherit globals 14 | #else 15 | #if __GNUC__ < 4 16 | #include 17 | #if __GNUC_MINOR__ == 0 18 | namespace sgi = std; // GCC 3.0 19 | #else 20 | namespace sgi = ::__gnu_cxx; // GCC 3.1 and later 21 | #endif 22 | #else // gcc 4.x and later 23 | #if __GNUC_MINOR__ < 3 24 | #include 25 | namespace sgi = ::__gnu_cxx; 26 | #else 27 | #undef __DEPRECATED 28 | #include 29 | namespace sgi = ::__gnu_cxx; 30 | #endif 31 | #endif 32 | #endif 33 | #else // ... there are other compilers, right? 34 | #ifndef WIN32 35 | namespace sgi = std; 36 | #else 37 | #define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS 38 | #include 39 | namespace sgi = stdext; 40 | 41 | #endif 42 | #endif 43 | 44 | 45 | #endif /* SGI_HASHMAP_H */ 46 | -------------------------------------------------------------------------------- /simulation/src/spectrum/model/spectrum-model-ism2400MHz-res1MHz.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * Copyright (c) 2009 CTTC 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License version 2 as 7 | * published by the Free Software Foundation; 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | * 18 | * Author: Nicola Baldo 19 | */ 20 | 21 | #ifndef FREQS_ISM2400MHZ_RES1MHZ_H 22 | #define FREQS_ISM2400MHZ_RES1MHZ_H 23 | 24 | 25 | #include 26 | 27 | namespace ns3 { 28 | 29 | 30 | extern Ptr SpectrumModelIsm2400MhzRes1Mhz; 31 | 32 | 33 | } 34 | 35 | 36 | 37 | 38 | 39 | #endif /* FREQS_ISM2400MHZ_RES1MHZ_H */ 40 | -------------------------------------------------------------------------------- /simulation/src/uan/model/uan-transducer.cc: -------------------------------------------------------------------------------- 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 2 | /* 3 | * Copyright (c) 2011 University of Washington 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License version 2 as 7 | * published by the Free Software Foundation; 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | * 18 | * Author: Mitch Watrous 19 | */ 20 | 21 | #include "uan-transducer.h" 22 | 23 | namespace ns3 { 24 | 25 | NS_OBJECT_ENSURE_REGISTERED (UanTransducer); 26 | 27 | TypeId UanTransducer::GetTypeId (void) 28 | { 29 | static TypeId tid = TypeId ("ns3::UanTransducer") 30 | .SetParent (); 31 | return tid; 32 | } 33 | 34 | } // namespace ns3 35 | -------------------------------------------------------------------------------- /simulation/src/network/helper/leaky-bucket-helper.cc: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ 2 | // 3 | // This program is free software; you can redistribute it and/or modify 4 | // it under the terms of the GNU General Public License version 2 as 5 | // published by the Free Software Foundation; 6 | // 7 | // Author: Baltzis Petros 8 | 9 | #include "leaky-bucket-helper.h" 10 | #include "ns3/leaky-bucket.h" 11 | #include "ns3/node.h" 12 | #include "ns3/inet-socket-address.h" 13 | #include "ns3/packet-socket-address.h" 14 | #include "ns3/net-device.h" 15 | 16 | 17 | namespace ns3 { 18 | 19 | LeakyBucketHelper::LeakyBucketHelper () 20 | { 21 | m_factory.SetTypeId ("ns3::LeakyBucket"); 22 | } 23 | 24 | void 25 | LeakyBucketHelper::SetAttribute (std::string name, const AttributeValue &value) 26 | { 27 | m_factory.Set (name, value); 28 | } 29 | 30 | //This function is called to install a leay-bucket to a node 31 | void 32 | LeakyBucketHelper::Install (Ptr ShapedDevice) const 33 | { 34 | Ptr ShapedNode = ShapedDevice->GetNode(); 35 | Ptr leaky = m_factory.Create (); 36 | //ShapedNode->AddShaper (leaky, ShapedDevice); 37 | 38 | } 39 | 40 | } // namespace ns3 41 | --------------------------------------------------------------------------------