NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
p
q
r
s
t
u
v
w
+
Typedefs
a
b
c
d
e
f
h
i
k
l
n
o
p
q
r
s
t
u
v
+
Enumerations
a
b
c
d
f
i
k
l
n
p
q
r
s
t
u
+
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
~
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Enumerations
+
Enumerator
a
c
d
e
i
k
l
m
n
p
r
s
u
w
+
Related Functions
b
c
d
e
f
g
i
k
l
m
n
o
p
s
v
+
Files
File List
+
File Members
+
All
a
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
u
v
w
+
Functions
c
f
h
m
r
s
u
w
+
Variables
a
c
d
f
g
i
k
l
m
n
p
r
s
t
Typedefs
+
Macros
d
e
f
i
l
m
n
p
r
s
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
pit-face-record.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#include "
pit-face-record.hpp
"
27
28
namespace
nfd
{
29
namespace
pit {
30
31
FaceRecord::FaceRecord
(
Face
&
face
)
32
: m_face(
face
)
33
, m_lastNonce(0)
34
, m_lastRenewed(
time
::steady_clock::TimePoint::min())
35
, m_expiry(
time
::steady_clock::TimePoint::min())
36
{
37
}
38
39
void
40
FaceRecord::update
(
const
Interest
& interest)
41
{
42
m_lastNonce = interest.
getNonce
();
43
m_lastRenewed =
time::steady_clock::now
();
44
45
time::milliseconds lifetime = interest.
getInterestLifetime
();
46
if
(lifetime < time::milliseconds::zero()) {
47
lifetime =
ndn::DEFAULT_INTEREST_LIFETIME
;
48
}
49
m_expiry = m_lastRenewed + lifetime;
50
}
51
52
53
}
// namespace pit
54
}
// namespace nfd
nfd::face::Face
generalization of a network interface
Definition:
face.hpp:67
ndn::time::steady_clock::now
static time_point now() noexcept
Definition:
time.cpp:80
pit-face-record.hpp
ndn::Interest
Represents an Interest packet.
Definition:
interest.hpp:42
ndn::time
Definition:
time-custom-clock.hpp:28
nfd::pit::FaceRecord::FaceRecord
FaceRecord(Face &face)
Definition:
pit-face-record.cpp:31
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
ndn::Interest::getNonce
uint32_t getNonce() const
Get nonce value.
Definition:
interest.cpp:445
face
ndn::Interest::getInterestLifetime
time::milliseconds getInterestLifetime() const
Definition:
interest.hpp:261
ndn::DEFAULT_INTEREST_LIFETIME
const time::milliseconds DEFAULT_INTEREST_LIFETIME
default value for InterestLifetime
Definition:
interest.hpp:38
nfd::pit::FaceRecord::update
void update(const Interest &interest)
updates lastNonce, lastRenewed, expiry fields
Definition:
pit-face-record.cpp:40
ndnSIM
NFD
daemon
table
pit-face-record.cpp
Generated on Tue Aug 7 2018 16:19:18 for ndnSIM by
1.8.14