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
ipv4-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) 2005 INRIA
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: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19
*/
20
21
#ifndef IPV4_END_POINT_DEMUX_H
22
#define IPV4_END_POINT_DEMUX_H
23
24
#include <stdint.h>
25
#include <list>
26
#include "ns3/ipv4-address.h"
27
#include "
ipv4-interface.h
"
28
29
namespace
ns3 {
30
31
class
Ipv4EndPoint;
32
43
class
Ipv4EndPointDemux
{
44
public
:
48
typedef
std::list<Ipv4EndPoint *>
EndPoints
;
49
53
typedef
std::list<Ipv4EndPoint *>::iterator
EndPointsI
;
54
55
Ipv4EndPointDemux
();
56
~Ipv4EndPointDemux
();
57
62
EndPoints
GetAllEndPoints
(
void
);
63
69
bool
LookupPortLocal
(uint16_t
port
);
70
77
bool
LookupLocal
(
Ipv4Address
addr, uint16_t
port
);
78
88
EndPoints
Lookup
(
Ipv4Address
daddr,
89
uint16_t dport,
90
Ipv4Address
saddr,
91
uint16_t sport,
92
Ptr<Ipv4Interface>
incomingInterface);
93
102
Ipv4EndPoint
*
SimpleLookup
(
Ipv4Address
daddr,
103
uint16_t dport,
104
Ipv4Address
saddr,
105
uint16_t sport);
106
111
Ipv4EndPoint
*
Allocate
(
void
);
112
118
Ipv4EndPoint
*
Allocate
(
Ipv4Address
address
);
119
125
Ipv4EndPoint
*
Allocate
(uint16_t
port
);
126
133
Ipv4EndPoint
*
Allocate
(
Ipv4Address
address
, uint16_t
port
);
134
143
Ipv4EndPoint
*
Allocate
(
Ipv4Address
localAddress,
144
uint16_t localPort,
145
Ipv4Address
peerAddress,
146
uint16_t peerPort);
147
152
void
DeAllocate
(
Ipv4EndPoint
*endPoint);
153
154
private
:
155
160
uint16_t
AllocateEphemeralPort
(
void
);
161
165
uint16_t
m_ephemeral
;
166
170
uint16_t
m_portLast
;
171
175
uint16_t
m_portFirst
;
176
180
EndPoints
m_endPoints
;
181
};
182
183
}
// namespace ns3
184
185
#endif
/* IPV4_END_POINTS_H */
ns3::Ptr< Ipv4Interface >
ns3::Ipv4EndPointDemux::GetAllEndPoints
EndPoints GetAllEndPoints(void)
Get the entire list of end points registered.
Definition:
ipv4-end-point-demux.cc:176
ns3::Ipv4EndPointDemux::m_ephemeral
uint16_t m_ephemeral
The ephemeral port.
Definition:
ipv4-end-point-demux.h:165
ns3::Ipv4EndPointDemux::LookupPortLocal
bool LookupPortLocal(uint16_t port)
Lookup for port local.
Definition:
ipv4-end-point-demux.cc:48
ns3::Ipv4EndPointDemux::m_portFirst
uint16_t m_portFirst
The first ephemeral port.
Definition:
ipv4-end-point-demux.h:175
ipv4-interface.h
port
uint16_t port
Definition:
dsdv-manet.cc:44
ns3::Ipv4EndPointDemux
Demultiplexes packets to various transport layer endpoints.
Definition:
ipv4-end-point-demux.h:43
ns3::Ipv4EndPointDemux::m_portLast
uint16_t m_portLast
The last ephemeral port.
Definition:
ipv4-end-point-demux.h:170
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:312
ns3::Ipv4EndPointDemux::LookupLocal
bool LookupLocal(Ipv4Address addr, uint16_t port)
Lookup for address and port.
Definition:
ipv4-end-point-demux.cc:62
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:196
ns3::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition:
ipv4-address.h:38
ns3::Ipv4EndPointDemux::EndPoints
std::list< Ipv4EndPoint * > EndPoints
Container of the IPv4 endpoints.
Definition:
ipv4-end-point-demux.h:48
ns3::Ipv4EndPointDemux::EndPointsI
std::list< Ipv4EndPoint * >::iterator EndPointsI
Iterator to the container of the IPv4 endpoints.
Definition:
ipv4-end-point-demux.h:53
first.address
tuple address
Definition:
first.py:37
ns3::Ipv4EndPointDemux::DeAllocate
void DeAllocate(Ipv4EndPoint *endPoint)
Remove a end point.
Definition:
ipv4-end-point-demux.cc:158
ns3::Ipv4EndPointDemux::m_endPoints
EndPoints m_endPoints
A list of IPv4 end points.
Definition:
ipv4-end-point-demux.h:180
ns3::Ipv4EndPointDemux::Ipv4EndPointDemux
Ipv4EndPointDemux()
Definition:
ipv4-end-point-demux.cc:30
ns3::Ipv4EndPointDemux::AllocateEphemeralPort
uint16_t AllocateEphemeralPort(void)
Allocate an ephemeral port.
Definition:
ipv4-end-point-demux.cc:354
ns3::Ipv4EndPoint
A representation of an internet endpoint/connection.
Definition:
ipv4-end-point.h:47
ns3::Ipv4EndPointDemux::~Ipv4EndPointDemux
~Ipv4EndPointDemux()
Definition:
ipv4-end-point-demux.cc:36
ns3::Ipv4EndPointDemux::Allocate
Ipv4EndPoint * Allocate(void)
Allocate a Ipv4EndPoint.
Definition:
ipv4-end-point-demux.cc:77
src
internet
model
ipv4-end-point-demux.h
Generated on Sat Apr 19 2014 14:06:56 for ns-3 by
1.8.6