ns-3
|
ICMPv6 Option Prefix Information. More...
#include <icmpv6-header.h>
Public Member Functions | |
Icmpv6OptionPrefixInformation () | |
Constructor. | |
Icmpv6OptionPrefixInformation (Ipv6Address network, uint8_t prefixlen) | |
Constructor. | |
virtual | ~Icmpv6OptionPrefixInformation () |
Destructor. | |
virtual TypeId | GetInstanceTypeId () const |
Get the instance type ID. | |
uint8_t | GetPrefixLength () const |
Get the prefix length. | |
void | SetPrefixLength (uint8_t prefixLength) |
Set the prefix length. | |
uint8_t | GetFlags () const |
Get the flags. | |
void | SetFlags (uint8_t flags) |
Set the flags. | |
uint32_t | GetValidTime () const |
Get the valid time of the information. | |
void | SetValidTime (uint32_t validTime) |
Set the valid time of the information. | |
uint32_t | GetPreferredTime () const |
Get the preferred time of the information. | |
void | SetPreferredTime (uint32_t preferredTime) |
Set the preferred time of the information. | |
uint32_t | GetReserved () const |
Get the reserved field. | |
void | SetReserved (uint32_t reserved) |
Set the reserved field (normally it will be 0x00000000). | |
Ipv6Address | GetPrefix () const |
Get the IPv6 prefix. | |
void | SetPrefix (Ipv6Address prefix) |
Set the IPv6 prefix. | |
virtual void | Print (std::ostream &os) const |
Print informations. | |
virtual uint32_t | GetSerializedSize () const |
Get the serialized size. | |
virtual void | Serialize (Buffer::Iterator start) const |
Serialize the packet. | |
virtual uint32_t | Deserialize (Buffer::Iterator start) |
Deserialize the packet. | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Get the UID of this class. |
ICMPv6 Option Prefix Information.
ns3::Icmpv6OptionPrefixInformation::Icmpv6OptionPrefixInformation | ( | Ipv6Address | network, |
uint8_t | prefixlen | ||
) |
Constructor.
network | prefix |
prefixlen | prefix length |
References SetFlags(), ns3::Icmpv6OptionHeader::SetLength(), SetPreferredTime(), SetPrefix(), SetPrefixLength(), SetReserved(), ns3::Icmpv6OptionHeader::SetType(), and SetValidTime().
uint32_t ns3::Icmpv6OptionPrefixInformation::Deserialize | ( | Buffer::Iterator | start | ) | [virtual] |
Deserialize the packet.
start | start offset |
Reimplemented from ns3::Icmpv6OptionHeader.
References GetSerializedSize(), ns3::Buffer::Iterator::Read(), ns3::Buffer::Iterator::ReadNtohU32(), ns3::Buffer::Iterator::ReadU8(), SetFlags(), ns3::Icmpv6OptionHeader::SetLength(), SetPreferredTime(), SetPrefix(), SetPrefixLength(), SetReserved(), ns3::Icmpv6OptionHeader::SetType(), and SetValidTime().
uint8_t ns3::Icmpv6OptionPrefixInformation::GetFlags | ( | ) | const |
Get the flags.
TypeId ns3::Icmpv6OptionPrefixInformation::GetInstanceTypeId | ( | void | ) | const [virtual] |
Get the instance type ID.
Reimplemented from ns3::Icmpv6OptionHeader.
References GetTypeId().
uint32_t ns3::Icmpv6OptionPrefixInformation::GetPreferredTime | ( | ) | const |
Get the preferred time of the information.
Get the IPv6 prefix.
uint8_t ns3::Icmpv6OptionPrefixInformation::GetPrefixLength | ( | ) | const |
Get the prefix length.
uint32_t ns3::Icmpv6OptionPrefixInformation::GetReserved | ( | ) | const |
Get the reserved field.
uint32_t ns3::Icmpv6OptionPrefixInformation::GetSerializedSize | ( | void | ) | const [virtual] |
Get the serialized size.
Reimplemented from ns3::Icmpv6OptionHeader.
Referenced by Deserialize().
TypeId ns3::Icmpv6OptionPrefixInformation::GetTypeId | ( | void | ) | [static] |
Get the UID of this class.
This method returns the TypeId associated to ns3::Icmpv6OptionPrefixInformation.
No Attributes defined for this type.
No TraceSources defined for this type.
Reimplemented from ns3::Icmpv6OptionHeader.
References ns3::TypeId::SetParent().
Referenced by GetInstanceTypeId().
uint32_t ns3::Icmpv6OptionPrefixInformation::GetValidTime | ( | ) | const |
Get the valid time of the information.
void ns3::Icmpv6OptionPrefixInformation::Print | ( | std::ostream & | os | ) | const [virtual] |
Print informations.
os | output stream |
Reimplemented from ns3::Icmpv6OptionHeader.
References ns3::Icmpv6OptionHeader::GetLength(), and ns3::Icmpv6OptionHeader::GetType().
void ns3::Icmpv6OptionPrefixInformation::Serialize | ( | Buffer::Iterator | start | ) | const [virtual] |
Serialize the packet.
start | start offset |
Reimplemented from ns3::Icmpv6OptionHeader.
References ns3::Ipv6Address::GetBytes(), ns3::Icmpv6OptionHeader::GetLength(), ns3::Icmpv6OptionHeader::GetType(), ns3::Buffer::Iterator::Write(), ns3::Buffer::Iterator::WriteHtonU32(), and ns3::Buffer::Iterator::WriteU8().
void ns3::Icmpv6OptionPrefixInformation::SetFlags | ( | uint8_t | flags | ) |
Set the flags.
flags | the flags to set |
Referenced by Deserialize(), and Icmpv6OptionPrefixInformation().
void ns3::Icmpv6OptionPrefixInformation::SetPreferredTime | ( | uint32_t | preferredTime | ) |
Set the preferred time of the information.
preferredTime | preferred time |
Referenced by Deserialize(), and Icmpv6OptionPrefixInformation().
void ns3::Icmpv6OptionPrefixInformation::SetPrefix | ( | Ipv6Address | prefix | ) |
Set the IPv6 prefix.
prefix | the IPv6 prefix |
Referenced by Deserialize(), and Icmpv6OptionPrefixInformation().
void ns3::Icmpv6OptionPrefixInformation::SetPrefixLength | ( | uint8_t | prefixLength | ) |
Set the prefix length.
prefixLength | the prefix length |
References NS_ASSERT.
Referenced by Deserialize(), and Icmpv6OptionPrefixInformation().
void ns3::Icmpv6OptionPrefixInformation::SetReserved | ( | uint32_t | reserved | ) |
Set the reserved field (normally it will be 0x00000000).
reserved | reserved value |
Referenced by Deserialize(), and Icmpv6OptionPrefixInformation().
void ns3::Icmpv6OptionPrefixInformation::SetValidTime | ( | uint32_t | validTime | ) |
Set the valid time of the information.
validTime | valid time |
Referenced by Deserialize(), and Icmpv6OptionPrefixInformation().