25 #include "ns3/object.h"
26 #include "ns3/buffer.h"
27 #include "ns3/object-factory.h"
71 virtual void Print (std::ostream &os)
const = 0;
135 virtual void Print (std::ostream &os)
const;
139 virtual uint8_t
GetKind (
void)
const;
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.
virtual uint8_t GetKind(void) const =0
Get the ‘kind’ (as in RFC 793) of this option.
static Ptr< TcpOption > CreateOption(uint8_t kind)
Creates an option.
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
virtual void Serialize(Buffer::Iterator start) const =0
Serialize the Option to a buffer iterator.
static TypeId GetTypeId(void)
Get the type ID.
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(void) const =0
Returns number of bytes required for Option serialization.
virtual void Serialize(Buffer::Iterator start) const
Serialize the Option to a buffer iterator.
virtual uint8_t GetKind(void) const
Get the ‘kind’ (as in RFC 793) of this option.
uint8_t m_content[40]
The option data.
virtual ~TcpOptionUnknown()
static TypeId GetTypeId(void)
Get the type ID.
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
virtual uint32_t GetSerializedSize(void) const
Returns number of bytes required for Option serialization.
uint32_t m_size
The unknown option size.
virtual void Print(std::ostream &os) const
Print the Option contents.
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the Option from a buffer iterator.
uint8_t m_kind
The unknown option kind.
a unique identifier for an interface.
Every class exported by the ns3 library is enclosed in the ns3 namespace.