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-routing-protocol.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2009 University of Washington
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
19
/* taken from src/node/ipv4-routing-protocol.h and adapted to IPv6 */
20
21
#ifndef IPV6_ROUTING_PROTOCOL_H
22
#define IPV6_ROUTING_PROTOCOL_H
23
24
#include "ns3/packet.h"
25
#include "ns3/callback.h"
26
#include "ns3/object.h"
27
#include "ns3/socket.h"
28
29
#include "
ipv6-header.h
"
30
#include "
ipv6-interface-address.h
"
31
#include "
ipv6.h
"
32
#include "ns3/output-stream-wrapper.h"
33
34
namespace
ns3 {
35
36
class
Ipv6MulticastRoute;
37
class
Ipv6Route;
38
class
NetDevice;
39
54
class
Ipv6RoutingProtocol
:
public
Object
55
{
56
public
:
57
static
TypeId
GetTypeId
(
void
);
58
59
typedef
Callback<void, Ptr<Ipv6Route>
,
Ptr<const Packet>
,
const
Ipv6Header
&>
UnicastForwardCallback
;
60
typedef
Callback<void, Ptr<Ipv6MulticastRoute>
,
Ptr<const Packet>
,
const
Ipv6Header
&>
MulticastForwardCallback
;
61
typedef
Callback<void, Ptr<const Packet>
,
const
Ipv6Header
&, uint32_t >
LocalDeliverCallback
;
62
typedef
Callback<void, Ptr<const Packet>
,
const
Ipv6Header
&,
Socket::SocketErrno
>
ErrorCallback
;
63
80
virtual
Ptr<Ipv6Route>
RouteOutput
(
Ptr<Packet>
p,
const
Ipv6Header
&header,
Ptr<NetDevice>
oif,
Socket::SocketErrno
&sockerr) = 0;
81
103
virtual
bool
RouteInput
(
Ptr<const Packet>
p,
const
Ipv6Header
&header,
Ptr<const NetDevice>
idev,
104
UnicastForwardCallback
ucb,
MulticastForwardCallback
mcb,
105
LocalDeliverCallback
lcb,
ErrorCallback
ecb) = 0;
106
114
virtual
void
NotifyInterfaceUp
(uint32_t interface) = 0;
115
123
virtual
void
NotifyInterfaceDown
(uint32_t interface) = 0;
124
134
virtual
void
NotifyAddAddress
(uint32_t interface,
Ipv6InterfaceAddress
address) = 0;
135
145
virtual
void
NotifyRemoveAddress
(uint32_t interface,
Ipv6InterfaceAddress
address) = 0;
146
158
virtual
void
NotifyAddRoute
(
Ipv6Address
dst,
Ipv6Prefix
mask,
Ipv6Address
nextHop, uint32_t interface,
Ipv6Address
prefixToUse =
Ipv6Address::GetZero
()) = 0;
159
168
virtual
void
NotifyRemoveRoute
(
Ipv6Address
dst,
Ipv6Prefix
mask,
Ipv6Address
nextHop, uint32_t interface,
Ipv6Address
prefixToUse =
Ipv6Address::GetZero
()) = 0;
169
174
virtual
void
SetIpv6
(
Ptr<Ipv6>
ipv6) = 0;
175
181
virtual
void
PrintRoutingTable
(
Ptr<OutputStreamWrapper>
stream)
const
= 0;
182
};
183
184
}
// namespace ns3
185
186
#endif
/* IPV6_ROUTING_PROTOCOL_H */
187
src
internet
model
ipv6-routing-protocol.h
Generated on Tue Nov 13 2012 10:32:15 for ns-3 by
1.8.1.2