Public Member Functions | Static Public Member Functions | Protected Member Functions

ns3::Ipv6Interface Class Reference

The IPv6 representation of a network interface. More...

#include <ipv6-interface.h>

Inheritance diagram for ns3::Ipv6Interface:
Inheritance graph
[legend]
Collaboration diagram for ns3::Ipv6Interface:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Ipv6Interface ()
 Constructs an Ipv6Interface.
virtual ~Ipv6Interface ()
 Destructor.
void SetNode (Ptr< Node > node)
 Set node associated with interface.
void SetDevice (Ptr< NetDevice > device)
 Set the NetDevice.
virtual Ptr< NetDeviceGetDevice () const
 Get the NetDevice.
void SetMetric (uint16_t metric)
 Set the metric.
uint16_t GetMetric () const
 Get the metric.
bool IsUp () const
 Is the interface UP ?
bool IsDown () const
 Is the interface DOWN ?
void SetUp ()
 Enable this interface.
void SetDown ()
 Disable this interface.
bool IsForwarding () const
 If the interface allows forwarding packets.
void SetForwarding (bool forward)
 Set forwarding enabled or not.
void SetCurHopLimit (uint8_t curHopLimit)
 Set the current hop limit.
uint8_t GetCurHopLimit () const
 Get the current hop limit value.
void SetBaseReachableTime (uint16_t baseReachableTime)
 Set the base reachable time.
uint16_t GetBaseReachableTime () const
 Get the base reachable time.
void SetReachableTime (uint16_t reachableTime)
 Set the reachable time.
uint16_t GetReachableTime () const
 Get the reachable time.
void SetRetransTimer (uint16_t retransTimer)
 Set the retransmission timer.
uint16_t GetRetransTimer () const
 Get the retransmission timer.
void Send (Ptr< Packet > p, Ipv6Address dest)
 Send a packet through this interface.
bool AddAddress (Ipv6InterfaceAddress iface)
 Add an IPv6 address.
Ipv6InterfaceAddress GetLinkLocalAddress () const
 Get link-local address from IPv6 interface.
Ipv6InterfaceAddress GetAddress (uint32_t index) const
 Get an address from IPv6 interface.
Ipv6InterfaceAddress GetAddressMatchingDestination (Ipv6Address dst)
 Get an address which is in the same network prefix as destination.
uint32_t GetNAddresses (void) const
 Get number of addresses on this IPv6 interface.
Ipv6InterfaceAddress RemoveAddress (uint32_t index)
 Remove an address from interface.
void SetState (Ipv6Address address, Ipv6InterfaceAddress::State_e state)
 Update state of an interface address.
void SetNsDadUid (Ipv6Address address, uint32_t uid)
 Update NS DAD packet UID of an interface address.

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID.

Protected Member Functions

virtual void DoDispose ()
 Dispose this object.

Detailed Description

The IPv6 representation of a network interface.

By default IPv6 interfaces are created in the "down" state with IP "fe80::1" and a /64 prefix. Before becoming useable, the user must invoke SetUp on them once the final IPv6 address and mask has been set.


Member Function Documentation

bool ns3::Ipv6Interface::AddAddress ( Ipv6InterfaceAddress  iface  ) 

Add an IPv6 address.

Parameters:
iface address to add
Returns:
true if address was added, false otherwise
Ipv6InterfaceAddress ns3::Ipv6Interface::GetAddress ( uint32_t  index  )  const

Get an address from IPv6 interface.

Parameters:
index index
Returns:
Ipv6InterfaceAddress address whose index is i
Ipv6InterfaceAddress ns3::Ipv6Interface::GetAddressMatchingDestination ( Ipv6Address  dst  ) 

Get an address which is in the same network prefix as destination.

Parameters:
dst destination address
Returns:
Corresponding Ipv6InterfaceAddress or assert if not found
uint16_t ns3::Ipv6Interface::GetBaseReachableTime (  )  const

Get the base reachable time.

Returns:
base reachable time
uint8_t ns3::Ipv6Interface::GetCurHopLimit (  )  const

Get the current hop limit value.

Returns:
current hop limit
virtual Ptr<NetDevice> ns3::Ipv6Interface::GetDevice (  )  const [virtual]

Get the NetDevice.

Returns:
the NetDevice associated with this interface
Ipv6InterfaceAddress ns3::Ipv6Interface::GetLinkLocalAddress (  )  const

Get link-local address from IPv6 interface.

Returns:
link-local Ipv6InterfaceAddress, assert if not found
uint16_t ns3::Ipv6Interface::GetMetric (  )  const

Get the metric.

Returns:
the metric
uint32_t ns3::Ipv6Interface::GetNAddresses ( void   )  const

Get number of addresses on this IPv6 interface.

Returns:
number of address
uint16_t ns3::Ipv6Interface::GetReachableTime (  )  const

Get the reachable time.

Returns:
reachable time
uint16_t ns3::Ipv6Interface::GetRetransTimer (  )  const

Get the retransmission timer.

Returns:
retransmission timer
static TypeId ns3::Ipv6Interface::GetTypeId ( void   )  [static]

Get the type ID.

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

Returns:
type ID

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

  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/LinkManager/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/LinkManager/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/LinkManager/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/SSManager/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/SSManager/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/SSManager/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/Classifier/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/Classifier/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/Classifier/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Channel/NoiseModel/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Channel/NoiseModel/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Channel/NoiseModel/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Channel/PropagationModel/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Channel/PropagationModel/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Channel/PropagationModel/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Mac/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Mac/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Mac/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Phy/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Phy/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Phy/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Transducer/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Transducer/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Transducer/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/LinkManager/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/LinkManager/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/LinkManager/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/SSManager/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/SSManager/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/SSManager/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/Classifier/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/Classifier/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/Classifier/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BandwidthManager/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BandwidthManager/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BandwidthManager/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BurstProfileManager/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BurstProfileManager/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BurstProfileManager/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Channel/$ns3::UanChannel/NoiseModel/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Channel/$ns3::UanChannel/NoiseModel/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Channel/$ns3::UanChannel/NoiseModel/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Channel/$ns3::UanChannel/PropagationModel/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Channel/$ns3::UanChannel/PropagationModel/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Channel/$ns3::UanChannel/PropagationModel/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/ConnectionManager/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/ConnectionManager/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/ConnectionManager/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Phy/Channel/$ns3::UanChannel/NoiseModel/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Phy/Channel/$ns3::UanChannel/NoiseModel/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Phy/Channel/$ns3::UanChannel/NoiseModel/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Phy/Channel/$ns3::UanChannel/PropagationModel/$ns3::Ipv6/$ns3::Ipv6L3Protocol/InterfaceList/[i]
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Phy/Channel/$ns3::UanChannel/PropagationModel/$ns3::Ipv6Interface
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Phy/Channel/$ns3::UanChannel/PropagationModel/$ns3::Ipv6L3Protocol/InterfaceList/[i]

No Attributes defined for this type.
No TraceSources defined for this type.

Reimplemented from ns3::Object.

bool ns3::Ipv6Interface::IsDown (  )  const

Is the interface DOWN ?

Returns:
true if interface is disabled, false otherwise.
bool ns3::Ipv6Interface::IsForwarding (  )  const

If the interface allows forwarding packets.

Returns:
true if forwarding is enabled, false otherwise
bool ns3::Ipv6Interface::IsUp (  )  const

Is the interface UP ?

Returns:
true if interface is enabled, false otherwise.
Ipv6InterfaceAddress ns3::Ipv6Interface::RemoveAddress ( uint32_t  index  ) 

Remove an address from interface.

Parameters:
index index to remove
Returns:
Ipv6InterfaceAddress address whose index is index
void ns3::Ipv6Interface::Send ( Ptr< Packet p,
Ipv6Address  dest 
)

Send a packet through this interface.

Parameters:
p packet to send
dest next hop address of packet.
Note:
This method will eventually call the private SendTo method which must be implemented by subclasses.
void ns3::Ipv6Interface::SetBaseReachableTime ( uint16_t  baseReachableTime  ) 

Set the base reachable time.

Parameters:
baseReachableTime the value to set
void ns3::Ipv6Interface::SetCurHopLimit ( uint8_t  curHopLimit  ) 

Set the current hop limit.

Parameters:
curHopLimit the value to set
void ns3::Ipv6Interface::SetDevice ( Ptr< NetDevice device  ) 

Set the NetDevice.

Parameters:
device NetDevice
void ns3::Ipv6Interface::SetForwarding ( bool  forward  ) 

Set forwarding enabled or not.

Parameters:
forward forwarding state
void ns3::Ipv6Interface::SetMetric ( uint16_t  metric  ) 

Set the metric.

Parameters:
metric configured routing metric (cost) of this interface
void ns3::Ipv6Interface::SetNode ( Ptr< Node node  ) 

Set node associated with interface.

Parameters:
node node
void ns3::Ipv6Interface::SetNsDadUid ( Ipv6Address  address,
uint32_t  uid 
)

Update NS DAD packet UID of an interface address.

Parameters:
address IPv6 address
uid packet UID
void ns3::Ipv6Interface::SetReachableTime ( uint16_t  reachableTime  ) 

Set the reachable time.

Parameters:
reachableTime value to set
void ns3::Ipv6Interface::SetRetransTimer ( uint16_t  retransTimer  ) 

Set the retransmission timer.

Parameters:
retransTimer value to set
void ns3::Ipv6Interface::SetState ( Ipv6Address  address,
Ipv6InterfaceAddress::State_e  state 
)

Update state of an interface address.

Parameters:
address IPv6 address
state new state

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