A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::Ipv6Header Class Reference

Packet header for IPv6. More...

#include <introspected-doxygen.h>

+ Inheritance diagram for ns3::Ipv6Header:

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.
 

Public Member Functions

 Ipv6Header (void)
 Constructor.
 
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...
 
- Public Member Functions inherited from ns3::ObjectBase
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 Public Member Functions inherited from ns3::Header
static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::Chunk
static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 

Private Attributes

Ipv6Address m_destinationAddress
 The destination address.
 
uint32_t m_flowLabel: 20
 The flow label. More...
 
uint8_t m_hopLimit
 The Hop limit value.
 
uint8_t m_nextHeader
 The Next header number.
 
uint16_t m_payloadLength
 The payload length.
 
Ipv6Address m_sourceAddress
 The source address.
 
uint32_t m_trafficClass: 8
 The traffic class.
 
uint32_t m_version: 4
 The version (always equal to 6).
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 
virtual void NotifyConstructionCompleted (void)
 

Detailed Description

Packet header for IPv6.

Doxygen introspection did not find any typical Config paths.
No Attributes are defined for this type.
No TraceSources are defined for this type.

Definition at line 33 of file ipv6-header.h.

Member Function Documentation

uint32_t ns3::Ipv6Header::Deserialize ( Buffer::Iterator  start)
virtual
uint32_t ns3::Ipv6Header::GetFlowLabel ( void  ) const

Get the "Flow label" field.

Returns
the flow label value

Definition at line 61 of file ipv6-header.cc.

References m_flowLabel.

uint8_t ns3::Ipv6Header::GetHopLimit ( void  ) const

Get the "Hop limit" field (TTL).

Returns
the hop limit value

Definition at line 91 of file ipv6-header.cc.

References m_hopLimit.

Referenced by ns3::Icmpv6L4Protocol::Forward(), ns3::Ipv6L3Protocol::IpMulticastForward(), and ns3::Ipv6ExtensionLooseRouting::Process().

TypeId ns3::Ipv6Header::GetInstanceTypeId ( void  ) const
virtual

Return the instance type identifier.

Returns
instance type ID

Implements ns3::ObjectBase.

Definition at line 125 of file ipv6-header.cc.

References GetTypeId().

uint8_t ns3::Ipv6Header::GetNextHeader ( void  ) const
uint16_t ns3::Ipv6Header::GetPayloadLength ( void  ) const

Get the "Payload length" field.

Returns
the payload length

Definition at line 71 of file ipv6-header.cc.

References m_payloadLength.

Referenced by ns3::Ipv6L3Protocol::Receive().

uint32_t ns3::Ipv6Header::GetSerializedSize ( void  ) const
virtual
uint8_t ns3::Ipv6Header::GetTrafficClass ( void  ) const

Get the "Traffic class" field.

Returns
the traffic value

Definition at line 51 of file ipv6-header.cc.

References m_trafficClass.

TypeId ns3::Ipv6Header::GetTypeId ( void  )
static

Get the type identifier.

Returns
type identifier

Definition at line 116 of file ipv6-header.cc.

References ns3::TypeId::SetParent().

Referenced by GetInstanceTypeId().

void ns3::Ipv6Header::Print ( std::ostream &  os) const
virtual

Print some informations about the packet.

Parameters
osoutput stream
Returns
info about this packet

Implements ns3::Header.

Definition at line 130 of file ipv6-header.cc.

References m_destinationAddress, m_flowLabel, m_hopLimit, m_nextHeader, m_payloadLength, m_sourceAddress, m_trafficClass, and m_version.

void ns3::Ipv6Header::Serialize ( Buffer::Iterator  start) const
virtual
void ns3::Ipv6Header::SetDestinationAddress ( Ipv6Address  dst)

Set the "Destination address" field.

Parameters
dstthe destination address

Definition at line 106 of file ipv6-header.cc.

References m_destinationAddress.

Referenced by ns3::Ipv6L3Protocol::BuildHeader(), Ipv6Header(), ns3::Ipv6ExtensionLooseRouting::Process(), ns3::UdpL4Protocol::Receive(), ns3::TcpL4Protocol::Receive(), and ns3::Ipv6RawSocketImpl::SendTo().

void ns3::Ipv6Header::SetFlowLabel ( uint32_t  flow)

Set the "Flow label" field.

Parameters
flowthe 20-bit value

Definition at line 56 of file ipv6-header.cc.

References m_flowLabel.

void ns3::Ipv6Header::SetHopLimit ( uint8_t  limit)

Set the "Hop limit" field (TTL).

Parameters
limitthe 8-bit value

Definition at line 86 of file ipv6-header.cc.

References m_hopLimit.

Referenced by ns3::Ipv6L3Protocol::BuildHeader(), ns3::Ipv6L3Protocol::IpMulticastForward(), and ns3::Ipv6ExtensionLooseRouting::Process().

void ns3::Ipv6Header::SetNextHeader ( uint8_t  next)

Set the "Next header" field.

Parameters
nextthe next header number

Definition at line 76 of file ipv6-header.cc.

References m_nextHeader.

Referenced by ns3::Ipv6L3Protocol::BuildHeader(), ns3::Ipv6ExtensionFragment::GetFragments(), and ns3::Ipv6ExtensionFragment::Process().

void ns3::Ipv6Header::SetPayloadLength ( uint16_t  len)

Set the "Payload length" field.

Parameters
lenthe length of the payload in bytes

Definition at line 66 of file ipv6-header.cc.

References m_payloadLength.

Referenced by ns3::Ipv6L3Protocol::BuildHeader(), and ns3::Ipv6ExtensionFragment::GetFragments().

void ns3::Ipv6Header::SetSourceAddress ( Ipv6Address  src)

Set the "Source address" field.

Parameters
srcthe source address

Definition at line 96 of file ipv6-header.cc.

References m_sourceAddress.

Referenced by ns3::Ipv6L3Protocol::BuildHeader(), Ipv6Header(), ns3::UdpL4Protocol::Receive(), and ns3::TcpL4Protocol::Receive().

void ns3::Ipv6Header::SetTrafficClass ( uint8_t  traffic)

Set the "Traffic class" field.

Parameters
trafficthe 8-bit value

Definition at line 46 of file ipv6-header.cc.

References m_trafficClass.

Referenced by ns3::Ipv6L3Protocol::BuildHeader().

Member Data Documentation

uint32_t ns3::Ipv6Header::m_flowLabel
private

The flow label.

Note
This is 20-bit value.

Definition at line 200 of file ipv6-header.h.

Referenced by Deserialize(), GetFlowLabel(), Print(), Serialize(), and SetFlowLabel().


The documentation for this class was generated from the following files: