Create an application which sends a UDP packet and waits for an echo of this packet. More...
#include "udp-echo-helper.h"
Public Member Functions | |
UdpEchoClientHelper (const Address &addr) | |
Create UdpEchoClientHelper which will make life easier for people trying to set up simulations with echos. | |
UdpEchoClientHelper (const Address &ip, uint16_t port) | |
Create UdpEchoClientHelper which will make life easier for people trying to set up simulations with echos. | |
void | SetFill (Ptr< Application > app, const std::string &fill) |
Given a pointer to a UdpEchoClient application, set the data fill of the packet (what is sent as data to the server) to the contents of the fill string (including the trailing zero terminator). | |
void | SetFill (Ptr< Application > app, uint8_t *fill, uint32_t fillLength, uint32_t dataLength) |
Given a pointer to a UdpEchoClient application, set the data fill of the packet (what is sent as data to the server) to the contents of the fill buffer, repeated as many times as is required. | |
void | SetFill (Ptr< Application > app, uint8_t fill, uint32_t dataLength) |
Given a pointer to a UdpEchoClient application, set the data fill of the packet (what is sent as data to the server) to the contents of the fill byte. | |
Public Member Functions inherited from ns3::ApplicationHelper | |
ApplicationHelper (const std::string &typeId) | |
Create an application of a given type ID. | |
ApplicationHelper (TypeId typeId) | |
Create an application of a given type ID. | |
int64_t | AssignStreams (NodeContainer c, int64_t stream) |
Assigns a unique (monotonically increasing) stream number to all applications that match the configured type of this application helper instance. | |
ApplicationContainer | Install (const std::string &nodeName) |
Install an application on the node configured with all the attributes set with SetAttribute. | |
ApplicationContainer | Install (NodeContainer c) |
Install an application on each node of the input container configured with all the attributes set with SetAttribute. | |
ApplicationContainer | Install (Ptr< Node > node) |
Install an application on the node configured with all the attributes set with SetAttribute. | |
void | SetAttribute (const std::string &name, const AttributeValue &value) |
Helper function used to set the underlying application attributes. | |
void | SetTypeId (const std::string &typeId) |
Allow the helper to be repurposed for another application type. | |
void | SetTypeId (TypeId typeId) |
Allow the helper to be repurposed for another application type. | |
Additional Inherited Members | |
Static Public Member Functions inherited from ns3::ApplicationHelper | |
static int64_t | AssignStreamsToAllApps (NodeContainer c, int64_t stream) |
Assign a fixed random variable stream number to the random variables used by all the applications. | |
Protected Member Functions inherited from ns3::ApplicationHelper | |
virtual Ptr< Application > | DoInstall (Ptr< Node > node) |
Install an application on the node configured with all the attributes set with SetAttribute. | |
Protected Attributes inherited from ns3::ApplicationHelper | |
ObjectFactory | m_factory |
Object factory. | |
Create an application which sends a UDP packet and waits for an echo of this packet.
Definition at line 40 of file udp-echo-helper.h.
ns3::UdpEchoClientHelper::UdpEchoClientHelper | ( | const Address & | ip, |
uint16_t | port ) |
Create UdpEchoClientHelper which will make life easier for people trying to set up simulations with echos.
Use this variant with addresses that do not include a port value (e.g., Ipv4Address and Ipv6Address).
ip | The IP address of the remote udp echo server |
port | The port number of the remote udp echo server |
Definition at line 24 of file udp-echo-helper.cc.
References port, and ns3::ApplicationHelper::SetAttribute().
ns3::UdpEchoClientHelper::UdpEchoClientHelper | ( | const Address & | addr | ) |
Create UdpEchoClientHelper which will make life easier for people trying to set up simulations with echos.
Use this variant with addresses that do include a port value (e.g., InetSocketAddress and Inet6SocketAddress).
addr | The address of the remote udp echo server |
Definition at line 31 of file udp-echo-helper.cc.
References ns3::ApplicationHelper::SetAttribute().
void ns3::UdpEchoClientHelper::SetFill | ( | Ptr< Application > | app, |
const std::string & | fill ) |
Given a pointer to a UdpEchoClient application, set the data fill of the packet (what is sent as data to the server) to the contents of the fill string (including the trailing zero terminator).
app | Smart pointer to the application (real type must be UdpEchoClient). |
fill | The string to use as the actual echo data bytes. |
Definition at line 38 of file udp-echo-helper.cc.
References SetFill().
Referenced by SetFill(), SetFill(), and SetFill().
void ns3::UdpEchoClientHelper::SetFill | ( | Ptr< Application > | app, |
uint8_t * | fill, | ||
uint32_t | fillLength, | ||
uint32_t | dataLength ) |
Given a pointer to a UdpEchoClient application, set the data fill of the packet (what is sent as data to the server) to the contents of the fill buffer, repeated as many times as is required.
Initializing the fill to the contents of a single buffer is accomplished by providing a complete buffer with fillLength set to your desired dataLength
app | Smart pointer to the application (real type must be UdpEchoClient). |
fill | The fill pattern to use when constructing packets. |
fillLength | The number of bytes in the provided fill pattern. |
dataLength | The desired length of the final echo data. |
Definition at line 50 of file udp-echo-helper.cc.
References SetFill().
void ns3::UdpEchoClientHelper::SetFill | ( | Ptr< Application > | app, |
uint8_t | fill, | ||
uint32_t | dataLength ) |
Given a pointer to a UdpEchoClient application, set the data fill of the packet (what is sent as data to the server) to the contents of the fill byte.
The fill byte will be used to initialize the contents of the data packet.
app | Smart pointer to the application (real type must be UdpEchoClient). |
fill | The byte to be repeated in constructing the packet data.. |
dataLength | The desired length of the resulting echo packet data. |
Definition at line 44 of file udp-echo-helper.cc.
References SetFill().