A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
ipv4-end-point-demux.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2005 INRIA
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: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
18
*/
19
20
#ifndef IPV4_END_POINT_DEMUX_H
21
#define IPV4_END_POINT_DEMUX_H
22
23
#include "
ipv4-interface.h
"
24
25
#include "ns3/ipv4-address.h"
26
27
#include <list>
28
#include <stdint.h>
29
30
namespace
ns3
31
{
32
33
class
Ipv4EndPoint;
34
47
class
Ipv4EndPointDemux
48
{
49
public
:
53
typedef
std::list<Ipv4EndPoint*>
EndPoints
;
54
58
typedef
std::list<Ipv4EndPoint*>::iterator
EndPointsI
;
59
60
Ipv4EndPointDemux
();
61
~Ipv4EndPointDemux
();
62
67
EndPoints
GetAllEndPoints
();
68
74
bool
LookupPortLocal
(uint16_t
port
);
75
83
bool
LookupLocal
(
Ptr<NetDevice>
boundNetDevice,
Ipv4Address
addr, uint16_t
port
);
84
103
EndPoints
Lookup
(
Ipv4Address
daddr,
104
uint16_t dport,
105
Ipv4Address
saddr,
106
uint16_t sport,
107
Ptr<Ipv4Interface>
incomingInterface);
108
117
Ipv4EndPoint
*
SimpleLookup
(
Ipv4Address
daddr,
118
uint16_t dport,
119
Ipv4Address
saddr,
120
uint16_t sport);
121
126
Ipv4EndPoint
*
Allocate
();
127
133
Ipv4EndPoint
*
Allocate
(
Ipv4Address
address
);
134
141
Ipv4EndPoint
*
Allocate
(
Ptr<NetDevice>
boundNetDevice, uint16_t
port
);
142
150
Ipv4EndPoint
*
Allocate
(
Ptr<NetDevice>
boundNetDevice,
Ipv4Address
address
, uint16_t
port
);
151
161
Ipv4EndPoint
*
Allocate
(
Ptr<NetDevice>
boundNetDevice,
162
Ipv4Address
localAddress,
163
uint16_t localPort,
164
Ipv4Address
peerAddress,
165
uint16_t peerPort);
166
171
void
DeAllocate
(
Ipv4EndPoint
* endPoint);
172
173
private
:
178
uint16_t
AllocateEphemeralPort
();
179
183
uint16_t
m_ephemeral
;
184
188
uint16_t
m_portLast
;
189
193
uint16_t
m_portFirst
;
194
198
EndPoints
m_endPoints
;
199
};
200
201
}
// namespace ns3
202
203
#endif
/* IPV4_END_POINTS_H */
ns3::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition:
ipv4-address.h:42
ns3::Ipv4EndPointDemux
Demultiplexes packets to various transport layer endpoints.
Definition:
ipv4-end-point-demux.h:48
ns3::Ipv4EndPointDemux::m_portFirst
uint16_t m_portFirst
The first ephemeral port.
Definition:
ipv4-end-point-demux.h:193
ns3::Ipv4EndPointDemux::EndPointsI
std::list< Ipv4EndPoint * >::iterator EndPointsI
Iterator to the container of the IPv4 endpoints.
Definition:
ipv4-end-point-demux.h:58
ns3::Ipv4EndPointDemux::AllocateEphemeralPort
uint16_t AllocateEphemeralPort()
Allocate an ephemeral port.
Definition:
ipv4-end-point-demux.cc:410
ns3::Ipv4EndPointDemux::m_endPoints
EndPoints m_endPoints
A list of IPv4 end points.
Definition:
ipv4-end-point-demux.h:198
ns3::Ipv4EndPointDemux::m_portLast
uint16_t m_portLast
The last ephemeral port.
Definition:
ipv4-end-point-demux.h:188
ns3::Ipv4EndPointDemux::SimpleLookup
Ipv4EndPoint * SimpleLookup(Ipv4Address daddr, uint16_t dport, Ipv4Address saddr, uint16_t sport)
simple lookup for a match with all the parameters.
Definition:
ipv4-end-point-demux.cc:368
ns3::Ipv4EndPointDemux::~Ipv4EndPointDemux
~Ipv4EndPointDemux()
Definition:
ipv4-end-point-demux.cc:40
ns3::Ipv4EndPointDemux::LookupLocal
bool LookupLocal(Ptr< NetDevice > boundNetDevice, Ipv4Address addr, uint16_t port)
Lookup for address and port.
Definition:
ipv4-end-point-demux.cc:66
ns3::Ipv4EndPointDemux::GetAllEndPoints
EndPoints GetAllEndPoints()
Get the entire list of end points registered.
Definition:
ipv4-end-point-demux.cc:181
ns3::Ipv4EndPointDemux::m_ephemeral
uint16_t m_ephemeral
The ephemeral port.
Definition:
ipv4-end-point-demux.h:183
ns3::Ipv4EndPointDemux::Ipv4EndPointDemux
Ipv4EndPointDemux()
Definition:
ipv4-end-point-demux.cc:32
ns3::Ipv4EndPointDemux::Lookup
EndPoints Lookup(Ipv4Address daddr, uint16_t dport, Ipv4Address saddr, uint16_t sport, Ptr< Ipv4Interface > incomingInterface)
lookup for a match with all the parameters.
Definition:
ipv4-end-point-demux.cc:200
ns3::Ipv4EndPointDemux::LookupPortLocal
bool LookupPortLocal(uint16_t port)
Lookup for port local.
Definition:
ipv4-end-point-demux.cc:52
ns3::Ipv4EndPointDemux::DeAllocate
void DeAllocate(Ipv4EndPoint *endPoint)
Remove a end point.
Definition:
ipv4-end-point-demux.cc:163
ns3::Ipv4EndPointDemux::Allocate
Ipv4EndPoint * Allocate()
Allocate a Ipv4EndPoint.
Definition:
ipv4-end-point-demux.cc:81
ns3::Ipv4EndPointDemux::EndPoints
std::list< Ipv4EndPoint * > EndPoints
Container of the IPv4 endpoints.
Definition:
ipv4-end-point-demux.h:53
ns3::Ipv4EndPoint
A representation of an internet endpoint/connection.
Definition:
ipv4-end-point.h:52
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
port
uint16_t port
Definition:
dsdv-manet.cc:44
ipv4-interface.h
first.address
address
Definition:
first.py:47
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
internet
model
ipv4-end-point-demux.h
Generated on Sun Mar 3 2024 17:10:58 for ns-3 by
1.9.1