--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
427 lines
18 KiB
C++
427 lines
18 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
|
|
*
|
|
*/
|
|
|
|
//
|
|
// This ns-3 example demonstrates the use of helper functions to ease
|
|
// the construction of simulation scenarios.
|
|
//
|
|
// The simulation topology consists of a mixed wired and wireless
|
|
// scenario in which a hierarchical mobility model is used.
|
|
//
|
|
// The simulation layout consists of N backbone routers interconnected
|
|
// by an ad hoc wifi network.
|
|
// Each backbone router also has a local 802.11 network and is connected
|
|
// to a local LAN. An additional set of (K-1) nodes are connected to
|
|
// this backbone. Finally, a local LAN is connected to each router
|
|
// on the backbone, with L-1 additional hosts.
|
|
//
|
|
// The nodes are populated with TCP/IP stacks, and OLSR unicast routing
|
|
// on the backbone. An example UDP transfer is shown. The simulator
|
|
// be configured to output tcpdumps or traces from different nodes.
|
|
//
|
|
//
|
|
// +--------------------------------------------------------+
|
|
// | |
|
|
// | 802.11 ad hoc, ns-2 mobility |
|
|
// | |
|
|
// +--------------------------------------------------------+
|
|
// | o o o (N backbone routers) |
|
|
// +--------+ +--------+
|
|
// wired LAN | mobile | wired LAN | mobile |
|
|
// -----------| router | -----------| router |
|
|
// --------- ---------
|
|
// | |
|
|
// +----------------+ +----------------+
|
|
// | 802.11 | | 802.11 |
|
|
// | infra net | | infra net |
|
|
// | K-1 hosts | | K-1 hosts |
|
|
// +----------------+ +----------------+
|
|
//
|
|
// We'll send data from the first wired LAN node on the first wired LAN
|
|
// to the last wireless STA on the last infrastructure net, thereby
|
|
// causing packets to traverse CSMA to adhoc to infrastructure links
|
|
//
|
|
// Note that certain mobility patterns may cause packet forwarding
|
|
// to fail (if nodes become disconnected)
|
|
|
|
#include <fstream>
|
|
#include <string>
|
|
#include "ns3/core-module.h"
|
|
#include "ns3/network-module.h"
|
|
#include "ns3/helper-module.h"
|
|
#include "ns3/applications-module.h"
|
|
#include "ns3/mobility-module.h"
|
|
#include "ns3/contrib-module.h"
|
|
#include "ns3/wifi-module.h"
|
|
#include "ns3/csma-module.h"
|
|
#include "ns3/olsr-helper.h"
|
|
#include "ns3/ipv4-global-routing-helper.h"
|
|
|
|
using namespace ns3;
|
|
|
|
//
|
|
// Define logging keyword for this file
|
|
//
|
|
NS_LOG_COMPONENT_DEFINE ("MixedWireless");
|
|
|
|
//
|
|
// This function will be used below as a trace sink, if the command-line
|
|
// argument or default value "useCourseChangeCallback" is set to true
|
|
//
|
|
static void
|
|
CourseChangeCallback (std::string path, Ptr<const MobilityModel> model)
|
|
{
|
|
Vector position = model->GetPosition ();
|
|
std::cout << "CourseChange " << path << " x=" << position.x << ", y=" << position.y << ", z=" << position.z << std::endl;
|
|
}
|
|
|
|
int
|
|
main (int argc, char *argv[])
|
|
{
|
|
//
|
|
// First, we declare and initialize a few local variables that control some
|
|
// simulation parameters.
|
|
//
|
|
uint32_t backboneNodes = 10;
|
|
uint32_t infraNodes = 5;
|
|
uint32_t lanNodes = 5;
|
|
uint32_t stopTime = 10;
|
|
bool useCourseChangeCallback = false;
|
|
bool enableTracing = false;
|
|
|
|
//
|
|
// Simulation defaults are typically set next, before command line
|
|
// arguments are parsed.
|
|
//
|
|
Config::SetDefault ("ns3::OnOffApplication::PacketSize", StringValue ("210"));
|
|
Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue ("10kb/s"));
|
|
|
|
//
|
|
// For convenience, we add the local variables to the command line argument
|
|
// system so that they can be overridden with flags such as
|
|
// "--backboneNodes=20"
|
|
//
|
|
CommandLine cmd;
|
|
cmd.AddValue("backboneNodes", "number of backbone nodes", backboneNodes);
|
|
cmd.AddValue ("infraNodes", "number of leaf nodes", infraNodes);
|
|
cmd.AddValue("lanNodes", "number of LAN nodes", lanNodes);
|
|
cmd.AddValue("stopTime", "simulation stop time (seconds)", stopTime);
|
|
cmd.AddValue("useCourseChangeCallback", "whether to enable course change tracing", useCourseChangeCallback);
|
|
cmd.AddValue("enableTracing", "enable tracing", enableTracing);
|
|
|
|
//
|
|
// The system global variables and the local values added to the argument
|
|
// system can be overridden by command line arguments by using this call.
|
|
//
|
|
cmd.Parse (argc, argv);
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
// //
|
|
// Construct the backbone //
|
|
// //
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
// Create a container to manage the nodes of the adhoc (backbone) network.
|
|
// Later we'll create the rest of the nodes we'll need.
|
|
//
|
|
NodeContainer backbone;
|
|
backbone.Create (backboneNodes);
|
|
//
|
|
// Create the backbone wifi net devices and install them into the nodes in
|
|
// our container
|
|
//
|
|
WifiHelper wifi;
|
|
NqosWifiMacHelper mac = NqosWifiMacHelper::Default ();
|
|
mac.SetType ("ns3::AdhocWifiMac");
|
|
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
|
|
"DataMode", StringValue ("OfdmRate54Mbps"));
|
|
YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
|
|
YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
|
|
wifiPhy.SetChannel (wifiChannel.Create ());
|
|
NetDeviceContainer backboneDevices = wifi.Install (wifiPhy, mac, backbone);
|
|
|
|
// We enable OLSR (which will be consulted at a higher priority than
|
|
// the global routing) on the backbone ad hoc nodes
|
|
NS_LOG_INFO ("Enabling OLSR routing on all backbone nodes");
|
|
OlsrHelper olsr;
|
|
//
|
|
// Add the IPv4 protocol stack to the nodes in our container
|
|
//
|
|
InternetStackHelper internet;
|
|
internet.SetRoutingHelper (olsr);
|
|
internet.Install (backbone);
|
|
|
|
// re-initialize for non-olsr routing.
|
|
internet.Reset ();
|
|
|
|
//
|
|
// Assign IPv4 addresses to the device drivers (actually to the associated
|
|
// IPv4 interfaces) we just created.
|
|
//
|
|
Ipv4AddressHelper ipAddrs;
|
|
ipAddrs.SetBase ("192.168.0.0", "255.255.255.0");
|
|
ipAddrs.Assign (backboneDevices);
|
|
|
|
//
|
|
// The ad-hoc network nodes need a mobility model so we aggregate one to
|
|
// each of the nodes we just finished building.
|
|
//
|
|
MobilityHelper mobility;
|
|
Ptr<ListPositionAllocator> positionAlloc =
|
|
CreateObject<ListPositionAllocator> ();
|
|
double x = 0.0;
|
|
for (uint32_t i = 0; i < backboneNodes; ++i)
|
|
{
|
|
positionAlloc->Add (Vector (x, 0.0, 0.0));
|
|
x += 5.0;
|
|
}
|
|
mobility.SetPositionAllocator (positionAlloc);
|
|
mobility.SetMobilityModel ("ns3::RandomDirection2dMobilityModel",
|
|
"Bounds", RectangleValue (Rectangle (0, 20, 0, 20)),
|
|
"Speed", RandomVariableValue (ConstantVariable (2)),
|
|
"Pause", RandomVariableValue (ConstantVariable (0.2)));
|
|
mobility.Install (backbone);
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
// //
|
|
// Construct the LANs //
|
|
// //
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
// Reset the address base-- all of the CSMA networks will be in
|
|
// the "172.16 address space
|
|
ipAddrs.SetBase ("172.16.0.0", "255.255.255.0");
|
|
|
|
|
|
for (uint32_t i = 0; i < backboneNodes; ++i)
|
|
{
|
|
NS_LOG_INFO ("Configuring local area network for backbone node " << i);
|
|
//
|
|
// Create a container to manage the nodes of the LAN. We need
|
|
// two containers here; one with all of the new nodes, and one
|
|
// with all of the nodes including new and existing nodes
|
|
//
|
|
NodeContainer newLanNodes;
|
|
newLanNodes.Create (lanNodes - 1);
|
|
// Now, create the container with all nodes on this link
|
|
NodeContainer lan (backbone.Get (i), newLanNodes);
|
|
//
|
|
// Create the CSMA net devices and install them into the nodes in our
|
|
// collection.
|
|
//
|
|
CsmaHelper csma;
|
|
csma.SetChannelAttribute ("DataRate",
|
|
DataRateValue (DataRate (5000000)));
|
|
csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (2)));
|
|
NetDeviceContainer lanDevices = csma.Install (lan);
|
|
//
|
|
// Add the IPv4 protocol stack to the new LAN nodes
|
|
//
|
|
internet.Install (newLanNodes);
|
|
//
|
|
// Assign IPv4 addresses to the device drivers (actually to the
|
|
// associated IPv4 interfaces) we just created.
|
|
//
|
|
ipAddrs.Assign (lanDevices);
|
|
//
|
|
// Assign a new network prefix for the next LAN, according to the
|
|
// network mask initialized above
|
|
//
|
|
ipAddrs.NewNetwork ();
|
|
}
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
// //
|
|
// Construct the mobile networks //
|
|
// //
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
// Reset the address base-- all of the 802.11 networks will be in
|
|
// the "10.0" address space
|
|
ipAddrs.SetBase ("10.0.0.0", "255.255.255.0");
|
|
|
|
for (uint32_t i = 0; i < backboneNodes; ++i)
|
|
{
|
|
NS_LOG_INFO ("Configuring wireless network for backbone node " << i);
|
|
//
|
|
// Create a container to manage the nodes of the LAN. We need
|
|
// two containers here; one with all of the new nodes, and one
|
|
// with all of the nodes including new and existing nodes
|
|
//
|
|
NodeContainer stas;
|
|
stas.Create (infraNodes - 1);
|
|
// Now, create the container with all nodes on this link
|
|
NodeContainer infra (backbone.Get (i), stas);
|
|
//
|
|
// Create an infrastructure network
|
|
//
|
|
WifiHelper wifiInfra = WifiHelper::Default ();
|
|
NqosWifiMacHelper macInfra = NqosWifiMacHelper::Default ();
|
|
wifiPhy.SetChannel (wifiChannel.Create ());
|
|
// Create unique ssids for these networks
|
|
std::string ssidString("wifi-infra");
|
|
std::stringstream ss;
|
|
ss << i;
|
|
ssidString += ss.str();
|
|
Ssid ssid = Ssid (ssidString);
|
|
wifiInfra.SetRemoteStationManager ("ns3::ArfWifiManager");
|
|
// setup stas
|
|
macInfra.SetType ("ns3::StaWifiMac",
|
|
"Ssid", SsidValue (ssid),
|
|
"ActiveProbing", BooleanValue (false));
|
|
NetDeviceContainer staDevices = wifiInfra.Install (wifiPhy, macInfra, stas);
|
|
// setup ap.
|
|
macInfra.SetType ("ns3::ApWifiMac",
|
|
"Ssid", SsidValue (ssid));
|
|
NetDeviceContainer apDevices = wifiInfra.Install (wifiPhy, macInfra, backbone.Get (i));
|
|
// Collect all of these new devices
|
|
NetDeviceContainer infraDevices (apDevices, staDevices);
|
|
|
|
// Add the IPv4 protocol stack to the nodes in our container
|
|
//
|
|
internet.Install (stas);
|
|
//
|
|
// Assign IPv4 addresses to the device drivers (actually to the associated
|
|
// IPv4 interfaces) we just created.
|
|
//
|
|
ipAddrs.Assign (infraDevices);
|
|
//
|
|
// Assign a new network prefix for each mobile network, according to
|
|
// the network mask initialized above
|
|
//
|
|
ipAddrs.NewNetwork ();
|
|
//
|
|
// The new wireless nodes need a mobility model so we aggregate one
|
|
// to each of the nodes we just finished building.
|
|
//
|
|
Ptr<ListPositionAllocator> subnetAlloc =
|
|
CreateObject<ListPositionAllocator> ();
|
|
for (uint32_t j = 0; j < infra.GetN (); ++j)
|
|
{
|
|
subnetAlloc->Add (Vector (0.0, j, 0.0));
|
|
}
|
|
mobility.PushReferenceMobilityModel (backbone.Get (i));
|
|
mobility.SetPositionAllocator (subnetAlloc);
|
|
mobility.SetMobilityModel ("ns3::RandomDirection2dMobilityModel",
|
|
"Bounds", RectangleValue (Rectangle (-10, 10, -10, 10)),
|
|
"Speed", RandomVariableValue (ConstantVariable (3)),
|
|
"Pause", RandomVariableValue (ConstantVariable (0.4)));
|
|
mobility.Install (infra);
|
|
}
|
|
///////////////////////////////////////////////////////////////////////////
|
|
// //
|
|
// Routing configuration //
|
|
// //
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
// The below global routing does not take into account wireless effects.
|
|
// However, it is useful for setting default routes for all of the nodes
|
|
// such as the LAN nodes.
|
|
NS_LOG_INFO ("Enabling global routing on all nodes");
|
|
Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
// //
|
|
// Application configuration //
|
|
// //
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
// Create the OnOff application to send UDP datagrams of size
|
|
// 210 bytes at a rate of 10 Kb/s, between two nodes
|
|
// We'll send data from the first wired LAN node on the first wired LAN
|
|
// to the last wireless STA on the last infrastructure net, thereby
|
|
// causing packets to traverse CSMA to adhoc to infrastructure links
|
|
|
|
NS_LOG_INFO ("Create Applications.");
|
|
uint16_t port = 9; // Discard port (RFC 863)
|
|
|
|
// Let's make sure that the user does not define too few nodes
|
|
// to make this example work. We need lanNodes > 1 and infraNodes > 1
|
|
NS_ASSERT (lanNodes > 1 && infraNodes > 1);
|
|
// We want the source to be the first node created outside of the backbone
|
|
// Conveniently, the variable "backboneNodes" holds this node index value
|
|
Ptr<Node> appSource = NodeList::GetNode (backboneNodes);
|
|
// We want the sink to be the last node created in the topology.
|
|
uint32_t lastNodeIndex = backboneNodes + backboneNodes*(lanNodes - 1) + backboneNodes*(infraNodes - 1) - 1;
|
|
Ptr<Node> appSink = NodeList::GetNode (lastNodeIndex);
|
|
// Let's fetch the IP address of the last node, which is on Ipv4Interface 1
|
|
Ipv4Address remoteAddr = appSink->GetObject<Ipv4> ()->GetAddress(1, 0).GetLocal ();
|
|
|
|
OnOffHelper onoff ("ns3::UdpSocketFactory",
|
|
Address (InetSocketAddress (remoteAddr, port)));
|
|
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
|
|
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
|
|
ApplicationContainer apps = onoff.Install (appSource);
|
|
apps.Start (Seconds (3.0));
|
|
apps.Stop (Seconds (20.0));
|
|
|
|
// Create a packet sink to receive these packets
|
|
PacketSinkHelper sink ("ns3::UdpSocketFactory",
|
|
InetSocketAddress (Ipv4Address::GetAny (), port));
|
|
apps = sink.Install (appSink);
|
|
apps.Start (Seconds (3.0));
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
// //
|
|
// Tracing configuration //
|
|
// //
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
NS_LOG_INFO ("Configure Tracing.");
|
|
if (enableTracing == true)
|
|
{
|
|
CsmaHelper csma;
|
|
|
|
//
|
|
// Let's set up some ns-2-like ascii traces, using another helper class
|
|
//
|
|
AsciiTraceHelper ascii;
|
|
Ptr<OutputStreamWrapper> stream = ascii.CreateFileStream ("mixed-wireless.tr");
|
|
wifiPhy.EnableAsciiAll (stream);
|
|
csma.EnableAsciiAll (stream);
|
|
internet.EnableAsciiIpv4All (stream);
|
|
|
|
// Let's do a pcap trace on the application source and sink, ifIndex 0
|
|
// Csma captures in non-promiscuous mode
|
|
#if 0
|
|
csma.EnablePcap ("mixed-wireless", appSource->GetId (), 0, false);
|
|
#else
|
|
csma.EnablePcapAll ("mixed-wireless", false);
|
|
#endif
|
|
wifiPhy.EnablePcap ("mixed-wireless", appSink->GetId (), 0);
|
|
wifiPhy.EnablePcap ("mixed-wireless", 9, 2);
|
|
wifiPhy.EnablePcap ("mixed-wireless", 9, 0);
|
|
}
|
|
|
|
if (useCourseChangeCallback == true)
|
|
{
|
|
Config::Connect ("/NodeList/*/$ns3::MobilityModel/CourseChange", MakeCallback (&CourseChangeCallback));
|
|
}
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
// //
|
|
// Run simulation //
|
|
// //
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
NS_LOG_INFO ("Run Simulation.");
|
|
Simulator::Stop (Seconds (stopTime));
|
|
Simulator::Run ();
|
|
Simulator::Destroy ();
|
|
}
|