A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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
37namespace ns3
38{
39
48{
49 public:
54 PingHelper();
55
63 PingHelper(Address remote, Address local = Address());
64
74
84
94 ApplicationContainer Install(std::string nodeName) const;
95
101 void SetAttribute(std::string name, const AttributeValue& value);
102
103 private:
112};
113
114} // namespace ns3
115
116#endif /* PING_HELPER_H */
a polymophic address class
Definition: address.h:101
holds a vector of ns3::Application pointers.
Hold a value for an Attribute.
Definition: attribute.h:70
keep track of a set of node pointers.
Instantiate subclasses of ns3::Object.
Create a ping application and associate it to a node.
Definition: ping-helper.h:48
void SetAttribute(std::string name, const AttributeValue &value)
Configure ping applications attribute.
Definition: ping-helper.cc:46
ObjectFactory m_factory
Object factory.
Definition: ping-helper.h:111
ApplicationContainer Install(NodeContainer nodes) const
Install a Ping application on each Node in the provided NodeContainer.
Definition: ping-helper.cc:65
Ptr< Application > InstallPriv(Ptr< Node > node) const
Do the actual application installation in the node.
Definition: ping-helper.cc:77
PingHelper()
Create a PingHelper which is used to make life easier for people wanting to use ping Applications.
Definition: ping-helper.cc:33
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
NodeContainer nodes
Every class exported by the ns3 library is enclosed in the ns3 namespace.