A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
main-simple.cc File Reference
#include <iostream>
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
+ Include dependency graph for main-simple.cc:

Go to the source code of this file.

Functions

static void GenerateTraffic (Ptr< Socket > socket, uint32_t size)
 
int main (int argc, char *argv[])
 
static void PrintTraffic (Ptr< Socket > socket)
 
void RunSimulation (void)
 
static void SocketPrinter (Ptr< Socket > socket)
 

Function Documentation

static void GenerateTraffic ( Ptr< Socket socket,
uint32_t  size 
)
static

Definition at line 10 of file main-simple.cc.

References ns3::Socket::Close(), ns3::Time::GetSeconds(), ns3::Simulator::Now(), ns3::Simulator::Schedule(), and ns3::Socket::Send().

Referenced by RunSimulation().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int main ( int  argc,
char *  argv[] 
)

Definition at line 68 of file main-simple.cc.

References RunSimulation().

+ Here is the call graph for this function:

static void PrintTraffic ( Ptr< Socket socket)
static

Definition at line 35 of file main-simple.cc.

References ns3::MakeCallback(), ns3::Socket::SetRecvCallback(), and SocketPrinter().

Referenced by RunSimulation().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void SocketPrinter ( Ptr< Socket socket)
static

Definition at line 25 of file main-simple.cc.

References ns3::Time::GetSeconds(), ns3::Packet::GetSize(), ns3::Simulator::Now(), and ns3::Socket::Recv().

Referenced by PrintTraffic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: