A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
ping-helper.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2022 Universita' di Firenze, Italy
3
* Copyright (c) 2008-2009 Strasbourg University (original Ping6 helper)
4
* Copyright (c) 2008 INRIA (original v4Ping helper)
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 2 as
8
* published by the Free Software Foundation;
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
*
19
* Author: Tommaso Pecorella <tommaso.pecorella@unifi.it>
20
*
21
* Derived from original v4Ping helper (author: Mathieu Lacage)
22
* Derived from original ping6 helper (author: Sebastien Vincent)
23
*/
24
25
#ifndef PING_HELPER_H
26
#define PING_HELPER_H
27
28
#include "ns3/application-container.h"
29
#include "ns3/ipv4-address.h"
30
#include "ns3/ipv6-address.h"
31
#include "ns3/node-container.h"
32
#include "ns3/object-factory.h"
33
#include "ns3/ping.h"
34
35
#include <stdint.h>
36
37
namespace
ns3
38
{
39
47
class
PingHelper
48
{
49
public
:
54
PingHelper
();
55
63
PingHelper
(
Address
remote,
Address
local =
Address
());
64
73
ApplicationContainer
Install
(
NodeContainer
nodes
)
const
;
74
83
ApplicationContainer
Install
(
Ptr<Node>
node)
const
;
84
94
ApplicationContainer
Install
(std::string nodeName)
const
;
95
101
void
SetAttribute
(std::string name,
const
AttributeValue
& value);
102
103
private
:
109
Ptr<Application>
InstallPriv
(
Ptr<Node>
node)
const
;
111
ObjectFactory
m_factory
;
112
};
113
114
}
// namespace ns3
115
116
#endif
/* PING_HELPER_H */
ns3::Address
a polymophic address class
Definition:
address.h:101
ns3::ApplicationContainer
holds a vector of ns3::Application pointers.
Definition:
application-container.h:44
ns3::AttributeValue
Hold a value for an Attribute.
Definition:
attribute.h:70
ns3::NodeContainer
keep track of a set of node pointers.
Definition:
node-container.h:40
ns3::ObjectFactory
Instantiate subclasses of ns3::Object.
Definition:
object-factory.h:48
ns3::PingHelper
Create a ping application and associate it to a node.
Definition:
ping-helper.h:48
ns3::PingHelper::SetAttribute
void SetAttribute(std::string name, const AttributeValue &value)
Configure ping applications attribute.
Definition:
ping-helper.cc:46
ns3::PingHelper::m_factory
ObjectFactory m_factory
Object factory.
Definition:
ping-helper.h:111
ns3::PingHelper::Install
ApplicationContainer Install(NodeContainer nodes) const
Install a Ping application on each Node in the provided NodeContainer.
Definition:
ping-helper.cc:65
ns3::PingHelper::InstallPriv
Ptr< Application > InstallPriv(Ptr< Node > node) const
Do the actual application installation in the node.
Definition:
ping-helper.cc:77
ns3::PingHelper::PingHelper
PingHelper()
Create a PingHelper which is used to make life easier for people wanting to use ping Applications.
Definition:
ping-helper.cc:33
ns3::Ptr< Node >
nodes
NodeContainer nodes
Definition:
lr-wpan-bootstrap.cc:53
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
internet-apps
helper
ping-helper.h
Generated on Sun Mar 3 2024 17:10:57 for ns-3 by
1.9.1