NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::lp::NackHeader Class Reference

represents a Network NACK header More...

#include <nack-header.hpp>

Public Member Functions

 NackHeader ()
 NackHeader (const Block &block)
template<encoding::Tag TAG>
size_t wireEncode (EncodingImpl< TAG > &encoder) const
const BlockwireEncode () const
void wireDecode (const Block &wire)
NackReason getReason () const
NackHeadersetReason (NackReason reason)
 set reason code More...

Detailed Description

represents a Network NACK header

Definition at line 52 of file nack-header.hpp.

Constructor & Destructor Documentation

§ NackHeader() [1/2]

ndn::lp::NackHeader::NackHeader ( )

Definition at line 49 of file nack-header.cpp.

§ NackHeader() [2/2]

ndn::lp::NackHeader::NackHeader ( const Block block)

Definition at line 54 of file nack-header.cpp.

References wireDecode().

Member Function Documentation

§ wireEncode() [1/2]

template<encoding::Tag TAG>
size_t ndn::lp::NackHeader::wireEncode ( EncodingImpl< TAG > &  encoder) const

§ wireEncode() [2/2]

const Block & ndn::lp::NackHeader::wireEncode ( ) const

Definition at line 78 of file nack-header.cpp.

References ndn::Block::hasWire().

§ wireDecode()

§ getReason()

NackReason ndn::lp::NackHeader::getReason ( ) const
reason code
Return values
NackReason::NONEif NackReason element does not exist or has an unknown code

Definition at line 119 of file nack-header.cpp.

References ndn::lp::CONGESTION, ndn::lp::DUPLICATE, ndn::lp::NO_ROUTE, and ndn::lp::NONE.

Referenced by nfd::fw::BestRouteStrategy2::afterReceiveNack(), ndn::lp::Nack::getReason(), and nfd::Forwarder::startProcessNack().

§ setReason()

NackHeader & ndn::lp::NackHeader::setReason ( NackReason  reason)

set reason code

reasona reason code; NackReason::NONE clears the reason

Definition at line 132 of file nack-header.cpp.

References ndn::Block::reset().

Referenced by nfd::fw::BestRouteStrategy2::afterReceiveInterest(), nfd::fw::BestRouteStrategy2::afterReceiveNack(), and ndn::lp::Nack::setReason().

The documentation for this class was generated from the following files: