32#include "ns3/bridge-helper.h"
33#include "ns3/command-line.h"
34#include "ns3/csma-helper.h"
35#include "ns3/double.h"
36#include "ns3/internet-stack-helper.h"
37#include "ns3/ipv4-address-helper.h"
38#include "ns3/mobility-helper.h"
39#include "ns3/on-off-helper.h"
40#include "ns3/packet-socket-address.h"
41#include "ns3/rectangle.h"
43#include "ns3/string.h"
44#include "ns3/uinteger.h"
45#include "ns3/yans-wifi-channel.h"
46#include "ns3/yans-wifi-helper.h"
59 cmd.AddValue(
"nWifis",
"Number of wifi networks",
nWifis);
60 cmd.AddValue(
"nStas",
"Number of stations per wifi network",
nStas);
61 cmd.AddValue(
"SendIp",
"Send Ipv4 or raw packets",
sendIp);
70 std::vector<NetDeviceContainer>
apDevices;
77 ip.
SetBase(
"192.168.0.0",
"255.255.255.0");
92 std::ostringstream
oss;
93 oss <<
"wifi-default-" <<
i;
109 mobility.SetPositionAllocator(
"ns3::GridPositionAllocator",
124 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
139 "ns3::RandomWalk2dMobilityModel",
145 StringValue(
"ns3::ConstantRandomVariable[Constant=1.0]"),
164 std::string protocol;
168 protocol =
"ns3::UdpSocketFactory";
174 tmp.SetPhysicalAddress(staDevices[1].Get(0)->GetAddress());
175 tmp.SetProtocol(0x807);
177 protocol =
"ns3::PacketSocketFactory";
186 wifiPhy.EnablePcap(
"wifi-wired-bridging", apDevices[0]);
187 wifiPhy.EnablePcap(
"wifi-wired-bridging", apDevices[1]);
a polymophic address class
holds a vector of ns3::Application pointers.
Manage ASCII trace files for device models.
Add capability to bridge multiple LAN segments (IEEE 802.1D bridging)
NetDeviceContainer Install(Ptr< Node > node, NetDeviceContainer c)
This method creates an ns3::BridgeNetDevice with the attributes configured by BridgeHelper::SetDevice...
Parse command-line arguments.
build a set of CsmaNetDevice objects
Class for representing data rates.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
aggregate IP/TCP/UDP functionality to existing Nodes.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Helper class used to assign positions and mobility models to nodes.
static void EnableAsciiAll(Ptr< OutputStreamWrapper > stream)
holds a vector of ns3::NetDevice pointers
keep track of a set of node pointers.
A helper to make it easier to instantiate an ns3::OnOffApplication on a set of nodes.
an address for a packet socket
void SetSingleDevice(uint32_t device)
Set the address to match only a specified NetDevice.
AttributeValue implementation for Rectangle.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static void Run()
Run the simulation.
static void Stop()
Tell the Simulator the calling event should be the last one executed.
The IEEE 802.11 SSID Information Element.
AttributeValue implementation for Ssid.
Hold variables of type string.
Hold an unsigned integer type.
helps to create WifiNetDevice objects
create MAC layers for a ns3::WifiNetDevice.
void SetPcapDataLinkType(SupportedPcapDataLinkTypes dlt)
Set the data link type of PCAP traces to be used.
@ DLT_IEEE802_11_RADIO
Include Radiotap link layer information.
manage and create wifi channel objects for the YANS model.
static YansWifiChannelHelper Default()
Create a channel helper in a default working state.
Make it easy to create and manage PHY objects for the YANS model.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Time Seconds(double value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.