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)
iterator in a Buffer instance
void WriteU8(uint8_t data)
void WriteHtonU32(uint32_t data)
uint32_t ReadNtohU32(void)
static Time Now(void)
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
void SetTimestamp(uint32_t ts)
Set the timestamp stored in the Option.
virtual void Print(std::ostream &os) const
Print the Option contents.
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
virtual uint8_t GetKind(void) const
Get the ‘kind’ (as in RFC 793) of this option.
static Time ElapsedTimeFromTsValue(uint32_t echoTime)
Estimate the Time elapsed from a TS echo value.
static TypeId GetTypeId(void)
Get the type ID.
virtual void Serialize(Buffer::Iterator start) const
Serialize the Option to a buffer iterator.
uint32_t GetEcho(void) const
Get the timestamp echo stored in the Option.
uint32_t m_timestamp
local timestamp
virtual uint32_t GetSerializedSize(void) const
Returns number of bytes required for Option serialization.
uint32_t GetTimestamp(void) const
Get the timestamp stored in the Option.
static uint32_t NowToTsValue()
Return an uint32_t value which represent "now".
uint32_t m_echo
echo timestamp
void SetEcho(uint32_t ts)
Set the timestamp echo stored in the Option.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the Option from a buffer iterator.
Simulation virtual time values and global simulation resolution.
int64_t GetMilliSeconds(void) 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.