#include <iostream>
#include <fstream>
#include <string>
#include <cassert>
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/ipv4-static-routing-helper.h"
#include "ns3/ipv4-list-routing-helper.h"
Go to the source code of this file.
Functions | |
void | BindSock (Ptr< Socket > sock, Ptr< NetDevice > netdev) |
void | dstSocketRecv (Ptr< Socket > socket) |
int | main (int argc, char *argv[]) |
NS_LOG_COMPONENT_DEFINE ("SocketBoundRoutingExample") | |
void | SendStuff (Ptr< Socket > sock, Ipv4Address dstaddr, uint16_t port) |
void | srcSocketRecv (Ptr< Socket > socket) |
Definition at line 183 of file socket-bound-static-routing.cc.
References ns3::Socket::BindToNetDevice().
Referenced by main().
Definition at line 208 of file socket-bound-static-routing.cc.
References first::address, ns3::InetSocketAddress::ConvertFrom(), ns3::InetSocketAddress::GetIpv4(), ns3::InetSocketAddress::GetPort(), ns3::Packet::GetSize(), NS_LOG_INFO, ns3::Socket::RecvFrom(), ns3::Packet::RemoveAllByteTags(), ns3::Packet::RemoveAllPacketTags(), and SendStuff().
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 55 of file socket-bound-static-routing.cc.
References ns3::Ipv4StaticRouting::AddHostRouteTo(), ns3::Ipv4AddressHelper::Assign(), ns3::Socket::Bind(), BindSock(), ns3::AsciiTraceHelper::CreateFileStream(), ns3::Socket::CreateSocket(), ns3::Simulator::Destroy(), dstSocketRecv(), ns3::AsciiTraceHelperForDevice::EnableAsciiAll(), ns3::PcapHelperForDevice::EnablePcapAll(), ns3::NetDeviceContainer::Get(), ns3::Object::GetObject(), ns3::PointToPointHelper::Install(), ns3::InternetStackHelper::Install(), ns3::LOG_LEVEL_INFO, ns3::LOG_PREFIX_TIME, ns3::LogComponentEnable(), ns3::LogComponentEnableAll(), ns3::TypeId::LookupByName(), ns3::MakeCallback(), ns3::CommandLine::Parse(), ns3::Simulator::Run(), ns3::Simulator::Schedule(), SendStuff(), ns3::Ipv4AddressHelper::SetBase(), ns3::PointToPointHelper::SetChannelAttribute(), ns3::PointToPointHelper::SetDeviceAttribute(), ns3::Socket::SetRecvCallback(), and srcSocketRecv().
NS_LOG_COMPONENT_DEFINE | ( | "SocketBoundRoutingExample" | ) |
void SendStuff | ( | Ptr< Socket > | sock, |
Ipv4Address | dstaddr, | ||
uint16_t | port | ||
) |
Definition at line 175 of file socket-bound-static-routing.cc.
References ns3::Packet::AddPaddingAtEnd(), and ns3::Socket::SendTo().
Referenced by dstSocketRecv(), and main().
Definition at line 190 of file socket-bound-static-routing.cc.
References ns3::InetSocketAddress::ConvertFrom(), ns3::Socket::GetBoundNetDevice(), ns3::InetSocketAddress::GetIpv4(), ns3::Packet::GetSize(), NS_LOG_INFO, ns3::Socket::RecvFrom(), ns3::Packet::RemoveAllByteTags(), and ns3::Packet::RemoveAllPacketTags().
Referenced by main().