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-end-point.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 IPV6_END_POINT_H
22
#define IPV6_END_POINT_H
23
24
#include <stdint.h>
25
26
#include "ns3/ipv6-address.h"
27
#include "ns3/callback.h"
28
#include "ns3/ipv6-header.h"
29
#include "ns3/net-device.h"
30
31
namespace
ns3
32
{
33
34
class
Header;
35
class
Packet;
36
41
class
Ipv6EndPoint
42
{
43
public
:
49
Ipv6EndPoint
(
Ipv6Address
addr, uint16_t
port
);
50
54
~Ipv6EndPoint
();
55
60
Ipv6Address
GetLocalAddress
();
61
66
void
SetLocalAddress
(
Ipv6Address
addr);
67
72
uint16_t
GetLocalPort
();
73
78
void
SetLocalPort
(uint16_t port);
79
84
Ipv6Address
GetPeerAddress
();
85
90
uint16_t
GetPeerPort
();
91
97
void
SetPeer
(
Ipv6Address
addr, uint16_t port);
98
118
void
BindToNetDevice
(
Ptr<NetDevice>
netdevice);
119
129
Ptr<NetDevice>
GetBoundNetDevice
(
void
);
130
135
void
SetRxCallback
(
Callback
<
void
,
Ptr<Packet>
,
Ipv6Header
, uint16_t> callback);
136
141
void
SetIcmpCallback
(
Callback<void, Ipv6Address, uint8_t, uint8_t, uint8_t, uint32_t>
callback);
142
147
void
SetDestroyCallback
(
Callback<void>
callback);
148
156
void
ForwardUp
(
Ptr<Packet>
p,
Ipv6Header
header, uint16_t port);
157
167
void
ForwardIcmp
(
Ipv6Address
src, uint8_t ttl, uint8_t type,
168
uint8_t code, uint32_t info);
169
170
private
:
178
void
DoForwardUp
(
Ptr<Packet>
p,
Ipv6Header
header, uint16_t sport);
179
188
void
DoForwardIcmp
(
Ipv6Address
src, uint8_t ttl, uint8_t type,
189
uint8_t code, uint32_t info);
190
194
Ipv6Address
m_localAddr
;
195
199
uint16_t
m_localPort
;
200
204
Ipv6Address
m_peerAddr
;
205
209
uint16_t
m_peerPort
;
210
214
Ptr<NetDevice>
m_boundnetdevice
;
215
219
Callback<void, Ptr<Packet>
,
Ipv6Header
, uint16_t>
m_rxCallback
;
220
224
Callback<void, Ipv6Address, uint8_t, uint8_t, uint8_t, uint32_t>
m_icmpCallback
;
225
229
Callback<void>
m_destroyCallback
;
230
};
231
232
}
/* namespace ns3 */
233
234
#endif
/* IPV6_END_POINT_H */
235
src
internet
model
ipv6-end-point.h
Generated on Fri Dec 21 2012 19:00:37 for ns-3 by
1.8.1.2