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
epc-tft.h
Go to the documentation of this file.
1
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
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: Nicola Baldo <nbaldo@cttc.es>
19
*/
20
21
22
#ifndef EPC_TFT_H
23
#define EPC_TFT_H
24
25
26
#include <ns3/simple-ref-count.h>
27
#include <ns3/ipv4-address.h>
28
29
#include <list>
30
31
namespace
ns3 {
32
33
34
40
class
EpcTft
:
public
SimpleRefCount
<EpcTft>
41
{
42
43
public
:
44
45
51
static
Ptr<EpcTft>
Default
();
52
56
enum
Direction
{
DOWNLINK
= 1,
57
UPLINK
= 2,
58
BIDIRECTIONAL
= 3};
59
73
struct
PacketFilter
74
{
75
PacketFilter
();
76
89
bool
Matches
(
Direction
d,
90
Ipv4Address
ra,
91
Ipv4Address
la,
92
uint16_t rp,
93
uint16_t lp,
94
uint8_t tos);
95
96
97
98
uint8_t
precedence
;
104
Direction
direction
;
107
Ipv4Address
remoteAddress
;
108
Ipv4Mask
remoteMask
;
109
Ipv4Address
localAddress
;
110
Ipv4Mask
localMask
;
112
uint16_t
remotePortStart
;
113
uint16_t
remotePortEnd
;
114
uint16_t
localPortStart
;
115
uint16_t
localPortEnd
;
117
uint8_t
typeOfService
;
118
uint8_t
typeOfServiceMask
;
119
};
120
121
EpcTft
();
122
123
131
uint8_t
Add
(
PacketFilter
f);
132
133
146
bool
Matches
(
Direction
direction,
147
Ipv4Address
remoteAddress,
148
Ipv4Address
localAddress,
149
uint16_t remotePort,
150
uint16_t localPort,
151
uint8_t typeOfService);
152
153
154
private
:
155
156
std::list<PacketFilter>
m_filters
;
157
uint8_t
m_numFilters
;
158
159
};
160
161
162
std::ostream&
operator<<
(std::ostream& os,
EpcTft::Direction
& d);
163
164
165
}
// namespace ns3
166
167
#endif
/* EPC_TFT_H */
168
169
ns3::EpcTft::Direction
Direction
Indicates the direction of the traffic that is to be classified.
Definition:
epc-tft.h:56
ns3::EpcTft::m_filters
std::list< PacketFilter > m_filters
Definition:
epc-tft.h:156
ns3::EpcTft::Add
uint8_t Add(PacketFilter f)
add a PacketFilter to the Traffic Flow Template
Definition:
epc-tft.cc:158
ns3::Ptr
smart pointer class similar to boost::intrusive_ptr
Definition:
ptr.h:59
ns3::EpcTft::PacketFilter::direction
Direction direction
whether the filter needs to be applied to uplink / downlink only, or in both cases ...
Definition:
epc-tft.h:104
ns3::Ipv4Mask
a class to represent an Ipv4 address mask
Definition:
ipv4-address.h:210
ns3::EpcTft::UPLINK
Definition:
epc-tft.h:57
ns3::EpcTft::Default
static Ptr< EpcTft > Default()
creates a TFT matching any traffic
Definition:
epc-tft.cc:142
ns3::EpcTft::PacketFilter::localPortEnd
uint16_t localPortEnd
end of the port number range of the UE
Definition:
epc-tft.h:115
ns3::EpcTft::BIDIRECTIONAL
Definition:
epc-tft.h:58
ns3::EpcTft::PacketFilter::Matches
bool Matches(Direction d, Ipv4Address ra, Ipv4Address la, uint16_t rp, uint16_t lp, uint8_t tos)
Definition:
epc-tft.cc:84
ns3::EpcTft::PacketFilter::localMask
Ipv4Mask localMask
IPv4 address mask of the UE.
Definition:
epc-tft.h:110
ns3::operator<<
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Definition:
angles.cc:43
ns3::EpcTft::PacketFilter::remoteAddress
Ipv4Address remoteAddress
IPv4 address of the remote host.
Definition:
epc-tft.h:107
ns3::EpcTft::PacketFilter::remotePortEnd
uint16_t remotePortEnd
end of the port number range of the remote host
Definition:
epc-tft.h:113
ns3::EpcTft::PacketFilter::typeOfService
uint8_t typeOfService
type of service field
Definition:
epc-tft.h:117
ns3::EpcTft::PacketFilter::localAddress
Ipv4Address localAddress
IPv4 address of the UE.
Definition:
epc-tft.h:109
ns3::EpcTft::EpcTft
EpcTft()
Definition:
epc-tft.cc:151
ns3::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition:
ipv4-address.h:38
ns3::EpcTft
This class implements the EPS bearer Traffic Flow Template (TFT), which is the set of all packet filt...
Definition:
epc-tft.h:40
ns3::EpcTft::PacketFilter::precedence
uint8_t precedence
used to specify the precedence for the packet filter among all packet filters in the TFT; higher valu...
Definition:
epc-tft.h:98
ns3::EpcTft::PacketFilter::remoteMask
Ipv4Mask remoteMask
IPv4 address mask of the remote host.
Definition:
epc-tft.h:108
ns3::EpcTft::PacketFilter::PacketFilter
PacketFilter()
Definition:
epc-tft.cc:68
ns3::EpcTft::DOWNLINK
Definition:
epc-tft.h:56
ns3::EpcTft::PacketFilter::typeOfServiceMask
uint8_t typeOfServiceMask
type of service field mask
Definition:
epc-tft.h:118
ns3::SimpleRefCount
A template-based reference counting class.
Definition:
simple-ref-count.h:64
ns3::EpcTft::Matches
bool Matches(Direction direction, Ipv4Address remoteAddress, Ipv4Address localAddress, uint16_t remotePort, uint16_t localPort, uint8_t typeOfService)
Definition:
epc-tft.cc:175
ns3::EpcTft::PacketFilter::remotePortStart
uint16_t remotePortStart
start of the port number range of the remote host
Definition:
epc-tft.h:112
ns3::EpcTft::m_numFilters
uint8_t m_numFilters
Definition:
epc-tft.h:157
ns3::EpcTft::PacketFilter
Implement the data structure representing a TrafficFlowTemplate Packet Filter.
Definition:
epc-tft.h:73
ns3::EpcTft::PacketFilter::localPortStart
uint16_t localPortStart
start of the port number range of the UE
Definition:
epc-tft.h:114
src
lte
model
epc-tft.h
Generated on Sat Apr 19 2014 14:06:59 for ns-3 by
1.8.6