A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
ping6.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2007-2009 Strasbourg University
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
19
*/
20
21
#ifndef PING6_H
22
#define PING6_H
23
24
#include "ns3/application.h"
25
#include "ns3/ipv6-address.h"
26
#include "ns3/ipv6-l3-protocol.h"
27
28
namespace
ns3
29
{
30
31
class
Packet;
32
class
Socket;
33
43
class
Ping6
:
public
Application
44
{
45
public
:
50
static
TypeId
GetTypeId
();
51
55
Ping6
();
56
60
virtual
~Ping6
();
61
66
void
SetLocal
(
Ipv6Address
ipv6);
67
72
void
SetRemote
(
Ipv6Address
ipv6);
73
80
void
SetIfIndex
(uint32_t ifIndex);
81
86
void
SetRouters
(std::vector<Ipv6Address> routers);
87
88
protected
:
92
virtual
void
DoDispose
();
93
94
private
:
98
virtual
void
StartApplication
();
99
103
virtual
void
StopApplication
();
104
109
void
ScheduleTransmit
(
Time
dt);
110
114
void
Send
();
115
120
void
HandleRead
(
Ptr<Socket>
socket);
121
125
Ipv6Address
m_address
;
126
130
uint32_t
m_count
;
131
135
uint32_t
m_sent
;
136
140
uint32_t
m_size
;
141
145
Time
m_interval
;
146
150
Ipv6Address
m_localAddress
;
151
155
uint32_t
m_ipInterfaceIndex
;
156
160
Ptr<Ipv6L3Protocol>
m_ipv6Protocol
;
161
165
Ipv6Address
m_peerAddress
;
166
170
Ptr<Socket>
m_socket
;
171
175
uint16_t
m_seq
;
176
180
EventId
m_sendEvent
;
181
185
uint32_t
m_ifIndex
;
186
190
std::vector<Ipv6Address>
m_routers
;
191
};
192
193
}
/* namespace ns3 */
194
195
#endif
/* PING6_H */
196
ns3::Application
The base class for all ns3 applications.
Definition:
application.h:61
ns3::EventId
An identifier for simulation events.
Definition:
event-id.h:54
ns3::Ipv6Address
Describes an IPv6 address.
Definition:
ipv6-address.h:50
ns3::Ping6
A ping6 application.
Definition:
ping6.h:44
ns3::Ping6::m_ifIndex
uint32_t m_ifIndex
Out interface (i.e.
Definition:
ping6.h:185
ns3::Ping6::~Ping6
virtual ~Ping6()
Destructor.
Definition:
ping6.cc:89
ns3::Ping6::SetRemote
void SetRemote(Ipv6Address ipv6)
Set the remote peer.
Definition:
ping6.cc:132
ns3::Ping6::SetLocal
void SetLocal(Ipv6Address ipv6)
Set the local address.
Definition:
ping6.cc:126
ns3::Ping6::m_localAddress
Ipv6Address m_localAddress
Local address.
Definition:
ping6.h:150
ns3::Ping6::DoDispose
virtual void DoDispose()
Dispose this object;.
Definition:
ping6.cc:95
ns3::Ping6::m_sendEvent
EventId m_sendEvent
Event ID.
Definition:
ping6.h:180
ns3::Ping6::HandleRead
void HandleRead(Ptr< Socket > socket)
Receive method.
Definition:
ping6.cc:249
ns3::Ping6::m_routers
std::vector< Ipv6Address > m_routers
Routers addresses for routing type 0.
Definition:
ping6.h:190
ns3::Ping6::m_count
uint32_t m_count
Number of "Echo request" packets that will be sent.
Definition:
ping6.h:130
ns3::Ping6::StopApplication
virtual void StopApplication()
Stop the application.
Definition:
ping6.cc:138
ns3::Ping6::SetIfIndex
void SetIfIndex(uint32_t ifIndex)
Set the out interface index.
Definition:
ping6.cc:150
ns3::Ping6::m_socket
Ptr< Socket > m_socket
Local socket.
Definition:
ping6.h:170
ns3::Ping6::m_address
Ipv6Address m_address
Peer IPv6 address.
Definition:
ping6.h:125
ns3::Ping6::Send
void Send()
Send a packet.
Definition:
ping6.cc:166
ns3::Ping6::SetRouters
void SetRouters(std::vector< Ipv6Address > routers)
Set routers for routing type 0 (loose routing).
Definition:
ping6.cc:161
ns3::Ping6::m_seq
uint16_t m_seq
Sequence number.
Definition:
ping6.h:175
ns3::Ping6::m_interval
Time m_interval
Interval between packets sent.
Definition:
ping6.h:145
ns3::Ping6::StartApplication
virtual void StartApplication()
Start the application.
Definition:
ping6.cc:101
ns3::Ping6::m_ipInterfaceIndex
uint32_t m_ipInterfaceIndex
IP interface index relative to the local address.
Definition:
ping6.h:155
ns3::Ping6::m_ipv6Protocol
Ptr< Ipv6L3Protocol > m_ipv6Protocol
IP interface index relative to the local address.
Definition:
ping6.h:160
ns3::Ping6::m_sent
uint32_t m_sent
Number of packets sent.
Definition:
ping6.h:135
ns3::Ping6::m_peerAddress
Ipv6Address m_peerAddress
Peer address.
Definition:
ping6.h:165
ns3::Ping6::m_size
uint32_t m_size
Size of the packet.
Definition:
ping6.h:140
ns3::Ping6::Ping6
Ping6()
Constructor.
Definition:
ping6.cc:78
ns3::Ping6::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
ping6.cc:43
ns3::Ping6::ScheduleTransmit
void ScheduleTransmit(Time dt)
Schedule sending a packet.
Definition:
ping6.cc:155
ns3::Ptr< Socket >
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:103
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
internet-apps
model
ping6.h
Generated on Tue Feb 6 2024 19:21:18 for ns-3 by
1.9.1