10#include "ns3/applications-module.h"
11#include "ns3/core-module.h"
12#include "ns3/csma-net-device.h"
13#include "ns3/global-router-interface.h"
14#include "ns3/internet-module.h"
15#include "ns3/ipv4-global-routing-helper.h"
16#include "ns3/ipv4-global-routing.h"
17#include "ns3/ipv4-list-routing-helper.h"
18#include "ns3/ipv4-list-routing.h"
19#include "ns3/ipv4-routing-table-entry.h"
20#include "ns3/ipv4-static-routing-helper.h"
21#include "ns3/ipv4-static-routing.h"
22#include "ns3/network-module.h"
23#include "ns3/point-to-point-module.h"
82 ipv4.SetBase(
"10.1.1.0",
"255.255.255.252");
85 ipv4.SetBase(
"10.1.1.4",
"255.255.255.252");
116 globalRouterB->InjectRoute(
"192.168.1.1",
"255.255.255.255");
143 p2p.EnableAsciiAll(
ascii.CreateFileStream(
"global-routing-injection32.tr"));
144 p2p.EnablePcapAll(
"global-routing-injection32");
a polymophic address class
holds a vector of ns3::Application pointers.
Manage ASCII trace files for device models.
Parse command-line arguments.
Class for representing data rates.
A FIFO packet queue that drops tail-end packets on overflow.
An interface aggregated to a node to provide global routing info.
void InjectRoute(Ipv4Address network, Ipv4Mask networkMask)
Inject a route to be circulated to other routers as an external route.
aggregate IP/TCP/UDP functionality to existing Nodes.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
Ipv4 addresses are stored in host order in this class.
static Ipv4Address GetAny()
static void PopulateRoutingTables()
Build a routing database and initialize the routing tables of the nodes in the simulation.
static void RecomputeRoutingTables()
Remove all routes that were previously installed in a prior call to either PopulateRoutingTables() or...
Access to the IPv4 forwarding table, interfaces, and configuration.
a class to store IPv4 address information on an interface
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Helper class that adds ns3::Ipv4ListRouting objects.
void Add(const Ipv4RoutingHelper &routing, int16_t priority)
a class to represent an Ipv4 address mask
Helper class that adds ns3::Ipv4StaticRouting objects.
static Mac48Address Allocate()
Allocate a new Mac48Address.
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.
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes.
Build a set of PointToPointNetDevice objects.
Smart pointer class similar to boost::intrusive_ptr.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static void Run()
Run the simulation.
Hold variables of type string.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
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.
Ptr< PacketSink > sink
Pointer to the packet sink application.