29 #include "ns3/address-utils.h"
30 #include "ns3/packet.h"
40 m_type (t), m_valid (true)
49 .AddConstructor<TypeHeader> ()
76 uint8_t type = i.
ReadU8 ();
122 os <<
"UNKNOWN_TYPE";
143 uint32_t dstSeqNo,
Ipv4Address origin, uint32_t originSeqNo) :
144 m_flags (flags), m_reserved (reserved), m_hopCount (hopCount), m_requestID (requestID), m_dst (dst),
145 m_dstSeqNo (dstSeqNo), m_origin (origin), m_originSeqNo (originSeqNo)
156 .AddConstructor<RreqHeader> ()
208 <<
" sequence number " <<
m_dstSeqNo <<
" source: ipv4 "
210 <<
" flags:" <<
" Gratuitous RREP " << (*this).GetGratiousRrep ()
211 <<
" Destination only " << (*this).GetDestinationOnly ()
212 <<
" Unknown sequence number " << (*this).GetUnknownSeqno ();
282 m_flags (0), m_prefixSize (prefixSize), m_hopCount (hopCount),
283 m_dst (dst), m_dstSeqNo (dstSeqNo), m_origin (origin)
295 .AddConstructor<RrepHeader> ()
345 os <<
"destination: ipv4 " <<
m_dst <<
" sequence number " <<
m_dstSeqNo;
351 <<
" acknowledgment required flag " << (*this).GetAckRequired ();
436 .AddConstructor<RrepAckHeader> ()
491 m_flag (0), m_reserved (0)
502 .AddConstructor<RerrHeader> ()
525 std::map<Ipv4Address, uint32_t>::const_iterator j;
539 uint8_t dest = i.
ReadU8 ();
543 for (uint8_t k = 0; k < dest; ++k)
558 os <<
"Unreachable destination (ipv4 address, seq. number):";
559 std::map<Ipv4Address, uint32_t>::const_iterator j;
562 os << (*j).first <<
", " << (*j).second;
564 os <<
"No delete flag " << (*this).GetNoDelete ();
579 return (
m_flag & (1 << 0));
622 if ((j->first != k->first) || (j->second != k->second))
keep track of time values and allow control of global simulation resolution
NS_OBJECT_ENSURE_REGISTERED(TypeHeader)
void ReadFrom(Buffer::Iterator &i, Ipv4Address &ad)
#define NS_ASSERT(condition)
void WriteTo(Buffer::Iterator &i, Ipv4Address ad)
uint32_t ReadNtohU32(void)
uint32_t GetDistanceFrom(Iterator const &o) const
iterator in a Buffer instance
void WriteHtonU32(uint32_t data)
Ipv4 addresses are stored in host order in this class.
void WriteU8(uint8_t data)
std::ostream & operator<<(std::ostream &os, TypeHeader const &h)
a unique identifier for an interface.
int64_t GetMilliSeconds(void) const
TypeId SetParent(TypeId tid)