NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
nack.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
24
#ifndef NDN_CXX_LP_NACK_HPP
25
#define NDN_CXX_LP_NACK_HPP
26
27
#include "../common.hpp"
28
#include "../tag-host.hpp"
29
#include "../interest.hpp"
30
31
#include "
nack-header.hpp
"
32
33
namespace
ndn
{
34
namespace
lp {
35
40
class
Nack
:
public
TagHost
41
{
42
public
:
43
Nack
() =
default
;
44
45
explicit
46
Nack
(
const
Interest
& interest);
47
48
explicit
49
Nack
(
Interest
&& interest);
50
51
public
:
// getter/setter
52
const
Interest
&
53
getInterest
()
const
54
{
55
return
m_interest;
56
}
57
58
Interest
&
59
getInterest
()
60
{
61
return
m_interest;
62
}
63
64
const
NackHeader
&
65
getHeader
()
const
66
{
67
return
m_header;
68
}
69
70
NackHeader
&
71
getHeader
()
72
{
73
return
m_header;
74
}
75
76
Nack
&
77
setHeader
(
const
NackHeader
& header)
78
{
79
m_header = header;
80
return
*
this
;
81
}
82
83
Nack
&
84
setHeader
(
NackHeader
&& header)
85
{
86
m_header = header;
87
return
*
this
;
88
}
89
90
public
:
// NackHeader proxy
91
NackReason
92
getReason
()
const
93
{
94
return
m_header.
getReason
();
95
}
96
97
Nack
&
98
setReason
(
NackReason
reason)
99
{
100
m_header.
setReason
(reason);
101
return
*
this
;
102
}
103
104
private
:
105
Interest
m_interest;
106
NackHeader
m_header;
107
};
108
109
}
// namespace lp
110
}
// namespace ndn
111
112
#endif // NDN_CXX_LP_NACK_HPP
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::lp::Nack::getHeader
const NackHeader & getHeader() const
Definition:
nack.hpp:65
ndn::lp::NackHeader::setReason
NackHeader & setReason(NackReason reason)
set reason code
Definition:
nack-header.cpp:132
ndn::TagHost
Base class to store tag information (e.g., inside Interest and Data packets)
Definition:
tag-host.hpp:34
ndn::lp::Nack::setHeader
Nack & setHeader(const NackHeader &header)
Definition:
nack.hpp:77
ndn::lp::Nack::getInterest
const Interest & getInterest() const
Definition:
nack.hpp:53
ndn::Interest
represents an Interest packet
Definition:
interest.hpp:45
ndn::lp::NackReason
NackReason
indicates the reason type of a network NACK
Definition:
nack-header.hpp:39
ndn::lp::Nack::setHeader
Nack & setHeader(NackHeader &&header)
Definition:
nack.hpp:84
ndn::lp::Nack
represents a Network NACK
Definition:
nack.hpp:40
ndn::lp::Nack::getReason
NackReason getReason() const
Definition:
nack.hpp:92
nack-header.hpp
ndn::lp::Nack::getHeader
NackHeader & getHeader()
Definition:
nack.hpp:71
ndn::lp::NackHeader::getReason
NackReason getReason() const
Definition:
nack-header.cpp:119
ndn::lp::Nack::setReason
Nack & setReason(NackReason reason)
Definition:
nack.hpp:98
ndn::lp::Nack::Nack
Nack()=default
ndn::lp::Nack::getInterest
Interest & getInterest()
Definition:
nack.hpp:59
ndn::lp::NackHeader
represents a Network NACK header
Definition:
nack-header.hpp:52
ndnSIM
ndn-cxx
src
lp
nack.hpp
Generated on Tue Feb 23 2016 22:18:43 for ndnSIM by
1.8.11