7 #ifndef NDN_MANAGEMENT_NDND_FORWARDING_ENTRY_HPP
8 #define NDN_MANAGEMENT_NDND_FORWARDING_ENTRY_HPP
10 #include "../encoding/tlv-ndnd.hpp"
11 #include "../name.hpp"
12 #include "../encoding/block.hpp"
29 time::milliseconds freshnessPeriod = time::milliseconds::min())
33 , forwardingFlags_(forwardingFlags)
34 , freshnessPeriod_(freshnessPeriod)
40 , freshnessPeriod_(time::milliseconds::min())
77 const time::milliseconds&
94 time::milliseconds freshnessPeriod_;
115 if (!action_.empty())
137 if (freshnessPeriod_ >= time::milliseconds::zero())
154 freshnessPeriod_ = time::milliseconds::min();
170 action_ = std::string(reinterpret_cast<const char*>(val->value()), val->value_size());
205 os <<
"ForwardingEntry(";
210 os <<
"Action:" << entry.
getAction() <<
", ";
214 os <<
"Prefix:" << entry.
getPrefix() <<
", ";
219 os <<
"FaceID:" << entry.
getFaceId() <<
", ";
238 #endif // NDN_MANAGEMENT_NDND_FORWARDING_ENTRY_HPP
Block nonNegativeIntegerBlock(uint32_t type, uint64_t value)
A ForwardingFlags object holds the flags which specify how the forwarding daemon should forward an in...
const std::string & getAction() const
element_const_iterator find(uint32_t type) const
Class representing wire element of the NDN packet.
void wireDecode(const Block &block)
uint64_t readNonNegativeInteger(const Block &block)
element_const_iterator elements_end() const
void setAction(const std::string &action)
void wireDecode(const Block &wire)
An ForwardingEntry holds an action and Name prefix and other fields for an forwarding entry...
const Block & wireEncode() const
element_container::const_iterator element_const_iterator
void setForwardingFlags(const ForwardingFlags &forwardingFlags)
void reset()
Reset wire buffer of the element.
A Name holds an array of Name::Component and represents an NDN name.
void push_back(const Block &element)
ForwardingEntry(const std::string &action, const Name &prefix, int faceId=-1, const ForwardingFlags &forwardingFlags=ForwardingFlags(), time::milliseconds freshnessPeriod=time::milliseconds::min())
size_t wireEncode(EncodingImpl< T > &block) const
Fast encoding or block size estimation.
void setFaceId(int faceId)
void parse() const
Parse wire buffer into subblocks.
const time::milliseconds & getFreshnessPeriod() const
void encode()
Encode subblocks into wire buffer.
void setPrefix(const Name &prefix)
const Name & getPrefix() const
const ForwardingFlags & getForwardingFlags() const
const Block & wireEncode() const
Block dataBlock(uint32_t type, const char *data, size_t dataSize)
std::ostream & operator<<(std::ostream &os, const FaceInstance &entry)
ForwardingEntry(const Block &wire)
Create from wire encoding.
bool hasWire() const
Check if the Block has fully encoded wire.
void wireDecode(const Block &wire)
void clear()
Clear all the components.
void setFreshnessPeriod(const time::milliseconds &freshnessPeriod)