A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
ipv6-end-point-demux.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2007-2009 Strasbourg University
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
18
*/
19
20
#ifndef IPV6_END_POINT_DEMUX_H
21
#define IPV6_END_POINT_DEMUX_H
22
23
#include "
ipv6-interface.h
"
24
25
#include "ns3/ipv6-address.h"
26
27
#include <list>
28
#include <stdint.h>
29
30
namespace
ns3
31
{
32
33
class
Ipv6EndPoint;
34
40
class
Ipv6EndPointDemux
41
{
42
public
:
46
typedef
std::list<Ipv6EndPoint*>
EndPoints
;
47
51
typedef
std::list<Ipv6EndPoint*>::iterator
EndPointsI
;
52
53
Ipv6EndPointDemux
();
54
~Ipv6EndPointDemux
();
55
61
bool
LookupPortLocal
(uint16_t
port
);
62
70
bool
LookupLocal
(
Ptr<NetDevice>
boundNetDevice,
Ipv6Address
addr, uint16_t
port
);
71
90
EndPoints
Lookup
(
Ipv6Address
dst,
91
uint16_t dport,
92
Ipv6Address
src,
93
uint16_t sport,
94
Ptr<Ipv6Interface>
incomingInterface);
95
104
Ipv6EndPoint
*
SimpleLookup
(
Ipv6Address
dst, uint16_t dport,
Ipv6Address
src, uint16_t sport);
105
110
Ipv6EndPoint
*
Allocate
();
111
117
Ipv6EndPoint
*
Allocate
(
Ipv6Address
address);
118
125
Ipv6EndPoint
*
Allocate
(
Ptr<NetDevice>
boundNetDevice, uint16_t
port
);
126
134
Ipv6EndPoint
*
Allocate
(
Ptr<NetDevice>
boundNetDevice,
Ipv6Address
address, uint16_t
port
);
135
145
Ipv6EndPoint
*
Allocate
(
Ptr<NetDevice>
boundNetDevice,
146
Ipv6Address
localAddress,
147
uint16_t localPort,
148
Ipv6Address
peerAddress,
149
uint16_t peerPort);
150
155
void
DeAllocate
(
Ipv6EndPoint
* endPoint);
156
161
EndPoints
GetEndPoints
()
const
;
162
163
private
:
168
uint16_t
AllocateEphemeralPort
();
169
173
uint16_t
m_ephemeral
;
174
178
uint16_t
m_portFirst
;
179
183
uint16_t
m_portLast
;
184
188
EndPoints
m_endPoints
;
189
};
190
191
}
/* namespace ns3 */
192
193
#endif
/* IPV6_END_POINT_DEMUX_H */
ns3::Ipv6Address
Describes an IPv6 address.
Definition:
ipv6-address.h:49
ns3::Ipv6EndPointDemux
Demultiplexer for end points.
Definition:
ipv6-end-point-demux.h:41
ns3::Ipv6EndPointDemux::Lookup
EndPoints Lookup(Ipv6Address dst, uint16_t dport, Ipv6Address src, uint16_t sport, Ptr< Ipv6Interface > incomingInterface)
lookup for a match with all the parameters.
Definition:
ipv6-end-point-demux.cc:182
ns3::Ipv6EndPointDemux::~Ipv6EndPointDemux
~Ipv6EndPointDemux()
Definition:
ipv6-end-point-demux.cc:39
ns3::Ipv6EndPointDemux::Ipv6EndPointDemux
Ipv6EndPointDemux()
Definition:
ipv6-end-point-demux.cc:31
ns3::Ipv6EndPointDemux::Allocate
Ipv6EndPoint * Allocate()
Allocate a Ipv6EndPoint.
Definition:
ipv6-end-point-demux.cc:80
ns3::Ipv6EndPointDemux::LookupLocal
bool LookupLocal(Ptr< NetDevice > boundNetDevice, Ipv6Address addr, uint16_t port)
Lookup for address and port.
Definition:
ipv6-end-point-demux.cc:65
ns3::Ipv6EndPointDemux::m_endPoints
EndPoints m_endPoints
A list of IPv6 end points.
Definition:
ipv6-end-point-demux.h:188
ns3::Ipv6EndPointDemux::m_ephemeral
uint16_t m_ephemeral
The ephemeral port.
Definition:
ipv6-end-point-demux.h:173
ns3::Ipv6EndPointDemux::EndPointsI
std::list< Ipv6EndPoint * >::iterator EndPointsI
Iterator to the container of the IPv6 endpoints.
Definition:
ipv6-end-point-demux.h:51
ns3::Ipv6EndPointDemux::GetEndPoints
EndPoints GetEndPoints() const
Get the entire list of end points registered.
Definition:
ipv6-end-point-demux.cc:374
ns3::Ipv6EndPointDemux::SimpleLookup
Ipv6EndPoint * SimpleLookup(Ipv6Address dst, uint16_t dport, Ipv6Address src, uint16_t sport)
Simple lookup for a four-tuple match.
Definition:
ipv6-end-point-demux.cc:311
ns3::Ipv6EndPointDemux::LookupPortLocal
bool LookupPortLocal(uint16_t port)
Lookup for port local.
Definition:
ipv6-end-point-demux.cc:51
ns3::Ipv6EndPointDemux::AllocateEphemeralPort
uint16_t AllocateEphemeralPort()
Allocate a ephemeral port.
Definition:
ipv6-end-point-demux.cc:352
ns3::Ipv6EndPointDemux::m_portFirst
uint16_t m_portFirst
The first ephemeral port.
Definition:
ipv6-end-point-demux.h:178
ns3::Ipv6EndPointDemux::m_portLast
uint16_t m_portLast
The last ephemeral port.
Definition:
ipv6-end-point-demux.h:183
ns3::Ipv6EndPointDemux::DeAllocate
void DeAllocate(Ipv6EndPoint *endPoint)
Remove a end point.
Definition:
ipv6-end-point-demux.cc:162
ns3::Ipv6EndPointDemux::EndPoints
std::list< Ipv6EndPoint * > EndPoints
Container of the IPv6 endpoints.
Definition:
ipv6-end-point-demux.h:46
ns3::Ipv6EndPoint
A representation of an IPv6 endpoint/connection.
Definition:
ipv6-end-point.h:50
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:78
port
uint16_t port
Definition:
dsdv-manet.cc:44
ipv6-interface.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
internet
model
ipv6-end-point-demux.h
Generated on Sun Jul 2 2023 18:21:40 for ns-3 by
1.9.6