|
ns-3
|
Option field for an IPv6ExtensionHeader Enables adding options to an IPv6ExtensionHeader. More...
#include <ipv6-extension-header.h>

Public Member Functions | |
| OptionField (uint32_t optionsOffset) | |
| Constructor. | |
| ~OptionField () | |
| Destructor. | |
| uint32_t | GetSerializedSize () const |
| Get the serialized size of the packet. | |
| void | Serialize (Buffer::Iterator start) const |
| Serialize all added options. | |
| uint32_t | Deserialize (Buffer::Iterator start, uint32_t length) |
| Deserialize the packet. | |
| void | AddOption (Ipv6OptionHeader const &option) |
| Serialize the option, prepending pad1 or padn option as necessary. | |
| uint32_t | GetOptionsOffset () |
| Get the offset where the options begin, measured from the start of the extension header. | |
| Buffer | GetOptionBuffer () |
| Get the buffer. | |
Option field for an IPv6ExtensionHeader Enables adding options to an IPv6ExtensionHeader.
Implementor's note: Make sure to add the result of OptionField::GetSerializedSize () to your IPv6ExtensionHeader::GetSerializedSize () return value. Call OptionField::Serialize and OptionField::Deserialize at the end of your corresponding IPv6ExtensionHeader methods.
| ns3::OptionField::OptionField | ( | uint32_t | optionsOffset | ) |
Constructor.
| optionsOffset | option offset |
| void ns3::OptionField::AddOption | ( | Ipv6OptionHeader const & | option | ) |
Serialize the option, prepending pad1 or padn option as necessary.
| option | the option header to serialize |
References ns3::Buffer::AddAtEnd(), ns3::Buffer::End(), ns3::Ipv6OptionHeader::GetAlignment(), ns3::Ipv6OptionHeader::GetSerializedSize(), NS_LOG_FUNCTION_NOARGS, NS_LOG_LOGIC, ns3::Buffer::Iterator::Prev(), and ns3::Ipv6OptionHeader::Serialize().
| uint32_t ns3::OptionField::Deserialize | ( | Buffer::Iterator | start, |
| uint32_t | length | ||
| ) |
Deserialize the packet.
| start | Buffer iterator |
| length | length |
References ns3::Buffer::AddAtEnd(), ns3::Buffer::Begin(), ns3::Buffer::Iterator::Read(), and ns3::Buffer::Iterator::Write().
Get the buffer.
| uint32_t ns3::OptionField::GetOptionsOffset | ( | ) |
Get the offset where the options begin, measured from the start of the extension header.
Referenced by ns3::Ipv6ExtensionHopByHop::Process(), and ns3::Ipv6ExtensionDestination::Process().
| uint32_t ns3::OptionField::GetSerializedSize | ( | void | ) | const |
Get the serialized size of the packet.
Reimplemented in ns3::Ipv6ExtensionDestinationHeader, and ns3::Ipv6ExtensionHopByHopHeader.
References ns3::Buffer::GetSize().
| void ns3::OptionField::Serialize | ( | Buffer::Iterator | start | ) | const |
Serialize all added options.
| start | Buffer iterator |
Reimplemented in ns3::Ipv6ExtensionDestinationHeader, and ns3::Ipv6ExtensionHopByHopHeader.
References ns3::Buffer::Begin(), ns3::Buffer::End(), NS_LOG_LOGIC, ns3::Ipv6OptionPad1Header::Serialize(), ns3::Ipv6OptionPadnHeader::Serialize(), and ns3::Buffer::Iterator::Write().