A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
udp-client-server-helper.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2008 INRIA
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
7
*/
8
9
#include "
udp-client-server-helper.h
"
10
11
#include <ns3/string.h>
12
#include <ns3/uinteger.h>
13
14
namespace
ns3
15
{
16
17
UdpServerHelper::UdpServerHelper
()
18
:
ApplicationHelper
(
UdpServer
::GetTypeId())
19
{
20
}
21
22
UdpServerHelper::UdpServerHelper
(uint16_t
port
)
23
:
UdpServerHelper
()
24
{
25
SetAttribute
(
"Port"
,
UintegerValue
(
port
));
26
}
27
28
UdpClientHelper::UdpClientHelper
()
29
:
ApplicationHelper
(
UdpClient
::GetTypeId())
30
{
31
}
32
33
UdpClientHelper::UdpClientHelper
(
const
Address
& address)
34
:
UdpClientHelper
()
35
{
36
SetAttribute
(
"RemoteAddress"
,
AddressValue
(address));
37
}
38
39
UdpClientHelper::UdpClientHelper
(
const
Address
& address, uint16_t
port
)
40
:
UdpClientHelper
(address)
41
{
42
SetAttribute
(
"RemotePort"
,
UintegerValue
(
port
));
43
}
44
45
UdpTraceClientHelper::UdpTraceClientHelper
()
46
:
ApplicationHelper
(
UdpTraceClient
::GetTypeId())
47
{
48
}
49
50
UdpTraceClientHelper::UdpTraceClientHelper
(
const
Address
& address,
const
std::string& filename)
51
:
UdpTraceClientHelper
()
52
{
53
SetAttribute
(
"RemoteAddress"
,
AddressValue
(address));
54
SetAttribute
(
"TraceFilename"
,
StringValue
(filename));
55
}
56
57
UdpTraceClientHelper::UdpTraceClientHelper
(
const
Address
& address,
58
uint16_t
port
,
59
const
std::string& filename)
60
:
UdpTraceClientHelper
(address, filename)
61
{
62
SetAttribute
(
"RemotePort"
,
UintegerValue
(
port
));
63
}
64
65
}
// namespace ns3
ns3::Address
a polymophic address class
Definition
address.h:90
ns3::AddressValue
Definition
address.h:275
ns3::ApplicationHelper
A helper to make it easier to instantiate an application on a set of nodes.
Definition
application-helper.h:28
ns3::ApplicationHelper::SetAttribute
void SetAttribute(const std::string &name, const AttributeValue &value)
Helper function used to set the underlying application attributes.
Definition
application-helper.cc:41
ns3::StringValue
Hold variables of type string.
Definition
string.h:45
ns3::UdpClientHelper
Create a client application which sends UDP packets carrying a 32bit sequence number and a 64 bit tim...
Definition
udp-client-server-helper.h:53
ns3::UdpClientHelper::UdpClientHelper
UdpClientHelper()
Create UdpClientHelper which will make life easier for people trying to set up simulations with udp-c...
Definition
udp-client-server-helper.cc:28
ns3::UdpClient
A Udp client.
Definition
udp-client.h:34
ns3::UdpServerHelper
Create a server application which waits for input UDP packets and uses the information carried into t...
Definition
udp-client-server-helper.h:28
ns3::UdpServerHelper::UdpServerHelper
UdpServerHelper()
Create UdpServerHelper which will make life easier for people trying to set up simulations with udp-c...
Definition
udp-client-server-helper.cc:17
ns3::UdpServer
A UDP server, receives UDP packets from a remote host.
Definition
udp-server.h:39
ns3::UdpTraceClientHelper
Create UdpTraceClient application which sends UDP packets based on a trace file of an MPEG4 stream.
Definition
udp-client-server-helper.h:98
ns3::UdpTraceClientHelper::UdpTraceClientHelper
UdpTraceClientHelper()
Create UdpTraceClientHelper which will make life easier for people trying to set up simulations with ...
Definition
udp-client-server-helper.cc:45
ns3::UdpTraceClient
A trace based streamer.
Definition
udp-trace-client.h:53
ns3::UintegerValue
Hold an unsigned integer type.
Definition
uinteger.h:34
port
uint16_t port
Definition
dsdv-manet.cc:33
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
udp-client-server-helper.h
src
applications
helper
udp-client-server-helper.cc
Generated on Fri Nov 8 2024 13:58:59 for ns-3 by
1.11.0