Files
ns-3-dev/examples/tutorial/sixth.cc
T
Lalith Suresh 77439e1c80 Converts csma, emu, tap-bridge, point-to-point, wifi and wimax modules into modular format
--HG--
rename : examples/csma/csma-broadcast.cc => src/devices/csma/examples/csma-broadcast.cc
rename : examples/csma/csma-multicast.cc => src/devices/csma/examples/csma-multicast.cc
rename : examples/csma/csma-one-subnet.cc => src/devices/csma/examples/csma-one-subnet.cc
rename : examples/csma/csma-packet-socket.cc => src/devices/csma/examples/csma-packet-socket.cc
rename : examples/csma/csma-ping.cc => src/devices/csma/examples/csma-ping.cc
rename : examples/csma/csma-raw-ip-socket.cc => src/devices/csma/examples/csma-raw-ip-socket.cc
rename : examples/csma/csma-star.cc => src/devices/csma/examples/csma-star.cc
rename : examples/csma/waf => src/devices/csma/examples/waf
rename : examples/csma/wscript => src/devices/csma/examples/wscript
rename : src/helper/csma-helper.cc => src/devices/csma/helper/csma-helper.cc
rename : src/helper/csma-helper.h => src/devices/csma/helper/csma-helper.h
rename : src/helper/csma-star-helper.cc => src/devices/csma/helper/csma-star-helper.cc
rename : src/helper/csma-star-helper.h => src/devices/csma/helper/csma-star-helper.h
rename : src/devices/csma/backoff.cc => src/devices/csma/model/backoff.cc
rename : src/devices/csma/backoff.h => src/devices/csma/model/backoff.h
rename : src/devices/csma/csma-channel.cc => src/devices/csma/model/csma-channel.cc
rename : src/devices/csma/csma-channel.h => src/devices/csma/model/csma-channel.h
rename : src/devices/csma/csma-net-device.cc => src/devices/csma/model/csma-net-device.cc
rename : src/devices/csma/csma-net-device.h => src/devices/csma/model/csma-net-device.h
rename : src/devices/csma/csma.h => src/devices/csma/model/csma.h
rename : src/devices/emu/emu.h => src/devices/emu/doc/emu.h
rename : examples/emulation/emu-ping.cc => src/devices/emu/examples/emu-ping.cc
rename : examples/emulation/emu-udp-echo.cc => src/devices/emu/examples/emu-udp-echo.cc
rename : examples/emulation/waf => src/devices/emu/examples/waf
rename : examples/emulation/wscript => src/devices/emu/examples/wscript
rename : src/helper/emu-helper.cc => src/devices/emu/helper/emu-helper.cc
rename : src/helper/emu-helper.h => src/devices/emu/helper/emu-helper.h
rename : src/devices/emu/emu-encode-decode.cc => src/devices/emu/model/emu-encode-decode.cc
rename : src/devices/emu/emu-encode-decode.h => src/devices/emu/model/emu-encode-decode.h
rename : src/devices/emu/emu-net-device.cc => src/devices/emu/model/emu-net-device.cc
rename : src/devices/emu/emu-net-device.h => src/devices/emu/model/emu-net-device.h
rename : src/devices/emu/emu-sock-creator.cc => src/devices/emu/model/emu-sock-creator.cc
rename : src/devices/point-to-point/point-to-point.h => src/devices/point-to-point/doc/point-to-point.h
rename : src/helper/point-to-point-dumbbell-helper.cc => src/devices/point-to-point/helper/point-to-point-dumbbell-helper.cc
rename : src/helper/point-to-point-dumbbell-helper.h => src/devices/point-to-point/helper/point-to-point-dumbbell-helper.h
rename : src/helper/point-to-point-grid-helper.cc => src/devices/point-to-point/helper/point-to-point-grid-helper.cc
rename : src/helper/point-to-point-grid-helper.h => src/devices/point-to-point/helper/point-to-point-grid-helper.h
rename : src/helper/point-to-point-helper.cc => src/devices/point-to-point/helper/point-to-point-helper.cc
rename : src/helper/point-to-point-helper.h => src/devices/point-to-point/helper/point-to-point-helper.h
rename : src/helper/point-to-point-star-helper.cc => src/devices/point-to-point/helper/point-to-point-star-helper.cc
rename : src/helper/point-to-point-star-helper.h => src/devices/point-to-point/helper/point-to-point-star-helper.h
rename : src/devices/point-to-point/point-to-point-channel.cc => src/devices/point-to-point/model/point-to-point-channel.cc
rename : src/devices/point-to-point/point-to-point-channel.h => src/devices/point-to-point/model/point-to-point-channel.h
rename : src/devices/point-to-point/point-to-point-net-device.cc => src/devices/point-to-point/model/point-to-point-net-device.cc
rename : src/devices/point-to-point/point-to-point-net-device.h => src/devices/point-to-point/model/point-to-point-net-device.h
rename : src/devices/point-to-point/point-to-point-remote-channel.cc => src/devices/point-to-point/model/point-to-point-remote-channel.cc
rename : src/devices/point-to-point/point-to-point-remote-channel.h => src/devices/point-to-point/model/point-to-point-remote-channel.h
rename : src/devices/point-to-point/point-to-point-test.cc => src/devices/point-to-point/model/point-to-point-test.cc
rename : src/devices/point-to-point/ppp-header.cc => src/devices/point-to-point/model/ppp-header.cc
rename : src/devices/point-to-point/ppp-header.h => src/devices/point-to-point/model/ppp-header.h
rename : src/devices/tap-bridge/tap.h => src/devices/tap-bridge/doc/tap.h
rename : examples/tap/lxc-left.conf => src/devices/tap-bridge/examples/lxc-left.conf
rename : examples/tap/lxc-right.conf => src/devices/tap-bridge/examples/lxc-right.conf
rename : examples/tap/tap-csma-virtual-machine.cc => src/devices/tap-bridge/examples/tap-csma-virtual-machine.cc
rename : examples/tap/tap-csma-virtual-machine.py => src/devices/tap-bridge/examples/tap-csma-virtual-machine.py
rename : examples/tap/tap-csma.cc => src/devices/tap-bridge/examples/tap-csma.cc
rename : examples/tap/tap-wifi-dumbbell.cc => src/devices/tap-bridge/examples/tap-wifi-dumbbell.cc
rename : examples/tap/tap-wifi-virtual-machine.cc => src/devices/tap-bridge/examples/tap-wifi-virtual-machine.cc
rename : examples/tap/tap-wifi-virtual-machine.py => src/devices/tap-bridge/examples/tap-wifi-virtual-machine.py
rename : examples/tap/virtual-network-setup.sh => src/devices/tap-bridge/examples/virtual-network-setup.sh
rename : examples/tap/virtual-network-teardown.sh => src/devices/tap-bridge/examples/virtual-network-teardown.sh
rename : examples/tap/waf => src/devices/tap-bridge/examples/waf
rename : examples/tap/wscript => src/devices/tap-bridge/examples/wscript
rename : src/helper/tap-bridge-helper.cc => src/devices/tap-bridge/helper/tap-bridge-helper.cc
rename : src/helper/tap-bridge-helper.h => src/devices/tap-bridge/helper/tap-bridge-helper.h
rename : src/devices/tap-bridge/tap-bridge.cc => src/devices/tap-bridge/model/tap-bridge.cc
rename : src/devices/tap-bridge/tap-bridge.h => src/devices/tap-bridge/model/tap-bridge.h
rename : src/devices/tap-bridge/tap-creator.cc => src/devices/tap-bridge/model/tap-creator.cc
rename : src/devices/tap-bridge/tap-encode-decode.cc => src/devices/tap-bridge/model/tap-encode-decode.cc
rename : src/devices/tap-bridge/tap-encode-decode.h => src/devices/tap-bridge/model/tap-encode-decode.h
rename : src/devices/wifi/wifi.h => src/devices/wifi/doc/wifi.h
rename : src/helper/nqos-wifi-mac-helper.cc => src/devices/wifi/helper/nqos-wifi-mac-helper.cc
rename : src/helper/nqos-wifi-mac-helper.h => src/devices/wifi/helper/nqos-wifi-mac-helper.h
rename : src/helper/qos-wifi-mac-helper.cc => src/devices/wifi/helper/qos-wifi-mac-helper.cc
rename : src/helper/qos-wifi-mac-helper.h => src/devices/wifi/helper/qos-wifi-mac-helper.h
rename : src/helper/wifi-helper.cc => src/devices/wifi/helper/wifi-helper.cc
rename : src/helper/wifi-helper.h => src/devices/wifi/helper/wifi-helper.h
rename : src/helper/yans-wifi-helper.cc => src/devices/wifi/helper/yans-wifi-helper.cc
rename : src/helper/yans-wifi-helper.h => src/devices/wifi/helper/yans-wifi-helper.h
rename : src/devices/wifi/aarf-wifi-manager.cc => src/devices/wifi/model/aarf-wifi-manager.cc
rename : src/devices/wifi/aarf-wifi-manager.h => src/devices/wifi/model/aarf-wifi-manager.h
rename : src/devices/wifi/aarfcd-wifi-manager.cc => src/devices/wifi/model/aarfcd-wifi-manager.cc
rename : src/devices/wifi/aarfcd-wifi-manager.h => src/devices/wifi/model/aarfcd-wifi-manager.h
rename : src/devices/wifi/adhoc-wifi-mac.cc => src/devices/wifi/model/adhoc-wifi-mac.cc
rename : src/devices/wifi/adhoc-wifi-mac.h => src/devices/wifi/model/adhoc-wifi-mac.h
rename : src/devices/wifi/amrr-wifi-manager.cc => src/devices/wifi/model/amrr-wifi-manager.cc
rename : src/devices/wifi/amrr-wifi-manager.h => src/devices/wifi/model/amrr-wifi-manager.h
rename : src/devices/wifi/amsdu-subframe-header.cc => src/devices/wifi/model/amsdu-subframe-header.cc
rename : src/devices/wifi/amsdu-subframe-header.h => src/devices/wifi/model/amsdu-subframe-header.h
rename : src/devices/wifi/ap-wifi-mac.cc => src/devices/wifi/model/ap-wifi-mac.cc
rename : src/devices/wifi/ap-wifi-mac.h => src/devices/wifi/model/ap-wifi-mac.h
rename : src/devices/wifi/arf-wifi-manager.cc => src/devices/wifi/model/arf-wifi-manager.cc
rename : src/devices/wifi/arf-wifi-manager.h => src/devices/wifi/model/arf-wifi-manager.h
rename : src/devices/wifi/block-ack-agreement.cc => src/devices/wifi/model/block-ack-agreement.cc
rename : src/devices/wifi/block-ack-agreement.h => src/devices/wifi/model/block-ack-agreement.h
rename : src/devices/wifi/block-ack-cache.cc => src/devices/wifi/model/block-ack-cache.cc
rename : src/devices/wifi/block-ack-cache.h => src/devices/wifi/model/block-ack-cache.h
rename : src/devices/wifi/block-ack-manager.cc => src/devices/wifi/model/block-ack-manager.cc
rename : src/devices/wifi/block-ack-manager.h => src/devices/wifi/model/block-ack-manager.h
rename : src/devices/wifi/block-ack-test-suite.cc => src/devices/wifi/model/block-ack-test-suite.cc
rename : src/devices/wifi/capability-information.cc => src/devices/wifi/model/capability-information.cc
rename : src/devices/wifi/capability-information.h => src/devices/wifi/model/capability-information.h
rename : src/devices/wifi/cara-wifi-manager.cc => src/devices/wifi/model/cara-wifi-manager.cc
rename : src/devices/wifi/cara-wifi-manager.h => src/devices/wifi/model/cara-wifi-manager.h
rename : src/devices/wifi/constant-rate-wifi-manager.cc => src/devices/wifi/model/constant-rate-wifi-manager.cc
rename : src/devices/wifi/constant-rate-wifi-manager.h => src/devices/wifi/model/constant-rate-wifi-manager.h
rename : src/devices/wifi/ctrl-headers.cc => src/devices/wifi/model/ctrl-headers.cc
rename : src/devices/wifi/ctrl-headers.h => src/devices/wifi/model/ctrl-headers.h
rename : src/devices/wifi/dca-txop.cc => src/devices/wifi/model/dca-txop.cc
rename : src/devices/wifi/dca-txop.h => src/devices/wifi/model/dca-txop.h
rename : src/devices/wifi/dcf-manager-test.cc => src/devices/wifi/model/dcf-manager-test.cc
rename : src/devices/wifi/dcf-manager.cc => src/devices/wifi/model/dcf-manager.cc
rename : src/devices/wifi/dcf-manager.h => src/devices/wifi/model/dcf-manager.h
rename : src/devices/wifi/dcf.cc => src/devices/wifi/model/dcf.cc
rename : src/devices/wifi/dcf.h => src/devices/wifi/model/dcf.h
rename : src/devices/wifi/dsss-error-rate-model.cc => src/devices/wifi/model/dsss-error-rate-model.cc
rename : src/devices/wifi/dsss-error-rate-model.h => src/devices/wifi/model/dsss-error-rate-model.h
rename : src/devices/wifi/edca-txop-n.cc => src/devices/wifi/model/edca-txop-n.cc
rename : src/devices/wifi/edca-txop-n.h => src/devices/wifi/model/edca-txop-n.h
rename : src/devices/wifi/error-rate-model.cc => src/devices/wifi/model/error-rate-model.cc
rename : src/devices/wifi/error-rate-model.h => src/devices/wifi/model/error-rate-model.h
rename : src/devices/wifi/ideal-wifi-manager.cc => src/devices/wifi/model/ideal-wifi-manager.cc
rename : src/devices/wifi/ideal-wifi-manager.h => src/devices/wifi/model/ideal-wifi-manager.h
rename : src/devices/wifi/interference-helper-tx-duration-test.cc => src/devices/wifi/model/interference-helper-tx-duration-test.cc
rename : src/devices/wifi/interference-helper.cc => src/devices/wifi/model/interference-helper.cc
rename : src/devices/wifi/interference-helper.h => src/devices/wifi/model/interference-helper.h
rename : src/devices/wifi/mac-low.cc => src/devices/wifi/model/mac-low.cc
rename : src/devices/wifi/mac-low.h => src/devices/wifi/model/mac-low.h
rename : src/devices/wifi/mac-rx-middle.cc => src/devices/wifi/model/mac-rx-middle.cc
rename : src/devices/wifi/mac-rx-middle.h => src/devices/wifi/model/mac-rx-middle.h
rename : src/devices/wifi/mac-tx-middle.cc => src/devices/wifi/model/mac-tx-middle.cc
rename : src/devices/wifi/mac-tx-middle.h => src/devices/wifi/model/mac-tx-middle.h
rename : src/devices/wifi/mgt-headers.cc => src/devices/wifi/model/mgt-headers.cc
rename : src/devices/wifi/mgt-headers.h => src/devices/wifi/model/mgt-headers.h
rename : src/devices/wifi/minstrel-wifi-manager.cc => src/devices/wifi/model/minstrel-wifi-manager.cc
rename : src/devices/wifi/minstrel-wifi-manager.h => src/devices/wifi/model/minstrel-wifi-manager.h
rename : src/devices/wifi/msdu-aggregator.cc => src/devices/wifi/model/msdu-aggregator.cc
rename : src/devices/wifi/msdu-aggregator.h => src/devices/wifi/model/msdu-aggregator.h
rename : src/devices/wifi/msdu-standard-aggregator.cc => src/devices/wifi/model/msdu-standard-aggregator.cc
rename : src/devices/wifi/msdu-standard-aggregator.h => src/devices/wifi/model/msdu-standard-aggregator.h
rename : src/devices/wifi/nist-error-rate-model.cc => src/devices/wifi/model/nist-error-rate-model.cc
rename : src/devices/wifi/nist-error-rate-model.h => src/devices/wifi/model/nist-error-rate-model.h
rename : src/devices/wifi/onoe-wifi-manager.cc => src/devices/wifi/model/onoe-wifi-manager.cc
rename : src/devices/wifi/onoe-wifi-manager.h => src/devices/wifi/model/onoe-wifi-manager.h
rename : src/devices/wifi/originator-block-ack-agreement.cc => src/devices/wifi/model/originator-block-ack-agreement.cc
rename : src/devices/wifi/originator-block-ack-agreement.h => src/devices/wifi/model/originator-block-ack-agreement.h
rename : src/devices/wifi/qos-blocked-destinations.cc => src/devices/wifi/model/qos-blocked-destinations.cc
rename : src/devices/wifi/qos-blocked-destinations.h => src/devices/wifi/model/qos-blocked-destinations.h
rename : src/devices/wifi/qos-tag.cc => src/devices/wifi/model/qos-tag.cc
rename : src/devices/wifi/qos-tag.h => src/devices/wifi/model/qos-tag.h
rename : src/devices/wifi/qos-utils.cc => src/devices/wifi/model/qos-utils.cc
rename : src/devices/wifi/qos-utils.h => src/devices/wifi/model/qos-utils.h
rename : src/devices/wifi/random-stream.cc => src/devices/wifi/model/random-stream.cc
rename : src/devices/wifi/random-stream.h => src/devices/wifi/model/random-stream.h
rename : src/devices/wifi/regular-wifi-mac.cc => src/devices/wifi/model/regular-wifi-mac.cc
rename : src/devices/wifi/regular-wifi-mac.h => src/devices/wifi/model/regular-wifi-mac.h
rename : src/devices/wifi/rraa-wifi-manager.cc => src/devices/wifi/model/rraa-wifi-manager.cc
rename : src/devices/wifi/rraa-wifi-manager.h => src/devices/wifi/model/rraa-wifi-manager.h
rename : src/devices/wifi/ssid.cc => src/devices/wifi/model/ssid.cc
rename : src/devices/wifi/ssid.h => src/devices/wifi/model/ssid.h
rename : src/devices/wifi/sta-wifi-mac.cc => src/devices/wifi/model/sta-wifi-mac.cc
rename : src/devices/wifi/sta-wifi-mac.h => src/devices/wifi/model/sta-wifi-mac.h
rename : src/devices/wifi/status-code.cc => src/devices/wifi/model/status-code.cc
rename : src/devices/wifi/status-code.h => src/devices/wifi/model/status-code.h
rename : src/devices/wifi/supported-rates.cc => src/devices/wifi/model/supported-rates.cc
rename : src/devices/wifi/supported-rates.h => src/devices/wifi/model/supported-rates.h
rename : src/devices/wifi/wifi-channel.cc => src/devices/wifi/model/wifi-channel.cc
rename : src/devices/wifi/wifi-channel.h => src/devices/wifi/model/wifi-channel.h
rename : src/devices/wifi/wifi-information-element-vector.cc => src/devices/wifi/model/wifi-information-element-vector.cc
rename : src/devices/wifi/wifi-information-element-vector.h => src/devices/wifi/model/wifi-information-element-vector.h
rename : src/devices/wifi/wifi-information-element.cc => src/devices/wifi/model/wifi-information-element.cc
rename : src/devices/wifi/wifi-information-element.h => src/devices/wifi/model/wifi-information-element.h
rename : src/devices/wifi/wifi-mac-header.cc => src/devices/wifi/model/wifi-mac-header.cc
rename : src/devices/wifi/wifi-mac-header.h => src/devices/wifi/model/wifi-mac-header.h
rename : src/devices/wifi/wifi-mac-queue.cc => src/devices/wifi/model/wifi-mac-queue.cc
rename : src/devices/wifi/wifi-mac-queue.h => src/devices/wifi/model/wifi-mac-queue.h
rename : src/devices/wifi/wifi-mac-trailer.cc => src/devices/wifi/model/wifi-mac-trailer.cc
rename : src/devices/wifi/wifi-mac-trailer.h => src/devices/wifi/model/wifi-mac-trailer.h
rename : src/devices/wifi/wifi-mac.cc => src/devices/wifi/model/wifi-mac.cc
rename : src/devices/wifi/wifi-mac.h => src/devices/wifi/model/wifi-mac.h
rename : src/devices/wifi/wifi-mode.cc => src/devices/wifi/model/wifi-mode.cc
rename : src/devices/wifi/wifi-mode.h => src/devices/wifi/model/wifi-mode.h
rename : src/devices/wifi/wifi-net-device.cc => src/devices/wifi/model/wifi-net-device.cc
rename : src/devices/wifi/wifi-net-device.h => src/devices/wifi/model/wifi-net-device.h
rename : src/devices/wifi/wifi-phy-standard.h => src/devices/wifi/model/wifi-phy-standard.h
rename : src/devices/wifi/wifi-phy-state-helper.cc => src/devices/wifi/model/wifi-phy-state-helper.cc
rename : src/devices/wifi/wifi-phy-state-helper.h => src/devices/wifi/model/wifi-phy-state-helper.h
rename : src/devices/wifi/wifi-phy.cc => src/devices/wifi/model/wifi-phy.cc
rename : src/devices/wifi/wifi-phy.h => src/devices/wifi/model/wifi-phy.h
rename : src/devices/wifi/wifi-preamble.h => src/devices/wifi/model/wifi-preamble.h
rename : src/devices/wifi/wifi-remote-station-manager.cc => src/devices/wifi/model/wifi-remote-station-manager.cc
rename : src/devices/wifi/wifi-remote-station-manager.h => src/devices/wifi/model/wifi-remote-station-manager.h
rename : src/devices/wifi/yans-error-rate-model.cc => src/devices/wifi/model/yans-error-rate-model.cc
rename : src/devices/wifi/yans-error-rate-model.h => src/devices/wifi/model/yans-error-rate-model.h
rename : src/devices/wifi/yans-wifi-channel.cc => src/devices/wifi/model/yans-wifi-channel.cc
rename : src/devices/wifi/yans-wifi-channel.h => src/devices/wifi/model/yans-wifi-channel.h
rename : src/devices/wifi/yans-wifi-phy.cc => src/devices/wifi/model/yans-wifi-phy.cc
rename : src/devices/wifi/yans-wifi-phy.h => src/devices/wifi/model/yans-wifi-phy.h
rename : src/devices/wifi/wifi-phy-test.cc => src/devices/wifi/test/wifi-phy-test.cc
rename : src/devices/wifi/wifi-test.cc => src/devices/wifi/test/wifi-test.cc
rename : src/devices/wimax/wimax.h => src/devices/wimax/doc/wimax.h
rename : examples/wimax/waf => src/devices/wimax/examples/waf
rename : examples/wimax/wimax-ipv4.cc => src/devices/wimax/examples/wimax-ipv4.cc
rename : examples/wimax/wimax-multicast.cc => src/devices/wimax/examples/wimax-multicast.cc
rename : examples/wimax/wimax-simple.cc => src/devices/wimax/examples/wimax-simple.cc
rename : examples/wimax/wscript => src/devices/wimax/examples/wscript
rename : src/helper/wimax-helper.cc => src/devices/wimax/helper/wimax-helper.cc
rename : src/helper/wimax-helper.h => src/devices/wimax/helper/wimax-helper.h
rename : src/devices/wimax/bandwidth-manager.cc => src/devices/wimax/model/bandwidth-manager.cc
rename : src/devices/wimax/bandwidth-manager.h => src/devices/wimax/model/bandwidth-manager.h
rename : src/devices/wimax/bs-link-manager.cc => src/devices/wimax/model/bs-link-manager.cc
rename : src/devices/wimax/bs-link-manager.h => src/devices/wimax/model/bs-link-manager.h
rename : src/devices/wimax/bs-net-device.cc => src/devices/wimax/model/bs-net-device.cc
rename : src/devices/wimax/bs-net-device.h => src/devices/wimax/model/bs-net-device.h
rename : src/devices/wimax/bs-scheduler-rtps.cc => src/devices/wimax/model/bs-scheduler-rtps.cc
rename : src/devices/wimax/bs-scheduler-rtps.h => src/devices/wimax/model/bs-scheduler-rtps.h
rename : src/devices/wimax/bs-scheduler-simple.cc => src/devices/wimax/model/bs-scheduler-simple.cc
rename : src/devices/wimax/bs-scheduler-simple.h => src/devices/wimax/model/bs-scheduler-simple.h
rename : src/devices/wimax/bs-scheduler.cc => src/devices/wimax/model/bs-scheduler.cc
rename : src/devices/wimax/bs-scheduler.h => src/devices/wimax/model/bs-scheduler.h
rename : src/devices/wimax/bs-service-flow-manager.cc => src/devices/wimax/model/bs-service-flow-manager.cc
rename : src/devices/wimax/bs-service-flow-manager.h => src/devices/wimax/model/bs-service-flow-manager.h
rename : src/devices/wimax/bs-uplink-scheduler-mbqos.cc => src/devices/wimax/model/bs-uplink-scheduler-mbqos.cc
rename : src/devices/wimax/bs-uplink-scheduler-mbqos.h => src/devices/wimax/model/bs-uplink-scheduler-mbqos.h
rename : src/devices/wimax/bs-uplink-scheduler-rtps.cc => src/devices/wimax/model/bs-uplink-scheduler-rtps.cc
rename : src/devices/wimax/bs-uplink-scheduler-rtps.h => src/devices/wimax/model/bs-uplink-scheduler-rtps.h
rename : src/devices/wimax/bs-uplink-scheduler-simple.cc => src/devices/wimax/model/bs-uplink-scheduler-simple.cc
rename : src/devices/wimax/bs-uplink-scheduler-simple.h => src/devices/wimax/model/bs-uplink-scheduler-simple.h
rename : src/devices/wimax/bs-uplink-scheduler.cc => src/devices/wimax/model/bs-uplink-scheduler.cc
rename : src/devices/wimax/bs-uplink-scheduler.h => src/devices/wimax/model/bs-uplink-scheduler.h
rename : src/devices/wimax/burst-profile-manager.cc => src/devices/wimax/model/burst-profile-manager.cc
rename : src/devices/wimax/burst-profile-manager.h => src/devices/wimax/model/burst-profile-manager.h
rename : src/devices/wimax/bvec.h => src/devices/wimax/model/bvec.h
rename : src/devices/wimax/cid-factory.cc => src/devices/wimax/model/cid-factory.cc
rename : src/devices/wimax/cid-factory.h => src/devices/wimax/model/cid-factory.h
rename : src/devices/wimax/cid.cc => src/devices/wimax/model/cid.cc
rename : src/devices/wimax/cid.h => src/devices/wimax/model/cid.h
rename : src/devices/wimax/connection-manager.cc => src/devices/wimax/model/connection-manager.cc
rename : src/devices/wimax/connection-manager.h => src/devices/wimax/model/connection-manager.h
rename : src/devices/wimax/crc8.cc => src/devices/wimax/model/crc8.cc
rename : src/devices/wimax/crc8.h => src/devices/wimax/model/crc8.h
rename : src/devices/wimax/cs-parameters.cc => src/devices/wimax/model/cs-parameters.cc
rename : src/devices/wimax/cs-parameters.h => src/devices/wimax/model/cs-parameters.h
rename : src/devices/wimax/default-traces.h => src/devices/wimax/model/default-traces.h
rename : src/devices/wimax/dl-mac-messages.cc => src/devices/wimax/model/dl-mac-messages.cc
rename : src/devices/wimax/dl-mac-messages.h => src/devices/wimax/model/dl-mac-messages.h
rename : src/devices/wimax/ipcs-classifier-record.cc => src/devices/wimax/model/ipcs-classifier-record.cc
rename : src/devices/wimax/ipcs-classifier-record.h => src/devices/wimax/model/ipcs-classifier-record.h
rename : src/devices/wimax/ipcs-classifier.cc => src/devices/wimax/model/ipcs-classifier.cc
rename : src/devices/wimax/ipcs-classifier.h => src/devices/wimax/model/ipcs-classifier.h
rename : src/devices/wimax/mac-messages.cc => src/devices/wimax/model/mac-messages.cc
rename : src/devices/wimax/mac-messages.h => src/devices/wimax/model/mac-messages.h
rename : src/devices/wimax/ofdm-downlink-frame-prefix.cc => src/devices/wimax/model/ofdm-downlink-frame-prefix.cc
rename : src/devices/wimax/ofdm-downlink-frame-prefix.h => src/devices/wimax/model/ofdm-downlink-frame-prefix.h
rename : src/devices/wimax/send-params.cc => src/devices/wimax/model/send-params.cc
rename : src/devices/wimax/send-params.h => src/devices/wimax/model/send-params.h
rename : src/devices/wimax/service-flow-manager.cc => src/devices/wimax/model/service-flow-manager.cc
rename : src/devices/wimax/service-flow-manager.h => src/devices/wimax/model/service-flow-manager.h
rename : src/devices/wimax/service-flow-record.cc => src/devices/wimax/model/service-flow-record.cc
rename : src/devices/wimax/service-flow-record.h => src/devices/wimax/model/service-flow-record.h
rename : src/devices/wimax/service-flow.cc => src/devices/wimax/model/service-flow.cc
rename : src/devices/wimax/service-flow.h => src/devices/wimax/model/service-flow.h
rename : src/devices/wimax/simple-ofdm-send-param.cc => src/devices/wimax/model/simple-ofdm-send-param.cc
rename : src/devices/wimax/simple-ofdm-send-param.h => src/devices/wimax/model/simple-ofdm-send-param.h
rename : src/devices/wimax/simple-ofdm-wimax-channel.cc => src/devices/wimax/model/simple-ofdm-wimax-channel.cc
rename : src/devices/wimax/simple-ofdm-wimax-channel.h => src/devices/wimax/model/simple-ofdm-wimax-channel.h
rename : src/devices/wimax/simple-ofdm-wimax-phy.cc => src/devices/wimax/model/simple-ofdm-wimax-phy.cc
rename : src/devices/wimax/simple-ofdm-wimax-phy.h => src/devices/wimax/model/simple-ofdm-wimax-phy.h
rename : src/devices/wimax/snr-to-block-error-rate-manager.cc => src/devices/wimax/model/snr-to-block-error-rate-manager.cc
rename : src/devices/wimax/snr-to-block-error-rate-manager.h => src/devices/wimax/model/snr-to-block-error-rate-manager.h
rename : src/devices/wimax/snr-to-block-error-rate-record.cc => src/devices/wimax/model/snr-to-block-error-rate-record.cc
rename : src/devices/wimax/snr-to-block-error-rate-record.h => src/devices/wimax/model/snr-to-block-error-rate-record.h
rename : src/devices/wimax/ss-link-manager.cc => src/devices/wimax/model/ss-link-manager.cc
rename : src/devices/wimax/ss-link-manager.h => src/devices/wimax/model/ss-link-manager.h
rename : src/devices/wimax/ss-manager.cc => src/devices/wimax/model/ss-manager.cc
rename : src/devices/wimax/ss-manager.h => src/devices/wimax/model/ss-manager.h
rename : src/devices/wimax/ss-net-device.cc => src/devices/wimax/model/ss-net-device.cc
rename : src/devices/wimax/ss-net-device.h => src/devices/wimax/model/ss-net-device.h
rename : src/devices/wimax/ss-record.cc => src/devices/wimax/model/ss-record.cc
rename : src/devices/wimax/ss-record.h => src/devices/wimax/model/ss-record.h
rename : src/devices/wimax/ss-scheduler.cc => src/devices/wimax/model/ss-scheduler.cc
rename : src/devices/wimax/ss-scheduler.h => src/devices/wimax/model/ss-scheduler.h
rename : src/devices/wimax/ss-service-flow-manager.cc => src/devices/wimax/model/ss-service-flow-manager.cc
rename : src/devices/wimax/ss-service-flow-manager.h => src/devices/wimax/model/ss-service-flow-manager.h
rename : src/devices/wimax/ul-job.cc => src/devices/wimax/model/ul-job.cc
rename : src/devices/wimax/ul-job.h => src/devices/wimax/model/ul-job.h
rename : src/devices/wimax/ul-mac-messages.cc => src/devices/wimax/model/ul-mac-messages.cc
rename : src/devices/wimax/ul-mac-messages.h => src/devices/wimax/model/ul-mac-messages.h
rename : src/devices/wimax/wimax-channel.cc => src/devices/wimax/model/wimax-channel.cc
rename : src/devices/wimax/wimax-channel.h => src/devices/wimax/model/wimax-channel.h
rename : src/devices/wimax/wimax-connection.cc => src/devices/wimax/model/wimax-connection.cc
rename : src/devices/wimax/wimax-connection.h => src/devices/wimax/model/wimax-connection.h
rename : src/devices/wimax/wimax-mac-header.cc => src/devices/wimax/model/wimax-mac-header.cc
rename : src/devices/wimax/wimax-mac-header.h => src/devices/wimax/model/wimax-mac-header.h
rename : src/devices/wimax/wimax-mac-queue.cc => src/devices/wimax/model/wimax-mac-queue.cc
rename : src/devices/wimax/wimax-mac-queue.h => src/devices/wimax/model/wimax-mac-queue.h
rename : src/devices/wimax/wimax-mac-to-mac-header.cc => src/devices/wimax/model/wimax-mac-to-mac-header.cc
rename : src/devices/wimax/wimax-mac-to-mac-header.h => src/devices/wimax/model/wimax-mac-to-mac-header.h
rename : src/devices/wimax/wimax-net-device.cc => src/devices/wimax/model/wimax-net-device.cc
rename : src/devices/wimax/wimax-net-device.h => src/devices/wimax/model/wimax-net-device.h
rename : src/devices/wimax/wimax-phy.cc => src/devices/wimax/model/wimax-phy.cc
rename : src/devices/wimax/wimax-phy.h => src/devices/wimax/model/wimax-phy.h
rename : src/devices/wimax/wimax-tlv.cc => src/devices/wimax/model/wimax-tlv.cc
rename : src/devices/wimax/wimax-tlv.h => src/devices/wimax/model/wimax-tlv.h
rename : src/devices/wimax/mac-messages-test.cc => src/devices/wimax/test/mac-messages-test.cc
rename : src/devices/wimax/phy-test.cc => src/devices/wimax/test/phy-test.cc
rename : src/devices/wimax/qos-test.cc => src/devices/wimax/test/qos-test.cc
rename : src/devices/wimax/ss-mac-test.cc => src/devices/wimax/test/ss-mac-test.cc
rename : src/devices/wimax/wimax-fragmentation-test.cc => src/devices/wimax/test/wimax-fragmentation-test.cc
rename : src/devices/wimax/wimax-service-flow-test.cc => src/devices/wimax/test/wimax-service-flow-test.cc
rename : src/devices/wimax/wimax-tlv-test.cc => src/devices/wimax/test/wimax-tlv-test.cc
2011-03-03 19:54:57 +00:00

233 lines
6.8 KiB
C++

/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <fstream>
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
#include "ns3/helper-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/applications-module.h"
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("SixthScriptExample");
// ===========================================================================
//
// node 0 node 1
// +----------------+ +----------------+
// | ns-3 TCP | | ns-3 TCP |
// +----------------+ +----------------+
// | 10.1.1.1 | | 10.1.1.2 |
// +----------------+ +----------------+
// | point-to-point | | point-to-point |
// +----------------+ +----------------+
// | |
// +---------------------+
// 5 Mbps, 2 ms
//
//
// We want to look at changes in the ns-3 TCP congestion window. We need
// to crank up a flow and hook the CongestionWindow attribute on the socket
// of the sender. Normally one would use an on-off application to generate a
// flow, but this has a couple of problems. First, the socket of the on-off
// application is not created until Application Start time, so we wouldn't be
// able to hook the socket (now) at configuration time. Second, even if we
// could arrange a call after start time, the socket is not public so we
// couldn't get at it.
//
// So, we can cook up a simple version of the on-off application that does what
// we want. On the plus side we don't need all of the complexity of the on-off
// application. On the minus side, we don't have a helper, so we have to get
// a little more involved in the details, but this is trivial.
//
// So first, we create a socket and do the trace connect on it; then we pass
// this socket into the constructor of our simple application which we then
// install in the source node.
// ===========================================================================
//
class MyApp : public Application
{
public:
MyApp ();
virtual ~MyApp();
void Setup (Ptr<Socket> socket, Address address, uint32_t packetSize, uint32_t nPackets, DataRate dataRate);
private:
virtual void StartApplication (void);
virtual void StopApplication (void);
void ScheduleTx (void);
void SendPacket (void);
Ptr<Socket> m_socket;
Address m_peer;
uint32_t m_packetSize;
uint32_t m_nPackets;
DataRate m_dataRate;
EventId m_sendEvent;
bool m_running;
uint32_t m_packetsSent;
};
MyApp::MyApp ()
: m_socket (0),
m_peer (),
m_packetSize (0),
m_nPackets (0),
m_dataRate (0),
m_sendEvent (),
m_running (false),
m_packetsSent (0)
{
}
MyApp::~MyApp()
{
m_socket = 0;
}
void
MyApp::Setup (Ptr<Socket> socket, Address address, uint32_t packetSize, uint32_t nPackets, DataRate dataRate)
{
m_socket = socket;
m_peer = address;
m_packetSize = packetSize;
m_nPackets = nPackets;
m_dataRate = dataRate;
}
void
MyApp::StartApplication (void)
{
m_running = true;
m_packetsSent = 0;
m_socket->Bind ();
m_socket->Connect (m_peer);
SendPacket ();
}
void
MyApp::StopApplication (void)
{
m_running = false;
if (m_sendEvent.IsRunning ())
{
Simulator::Cancel (m_sendEvent);
}
if (m_socket)
{
m_socket->Close ();
}
}
void
MyApp::SendPacket (void)
{
Ptr<Packet> packet = Create<Packet> (m_packetSize);
m_socket->Send (packet);
if (++m_packetsSent < m_nPackets)
{
ScheduleTx ();
}
}
void
MyApp::ScheduleTx (void)
{
if (m_running)
{
Time tNext (Seconds (m_packetSize * 8 / static_cast<double> (m_dataRate.GetBitRate ())));
m_sendEvent = Simulator::Schedule (tNext, &MyApp::SendPacket, this);
}
}
static void
CwndChange (Ptr<OutputStreamWrapper> stream, uint32_t oldCwnd, uint32_t newCwnd)
{
NS_LOG_UNCOND (Simulator::Now ().GetSeconds () << "\t" << newCwnd);
*stream->GetStream () << Simulator::Now ().GetSeconds () << "\t" << oldCwnd << "\t" << newCwnd << std::endl;
}
static void
RxDrop (Ptr<PcapFileWrapper> file, Ptr<const Packet> p)
{
NS_LOG_UNCOND ("RxDrop at " << Simulator::Now ().GetSeconds ());
file->Write(Simulator::Now(), p);
}
int
main (int argc, char *argv[])
{
NodeContainer nodes;
nodes.Create (2);
PointToPointHelper pointToPoint;
pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
pointToPoint.SetChannelAttribute ("Delay", StringValue ("2ms"));
NetDeviceContainer devices;
devices = pointToPoint.Install (nodes);
Ptr<RateErrorModel> em = CreateObjectWithAttributes<RateErrorModel> (
"RanVar", RandomVariableValue (UniformVariable (0., 1.)),
"ErrorRate", DoubleValue (0.00001));
devices.Get (1)->SetAttribute ("ReceiveErrorModel", PointerValue (em));
InternetStackHelper stack;
stack.Install (nodes);
Ipv4AddressHelper address;
address.SetBase ("10.1.1.0", "255.255.255.252");
Ipv4InterfaceContainer interfaces = address.Assign (devices);
uint16_t sinkPort = 8080;
Address sinkAddress (InetSocketAddress(interfaces.GetAddress (1), sinkPort));
PacketSinkHelper packetSinkHelper ("ns3::TcpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), sinkPort));
ApplicationContainer sinkApps = packetSinkHelper.Install (nodes.Get (1));
sinkApps.Start (Seconds (0.));
sinkApps.Stop (Seconds (20.));
Ptr<Socket> ns3TcpSocket = Socket::CreateSocket (nodes.Get (0), TcpSocketFactory::GetTypeId ());
Ptr<MyApp> app = CreateObject<MyApp> ();
app->Setup (ns3TcpSocket, sinkAddress, 1040, 1000, DataRate ("1Mbps"));
nodes.Get (0)->AddApplication (app);
app->SetStartTime (Seconds (1.));
app->SetStopTime (Seconds (20.));
AsciiTraceHelper asciiTraceHelper;
Ptr<OutputStreamWrapper> stream = asciiTraceHelper.CreateFileStream ("sixth.cwnd");
ns3TcpSocket->TraceConnectWithoutContext ("CongestionWindow", MakeBoundCallback (&CwndChange, stream));
PcapHelper pcapHelper;
Ptr<PcapFileWrapper> file = pcapHelper.CreateFile ("sixth.pcap", std::ios::out, PcapHelper::DLT_PPP);
devices.Get (1)->TraceConnectWithoutContext("PhyRxDrop", MakeBoundCallback (&RxDrop, file));
Simulator::Stop (Seconds(20));
Simulator::Run ();
Simulator::Destroy ();
return 0;
}