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-demux.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_DEMUX_H
22
#define IPV6_END_POINT_DEMUX_H
23
24
#include <stdint.h>
25
#include <list>
26
#include "ns3/ipv6-address.h"
27
#include "
ipv6-interface.h
"
28
29
namespace
ns3 {
30
31
class
Ipv6EndPoint;
32
37
class
Ipv6EndPointDemux
38
{
39
public
:
40
typedef
std::list<Ipv6EndPoint *>
EndPoints
;
41
typedef
std::list<Ipv6EndPoint *>::iterator
EndPointsI
;
42
46
Ipv6EndPointDemux
();
47
51
~Ipv6EndPointDemux
();
52
58
bool
LookupPortLocal
(uint16_t
port
);
59
66
bool
LookupLocal
(
Ipv6Address
addr, uint16_t
port
);
67
77
EndPoints
Lookup
(
Ipv6Address
dst, uint16_t dport,
Ipv6Address
src, uint16_t sport,
Ptr<Ipv6Interface>
incomingInterface);
78
87
Ipv6EndPoint
*
SimpleLookup
(
Ipv6Address
dst, uint16_t dport,
Ipv6Address
src, uint16_t sport);
88
93
Ipv6EndPoint
*
Allocate
(
void
);
94
100
Ipv6EndPoint
*
Allocate
(
Ipv6Address
address);
101
107
Ipv6EndPoint
*
Allocate
(uint16_t
port
);
108
115
Ipv6EndPoint
*
Allocate
(
Ipv6Address
address, uint16_t
port
);
116
125
Ipv6EndPoint
*
Allocate
(
Ipv6Address
localAddress, uint16_t localPort,
Ipv6Address
peerAddress, uint16_t peerPort);
126
131
void
DeAllocate
(
Ipv6EndPoint
*endPoint);
132
137
EndPoints
GetEndPoints
()
const
;
138
139
private
:
144
uint16_t
AllocateEphemeralPort
();
145
149
uint16_t
m_ephemeral
;
150
154
uint16_t
m_portFirst
;
155
159
uint16_t
m_portLast
;
160
164
EndPoints
m_endPoints
;
165
};
166
167
}
/* namespace ns3 */
168
169
#endif
/* IPV6_END_POINT_DEMUX_H */
170
src
internet
model
ipv6-end-point-demux.h
Generated on Tue May 14 2013 11:08:22 for ns-3 by
1.8.1.2