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