ns-3
ns3::Ipv6InterfaceAddress Class Reference

IPv6 address associated with an interface. More...

#include <ipv6-interface-address.h>

List of all members.

Public Types

enum  State_e {
  TENTATIVE, DEPRECATED, PREFERRED, PERMANENT,
  HOMEADDRESS, TENTATIVE_OPTIMISTIC, INVALID
}
 State of an address associated with an interface. More...
enum  Scope_e { HOST, LINKLOCAL, GLOBAL }
 Scope of address. More...

Public Member Functions

 Ipv6InterfaceAddress ()
 Default constructor.
 Ipv6InterfaceAddress (Ipv6Address address)
 Constructor. Prefix is 64 by default.
 Ipv6InterfaceAddress (Ipv6Address address, Ipv6Prefix prefix)
 Constructor.
 Ipv6InterfaceAddress (const Ipv6InterfaceAddress &o)
 Copy constructor.
 ~Ipv6InterfaceAddress ()
 Destructor.
void SetAddress (Ipv6Address address)
 Set IPv6 address (and scope).
Ipv6Address GetAddress () const
 Get the IPv6 address.
Ipv6Prefix GetPrefix () const
 Get the IPv6 prefix.
void SetState (Ipv6InterfaceAddress::State_e state)
 Set the state.
Ipv6InterfaceAddress::State_e GetState () const
 Get the address state.
void SetScope (Ipv6InterfaceAddress::Scope_e scope)
 Set the scope.
Ipv6InterfaceAddress::Scope_e GetScope () const
 Get address scope.
void SetNsDadUid (uint32_t uid)
 Set the latest DAD probe packet UID.
uint32_t GetNsDadUid () const
 Get the latest DAD probe packet UID.

Friends

bool operator== (Ipv6InterfaceAddress const &a, Ipv6InterfaceAddress const &b)
bool operator!= (Ipv6InterfaceAddress const &a, Ipv6InterfaceAddress const &b)

Detailed Description

IPv6 address associated with an interface.


Member Enumeration Documentation

Scope of address.

Enumerator:
HOST 

Localhost (::1/128)

LINKLOCAL 

Link-local address (fe80::/64)

GLOBAL 

Global address (2000::/3)

State of an address associated with an interface.

Enumerator:
TENTATIVE 

Address is tentative, no packet can be sent unless DAD finished

DEPRECATED 

Address is deprecated and should not be used

PREFERRED 

Preferred address

PERMANENT 

Permanent address

HOMEADDRESS 

Address is a HomeAddress

TENTATIVE_OPTIMISTIC 

Address is tentative but we are optimistic so we can send packet even if DAD is not yet finished

INVALID 

Invalid state (after a DAD failed)


Constructor & Destructor Documentation

Constructor. Prefix is 64 by default.

Parameters:
addressthe IPv6 address to set

References NS_LOG_FUNCTION, SetAddress(), SetState(), and TENTATIVE_OPTIMISTIC.

Constructor.

Parameters:
addressIPv6 address to set
prefixIPv6 prefix

References NS_LOG_FUNCTION, SetAddress(), SetState(), and TENTATIVE_OPTIMISTIC.

Copy constructor.

Parameters:
oobject to copy

Member Function Documentation

Get the latest DAD probe packet UID.

Returns:
uid

References NS_LOG_FUNCTION_NOARGS.

Get address scope.

Returns:
scope

References NS_LOG_FUNCTION_NOARGS.

Get the address state.

Returns:
address state

References NS_LOG_FUNCTION_NOARGS.

Referenced by ns3::Icmpv6L4Protocol::FunctionDadTimeout().

Set IPv6 address (and scope).

Parameters:
addressIPv6 address to set

References GLOBAL, HOST, ns3::Ipv6Address::IsLinkLocal(), ns3::Ipv6Address::IsLocalhost(), LINKLOCAL, and NS_LOG_FUNCTION.

Referenced by Ipv6InterfaceAddress().

Set the latest DAD probe packet UID.

Parameters:
uidpacket uid

References NS_LOG_FUNCTION.

Set the scope.

Parameters:
scopethe scope of address

References NS_LOG_FUNCTION.

Set the state.

Parameters:
statethe state

References NS_LOG_FUNCTION.

Referenced by Ipv6InterfaceAddress().


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