A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
ipv6.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2007 INRIA
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: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19
*/
20
21
/* taken from src/node/ipv4.h and adapted to IPv6 */
22
23
#ifndef IPV6_H
24
#define IPV6_H
25
26
#include <stdint.h>
27
28
#include "ns3/object.h"
29
#include "ns3/socket.h"
30
#include "ns3/callback.h"
31
32
#include "ns3/ipv6-address.h"
33
#include "
ipv6-interface-address.h
"
34
35
namespace
ns3 {
36
37
class
Node;
38
class
NetDevice;
39
class
Packet;
40
class
Ipv6RoutingProtocol;
41
79
class
Ipv6
:
public
Object
80
{
81
public
:
82
static
TypeId
GetTypeId
(
void
);
83
87
Ipv6
();
88
92
virtual
~Ipv6
();
93
103
virtual
void
SetRoutingProtocol
(
Ptr<Ipv6RoutingProtocol>
routingProtocol) = 0;
104
110
virtual
Ptr<Ipv6RoutingProtocol>
GetRoutingProtocol
(
void
)
const
= 0;
111
122
virtual
uint32_t
AddInterface
(
Ptr<NetDevice>
device) = 0;
123
128
virtual
uint32_t
GetNInterfaces
(
void
)
const
= 0;
129
144
virtual
int32_t
GetInterfaceForAddress
(
Ipv6Address
address
)
const
= 0;
145
162
virtual
int32_t
GetInterfaceForPrefix
(
Ipv6Address
address,
163
Ipv6Prefix
mask)
const
= 0;
164
170
virtual
Ptr<NetDevice>
GetNetDevice
(uint32_t interface) = 0;
171
177
virtual
int32_t
GetInterfaceForDevice
(
Ptr<const NetDevice>
device)
const
= 0;
178
185
virtual
bool
AddAddress
(uint32_t interface,
Ipv6InterfaceAddress
address) = 0;
186
192
virtual
uint32_t
GetNAddresses
(uint32_t interface)
const
= 0;
193
204
virtual
Ipv6InterfaceAddress
GetAddress
(uint32_t interface, uint32_t addressIndex)
const
= 0;
205
218
virtual
bool
RemoveAddress
(uint32_t interface, uint32_t addressIndex) = 0;
219
227
virtual
bool
RemoveAddress
(uint32_t interface,
Ipv6Address
address) = 0;
228
236
virtual
void
SetMetric
(uint32_t interface, uint16_t metric) = 0;
237
245
virtual
uint16_t
GetMetric
(uint32_t interface)
const
= 0;
246
253
virtual
uint16_t
GetMtu
(uint32_t interface)
const
= 0;
254
260
virtual
void
SetPmtu
(
Ipv6Address
dst, uint32_t pmtu) = 0;
261
268
virtual
bool
IsUp
(uint32_t interface)
const
= 0;
269
276
virtual
void
SetUp
(uint32_t interface) = 0;
277
284
virtual
void
SetDown
(uint32_t interface) = 0;
285
291
virtual
bool
IsForwarding
(uint32_t interface)
const
= 0;
292
300
virtual
void
SetForwarding
(uint32_t interface,
bool
val) = 0;
301
305
virtual
void
RegisterExtensions
() = 0;
306
310
virtual
void
RegisterOptions
() = 0;
311
315
static
const
uint32_t
IF_ANY
= 0xffffffff;
316
317
private
:
318
// Indirect the IPv6 attributes through private pure virtual methods
323
virtual
void
SetIpForward
(
bool
forward) = 0;
324
329
virtual
bool
GetIpForward
(
void
)
const
= 0;
330
335
virtual
void
SetMtuDiscover
(
bool
mtuDiscover) = 0;
336
341
virtual
bool
GetMtuDiscover
(
void
)
const
= 0;
342
};
343
344
}
// namespace ns3
345
346
#endif
/* IPV6_H */
347
src
internet
model
ipv6.h
Generated on Fri Aug 30 2013 01:42:52 for ns-3 by
1.8.1.2