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
:
45
typedef
std::list<Ipv4EndPoint *>
EndPoints
;
46
typedef
std::list<Ipv4EndPoint *>::iterator
EndPointsI
;
47
48
Ipv4EndPointDemux
();
49
~Ipv4EndPointDemux
();
50
51
EndPoints
GetAllEndPoints
(
void
);
52
bool
LookupPortLocal
(uint16_t
port
);
53
bool
LookupLocal
(
Ipv4Address
addr, uint16_t
port
);
54
EndPoints
Lookup
(
Ipv4Address
daddr,
55
uint16_t dport,
56
Ipv4Address
saddr,
57
uint16_t sport,
58
Ptr<Ipv4Interface>
incomingInterface);
59
60
Ipv4EndPoint
*
SimpleLookup
(
Ipv4Address
daddr,
61
uint16_t dport,
62
Ipv4Address
saddr,
63
uint16_t sport);
64
65
Ipv4EndPoint
*
Allocate
(
void
);
66
Ipv4EndPoint
*
Allocate
(
Ipv4Address
address
);
67
Ipv4EndPoint
*
Allocate
(uint16_t
port
);
68
Ipv4EndPoint
*
Allocate
(
Ipv4Address
address
, uint16_t
port
);
69
Ipv4EndPoint
*
Allocate
(
Ipv4Address
localAddress,
70
uint16_t localPort,
71
Ipv4Address
peerAddress,
72
uint16_t peerPort);
73
74
void
DeAllocate
(
Ipv4EndPoint
*endPoint);
75
76
private
:
77
uint16_t
AllocateEphemeralPort
(
void
);
78
79
uint16_t
m_ephemeral
;
80
uint16_t
m_portLast
;
81
uint16_t
m_portFirst
;
82
EndPoints
m_endPoints
;
83
};
84
85
}
// namespace ns3
86
87
#endif
/* IPV4_END_POINTS_H */
ns3::Ptr< Ipv4Interface >
ns3::Ipv4EndPointDemux::GetAllEndPoints
EndPoints GetAllEndPoints(void)
Definition:
ipv4-end-point-demux.cc:175
ns3::Ipv4EndPointDemux::m_ephemeral
uint16_t m_ephemeral
Definition:
ipv4-end-point-demux.h:79
ns3::Ipv4EndPointDemux::LookupPortLocal
bool LookupPortLocal(uint16_t port)
Definition:
ipv4-end-point-demux.cc:47
ns3::Ipv4EndPointDemux::m_portFirst
uint16_t m_portFirst
Definition:
ipv4-end-point-demux.h:81
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
Definition:
ipv4-end-point-demux.h:80
ns3::Ipv4EndPointDemux::SimpleLookup
Ipv4EndPoint * SimpleLookup(Ipv4Address daddr, uint16_t dport, Ipv4Address saddr, uint16_t sport)
Definition:
ipv4-end-point-demux.cc:311
ns3::Ipv4EndPointDemux::LookupLocal
bool LookupLocal(Ipv4Address addr, uint16_t port)
Definition:
ipv4-end-point-demux.cc:61
ns3::Ipv4EndPointDemux::Lookup
EndPoints Lookup(Ipv4Address daddr, uint16_t dport, Ipv4Address saddr, uint16_t sport, Ptr< Ipv4Interface > incomingInterface)
Definition:
ipv4-end-point-demux.cc:195
ns3::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition:
ipv4-address.h:38
ns3::Ipv4EndPointDemux::EndPoints
std::list< Ipv4EndPoint * > EndPoints
Definition:
ipv4-end-point-demux.h:45
ns3::Ipv4EndPointDemux::EndPointsI
std::list< Ipv4EndPoint * >::iterator EndPointsI
Definition:
ipv4-end-point-demux.h:46
first.address
tuple address
Definition:
first.py:37
ns3::Ipv4EndPointDemux::DeAllocate
void DeAllocate(Ipv4EndPoint *endPoint)
Definition:
ipv4-end-point-demux.cc:157
ns3::Ipv4EndPointDemux::m_endPoints
EndPoints m_endPoints
Definition:
ipv4-end-point-demux.h:82
ns3::Ipv4EndPointDemux::Ipv4EndPointDemux
Ipv4EndPointDemux()
Definition:
ipv4-end-point-demux.cc:29
ns3::Ipv4EndPointDemux::AllocateEphemeralPort
uint16_t AllocateEphemeralPort(void)
Definition:
ipv4-end-point-demux.cc:353
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:35
ns3::Ipv4EndPointDemux::Allocate
Ipv4EndPoint * Allocate(void)
Definition:
ipv4-end-point-demux.cc:76
src
internet
model
ipv4-end-point-demux.h
Generated on Sat Nov 16 2013 12:55:27 for ns-3 by
1.8.5