A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
internet
model
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
38
class
Ipv6EndPointDemux
39
{
40
public
:
44
typedef
std::list<Ipv6EndPoint *>
EndPoints
;
45
49
typedef
std::list<Ipv6EndPoint *>::iterator
EndPointsI
;
50
51
Ipv6EndPointDemux
();
52
~Ipv6EndPointDemux
();
53
59
bool
LookupPortLocal
(uint16_t
port
);
60
68
bool
LookupLocal
(
Ptr<NetDevice>
boundNetDevice,
Ipv6Address
addr, uint16_t
port
);
69
88
EndPoints
Lookup
(
Ipv6Address
dst, uint16_t dport,
Ipv6Address
src, uint16_t sport,
Ptr<Ipv6Interface>
incomingInterface);
89
98
Ipv6EndPoint
*
SimpleLookup
(
Ipv6Address
dst, uint16_t dport,
Ipv6Address
src, uint16_t sport);
99
104
Ipv6EndPoint
*
Allocate
(
void
);
105
111
Ipv6EndPoint
*
Allocate
(
Ipv6Address
address
);
112
119
Ipv6EndPoint
*
Allocate
(
Ptr<NetDevice>
boundNetDevice, uint16_t
port
);
120
128
Ipv6EndPoint
*
Allocate
(
Ptr<NetDevice>
boundNetDevice,
Ipv6Address
address
, uint16_t
port
);
129
139
Ipv6EndPoint
*
Allocate
(
Ptr<NetDevice>
boundNetDevice,
140
Ipv6Address
localAddress, uint16_t localPort,
141
Ipv6Address
peerAddress, uint16_t peerPort);
142
147
void
DeAllocate
(
Ipv6EndPoint
*endPoint);
148
153
EndPoints
GetEndPoints
()
const
;
154
155
private
:
160
uint16_t
AllocateEphemeralPort
();
161
165
uint16_t
m_ephemeral
;
166
170
uint16_t
m_portFirst
;
171
175
uint16_t
m_portLast
;
176
180
EndPoints
m_endPoints
;
181
};
182
183
}
/* namespace ns3 */
184
185
#endif
/* IPV6_END_POINT_DEMUX_H */
186
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:73
ns3::Ipv6EndPointDemux::EndPoints
std::list< Ipv6EndPoint * > EndPoints
Container of the IPv6 endpoints.
Definition:
ipv6-end-point-demux.h:44
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:172
ns3::Ipv6EndPointDemux::m_ephemeral
uint16_t m_ephemeral
The ephemeral port.
Definition:
ipv6-end-point-demux.h:165
ns3::Ipv6EndPointDemux::EndPointsI
std::list< Ipv6EndPoint * >::iterator EndPointsI
Iterator to the container of the IPv6 endpoints.
Definition:
ipv6-end-point-demux.h:49
ns3::Ipv6EndPointDemux::m_endPoints
EndPoints m_endPoints
A list of IPv6 end points.
Definition:
ipv6-end-point-demux.h:180
port
uint16_t port
Definition:
dsdv-manet.cc:45
ns3::Ipv6EndPointDemux::Ipv6EndPointDemux
Ipv6EndPointDemux()
Definition:
ipv6-end-point-demux.cc:29
ns3::Ipv6EndPointDemux::LookupLocal
bool LookupLocal(Ptr< NetDevice > boundNetDevice, Ipv6Address addr, uint16_t port)
Lookup for address and port.
Definition:
ipv6-end-point-demux.cc:61
ns3::Ipv6EndPointDemux::Allocate
Ipv6EndPoint * Allocate(void)
Allocate a Ipv6EndPoint.
Definition:
ipv6-end-point-demux.cc:76
ns3::Ipv6EndPointDemux::m_portLast
uint16_t m_portLast
The last ephemeral port.
Definition:
ipv6-end-point-demux.h:175
ns3::Ipv6EndPointDemux::DeAllocate
void DeAllocate(Ipv6EndPoint *endPoint)
Remove a end point.
Definition:
ipv6-end-point-demux.cc:153
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
first.address
address
Definition:
first.py:37
ns3::Ipv6EndPointDemux::LookupPortLocal
bool LookupPortLocal(uint16_t port)
Lookup for port local.
Definition:
ipv6-end-point-demux.cc:48
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:291
ns3::Ipv6EndPointDemux::m_portFirst
uint16_t m_portFirst
The first ephemeral port.
Definition:
ipv6-end-point-demux.h:170
ns3::Ipv6EndPointDemux::~Ipv6EndPointDemux
~Ipv6EndPointDemux()
Definition:
ipv6-end-point-demux.cc:37
ns3::Ipv6Address
Describes an IPv6 address.
Definition:
ipv6-address.h:49
ns3::Ipv6EndPointDemux
Demultiplexer for end points.
Definition:
ipv6-end-point-demux.h:38
ns3::Ipv6EndPoint
A representation of an IPv6 endpoint/connection.
Definition:
ipv6-end-point.h:50
ns3::Ipv6EndPointDemux::AllocateEphemeralPort
uint16_t AllocateEphemeralPort()
Allocate a ephemeral port.
Definition:
ipv6-end-point-demux.cc:331
ipv6-interface.h
ns3::Ipv6EndPointDemux::GetEndPoints
EndPoints GetEndPoints() const
Get the entire list of end points registered.
Definition:
ipv6-end-point-demux.cc:353
Generated on Wed Nov 7 2018 10:01:55 for ns-3 by
1.8.14