90#include "ns3/applications-module.h"
91#include "ns3/core-module.h"
92#include "ns3/csma-module.h"
93#include "ns3/internet-module.h"
94#include "ns3/ipv4-global-routing-helper.h"
95#include "ns3/mobility-module.h"
96#include "ns3/network-module.h"
97#include "ns3/point-to-point-module.h"
98#include "ns3/tap-bridge-module.h"
99#include "ns3/wifi-module.h"
111 std::string mode =
"ConfigureLocal";
112 std::string
tapName =
"thetap";
115 cmd.AddValue(
"mode",
"Mode setting of TapBridge", mode);
116 cmd.AddValue(
"tapName",
"Name of the OS tap device",
tapName);
141 wifiMac.SetType(
"ns3::StaWifiMac",
196 ipv4.SetBase(
"10.1.2.0",
"255.255.255.192");
215 wifiPhy.EnablePcapAll(
"tap-wifi-dumbbell");
217 csmaRight.EnablePcapAll(
"tap-wifi-dumbbell",
false);
holds a vector of ns3::Application pointers.
AttributeValue implementation for Boolean.
Parse command-line arguments.
build a set of CsmaNetDevice objects
void SetChannelAttribute(std::string n1, const AttributeValue &v1)
Class for representing data rates.
AttributeValue implementation for DataRate.
static void Bind(std::string name, const AttributeValue &value)
Iterate over the set of GlobalValues until a matching name is found and then set its value with Globa...
aggregate IP/TCP/UDP functionality to existing Nodes.
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
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.
static Ipv4Address GetAny()
static void PopulateRoutingTables()
Build a routing database and initialize the routing tables of the nodes in the simulation.
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Helper class used to assign positions and mobility models to nodes.
holds a vector of ns3::NetDevice pointers
keep track of a set of node pointers.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
A helper to make it easier to instantiate an ns3::OnOffApplication on a set of nodes.
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes.
Build a set of PointToPointNetDevice objects.
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.
build TapBridge to allow ns-3 simulations to interact with Linux tap devices and processes on the Lin...
void SetAttribute(std::string n1, const AttributeValue &v1)
Set an attribute in the underlying TapBridge net device when these devices are automatically created.
AttributeValue implementation for Time.
helps to create WifiNetDevice objects
create MAC layers for a ns3::WifiNetDevice.
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.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
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.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< PacketSink > sink
Pointer to the packet sink application.