NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
nack.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2013-2018 Regents of the University of California.
4
*
5
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
6
*
7
* ndn-cxx library is free software: you can redistribute it and/or modify it under the
8
* terms of the GNU Lesser General Public License as published by the Free Software
9
* Foundation, either version 3 of the License, or (at your option) any later version.
10
*
11
* ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
12
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
14
*
15
* You should have received copies of the GNU General Public License and GNU Lesser
16
* General Public License along with ndn-cxx, e.g., in COPYING.md file. If not, see
17
* <http://www.gnu.org/licenses/>.
18
*
19
* See AUTHORS.md for complete list of ndn-cxx authors and contributors.
20
*
21
* @author Eric Newberry <enewberry@email.arizona.edu>
22
*/
23
24
#ifndef NDN_CXX_LP_NACK_HPP
25
#define NDN_CXX_LP_NACK_HPP
26
27
#include "
ndn-cxx/interest.hpp
"
28
#include "
ndn-cxx/detail/packet-base.hpp
"
29
#include "
ndn-cxx/lp/nack-header.hpp
"
30
31
namespace
ndn
{
32
namespace
lp
{
33
38
class
Nack
:
public
PacketBase
39
{
40
public
:
41
Nack
();
42
43
explicit
44
Nack
(
const
Interest
& interest);
45
46
explicit
47
Nack
(
Interest
&& interest);
48
49
public
:
// getter/setter
50
const
Interest
&
51
getInterest
()
const
52
{
53
return
m_interest;
54
}
55
56
Interest
&
57
getInterest
()
58
{
59
return
m_interest;
60
}
61
62
const
NackHeader
&
63
getHeader
()
const
64
{
65
return
m_header;
66
}
67
68
NackHeader
&
69
getHeader
()
70
{
71
return
m_header;
72
}
73
74
Nack
&
75
setHeader
(
const
NackHeader
& header)
76
{
77
m_header = header;
78
return
*
this
;
79
}
80
81
Nack
&
82
setHeader
(
NackHeader
&& header)
83
{
84
m_header = header;
85
return
*
this
;
86
}
87
88
public
:
// NackHeader proxy
89
NackReason
90
getReason
()
const
91
{
92
return
m_header.
getReason
();
93
}
94
95
Nack
&
96
setReason
(
NackReason
reason)
97
{
98
m_header.
setReason
(reason);
99
return
*
this
;
100
}
101
102
private
:
103
Interest
m_interest;
104
NackHeader
m_header;
105
};
106
107
}
// namespace lp
108
}
// namespace ndn
109
110
#endif // NDN_CXX_LP_NACK_HPP
packet-base.hpp
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::lp::NackHeader::setReason
NackHeader & setReason(NackReason reason)
set reason code
Definition:
nack-header.cpp:140
ndn::lp::Nack::setHeader
Nack & setHeader(const NackHeader &header)
Definition:
nack.hpp:75
ndn::Interest
Represents an Interest packet.
Definition:
interest.hpp:44
ndn::lp::NackReason
NackReason
indicates the reason type of a network NACK
Definition:
nack-header.hpp:37
ndn::lp::Nack::getHeader
const NackHeader & getHeader() const
Definition:
nack.hpp:63
ndn::lp::Nack::setHeader
Nack & setHeader(NackHeader &&header)
Definition:
nack.hpp:82
ndn::lp::NackHeader::getReason
NackReason getReason() const
Definition:
nack-header.cpp:127
ndn::lp::Nack
represents a Network Nack
Definition:
nack.hpp:38
ndn::lp::Nack::getReason
NackReason getReason() const
Definition:
nack.hpp:90
nack-header.hpp
ndn::lp::Nack::getHeader
NackHeader & getHeader()
Definition:
nack.hpp:69
ndn::PacketBase
base class to allow simple management of packet tags
Definition:
packet-base.hpp:31
interest.hpp
ndn::lp::Nack::Nack
Nack()
ndn::lp::Nack::setReason
Nack & setReason(NackReason reason)
Definition:
nack.hpp:96
ndn::lp
Definition:
cache-policy.cpp:28
ndn::lp::Nack::getInterest
Interest & getInterest()
Definition:
nack.hpp:57
ndn::lp::NackHeader
represents a Network NACK header
Definition:
nack-header.hpp:57
ndn::lp::Nack::getInterest
const Interest & getInterest() const
Definition:
nack.hpp:51
ndnSIM
ndn-cxx
ndn-cxx
lp
nack.hpp
Generated on Sun Feb 24 2019 22:16:05 for ndnSIM by
1.8.15