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
ping-helper.cc
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
* SPDX-License-Identifier: GPL-2.0-only
7
*
8
* Author: Tommaso Pecorella <tommaso.pecorella@unifi.it>
9
*
10
* Derived from original v4Ping helper (author: Mathieu Lacage)
11
* Derived from original ping6 helper (author: Sebastien Vincent)
12
*/
13
14
#include "
ping-helper.h
"
15
16
namespace
ns3
17
{
18
19
PingHelper::PingHelper
()
20
:
ApplicationHelper
(
"ns3::Ping"
)
21
{
22
}
23
24
PingHelper::PingHelper
(
const
Address
& remote,
const
Address
& local)
25
:
ApplicationHelper
(
"ns3::Ping"
)
26
{
27
m_factory
.
Set
(
"Destination"
,
AddressValue
(remote));
28
m_factory
.
Set
(
"InterfaceAddress"
,
AddressValue
(local));
29
}
30
31
}
// 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::m_factory
ObjectFactory m_factory
Object factory.
Definition
application-helper.h:129
ns3::ObjectFactory::Set
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
Definition
object-factory.h:213
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:19
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ping-helper.h
src
internet-apps
helper
ping-helper.cc
Generated on Fri Nov 8 2024 13:59:00 for ns-3 by
1.11.0