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
ipv6-flow-classifier.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
//
3
// Copyright (c) 2009 INESC Porto
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: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
19
// Modifications: Tommaso Pecorella <tommaso.pecorella@unifi.it>
20
//
21
22
#ifndef IPV6_FLOW_CLASSIFIER_H
23
#define IPV6_FLOW_CLASSIFIER_H
24
25
#include <stdint.h>
26
#include <map>
27
28
#include "ns3/ipv6-header.h"
29
#include "ns3/flow-classifier.h"
30
31
namespace
ns3
{
32
33
class
Packet;
34
39
class
Ipv6FlowClassifier
:
public
FlowClassifier
40
{
41
public
:
42
44
struct
FiveTuple
45
{
46
Ipv6Address
sourceAddress
;
47
Ipv6Address
destinationAddress
;
48
uint8_t
protocol
;
49
uint16_t
sourcePort
;
50
uint16_t
destinationPort
;
51
};
52
53
Ipv6FlowClassifier
();
54
65
bool
Classify
(
const
Ipv6Header
&ipHeader,
Ptr<const Packet>
ipPayload,
66
uint32_t *out_flowId, uint32_t *out_packetId);
67
71
FiveTuple
FindFlow
(
FlowId
flowId)
const
;
72
73
virtual
void
SerializeToXmlStream
(std::ostream &os,
int
indent
)
const
;
74
75
private
:
76
78
std::map<FiveTuple, FlowId>
m_flowMap
;
80
std::map<FlowId, FlowPacketId>
m_flowPktIdMap
;
81
82
};
83
91
bool
operator <
(
const
Ipv6FlowClassifier::FiveTuple
&t1,
const
Ipv6FlowClassifier::FiveTuple
&t2);
92
100
bool
operator ==
(
const
Ipv6FlowClassifier::FiveTuple
&t1,
const
Ipv6FlowClassifier::FiveTuple
&t2);
101
102
103
}
// namespace ns3
104
105
#endif
/* IPV6_FLOW_CLASSIFIER_H */
ns3::Ipv6Header
Introspection did not find any typical Config paths.
Definition:
ipv6-header.h:33
ns3::Ptr< const Packet >
ns3::Ipv6FlowClassifier::FindFlow
FiveTuple FindFlow(FlowId flowId) const
Searches for the FiveTuple corresponding to the given flowId.
Definition:
ipv6-flow-classifier.cc:174
ns3::Ipv6FlowClassifier::FiveTuple::destinationAddress
Ipv6Address destinationAddress
Destination address.
Definition:
ipv6-flow-classifier.h:47
ns3::Ipv6FlowClassifier::Ipv6FlowClassifier
Ipv6FlowClassifier()
Definition:
ipv6-flow-classifier.cc:99
ns3::Ipv6FlowClassifier::Classify
bool Classify(const Ipv6Header &ipHeader, Ptr< const Packet > ipPayload, uint32_t *out_flowId, uint32_t *out_packetId)
try to classify the packet into flow-id and packet-id
Definition:
ipv6-flow-classifier.cc:104
check-style.indent
def indent(source, debug, level)
Definition:
check-style.py:286
ns3::Ipv6FlowClassifier::SerializeToXmlStream
virtual void SerializeToXmlStream(std::ostream &os, int indent) const
Serializes the results to an std::ostream in XML format.
Definition:
ipv6-flow-classifier.cc:190
ns3::Ipv6FlowClassifier::m_flowMap
std::map< FiveTuple, FlowId > m_flowMap
Map to Flows Identifiers to FlowIds.
Definition:
ipv6-flow-classifier.h:78
ns3::Ipv6FlowClassifier::FiveTuple::sourceAddress
Ipv6Address sourceAddress
Source address.
Definition:
ipv6-flow-classifier.h:46
ns3::operator<
bool operator<(const int64x64_t &lhs, const int64x64_t &rhs)
Less than operator.
Definition:
int64x64-128.h:356
ns3::Ipv6FlowClassifier::m_flowPktIdMap
std::map< FlowId, FlowPacketId > m_flowPktIdMap
Map to FlowIds to FlowPacketId.
Definition:
ipv6-flow-classifier.h:80
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::Ipv6FlowClassifier::FiveTuple::protocol
uint8_t protocol
Protocol.
Definition:
ipv6-flow-classifier.h:48
ns3::Ipv6FlowClassifier
Classifies packets by looking at their IP and TCP/UDP headers.
Definition:
ipv6-flow-classifier.h:39
ns3::Ipv6Address
Describes an IPv6 address.
Definition:
ipv6-address.h:47
ns3::operator==
bool operator==(const EventId &a, const EventId &b)
Definition:
event-id.cc:95
ns3::Ipv6FlowClassifier::FiveTuple::destinationPort
uint16_t destinationPort
Destination port.
Definition:
ipv6-flow-classifier.h:50
ns3::Ipv6FlowClassifier::FiveTuple::sourcePort
uint16_t sourcePort
Source port.
Definition:
ipv6-flow-classifier.h:49
ns3::Ipv6FlowClassifier::FiveTuple
Structure to classify a packet.
Definition:
ipv6-flow-classifier.h:44
ns3::FlowId
uint32_t FlowId
Abstract identifier of a packet flow.
Definition:
flow-classifier.h:33
ns3::FlowClassifier
Provides a method to translate raw packet data into abstract flow identifier and packet identifier pa...
Definition:
flow-classifier.h:53
src
flow-monitor
model
ipv6-flow-classifier.h
Generated on Wed Sep 30 2015 15:55:31 for ns-3 by
1.8.9.1