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.h
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
#ifndef UDP_CLIENT_SERVER_HELPER_H
10
#define UDP_CLIENT_SERVER_HELPER_H
11
12
#include <ns3/application-helper.h>
13
#include <ns3/udp-client.h>
14
#include <ns3/udp-server.h>
15
#include <ns3/udp-trace-client.h>
16
17
#include <stdint.h>
18
19
namespace
ns3
20
{
21
/**
22
* \ingroup udpclientserver
23
* \brief Create a server application which waits for input UDP packets
24
* and uses the information carried into their payload to compute
25
* delay and to determine if some packets are lost.
26
*/
27
class
UdpServerHelper
:
public
ApplicationHelper
28
{
29
public
:
30
/**
31
* Create UdpServerHelper which will make life easier for people trying
32
* to set up simulations with udp-client-server application.
33
*
34
*/
35
UdpServerHelper
();
36
37
/**
38
* Create UdpServerHelper which will make life easier for people trying
39
* to set up simulations with udp-client-server application.
40
*
41
* \param port The port the server will wait on for incoming packets
42
*/
43
UdpServerHelper
(uint16_t
port
);
44
};
45
46
/**
47
* \ingroup udpclientserver
48
* \brief Create a client application which sends UDP packets carrying
49
* a 32bit sequence number and a 64 bit time stamp.
50
*
51
*/
52
class
UdpClientHelper
:
public
ApplicationHelper
53
{
54
public
:
55
/**
56
* Create UdpClientHelper which will make life easier for people trying
57
* to set up simulations with udp-client-server.
58
*
59
*/
60
UdpClientHelper
();
61
62
/**
63
* Create UdpClientHelper which will make life easier for people trying
64
* to set up simulations with udp-client-server. Use this variant with
65
* addresses that do not include a port value (e.g., Ipv4Address and
66
* Ipv6Address).
67
*
68
* \param ip The IP address of the remote UDP server
69
* \param port The port number of the remote UDP server
70
*/
71
72
UdpClientHelper
(
const
Address
& ip, uint16_t
port
);
73
/**
74
* Create UdpClientHelper which will make life easier for people trying
75
* to set up simulations with udp-client-server. Use this variant with
76
* addresses that do include a port value (e.g., InetSocketAddress and
77
* Inet6SocketAddress).
78
*
79
* \param addr The address of the remote UDP server
80
*/
81
82
UdpClientHelper
(
const
Address
& addr);
83
};
84
85
/**
86
* \ingroup udpclientserver
87
* Create UdpTraceClient application which sends UDP packets based on a trace
88
* file of an MPEG4 stream. Trace files could be downloaded form :
89
* https://web.archive.org/web/20190907061916/http://www2.tkn.tu-berlin.de/research/trace/ltvt.html
90
* (the 2 first lines of the file should be removed)
91
* A valid trace file is a file with 4 columns:
92
* \li -1- the first one represents the frame index
93
* \li -2- the second one indicates the type of the frame: I, P or B
94
* \li -3- the third one indicates the time on which the frame was generated by the encoder
95
* \li -4- the fourth one indicates the frame size in byte
96
*/
97
class
UdpTraceClientHelper
:
public
ApplicationHelper
98
{
99
public
:
100
/**
101
* Create UdpTraceClientHelper which will make life easier for people trying
102
* to set up simulations with udp-client-server.
103
*
104
*/
105
UdpTraceClientHelper
();
106
107
/**
108
* Create UdpTraceClientHelper which will make life easier for people trying
109
* to set up simulations with udp-client-server. Use this variant with
110
* addresses that do not include a port value (e.g., Ipv4Address and
111
* Ipv6Address).
112
*
113
* \param ip The IP address of the remote UDP server
114
* \param port The port number of the remote UDP server
115
* \param filename the file from which packet traces will be loaded
116
*/
117
UdpTraceClientHelper
(
const
Address
& ip, uint16_t
port
,
const
std::string& filename =
""
);
118
119
/**
120
* Create UdpTraceClientHelper which will make life easier for people trying
121
* to set up simulations with udp-client-server. Use this variant with
122
* addresses that do include a port value (e.g., InetSocketAddress and
123
* Inet6SocketAddress).
124
*
125
* \param addr The address of the remote UDP server
126
* \param filename the file from which packet traces will be loaded
127
*/
128
UdpTraceClientHelper
(
const
Address
& addr,
const
std::string& filename =
""
);
129
};
130
131
}
// namespace ns3
132
133
#endif
/* UDP_CLIENT_SERVER_H */
ns3::Address
a polymophic address class
Definition
address.h:90
ns3::ApplicationHelper
A helper to make it easier to instantiate an application on a set of nodes.
Definition
application-helper.h:28
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::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::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
port
uint16_t port
Definition
dsdv-manet.cc:33
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
applications
helper
udp-client-server-helper.h
Generated on Fri Nov 8 2024 13:58:59 for ns-3 by
1.11.0