21#include "ns3/applications-module.h"
22#include "ns3/click-internet-stack-helper.h"
23#include "ns3/core-module.h"
24#include "ns3/csma-module.h"
25#include "ns3/internet-module.h"
26#include "ns3/ipv4-click-routing.h"
27#include "ns3/ipv4-l3-click-protocol.h"
28#include "ns3/network-module.h"
35main(
int argc,
char* argv[])
40 cmd.AddValue(
"clickConfigFolder",
41 "Base folder for click configuration files",
43 cmd.Parse(argc, argv);
56 clickinternet.SetClickFile(n.
Get(0), clickConfigFolder +
"/nsclick-routing-node0.click");
57 clickinternet.SetClickFile(n.
Get(1), clickConfigFolder +
"/nsclick-ip-router.click");
58 clickinternet.SetClickFile(n.
Get(2), clickConfigFolder +
"/nsclick-routing-node2.click");
80 ipv4.SetBase(
"172.16.1.0",
"255.255.255.0");
83 ipv4.SetBase(
"172.16.2.0",
"255.255.255.0");
111 csma.EnablePcap(
"nsclick-routing", d01,
false);
112 csma.EnablePcap(
"nsclick-routing", d12,
false);
holds a vector of ns3::Application pointers.
void Start(Time start) const
Start all of the Applications in this container at the start time given as a parameter.
void Stop(Time stop) const
Arrange for all of the Applications in this container to Stop() at the Time given as a parameter.
aggregate Click/IP/TCP/UDP functionality to existing Nodes.
Parse command-line arguments.
build a set of CsmaNetDevice objects
Class for representing data rates.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
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.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
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.
Simulation virtual time values and global simulation resolution.
Create a client application which sends UDP packets carrying a 32bit sequence number and a 64 bit tim...
Create a server application which waits for input UDP packets and uses the information carried into t...
Hold an unsigned integer type.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
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.