12#include "ns3/buffer.h"
13#include "ns3/object-factory.h"
14#include "ns3/object.h"
61 virtual void Print(std::ostream& os)
const = 0;
125 void Print(std::ostream& os)
const override;
129 uint8_t
GetKind()
const override;
iterator in a Buffer instance
A base class which provides memory management and object aggregation.
Smart pointer class similar to boost::intrusive_ptr.
Base class for all kinds of TCP options.
static Ptr< TcpOption > CreateOption(uint8_t kind)
Creates an option.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
virtual void Serialize(Buffer::Iterator start) const =0
Serialize the Option to a buffer iterator.
virtual uint8_t GetKind() const =0
Get the ‘kind’ (as in RFC 793 ) of this option.
virtual uint32_t Deserialize(Buffer::Iterator start)=0
Deserialize the Option from a buffer iterator.
static bool IsKindKnown(uint8_t kind)
Check if the option is implemented.
virtual void Print(std::ostream &os) const =0
Print the Option contents.
Kind
The option Kind, as defined in the respective RFCs.
@ UNKNOWN
not a standardized value; for unknown recv'd options
@ SACKPERMITTED
SACKPERMITTED.
virtual uint32_t GetSerializedSize() const =0
Returns number of bytes required for Option serialization.
static TypeId GetTypeId()
Get the type ID.
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the Option from a buffer iterator.
void Serialize(Buffer::Iterator start) const override
Serialize the Option to a buffer iterator.
uint8_t GetKind() const override
Get the ‘kind’ (as in RFC 793 ) of this option.
uint8_t m_content[40]
The option data.
void Print(std::ostream &os) const override
Print the Option contents.
static TypeId GetTypeId()
Get the type ID.
uint32_t GetSerializedSize() const override
Returns number of bytes required for Option serialization.
uint32_t m_size
The unknown option size.
~TcpOptionUnknown() override
uint8_t m_kind
The unknown option kind.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
a unique identifier for an interface.
Every class exported by the ns3 library is enclosed in the ns3 namespace.