NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
ndn-l3-tracer.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20
#ifndef NDN_L3_TRACER_H
21
#define NDN_L3_TRACER_H
22
23
#include "ns3/ndnSIM/model/ndn-common.hpp"
24
25
#include "ns3/ptr.h"
26
#include "ns3/simple-ref-count.h"
27
28
namespace
nfd
{
29
namespace
pit {
30
class
Entry;
31
}
// namespace pit
32
}
// namespace nfd
33
34
namespace
ns3
{
35
36
class
Node;
37
class
Packet;
38
39
namespace
ndn
{
40
45
class
L3Tracer
:
public
SimpleRefCount<L3Tracer> {
46
public
:
51
L3Tracer
(Ptr<Node> node);
52
57
L3Tracer
(
const
std::string& node);
58
62
virtual
~
L3Tracer
();
63
69
virtual
void
70
PrintHeader(std::ostream& os)
const
= 0;
71
77
virtual
void
78
Print(std::ostream& os)
const
= 0;
79
80
protected
:
81
void
82
Connect();
83
84
virtual
void
85
OutInterests(
const
Interest
&,
const
Face&) = 0;
86
87
virtual
void
88
InInterests(
const
Interest
&,
const
Face&) = 0;
89
90
virtual
void
91
OutData(
const
Data
&,
const
Face&) = 0;
92
93
virtual
void
94
InData(
const
Data
&,
const
Face&) = 0;
95
96
virtual
void
97
OutNack(
const
lp::Nack
& nack,
const
Face&) = 0;
98
99
virtual
void
100
InNack(
const
lp::Nack
&,
const
Face&) = 0;
101
102
virtual
void
103
SatisfiedInterests(
const
nfd::pit::Entry
&,
const
Face&,
const
Data
&) = 0;
104
105
virtual
void
106
TimedOutInterests(
const
nfd::pit::Entry
&) = 0;
107
108
protected
:
109
std::string
m_node
;
110
Ptr<Node>
m_nodePtr
;
111
112
struct
Stats
{
113
inline
void
114
Reset
()
115
{
116
m_inInterests = 0;
117
m_outInterests = 0;
118
m_inData = 0;
119
m_outData = 0;
120
m_inNack = 0;
121
m_outNack = 0;
122
m_satisfiedInterests = 0;
123
m_timedOutInterests = 0;
124
125
m_outSatisfiedInterests = 0;
126
m_outTimedOutInterests = 0;
127
}
128
129
double
m_inInterests
;
130
double
m_outInterests
;
131
double
m_inData
;
132
double
m_outData
;
133
double
m_inNack
;
134
double
m_outNack
;
135
double
m_satisfiedInterests
;
136
double
m_timedOutInterests
;
137
double
m_outSatisfiedInterests
;
138
double
m_outTimedOutInterests
;
139
};
140
};
141
145
inline
std::ostream&
146
operator<<
(std::ostream& os,
const
L3Tracer
& tracer)
147
{
148
os <<
"# "
;
149
tracer.
PrintHeader
(os);
150
os <<
"\n"
;
151
tracer.
Print
(os);
152
return
os;
153
}
154
155
}
// namespace ndn
156
}
// namespace ns3
157
158
#endif // NDN_L3_TRACER_H
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ns3::ndn::L3Tracer::Stats::m_outData
double m_outData
Definition:
ndn-l3-tracer.hpp:132
ns3::ndn::L3Tracer::m_node
std::string m_node
Definition:
ndn-l3-tracer.hpp:109
ns3::ndn::L3Tracer::Stats::m_timedOutInterests
double m_timedOutInterests
Definition:
ndn-l3-tracer.hpp:136
ns3::ndn::L3Tracer::Stats::m_outTimedOutInterests
double m_outTimedOutInterests
Definition:
ndn-l3-tracer.hpp:138
ns3::ndn::L3Tracer::Stats::m_outSatisfiedInterests
double m_outSatisfiedInterests
Definition:
ndn-l3-tracer.hpp:137
ns3::ndn::L3Tracer::Stats
Definition:
ndn-l3-tracer.hpp:112
ns3::ndn::L3Tracer
Base class for network-layer (incoming/outgoing Interests and Data) tracing of NDN stack...
Definition:
ndn-l3-tracer.hpp:45
ndn::lp::Nack
represents a Network Nack
Definition:
nack.hpp:40
ns3::ndn::L3Tracer::Print
virtual void Print(std::ostream &os) const =0
Print current trace data.
nfd::operator<<
std::ostream & operator<<(std::ostream &os, const Network &network)
Definition:
network.cpp:93
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
ns3::ndn::L3Tracer::Stats::Reset
void Reset()
Definition:
ndn-l3-tracer.hpp:114
ns3::ndn::L3Tracer::Stats::m_satisfiedInterests
double m_satisfiedInterests
Definition:
ndn-l3-tracer.hpp:135
nfd::pit::Entry
an Interest table entry
Definition:
pit-entry.hpp:57
ns3::ndn::L3Tracer::Stats::m_inData
double m_inData
Definition:
ndn-l3-tracer.hpp:131
ns3
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
content-store-impl.cpp:38
ns3::ndn::L3Tracer::Stats::m_outInterests
double m_outInterests
Definition:
ndn-l3-tracer.hpp:130
ns3::ndn::L3Tracer::Stats::m_outNack
double m_outNack
Definition:
ndn-l3-tracer.hpp:134
ns3::ndn::L3Tracer::Stats::m_inInterests
double m_inInterests
Definition:
ndn-l3-tracer.hpp:129
ns3::ndn::L3Tracer::m_nodePtr
Ptr< Node > m_nodePtr
Definition:
ndn-l3-tracer.hpp:110
ndn::tlv::Data
Definition:
tlv.hpp:62
ndn::tlv::Interest
Definition:
tlv.hpp:61
ns3::ndn::L3Tracer::PrintHeader
virtual void PrintHeader(std::ostream &os) const =0
Print head of the trace (e.g., for post-processing)
ns3::ndn::L3Tracer::Stats::m_inNack
double m_inNack
Definition:
ndn-l3-tracer.hpp:133
ndnSIM
utils
tracers
ndn-l3-tracer.hpp
Generated on Wed Jan 11 2017 18:17:16 for ndnSIM by
1.8.13