46 .SetGroupName (
"Internet")
85 uint8_t readKind = i.
ReadU8 ();
92 uint8_t size = i.
ReadU8 ();
140 return (now & 0xFFFFFFFF);
147 uint32_t now32 = now64 & 0xFFFFFFFF;
150 if (now32 > echoTime)
Simulation virtual time values and global simulation resolution.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
static Time ElapsedTimeFromTsValue(uint32_t echoTime)
Estimate the Time elapsed from a TS echo value.
void SetTimestamp(uint32_t ts)
Set the timestamp stored in the Option.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
static TypeId GetTypeId(void)
Get the type ID.
void SetEcho(uint32_t ts)
Set the timestamp echo stored in the Option.
uint32_t ReadNtohU32(void)
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
uint32_t GetTimestamp(void) const
Get the timestamp stored in the Option.
iterator in a Buffer instance
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the Option from a buffer iterator.
virtual uint32_t GetSerializedSize(void) const
Returns number of bytes required for Option serialization.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void Print(std::ostream &os) const
Print the Option contents.
virtual void Serialize(Buffer::Iterator start) const
Serialize the Option to a buffer iterator.
static Time Now(void)
Return the current simulation virtual time.
void WriteHtonU32(uint32_t data)
static uint32_t NowToTsValue()
Return an uint32_t value which represent "now".
Defines the TCP option of kind 8 (timestamp option) as in RFC 1323
void WriteU8(uint8_t data)
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
int64_t GetMilliSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Time Seconds(double value)
Construct a Time in the indicated unit.
Base class for all kinds of TCP options.
virtual uint8_t GetKind(void) const
Get the ‘kind’ (as in RFC 793) of this option.
uint32_t m_timestamp
local timestamp
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
uint32_t m_echo
echo timestamp
uint32_t GetEcho(void) const
Get the timestamp echo stored in the Option.