A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::Ipv6 Class Referenceabstract

Access to the IPv6 forwarding table, interfaces, and configuration. More...

#include "ipv6.h"

+ Inheritance diagram for ns3::Ipv6:
+ Collaboration diagram for ns3::Ipv6:

Public Member Functions

 Ipv6 ()
 Constructor.
 
 ~Ipv6 () override
 Destructor.
 
virtual bool AddAddress (uint32_t interface, Ipv6InterfaceAddress address, bool addOnLinkRoute=true)=0
 Add an address on the specified IPv6 interface.
 
virtual uint32_t AddInterface (Ptr< NetDevice > device)=0
 Add a NetDevice interface.
 
virtual Ipv6InterfaceAddress GetAddress (uint32_t interface, uint32_t addressIndex) const =0
 Get IPv6 address on specified IPv6 interface.
 
virtual int32_t GetInterfaceForAddress (Ipv6Address address) const =0
 Return the interface number of the interface that has been assigned the specified IP address.
 
virtual int32_t GetInterfaceForDevice (Ptr< const NetDevice > device) const =0
 Get the interface index of the specified NetDevice.
 
virtual int32_t GetInterfaceForPrefix (Ipv6Address address, Ipv6Prefix mask) const =0
 Return the interface number of first interface found that has an IPv6 address within the prefix specified by the input address and mask parameters.
 
virtual uint16_t GetMetric (uint32_t interface) const =0
 Get metric for the specified IPv6 interface.
 
virtual uint16_t GetMtu (uint32_t interface) const =0
 Get MTU for the specified IPv6 interface.
 
virtual uint32_t GetNAddresses (uint32_t interface) const =0
 Get number of addresses on specified IPv6 interface.
 
virtual Ptr< NetDeviceGetNetDevice (uint32_t interface)=0
 Get the NetDevice of the specified interface number.
 
virtual uint32_t GetNInterfaces () const =0
 Get number of interfaces.
 
virtual Ptr< IpL4ProtocolGetProtocol (int protocolNumber) const =0
 Get L4 protocol by protocol number.
 
virtual Ptr< IpL4ProtocolGetProtocol (int protocolNumber, int32_t interfaceIndex) const =0
 Get L4 protocol by protocol number for the specified interface.
 
virtual Ptr< Ipv6RoutingProtocolGetRoutingProtocol () const =0
 Get the routing protocol to be used by this IPv6 stack.
 
virtual void Insert (Ptr< IpL4Protocol > protocol)=0
 Add a L4 protocol.
 
virtual void Insert (Ptr< IpL4Protocol > protocol, uint32_t interfaceIndex)=0
 Add a L4 protocol to a specific interface.
 
virtual bool IsForwarding (uint32_t interface) const =0
 If the specified IPv6 interface has forwarding enabled.
 
virtual bool IsUp (uint32_t interface) const =0
 If the specified interface index is in "up" state.
 
virtual void RegisterExtensions ()=0
 Register the IPv6 Extensions.
 
virtual void RegisterOptions ()=0
 Register the IPv6 Options.
 
virtual void Remove (Ptr< IpL4Protocol > protocol)=0
 Remove a L4 protocol.
 
virtual void Remove (Ptr< IpL4Protocol > protocol, uint32_t interfaceIndex)=0
 Remove a L4 protocol from a specific interface.
 
virtual bool RemoveAddress (uint32_t interface, Ipv6Address address)=0
 Remove the given address on named Ipv6 interface.
 
virtual bool RemoveAddress (uint32_t interface, uint32_t addressIndex)=0
 Remove an address on specified IPv6 interface.
 
virtual void Send (Ptr< Packet > packet, Ipv6Address source, Ipv6Address destination, uint8_t protocol, Ptr< Ipv6Route > route)=0
 Higher-level layers call this method to send a packet down the stack to the MAC and PHY layers.
 
virtual void SetDown (uint32_t interface)=0
 Set the interface into the "down" state.
 
virtual void SetForwarding (uint32_t interface, bool val)=0
 Set forwarding on specified IPv6 interface.
 
virtual void SetMetric (uint32_t interface, uint16_t metric)=0
 Set metric on specified Ipv6 interface.
 
virtual void SetPmtu (Ipv6Address dst, uint32_t pmtu)=0
 Set the Path MTU for the specified IPv6 destination address.
 
virtual void SetRoutingProtocol (Ptr< Ipv6RoutingProtocol > routingProtocol)=0
 Register a new routing protocol to be used by this IPv6 stack.
 
virtual void SetUp (uint32_t interface)=0
 Set the interface into the "up" state.
 
virtual Ipv6Address SourceAddressSelection (uint32_t interface, Ipv6Address dest)=0
 Choose the source address to use with destination address.
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor.
 
 ~Object () override
 Destructor.
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together.
 
void Dispose ()
 Dispose of this Object.
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one.
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId.
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object.
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one.
 
bool IsInitialized () const
 Check if the object has been initialized.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful.
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors.
 
virtual TypeId GetInstanceTypeId () const =0
 Get the most derived TypeId for this Object.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful.
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors.
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context.
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context.
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context.
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Static Public Attributes

static const uint32_t IF_ANY = 0xffffffff
 Any interface magic number.
 

Private Member Functions

virtual bool GetIpForward () const =0
 Get IPv6 forwarding state.
 
virtual bool GetMtuDiscover () const =0
 Get IPv6 MTU discover state.
 
virtual void SetIpForward (bool forward)=0
 Set IPv6 forwarding state.
 
virtual void SetMtuDiscover (bool mtuDiscover)=0
 Set IPv6 MTU discover state.
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void DoDispose ()
 Destructor implementation.
 
virtual void DoInitialize ()
 Initialize() implementation.
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed.
 

Detailed Description

Access to the IPv6 forwarding table, interfaces, and configuration.

Introspection did not find any typical Config paths.

This class defines the API to manipulate the following aspects of the IPv6 implementation:

  1. set/get an Ipv6RoutingProtocol
  2. register a NetDevice for use by the IPv6 layer (basically, to create IPv6-related state such as addressing and neighbor cache that is associated with a NetDevice)
  3. manipulate the status of the NetDevice from the IPv6 perspective, such as marking it as Up or Down,
  4. adding, deleting, and getting addresses associated to the IPv6 interfaces.
  5. exporting IPv6 configuration attributes

Each NetDevice has conceptually a single IPv6 interface associated with it (the corresponding structure in the Linux IPv6 implementation is struct in_device). Each interface may have one or more IPv6 addresses associated with it. Each IPv6 address may have different subnet mask, scope, etc., so all of this per-address information is stored in an Ipv6InterfaceAddress class (the corresponding structure in Linux is struct in6_ifaddr)

IPv6 attributes such as whether IP forwarding is enabled and disabled are also stored in this class

TO DO: Add API to allow access to the IPv6 neighbor table

See also
Ipv6RoutingProtocol
Ipv6InterfaceAddress


Attributes

  • IpForward: Globally enable or disable IP forwarding for all current and future IPv6 devices.
    • Set with class: ns3::BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: constructwriteread
  • MtuDiscover: If disabled, every interface will have its MTU set to 1280 bytes.
    • Set with class: ns3::BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: constructwriteread

No TraceSources are defined for this type.
Size of this type is 32 bytes (on a 64-bit architecture).

Definition at line 81 of file ipv6.h.

Constructor & Destructor Documentation

◆ Ipv6()

ns3::Ipv6::Ipv6 ( )

Constructor.

Definition at line 54 of file ipv6.cc.

◆ ~Ipv6()

ns3::Ipv6::~Ipv6 ( )
override

Destructor.

Definition at line 58 of file ipv6.cc.

Member Function Documentation

◆ AddAddress()

virtual bool ns3::Ipv6::AddAddress ( uint32_t  interface,
Ipv6InterfaceAddress  address,
bool  addOnLinkRoute = true 
)
pure virtual

Add an address on the specified IPv6 interface.

Parameters
interfaceInterface number of an IPv6 interface
addressIpv6InterfaceAddress address to associate with the underlying IPv6 interface
addOnLinkRouteadd on-link route to the network (default true)
Returns
true if the operation succeeded

Implemented in ns3::Ipv6L3Protocol.

◆ AddInterface()

virtual uint32_t ns3::Ipv6::AddInterface ( Ptr< NetDevice device)
pure virtual

Add a NetDevice interface.

Once a device has been added, it can never be removed: if you want to disable it, you can invoke Ipv6::SetDown which will make sure that it is never used during packet forwarding.

Parameters
devicedevice to add to the list of IPv6 interfaces which can be used as output interfaces during packet forwarding.
Returns
the index of the IPv6 interface added.

Implemented in ns3::Ipv6L3Protocol.

◆ GetAddress()

virtual Ipv6InterfaceAddress ns3::Ipv6::GetAddress ( uint32_t  interface,
uint32_t  addressIndex 
) const
pure virtual

Get IPv6 address on specified IPv6 interface.

Because addresses can be removed, the addressIndex is not guaranteed to be static across calls to this method.

Parameters
interfaceInterface number of an IPv6 interface
addressIndexindex of Ipv6InterfaceAddress
Returns
the Ipv6InterfaceAddress associated to the interface and addressIndex

Implemented in ns3::Ipv6L3Protocol.

Referenced by ns3::NoBackhaulEpcHelper::GetUeDefaultGatewayAddress6().

+ Here is the caller graph for this function:

◆ GetInterfaceForAddress()

virtual int32_t ns3::Ipv6::GetInterfaceForAddress ( Ipv6Address  address) const
pure virtual

Return the interface number of the interface that has been assigned the specified IP address.

Parameters
addressThe IP address being searched for
Returns
The interface number of the IPv6 interface with the given address or -1 if not found.

Each IP interface has one or more IP addresses associated with it. This method searches the list of interfaces for one that holds a particular address. This call takes an IP address as a parameter and returns the interface number of the first interface that has been assigned that address, or -1 if not found. There must be an exact match.

Implemented in ns3::Ipv6L3Protocol.

◆ GetInterfaceForDevice()

virtual int32_t ns3::Ipv6::GetInterfaceForDevice ( Ptr< const NetDevice device) const
pure virtual

Get the interface index of the specified NetDevice.

Parameters
deviceThe NetDevice for an Ipv6Interface
Returns
The interface number of an IPv6 interface or -1 if not found.

Implemented in ns3::Ipv6L3Protocol.

◆ GetInterfaceForPrefix()

virtual int32_t ns3::Ipv6::GetInterfaceForPrefix ( Ipv6Address  address,
Ipv6Prefix  mask 
) const
pure virtual

Return the interface number of first interface found that has an IPv6 address within the prefix specified by the input address and mask parameters.

Parameters
addressThe IP address assigned to the interface of interest.
maskThe IP prefix to use in the mask
Returns
The interface number of the IPv6 interface with the given address or -1 if not found.

Each IP interface has one or more IP addresses associated with it. This method searches the list of interfaces for the first one found that holds an address that is included within the prefix formed by the input address and mask parameters. The value -1 is returned if no match is found.

Implemented in ns3::Ipv6L3Protocol.

◆ GetIpForward()

virtual bool ns3::Ipv6::GetIpForward ( ) const
privatepure virtual

Get IPv6 forwarding state.

Returns
forwarding state (enabled or not)

Implemented in ns3::Ipv6L3Protocol.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetMetric()

virtual uint16_t ns3::Ipv6::GetMetric ( uint32_t  interface) const
pure virtual

Get metric for the specified IPv6 interface.

Parameters
interfaceThe interface number of an IPv6 interface
Returns
routing metric (cost) associated to the underlying IPv6 interface

Implemented in ns3::Ipv6L3Protocol.

◆ GetMtu()

virtual uint16_t ns3::Ipv6::GetMtu ( uint32_t  interface) const
pure virtual

Get MTU for the specified IPv6 interface.

Parameters
interfaceInterface number of IPv6 interface
Returns
the Maximum Transmission Unit (in bytes) associated to the underlying IPv6 interface

Implemented in ns3::Ipv6L3Protocol.

◆ GetMtuDiscover()

virtual bool ns3::Ipv6::GetMtuDiscover ( ) const
privatepure virtual

Get IPv6 MTU discover state.

Returns
MTU discover state (enabled or not)

Implemented in ns3::Ipv6L3Protocol.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetNAddresses()

virtual uint32_t ns3::Ipv6::GetNAddresses ( uint32_t  interface) const
pure virtual

Get number of addresses on specified IPv6 interface.

Parameters
interfaceInterface number of an IPv6 interface
Returns
the number of Ipv6InterfaceAddress entries for the interface.

Implemented in ns3::Ipv6L3Protocol.

◆ GetNetDevice()

virtual Ptr< NetDevice > ns3::Ipv6::GetNetDevice ( uint32_t  interface)
pure virtual

Get the NetDevice of the specified interface number.

Parameters
interfaceThe interface number of an IPv6 interface.
Returns
The NetDevice associated with the IPv6 interface number.

Implemented in ns3::Ipv6L3Protocol.

◆ GetNInterfaces()

virtual uint32_t ns3::Ipv6::GetNInterfaces ( ) const
pure virtual

Get number of interfaces.

Returns
the number of interfaces added by the user.

Implemented in ns3::Ipv6L3Protocol.

◆ GetProtocol() [1/2]

virtual Ptr< IpL4Protocol > ns3::Ipv6::GetProtocol ( int  protocolNumber) const
pure virtual

Get L4 protocol by protocol number.

Parameters
protocolNumberprotocol number
Returns
corresponding IpL4Protocol or 0 if not found

Implemented in ns3::Ipv6L3Protocol.

Referenced by ns3::Ipv6Interface::AddAddress(), ns3::Ipv6Interface::DoSetup(), and ns3::Ipv6Interface::Send().

+ Here is the caller graph for this function:

◆ GetProtocol() [2/2]

virtual Ptr< IpL4Protocol > ns3::Ipv6::GetProtocol ( int  protocolNumber,
int32_t  interfaceIndex 
) const
pure virtual

Get L4 protocol by protocol number for the specified interface.

Parameters
protocolNumberprotocol number
interfaceIndexinterface index, -1 means "any" interface.
Returns
corresponding IpL4Protocol or 0 if not found

Implemented in ns3::Ipv6L3Protocol.

◆ GetRoutingProtocol()

virtual Ptr< Ipv6RoutingProtocol > ns3::Ipv6::GetRoutingProtocol ( ) const
pure virtual

Get the routing protocol to be used by this IPv6 stack.

Returns
smart pointer to Ipv6RoutingProtocol object, or null pointer if none

Implemented in ns3::Ipv6L3Protocol.

Referenced by Ipv6ForwardingTest::DoRun().

+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::Ipv6::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 34 of file ipv6.cc.

References GetIpForward(), GetMtuDiscover(), ns3::MakeBooleanAccessor(), ns3::MakeBooleanChecker(), SetIpForward(), SetMtuDiscover(), and ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ Insert() [1/2]

virtual void ns3::Ipv6::Insert ( Ptr< IpL4Protocol protocol)
pure virtual

Add a L4 protocol.

Parameters
protocolL4 protocol

Implemented in ns3::Ipv6L3Protocol.

◆ Insert() [2/2]

virtual void ns3::Ipv6::Insert ( Ptr< IpL4Protocol protocol,
uint32_t  interfaceIndex 
)
pure virtual

Add a L4 protocol to a specific interface.

This may be called multiple times for multiple interfaces for the same protocol. To insert for all interfaces, use the separate Insert (Ptr<IpL4Protocol> protocol) method.

Setting a protocol on a specific interface will overwrite the previously bound protocol.

Parameters
protocolL4 protocol.
interfaceIndexinterface index.

Implemented in ns3::Ipv6L3Protocol.

◆ IsForwarding()

virtual bool ns3::Ipv6::IsForwarding ( uint32_t  interface) const
pure virtual

If the specified IPv6 interface has forwarding enabled.

Parameters
interfaceInterface number of IPv6 interface
Returns
true if IPv6 forwarding enabled for input datagrams on this device

Implemented in ns3::Ipv6L3Protocol.

◆ IsUp()

virtual bool ns3::Ipv6::IsUp ( uint32_t  interface) const
pure virtual

If the specified interface index is in "up" state.

Parameters
interfaceInterface number of IPv6 interface
Returns
true if the underlying interface is in the "up" state, false otherwise.

Implemented in ns3::Ipv6L3Protocol.

◆ RegisterExtensions()

virtual void ns3::Ipv6::RegisterExtensions ( )
pure virtual

Register the IPv6 Extensions.

Does nothing if the Extensions have been already registered.

Implemented in ns3::Ipv6L3Protocol.

◆ RegisterOptions()

virtual void ns3::Ipv6::RegisterOptions ( )
pure virtual

Register the IPv6 Options.

Does nothing if the Options have been already registered.

Implemented in ns3::Ipv6L3Protocol.

◆ Remove() [1/2]

virtual void ns3::Ipv6::Remove ( Ptr< IpL4Protocol protocol)
pure virtual

Remove a L4 protocol.

Parameters
protocolL4 protocol to remove.

Implemented in ns3::Ipv6L3Protocol.

◆ Remove() [2/2]

virtual void ns3::Ipv6::Remove ( Ptr< IpL4Protocol protocol,
uint32_t  interfaceIndex 
)
pure virtual

Remove a L4 protocol from a specific interface.

Parameters
protocolL4 protocol to remove.
interfaceIndexinterface index.

Implemented in ns3::Ipv6L3Protocol.

◆ RemoveAddress() [1/2]

virtual bool ns3::Ipv6::RemoveAddress ( uint32_t  interface,
Ipv6Address  address 
)
pure virtual

Remove the given address on named Ipv6 interface.

Parameters
interfaceInterface number of an IPv6 interface
addressthe address to remove
Returns
true if the operation succeeded

Implemented in ns3::Ipv6L3Protocol.

◆ RemoveAddress() [2/2]

virtual bool ns3::Ipv6::RemoveAddress ( uint32_t  interface,
uint32_t  addressIndex 
)
pure virtual

Remove an address on specified IPv6 interface.

Remove the address at addressIndex on named interface. The addressIndex for all higher indices will decrement by one after this method is called; so, for example, to remove 5 addresses from an interface i, one could call RemoveAddress (i, 0); 5 times.

Parameters
interfaceInterface number of an IPv6 interface
addressIndexindex of Ipv6InterfaceAddress to remove
Returns
true if the operation succeeded

Implemented in ns3::Ipv6L3Protocol.

◆ Send()

virtual void ns3::Ipv6::Send ( Ptr< Packet packet,
Ipv6Address  source,
Ipv6Address  destination,
uint8_t  protocol,
Ptr< Ipv6Route route 
)
pure virtual

Higher-level layers call this method to send a packet down the stack to the MAC and PHY layers.

All PMTU values are stored at this level, so packet size calculations should be done mathematically at higher levels.

Parameters
packetpacket to send
sourcesource address of packet
destinationaddress of packet
protocolnumber of packet
routeroute to take

Implemented in ns3::Ipv6L3Protocol.

Referenced by ns3::Icmpv6L4Protocol::NotifyNewAggregate(), ns3::TcpL4Protocol::NotifyNewAggregate(), and ns3::UdpL4Protocol::NotifyNewAggregate().

+ Here is the caller graph for this function:

◆ SetDown()

virtual void ns3::Ipv6::SetDown ( uint32_t  interface)
pure virtual

Set the interface into the "down" state.

In this state, it is ignored during IPv6 forwarding.

Parameters
interfaceInterface number of IPv6 interface

Implemented in ns3::Ipv6L3Protocol.

Referenced by NixVectorRoutingTest::DoRun().

+ Here is the caller graph for this function:

◆ SetForwarding()

virtual void ns3::Ipv6::SetForwarding ( uint32_t  interface,
bool  val 
)
pure virtual

Set forwarding on specified IPv6 interface.

Parameters
interfaceInterface number of IPv6 interface
valValue to set the forwarding flag

If set to true, IPv6 forwarding is enabled for input datagrams on this device

Implemented in ns3::Ipv6L3Protocol.

◆ SetIpForward()

virtual void ns3::Ipv6::SetIpForward ( bool  forward)
privatepure virtual

Set IPv6 forwarding state.

Parameters
forwardIPv6 forwarding enabled or not

Implemented in ns3::Ipv6L3Protocol.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetMetric()

virtual void ns3::Ipv6::SetMetric ( uint32_t  interface,
uint16_t  metric 
)
pure virtual

Set metric on specified Ipv6 interface.

Parameters
interfaceThe interface number of an IPv6 interface
metricrouting metric (cost) associated to the underlying IPv6 interface

Implemented in ns3::Ipv6L3Protocol.

◆ SetMtuDiscover()

virtual void ns3::Ipv6::SetMtuDiscover ( bool  mtuDiscover)
privatepure virtual

Set IPv6 MTU discover state.

Parameters
mtuDiscoverIPv6 MTU discover enabled or not

Implemented in ns3::Ipv6L3Protocol.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetPmtu()

virtual void ns3::Ipv6::SetPmtu ( Ipv6Address  dst,
uint32_t  pmtu 
)
pure virtual

Set the Path MTU for the specified IPv6 destination address.

Parameters
dstIpv6 destination address
pmtuthe Path MTU

Implemented in ns3::Ipv6L3Protocol.

◆ SetRoutingProtocol()

virtual void ns3::Ipv6::SetRoutingProtocol ( Ptr< Ipv6RoutingProtocol routingProtocol)
pure virtual

Register a new routing protocol to be used by this IPv6 stack.

This call will replace any routing protocol that has been previously registered. If you want to add multiple routing protocols, you must add them to a Ipv6ListRoutingProtocol directly.

Parameters
routingProtocolsmart pointer to Ipv6RoutingProtocol object

Implemented in ns3::Ipv6L3Protocol.

◆ SetUp()

virtual void ns3::Ipv6::SetUp ( uint32_t  interface)
pure virtual

Set the interface into the "up" state.

In this state, it is considered valid during IPv6 forwarding.

Parameters
interfaceInterface number of IPv6 interface

Implemented in ns3::Ipv6L3Protocol.

◆ SourceAddressSelection()

virtual Ipv6Address ns3::Ipv6::SourceAddressSelection ( uint32_t  interface,
Ipv6Address  dest 
)
pure virtual

Choose the source address to use with destination address.

Parameters
interfaceinterface index
destIPv6 destination address
Returns
IPv6 source address to use

Implemented in ns3::Ipv6L3Protocol.

Member Data Documentation

◆ IF_ANY

const uint32_t ns3::Ipv6::IF_ANY = 0xffffffff
static

Any interface magic number.

Definition at line 400 of file ipv6.h.

Referenced by ns3::Ipv6StaticRouting::LookupStatic().


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