|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
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)
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the Option from a buffer iterator.
static Time Now(void)
Return the current simulation virtual time.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Base class for all kinds of TCP options.
uint32_t GetEcho(void) const
Get the timestamp echo stored in the Option.
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
void WriteU8(uint8_t data)
uint32_t m_timestamp
local timestamp
virtual uint32_t GetSerializedSize(void) const
Returns number of bytes required for Option serialization.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
static TypeId GetTypeId(void)
Get the type ID.
void SetEcho(uint32_t ts)
Set the timestamp echo stored in the Option.
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
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
virtual void Serialize(Buffer::Iterator start) const
Serialize the Option to a buffer iterator.
Simulation virtual time values and global simulation resolution.
static Time ElapsedTimeFromTsValue(uint32_t echoTime)
Estimate the Time elapsed from a TS echo value.
virtual void Print(std::ostream &os) const
Print the Option contents.
virtual uint8_t GetKind(void) const
Get the ‘kind’ (as in RFC 793) of this option.
iterator in a Buffer instance
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.
uint32_t m_echo
echo timestamp
void SetTimestamp(uint32_t ts)
Set the timestamp stored in the Option.
uint32_t ReadNtohU32(void)
uint32_t GetTimestamp(void) const
Get the timestamp stored in the Option.
void WriteHtonU32(uint32_t data)