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 ();
437 .AddConstructor<RrepAckHeader> ()
492 m_flag (0), m_reserved (0)
503 .AddConstructor<RerrHeader> ()
526 std::map<Ipv4Address, uint32_t>::const_iterator j;
540 uint8_t dest = i.
ReadU8 ();
544 for (uint8_t k = 0; k < dest; ++k)
559 os <<
"Unreachable destination (ipv4 address, seq. number):";
560 std::map<Ipv4Address, uint32_t>::const_iterator j;
563 os << (*j).first <<
", " << (*j).second;
565 os <<
"No delete flag " << (*this).GetNoDelete ();
580 return (
m_flag & (1 << 0));
623 if ((j->first != k->first) || (j->second != k->second))
Simulation virtual time values and global simulation resolution.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
void ReadFrom(Buffer::Iterator &i, Ipv4Address &ad)
Read an Ipv4Address from a Buffer.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
void WriteTo(Buffer::Iterator &i, Ipv4Address ad)
Write an Ipv4Address to a Buffer.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
uint32_t ReadNtohU32(void)
uint32_t GetDistanceFrom(Iterator const &o) const
iterator in a Buffer instance
Every class exported by the ns3 library is enclosed in the ns3 namespace.
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
Get an approximation of the time stored in this instance in the indicated unit.
TypeId SetParent(TypeId tid)