ns-3
ns3::Ipv6Option Class Reference

IPv6 Option base. More...

#include <ipv6-option.h>

Inheritance diagram for ns3::Ipv6Option:
Collaboration diagram for ns3::Ipv6Option:

List of all members.

Public Member Functions

virtual ~Ipv6Option ()
 Destructor.
void SetNode (Ptr< Node > node)
 Set the node.
virtual uint8_t GetOptionNumber () const =0
 Get the option number.
virtual uint8_t Process (Ptr< Packet > packet, uint8_t offset, Ipv6Header const &ipv6Header, bool &isDropped)=0
 Process method.

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type identificator.

Detailed Description

IPv6 Option base.

If you want to implement a new IPv6 option, all you have to do is implement a subclass of this class and add it to an Ipv6OptionDemux.


Member Function Documentation

virtual uint8_t ns3::Ipv6Option::GetOptionNumber ( ) const [pure virtual]

Get the option number.

Returns:
option number

Implemented in ns3::Ipv6OptionRouterAlert, ns3::Ipv6OptionJumbogram, ns3::Ipv6OptionPadn, and ns3::Ipv6OptionPad1.

Referenced by GetTypeId().

TypeId ns3::Ipv6Option::GetTypeId ( void  ) [static]

Get the type identificator.

This method returns the TypeId associated to ns3::Ipv6Option.

Returns:
type identificator

This object is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::Ipv6Option
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::Ipv6OptionDemux/Options/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::Ipv6Option
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::Ipv6OptionDemux/Options/[i]

Attributes defined for this type:

No TraceSources defined for this type.

Reimplemented from ns3::Object.

Reimplemented in ns3::Ipv6OptionRouterAlert, ns3::Ipv6OptionJumbogram, ns3::Ipv6OptionPadn, and ns3::Ipv6OptionPad1.

References GetOptionNumber(), and ns3::TypeId::SetParent().

virtual uint8_t ns3::Ipv6Option::Process ( Ptr< Packet packet,
uint8_t  offset,
Ipv6Header const &  ipv6Header,
bool &  isDropped 
) [pure virtual]

Process method.

Called from Ipv6L3Protocol::Receive.

Parameters:
packetthe packet
offsetthe offset of the extension to process
ipv6Headerthe IPv6 header of packet received
isDroppedif the packet must be dropped
Returns:
the processed size

Implemented in ns3::Ipv6OptionRouterAlert, ns3::Ipv6OptionJumbogram, ns3::Ipv6OptionPadn, and ns3::Ipv6OptionPad1.

void ns3::Ipv6Option::SetNode ( Ptr< Node node)

Set the node.

Parameters:
nodethe node to set

References NS_LOG_FUNCTION.


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