NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
nack-header.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_HEADER_HPP
25
#define NDN_CXX_LP_NACK_HEADER_HPP
26
27
#include "../common.hpp"
28
#include "../encoding/encoding-buffer.hpp"
29
#include "../encoding/block-helpers.hpp"
30
31
#include "
tlv.hpp
"
32
33
namespace
ndn
{
34
namespace
lp
{
35
39
enum class
NackReason
{
40
NONE
= 0,
41
CONGESTION
= 50,
42
DUPLICATE
= 100,
43
NO_ROUTE
= 150
44
};
45
46
std::ostream&
47
operator<<
(std::ostream& os,
NackReason
reason);
48
52
class
NackHeader
53
{
54
public
:
55
NackHeader
();
56
57
explicit
58
NackHeader
(
const
Block
& block);
59
60
template
<encoding::Tag TAG>
61
size_t
62
wireEncode(
EncodingImpl<TAG>
& encoder)
const
;
63
64
const
Block
&
65
wireEncode()
const
;
66
67
void
68
wireDecode(
const
Block
& wire);
69
70
public
:
// reason
75
NackReason
76
getReason()
const
;
77
82
NackHeader
&
83
setReason(
NackReason
reason);
84
85
private
:
86
NackReason
m_reason;
87
mutable
Block
m_wire;
88
};
89
90
}
// namespace lp
91
}
// namespace ndn
92
93
#endif // NDN_CXX_LP_NACK_HEADER_HPP
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::lp::NackReason::NO_ROUTE
ndn::Block
Class representing a wire element of NDN-TLV packet format.
Definition:
block.hpp:43
ndn::lp::NackReason
NackReason
indicates the reason type of a network NACK
Definition:
nack-header.hpp:39
tlv.hpp
ndn::encoding::EncodingImpl
Definition:
encoding-buffer-fwd.hpp:45
ndn::lp::NackReason::NONE
ndn::lp::NackReason::DUPLICATE
ndn::lp::operator<<
std::ostream & operator<<(std::ostream &os, CachePolicyType policy)
Definition:
cache-policy.cpp:30
ndn::lp
Definition:
cache-policy.cpp:27
ndn::lp::NackReason::CONGESTION
ndn::lp::NackHeader
represents a Network NACK header
Definition:
nack-header.hpp:52
ndnSIM
ndn-cxx
src
lp
nack-header.hpp
Generated on Wed Jan 11 2017 18:17:13 for ndnSIM by
1.8.13