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/address-utils.h>
12
#include <ns3/string.h>
13
#include <ns3/uinteger.h>
14
15
namespace
ns3
16
{
17
18
UdpServerHelper::UdpServerHelper
()
19
:
ApplicationHelper
(
UdpServer
::GetTypeId())
20
{
21
}
22
23
UdpServerHelper::UdpServerHelper
(uint16_t
port
)
24
:
UdpServerHelper
()
25
{
26
SetAttribute
(
"Port"
,
UintegerValue
(
port
));
27
}
28
29
UdpServerHelper::UdpServerHelper
(
const
Address
& address)
30
:
UdpServerHelper
()
31
{
32
SetAttribute
(
"Local"
,
AddressValue
(address));
33
}
34
35
UdpClientHelper::UdpClientHelper
()
36
:
ApplicationHelper
(
UdpClient
::GetTypeId())
37
{
38
}
39
40
UdpClientHelper::UdpClientHelper
(
const
Address
& address)
41
:
UdpClientHelper
()
42
{
43
SetAttribute
(
"Remote"
,
AddressValue
(address));
44
}
45
46
UdpClientHelper::UdpClientHelper
(
const
Address
& address, uint16_t
port
)
47
:
UdpClientHelper
(addressUtils::ConvertToSocketAddress(address,
port
))
48
{
49
}
50
51
UdpTraceClientHelper::UdpTraceClientHelper
()
52
:
ApplicationHelper
(
UdpTraceClient
::GetTypeId())
53
{
54
}
55
56
UdpTraceClientHelper::UdpTraceClientHelper
(
const
Address
& address,
const
std::string& filename)
57
:
UdpTraceClientHelper
()
58
{
59
SetAttribute
(
"Remote"
,
AddressValue
(address));
60
SetAttribute
(
"TraceFilename"
,
StringValue
(filename));
61
}
62
63
UdpTraceClientHelper::UdpTraceClientHelper
(
const
Address
& address,
64
uint16_t
port
,
65
const
std::string& filename)
66
:
UdpTraceClientHelper
(addressUtils::ConvertToSocketAddress(address,
port
), filename)
67
{
68
}
69
70
}
// namespace ns3
ns3::Address
a polymophic address class
Definition
address.h:90
ns3::AddressValue
AttributeValue implementation for Address.
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:61
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:35
ns3::UdpClient
A Udp client.
Definition
udp-client.h:38
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:18
ns3::UdpServer
A UDP server, receives UDP packets from a remote host.
Definition
udp-server.h:38
ns3::UdpTraceClientHelper
Create UdpTraceClient application which sends UDP packets based on a trace file of an MPEG4 stream.
Definition
udp-client-server-helper.h:106
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:51
ns3::UdpTraceClient
A trace based streamer.
Definition
udp-trace-client.h:55
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 Sun Dec 1 2024 18:20:35 for ns-3 by
1.11.0