22 #ifndef _NDN_INTEREST_HEADER_H_ 
   23 #define _NDN_INTEREST_HEADER_H_ 
   25 #include "ns3/simple-ref-count.h" 
   26 #include "ns3/nstime.h" 
   27 #include "ns3/packet.h" 
   30 #include <ns3/ndnSIM/ndn.cxx/name.h> 
   31 #include <ns3/ndnSIM/ndn.cxx/exclude.h> 
   43 class Interest : 
public SimpleRefCount<Interest>
 
   51   Interest (Ptr<Packet> payload = Create<Packet> ());
 
  158       NACK_CONGESTION = 11,
 
  159       NACK_GIVEUP_PIT = 12,
 
  216   inline Ptr<const Packet>
 
  223   SetWire (Ptr<const Packet> packet) 
const;
 
  229   Print (std::ostream &os) 
const;
 
  234   operator = (
const Interest &other) { 
return *
this; }
 
  239   Time  m_interestLifetime; 
 
  243   Ptr<Exclude> m_exclude;   
 
  244   Ptr<Packet> m_payload;    
 
  246   mutable Ptr<const Packet> m_wire;
 
  249 inline std::ostream &
 
  250 operator << (std::ostream &os, 
const Interest &i)
 
  256 inline Ptr<const Packet>
 
  276 #endif // _NDN_INTEREST_HEADER_H_ 
void SetWire(Ptr< const Packet > packet) const 
Set (cache) wire formatted packet. 
 
void SetScope(int8_t scope)
Set Scope Scope limits where the Interest may propagate. 
 
const Name & GetName() const 
Get interest name. 
 
void SetNack(uint8_t nackType)
Mark the Interest as a Negative Acknowledgement Three types of NACKs are supported. 
 
Ptr< const Name > GetNamePtr() const 
Get smart pointer to the interest name (to avoid extra memory usage) 
 
Class for Interest parsing exception. 
 
void SetInterestLifetime(Time time)
Set InterestLifetime InterestLifetime indicates the (approximate) time remaining before the interest ...
 
void Print(std::ostream &os) const 
Print Interest in plain-text to the specified output stream. 
 
uint32_t GetNonce() const 
Get Nonce value Nonce carries a randomly-genenerated bytestring that is used to detect and discard du...
 
Ptr< const Packet > GetPayload() const 
Get virtual "payload" to interest packet. 
 
Time GetInterestLifetime() const 
Get InterestLifetime value InterestLifetime indicates the (approximate) time remaining before the int...
 
void SetExclude(Ptr< Exclude > exclude)
Set exclude filter of interest packet. 
 
Interest(Ptr< Packet > payload=Create< Packet >())
Constructor. 
 
uint8_t GetNack() const 
Get NACK type Returns NACK_LOOP, NACK_CONGESTION or NACK_GIVEUP_PIT. 
 
NDN Interest (wire formats are defined in wire) 
 
void SetPayload(Ptr< Packet > payload)
Set virtual "payload" of interest packet. 
 
int8_t GetScope() const 
Get Scope value Scope limits where the Interest may propagate. 
 
void SetName(Ptr< Name > name)
Set interest name. 
 
void SetNonce(uint32_t nonce)
Set Nonce Nonce carries a randomly-genenerated bytestring that is used to detect and discard duplicat...
 
Ptr< const Packet > GetWire() const 
Get wire formatted packet. 
 
Ptr< const Exclude > GetExclude() const 
Get exclude filter of interest packet.