Doxygen introspection did not find any typical Config paths. More...
#include <ipv6-header.h>
Public Types | |
enum | NextHeader_e { IPV6_EXT_HOP_BY_HOP = 0, IPV6_IPV4 = 4, IPV6_TCP = 6, IPV6_UDP = 17, IPV6_IPV6 = 41, IPV6_EXT_ROUTING = 43, IPV6_EXT_FRAGMENTATION = 44, IPV6_EXT_CONFIDENTIALITY = 50, IPV6_EXT_AUTHENTIFICATION = 51, IPV6_ICMPV6 = 58, IPV6_EXT_END = 59, IPV6_EXT_DESTINATION = 60, IPV6_SCTP = 135, IPV6_EXT_MOBILITY = 135, IPV6_UDP_LITE = 136 } |
IPv6 next-header value. More... | |
Public Member Functions | |
Ipv6Header (void) | |
Constructor. More... | |
virtual uint32_t | Deserialize (Buffer::Iterator start) |
Deserialize the packet. More... | |
Ipv6Address | GetDestinationAddress (void) const |
Get the "Destination address" field. More... | |
uint32_t | GetFlowLabel (void) const |
Get the "Flow label" field. More... | |
uint8_t | GetHopLimit (void) const |
Get the "Hop limit" field (TTL). More... | |
virtual TypeId | GetInstanceTypeId (void) const |
Return the instance type identifier. More... | |
uint8_t | GetNextHeader (void) const |
Get the next header. More... | |
uint16_t | GetPayloadLength (void) const |
Get the "Payload length" field. More... | |
virtual uint32_t | GetSerializedSize (void) const |
Get the serialized size of the packet. More... | |
Ipv6Address | GetSourceAddress (void) const |
Get the "Source address" field. More... | |
uint8_t | GetTrafficClass (void) const |
Get the "Traffic class" field. More... | |
virtual void | Print (std::ostream &os) const |
Print some informations about the packet. More... | |
virtual void | Serialize (Buffer::Iterator start) const |
Serialize the packet. More... | |
void | SetDestinationAddress (Ipv6Address dst) |
Set the "Destination address" field. More... | |
void | SetFlowLabel (uint32_t flow) |
Set the "Flow label" field. More... | |
void | SetHopLimit (uint8_t limit) |
Set the "Hop limit" field (TTL). More... | |
void | SetNextHeader (uint8_t next) |
Set the "Next header" field. More... | |
void | SetPayloadLength (uint16_t len) |
Set the "Payload length" field. More... | |
void | SetSourceAddress (Ipv6Address src) |
Set the "Source address" field. More... | |
void | SetTrafficClass (uint8_t traffic) |
Set the "Traffic class" field. More... | |
![]() | |
virtual | ~Header () |
![]() | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Get the type identifier. More... | |
![]() | |
static TypeId | GetTypeId (void) |
![]() | |
static TypeId | GetTypeId (void) |
![]() | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Attributes | |
Ipv6Address | m_destinationAddress |
The destination address. More... | |
uint32_t | m_flowLabel: 20 |
The flow label. More... | |
uint8_t | m_hopLimit |
The Hop limit value. More... | |
uint8_t | m_nextHeader |
The Next header number. More... | |
uint16_t | m_payloadLength |
The payload length. More... | |
Ipv6Address | m_sourceAddress |
The source address. More... | |
uint32_t | m_trafficClass: 8 |
The traffic class. More... | |
uint32_t | m_version: 4 |
The version (always equal to 6). More... | |
Additional Inherited Members | |
![]() | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
virtual void | NotifyConstructionCompleted (void) |
This method is invoked once all member attributes have been initialized. More... | |
Doxygen introspection did not find any typical Config paths.
Packet header for IPv6.
No Attributes are defined for this type.
No TraceSources are defined for this type.
Definition at line 33 of file ipv6-header.h.
IPv6 next-header value.
Definition at line 40 of file ipv6-header.h.
ns3::Ipv6Header::Ipv6Header | ( | void | ) |
Constructor.
Definition at line 35 of file ipv6-header.cc.
References SetDestinationAddress(), and SetSourceAddress().
|
virtual |
Deserialize the packet.
start | Buffer iterator |
Implements ns3::Header.
Definition at line 165 of file ipv6-header.cc.
References GetSerializedSize(), m_destinationAddress, m_flowLabel, m_hopLimit, m_nextHeader, m_payloadLength, m_sourceAddress, m_trafficClass, m_version, NS_ASSERT, ns3::ReadFrom(), ns3::Buffer::Iterator::ReadNtohU16(), ns3::Buffer::Iterator::ReadNtohU32(), ns3::Buffer::Iterator::ReadU8(), and visualizer.core::start().
Referenced by ns3::Ipv6ExtensionLooseRouting::Process().
Ipv6Address ns3::Ipv6Header::GetDestinationAddress | ( | void | ) | const |
Get the "Destination address" field.
Definition at line 112 of file ipv6-header.cc.
References m_destinationAddress.
Referenced by ns3::SixLowPanNetDevice::CompressLowPanHc1(), ns3::SixLowPanNetDevice::CompressLowPanIphc(), ns3::SixLowPanNetDevice::DecompressLowPanIphc(), ns3::TcpSocketBase::DoForwardUp(), ns3::UdpSocketImpl::DoSendTo(), ns3::Icmpv6L4Protocol::Forward(), ns3::Ipv6RawSocketImpl::ForwardUp(), ns3::Icmpv6L4Protocol::HandlePacketTooBig(), ns3::Ipv6L3Protocol::IpForward(), ns3::Ipv6L3Protocol::IpMulticastForward(), ns3::Ipv6L3Protocol::LocalDeliver(), ns3::Ipv6ExtensionLooseRouting::Process(), ns3::Ipv6Extension::ProcessOptions(), ns3::Icmpv4L4Protocol::Receive(), ns3::Ipv6L3Protocol::Receive(), ns3::TcpL4Protocol::Receive(), ns3::UdpL4Protocol::Receive(), ns3::Icmpv6L4Protocol::Receive(), ns3::dsr::DsrRouting::Receive(), ns3::Ipv6ListRouting::RouteInput(), ns3::Ipv6StaticRouting::RouteInput(), ns3::Ipv6ListRouting::RouteOutput(), ns3::Ipv6StaticRouting::RouteOutput(), and ns3::Ipv6L3Protocol::SendRealOut().
uint32_t ns3::Ipv6Header::GetFlowLabel | ( | void | ) | const |
Get the "Flow label" field.
Definition at line 62 of file ipv6-header.cc.
References m_flowLabel.
Referenced by ns3::SixLowPanNetDevice::CompressLowPanHc1(), and ns3::SixLowPanNetDevice::CompressLowPanIphc().
uint8_t ns3::Ipv6Header::GetHopLimit | ( | void | ) | const |
Get the "Hop limit" field (TTL).
Definition at line 92 of file ipv6-header.cc.
References m_hopLimit.
Referenced by ns3::SixLowPanNetDevice::CompressLowPanHc1(), ns3::SixLowPanNetDevice::CompressLowPanIphc(), ns3::Icmpv6L4Protocol::Forward(), ns3::UdpSocketImpl::ForwardUp6(), ns3::Ipv6L3Protocol::IpForward(), ns3::Ipv6L3Protocol::IpMulticastForward(), and ns3::Ipv6ExtensionLooseRouting::Process().
|
virtual |
Return the instance type identifier.
Implements ns3::ObjectBase.
Definition at line 126 of file ipv6-header.cc.
References GetTypeId().
uint8_t ns3::Ipv6Header::GetNextHeader | ( | void | ) | const |
Get the next header.
Definition at line 82 of file ipv6-header.cc.
References m_nextHeader.
Referenced by ns3::SixLowPanNetDevice::CompressLowPanHc1(), ns3::SixLowPanNetDevice::CompressLowPanIphc(), ns3::Icmpv6L4Protocol::Forward(), ns3::Ipv6RawSocketImpl::ForwardUp(), ns3::Ipv6ExtensionFragment::GetFragments(), ns3::Ipv6L3Protocol::IpForward(), ns3::Ipv6L3Protocol::LocalDeliver(), and ns3::Ipv6L3Protocol::Receive().
uint16_t ns3::Ipv6Header::GetPayloadLength | ( | void | ) | const |
Get the "Payload length" field.
Definition at line 72 of file ipv6-header.cc.
References m_payloadLength.
Referenced by ns3::Ipv6L3Protocol::Receive().
|
virtual |
Get the serialized size of the packet.
Implements ns3::Header.
Definition at line 144 of file ipv6-header.cc.
Referenced by ns3::SixLowPanNetDevice::CompressLowPanHc1(), ns3::SixLowPanNetDevice::CompressLowPanIphc(), Deserialize(), ns3::Ipv6ExtensionFragment::GetFragments(), ns3::Icmpv6L4Protocol::HandleDestinationUnreachable(), ns3::Ipv6L3Protocol::LocalDeliver(), ns3::Ipv6ExtensionLooseRouting::Process(), and ns3::Ipv6RawSocketImpl::SendTo().
Ipv6Address ns3::Ipv6Header::GetSourceAddress | ( | void | ) | const |
Get the "Source address" field.
Definition at line 102 of file ipv6-header.cc.
References m_sourceAddress.
Referenced by ns3::SixLowPanNetDevice::CompressLowPanHc1(), ns3::SixLowPanNetDevice::CompressLowPanIphc(), ns3::SixLowPanNetDevice::DecompressLowPanIphc(), ns3::TcpSocketBase::DoForwardUp(), ns3::UdpSocketImpl::DoSendTo(), ns3::Icmpv6L4Protocol::Forward(), ns3::Ipv6RawSocketImpl::ForwardUp(), ns3::UdpSocketImpl::ForwardUp6(), ns3::Ipv6ExtensionFragment::HandleFragmentsTimeout(), ns3::Radvd::HandleRead(), ns3::Ipv6L3Protocol::IpForward(), ns3::Ipv6L3Protocol::IpMulticastForward(), ns3::Ipv6L3Protocol::LocalDeliver(), ns3::Ipv6ExtensionFragment::Process(), ns3::Ipv6ExtensionRouting::Process(), ns3::Ipv6ExtensionLooseRouting::Process(), ns3::Ipv6Extension::ProcessOptions(), ns3::Icmpv4L4Protocol::Receive(), ns3::TcpL4Protocol::Receive(), ns3::UdpL4Protocol::Receive(), ns3::Icmpv6L4Protocol::Receive(), ns3::dsr::DsrRouting::Receive(), ns3::Ipv6StaticRouting::RouteInput(), ns3::Ipv6ListRouting::RouteOutput(), and ns3::Ipv6L3Protocol::SendRealOut().
uint8_t ns3::Ipv6Header::GetTrafficClass | ( | void | ) | const |
Get the "Traffic class" field.
Definition at line 52 of file ipv6-header.cc.
References m_trafficClass.
Referenced by ns3::SixLowPanNetDevice::CompressLowPanHc1(), ns3::SixLowPanNetDevice::CompressLowPanIphc(), and ns3::UdpSocketImpl::ForwardUp6().
|
static |
Get the type identifier.
Definition at line 117 of file ipv6-header.cc.
References ns3::TypeId::SetParent().
Referenced by GetInstanceTypeId().
|
virtual |
Print some informations about the packet.
os | output stream |
Implements ns3::Header.
Definition at line 131 of file ipv6-header.cc.
References m_destinationAddress, m_flowLabel, m_hopLimit, m_nextHeader, m_payloadLength, m_sourceAddress, m_trafficClass, and m_version.
|
virtual |
Serialize the packet.
start | Buffer iterator |
Implements ns3::Header.
Definition at line 149 of file ipv6-header.cc.
References m_destinationAddress, m_flowLabel, m_hopLimit, m_nextHeader, m_payloadLength, m_sourceAddress, m_trafficClass, visualizer.core::start(), ns3::Buffer::Iterator::WriteHtonU16(), ns3::Buffer::Iterator::WriteHtonU32(), ns3::WriteTo(), and ns3::Buffer::Iterator::WriteU8().
Referenced by ns3::Ipv6ExtensionLooseRouting::Process().
void ns3::Ipv6Header::SetDestinationAddress | ( | Ipv6Address | dst | ) |
Set the "Destination address" field.
dst | the destination address |
Definition at line 107 of file ipv6-header.cc.
References m_destinationAddress.
Referenced by ns3::Ipv6L3Protocol::BuildHeader(), ns3::SixLowPanNetDevice::DecompressLowPanHc1(), ns3::SixLowPanNetDevice::DecompressLowPanIphc(), ns3::UdpSocketImpl::DoSendTo(), Ipv6Header(), ns3::Ipv6ExtensionLooseRouting::Process(), ns3::TcpL4Protocol::Receive(), ns3::UdpL4Protocol::Receive(), ns3::TcpL4Protocol::Send(), ns3::TcpL4Protocol::SendPacket(), ns3::Ipv6RawSocketImpl::SendTo(), and ns3::TcpSocketBase::SetupEndpoint6().
void ns3::Ipv6Header::SetFlowLabel | ( | uint32_t | flow | ) |
Set the "Flow label" field.
flow | the 20-bit value |
Definition at line 57 of file ipv6-header.cc.
References m_flowLabel.
Referenced by ns3::SixLowPanNetDevice::DecompressLowPanHc1(), and ns3::SixLowPanNetDevice::DecompressLowPanIphc().
void ns3::Ipv6Header::SetHopLimit | ( | uint8_t | limit | ) |
Set the "Hop limit" field (TTL).
limit | the 8-bit value |
Definition at line 87 of file ipv6-header.cc.
References m_hopLimit.
Referenced by ns3::Ipv6L3Protocol::BuildHeader(), ns3::SixLowPanNetDevice::DecompressLowPanHc1(), ns3::SixLowPanNetDevice::DecompressLowPanIphc(), ns3::Ipv6L3Protocol::IpForward(), ns3::Ipv6L3Protocol::IpMulticastForward(), and ns3::Ipv6ExtensionLooseRouting::Process().
void ns3::Ipv6Header::SetNextHeader | ( | uint8_t | next | ) |
Set the "Next header" field.
next | the next header number |
Definition at line 77 of file ipv6-header.cc.
References m_nextHeader.
Referenced by ns3::Ipv6L3Protocol::BuildHeader(), ns3::SixLowPanNetDevice::DecompressLowPanHc1(), ns3::SixLowPanNetDevice::DecompressLowPanIphc(), ns3::UdpSocketImpl::DoSendTo(), ns3::Ipv6ExtensionFragment::GetFragments(), ns3::Ipv6ExtensionFragment::Process(), ns3::TcpL4Protocol::Send(), and ns3::TcpL4Protocol::SendPacket().
void ns3::Ipv6Header::SetPayloadLength | ( | uint16_t | len | ) |
Set the "Payload length" field.
len | the length of the payload in bytes |
Definition at line 67 of file ipv6-header.cc.
References m_payloadLength.
Referenced by ns3::Ipv6L3Protocol::BuildHeader(), ns3::SixLowPanNetDevice::DecompressLowPanHc1(), ns3::SixLowPanNetDevice::DecompressLowPanIphc(), and ns3::Ipv6ExtensionFragment::GetFragments().
void ns3::Ipv6Header::SetSourceAddress | ( | Ipv6Address | src | ) |
Set the "Source address" field.
src | the source address |
Definition at line 97 of file ipv6-header.cc.
References m_sourceAddress.
Referenced by ns3::Ipv6L3Protocol::BuildHeader(), ns3::SixLowPanNetDevice::DecompressLowPanHc1(), ns3::SixLowPanNetDevice::DecompressLowPanIphc(), ns3::UdpSocketImpl::DoSendTo(), Ipv6Header(), ns3::TcpL4Protocol::Receive(), ns3::UdpL4Protocol::Receive(), and ns3::TcpL4Protocol::SendPacket().
void ns3::Ipv6Header::SetTrafficClass | ( | uint8_t | traffic | ) |
Set the "Traffic class" field.
traffic | the 8-bit value |
Definition at line 47 of file ipv6-header.cc.
References m_trafficClass.
Referenced by ns3::Ipv6L3Protocol::BuildHeader(), ns3::SixLowPanNetDevice::DecompressLowPanHc1(), and ns3::SixLowPanNetDevice::DecompressLowPanIphc().
|
private |
The destination address.
Definition at line 225 of file ipv6-header.h.
Referenced by Deserialize(), GetDestinationAddress(), Print(), Serialize(), and SetDestinationAddress().
|
private |
The flow label.
Definition at line 200 of file ipv6-header.h.
Referenced by Deserialize(), GetFlowLabel(), Print(), Serialize(), and SetFlowLabel().
|
private |
The Hop limit value.
Definition at line 215 of file ipv6-header.h.
Referenced by Deserialize(), GetHopLimit(), Print(), Serialize(), and SetHopLimit().
|
private |
The Next header number.
Definition at line 210 of file ipv6-header.h.
Referenced by Deserialize(), GetNextHeader(), Print(), Serialize(), and SetNextHeader().
|
private |
The payload length.
Definition at line 205 of file ipv6-header.h.
Referenced by Deserialize(), GetPayloadLength(), Print(), Serialize(), and SetPayloadLength().
|
private |
The source address.
Definition at line 220 of file ipv6-header.h.
Referenced by Deserialize(), GetSourceAddress(), Print(), Serialize(), and SetSourceAddress().
|
private |
The traffic class.
Definition at line 194 of file ipv6-header.h.
Referenced by Deserialize(), GetTrafficClass(), Print(), Serialize(), and SetTrafficClass().
|
private |
The version (always equal to 6).
Definition at line 190 of file ipv6-header.h.
Referenced by Deserialize(), and Print().