22 #include <sys/socket.h>
25 #include "ns3/core-module.h"
26 #include "ns3/network-module.h"
27 #include "ns3/internet-module.h"
28 #include "ns3/fd-net-device-module.h"
29 #include "ns3/applications-module.h"
36 main (
int argc,
char *argv[])
48 if (socketpair (AF_UNIX, SOCK_DGRAM, 0, sv) < 0)
62 addresses.
SetBase (
"10.0.0.0",
"255.255.255.0");
uint32_t AddApplication(Ptr< Application > application)
void SetStopTime(Time stop)
Specify application stop time.
virtual NetDeviceContainer Install(Ptr< Node > node) const
This method creates a FdNetDevice and associates it to a node.
smart pointer class similar to boost::intrusive_ptr
NS_LOG_COMPONENT_DEFINE("GrantedTimeWindowMpiInterface")
holds a vector of std::pair of Ptr and interface index.
void SetFileDescriptor(int fd)
Set the associated file descriptor.
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
static void Run(void)
Run the simulation until one of:
aggregate IP/TCP/UDP functionality to existing Nodes.
build a set of FdNetDevice objects Normally we eschew multiple inheritance, however, the classes PcapUserHelperForDevice and AsciiTraceUserHelperForDevice are treated as "mixins".
#define NS_FATAL_ERROR(msg)
fatal error handling
int main(int argc, char *argv[])
void EnablePcapAll(std::string prefix, bool promiscuous=false)
Enable pcap output on each device (which is of the appropriate type) in the set of all nodes created ...
holds a vector of ns3::NetDevice pointers
static void Destroy(void)
Every event scheduled by the Simulator::insertAtDestroy method is invoked.
keep track of a set of node pointers.
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
hold objects of type ns3::Ipv4Address
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
static void Stop(void)
If an event invokes this method, it will be the last event scheduled by the Simulator::run method bef...
Ptr< Node > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
a NetDevice to read/write network traffic from/into a file descriptor.
void SetAttribute(std::string name, const AttributeValue &value)
Ptr< T > GetObject(void) const
void SetStartTime(Time start)
Specify application start time.
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const