#include <iostream>
#include <fstream>
#include <string>
#include <cassert>
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
Go to the source code of this file.
Functions | |
int | main (int argc, char *argv[]) |
NS_LOG_COMPONENT_DEFINE ("CsmaPacketSocketExample") | |
static void | SinkRx (std::string path, Ptr< const Packet > p, const Address &address) |
Variables | |
std::ofstream | g_os |
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 53 of file csma-packet-socket.cc.
References ns3::Config::Connect(), ns3::NodeContainer::Create(), ns3::AsciiTraceHelper::CreateFileStream(), ns3::Simulator::Destroy(), ns3::AsciiTraceHelperForDevice::EnableAsciiAll(), g_os, ns3::NetDeviceContainer::Get(), ns3::NodeContainer::Get(), ns3::PacketSocketHelper::Install(), ns3::PacketSinkHelper::Install(), ns3::OnOffHelper::Install(), ns3::CsmaHelper::Install(), ns3::LOG_LEVEL_INFO, ns3::LogComponentEnable(), ns3::MakeCallback(), first::nodes, NS_LOG_INFO, ns3::CommandLine::Parse(), ns3::Simulator::Run(), ns3::OnOffHelper::SetAttribute(), ns3::OnOffHelper::SetConstantRate(), ns3::CsmaHelper::SetDeviceAttribute(), ns3::PacketSocketAddress::SetPhysicalAddress(), ns3::PacketSocketAddress::SetProtocol(), ns3::PacketSocketAddress::SetSingleDevice(), SinkRx(), ns3::ApplicationContainer::Start(), and ns3::ApplicationContainer::Stop().
NS_LOG_COMPONENT_DEFINE | ( | "CsmaPacketSocketExample" | ) |
Definition at line 47 of file csma-packet-socket.cc.
References g_os, and ns3::Packet::GetSize().
Referenced by main().
std::ofstream g_os |
Definition at line 44 of file csma-packet-socket.cc.