A Discrete-Event Network Simulator
API
ns3::Ipv6Address Class Reference

Describes an IPv6 address. More...

#include "ipv6-address.h"

Public Member Functions

 Ipv6Address ()
 Default constructor. More...
 
 Ipv6Address (char const *address)
 Constructs an Ipv6Address by parsing the input C-string. More...
 
 Ipv6Address (uint8_t address[16])
 Constructs an Ipv6Address by using the input 16 bytes. More...
 
 Ipv6Address (Ipv6Address const &addr)
 Copy constructor. More...
 
 Ipv6Address (Ipv6Address const *addr)
 Copy constructor. More...
 
 ~Ipv6Address ()
 Destructor. More...
 
Ipv6Address CombinePrefix (Ipv6Prefix const &prefix)
 Combine this address with a prefix. More...
 
void GetBytes (uint8_t buf[16]) const
 Get the bytes corresponding to the address. More...
 
Ipv4Address GetIpv4MappedAddress () const
 Return the Ipv4 address. More...
 
NS_DEPRECATED bool IsAllHostsMulticast () const
 If the IPv6 address is "all hosts multicast" (ff02::3/8). More...
 
bool IsAllNodesMulticast () const
 If the IPv6 address is "all nodes multicast" (ff02::1/8). More...
 
bool IsAllRoutersMulticast () const
 If the IPv6 address is "all routers multicast" (ff02::2/8). More...
 
bool IsAny () const
 If the IPv6 address is the "Any" address. More...
 
bool IsDocumentation () const
 If the IPv6 address is a documentation address (2001:DB8::/32). More...
 
bool IsEqual (const Ipv6Address &other) const
 Comparison operation between two Ipv6Addresses. More...
 
bool IsIpv4MappedAddress () const
 If the address is an IPv4-mapped address. More...
 
bool IsLinkLocal () const
 If the IPv6 address is a link-local address (fe80::/64). More...
 
bool IsLinkLocalMulticast () const
 If the IPv6 address is link-local multicast (ff02::/16). More...
 
bool IsLocalhost () const
 If the IPv6 address is localhost (::1). More...
 
bool IsMulticast () const
 If the IPv6 address is multicast (ff00::/8). More...
 
bool IsSolicitedMulticast () const
 If the IPv6 address is a Solicited multicast address. More...
 
 operator Address () const
 Convert to Address object. More...
 
void Print (std::ostream &os) const
 Print this address to the given output stream. More...
 
void Serialize (uint8_t buf[16]) const
 Serialize this address to a 16-byte buffer. More...
 
void Set (char const *address)
 Sets an Ipv6Address by parsing the input C-string. More...
 
void Set (uint8_t address[16])
 Set an Ipv6Address by using the input 16 bytes. More...
 

Static Public Member Functions

static Ipv6Address ConvertFrom (const Address &address)
 Convert the Address object into an Ipv6Address ones. More...
 
static Ipv6Address Deserialize (const uint8_t buf[16])
 Deserialize this address. More...
 
static Ipv6Address GetAllHostsMulticast ()
 Get the "all hosts multicast" address. More...
 
static Ipv6Address GetAllNodesMulticast ()
 Get the "all nodes multicast" address. More...
 
static Ipv6Address GetAllRoutersMulticast ()
 Get the "all routers multicast" address. More...
 
static Ipv6Address GetAny ()
 Get the "any" (::) Ipv6Address. More...
 
static Ipv6Address GetLoopback ()
 Get the loopback address. More...
 
static Ipv6Address GetOnes ()
 Get the "all-1" IPv6 address (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff). More...
 
static Ipv6Address GetZero ()
 Get the 0 (::) Ipv6Address. More...
 
static bool IsMatchingType (const Address &address)
 If the Address matches the type. More...
 
static Ipv6Address MakeAutoconfiguredAddress (Mac16Address addr, Ipv6Address prefix)
 Make the autoconfigured IPv6 address with Mac16Address. More...
 
static Ipv6Address MakeAutoconfiguredAddress (Mac48Address addr, Ipv6Address prefix)
 Make the autoconfigured IPv6 address with Mac48Address. More...
 
static Ipv6Address MakeAutoconfiguredAddress (Mac64Address addr, Ipv6Address prefix)
 Make the autoconfigured IPv6 address with Mac64Address. More...
 
static Ipv6Address MakeAutoconfiguredAddress (Mac8Address addr, Ipv6Address prefix)
 Make the autoconfigured IPv6 address with Mac8Address. More...
 
static Ipv6Address MakeAutoconfiguredLinkLocalAddress (Mac16Address mac)
 Make the autoconfigured link-local IPv6 address with Mac16Address. More...
 
static Ipv6Address MakeAutoconfiguredLinkLocalAddress (Mac48Address mac)
 Make the autoconfigured link-local IPv6 address with Mac48Address. More...
 
static Ipv6Address MakeAutoconfiguredLinkLocalAddress (Mac64Address mac)
 Make the autoconfigured link-local IPv6 address with Mac64Address. More...
 
static Ipv6Address MakeAutoconfiguredLinkLocalAddress (Mac8Address mac)
 Make the autoconfigured link-local IPv6 address with Mac8Address. More...
 
static Ipv6Address MakeIpv4MappedAddress (Ipv4Address addr)
 Make the Ipv4-mapped IPv6 address. More...
 
static Ipv6Address MakeSolicitedAddress (Ipv6Address addr)
 Make the solicited IPv6 address. More...
 

Private Member Functions

Address ConvertTo (void) const
 convert the IPv6Address object to an Address object. More...
 

Static Private Member Functions

static uint8_t GetType (void)
 Return the Type of address. More...
 

Private Attributes

uint8_t m_address [16]
 The address representation on 128 bits (16 bytes). More...
 

Friends

bool operator!= (Ipv6Address const &a, Ipv6Address const &b)
 Not equal to operator. More...
 
bool operator< (Ipv6Address const &a, Ipv6Address const &b)
 Less than to operator. More...
 
bool operator== (Ipv6Address const &a, Ipv6Address const &b)
 Equal to operator. More...
 

Detailed Description

Describes an IPv6 address.

See also
Ipv6Prefix
Ipv6Address Attribute

Definition at line 49 of file ipv6-address.h.

Constructor & Destructor Documentation

ns3::Ipv6Address::Ipv6Address ( )

Default constructor.

Definition at line 281 of file ipv6-address.cc.

References m_address, and NS_LOG_FUNCTION.

Referenced by ns3::operator>>().

+ Here is the caller graph for this function:

ns3::Ipv6Address::Ipv6Address ( char const *  address)

Constructs an Ipv6Address by parsing the input C-string.

Parameters
addressthe C-string containing the IPv6 address (e.g. 2001:660:4701::1).

Definition at line 299 of file ipv6-address.cc.

References ns3::AsciiToIpv6Host(), m_address, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

ns3::Ipv6Address::Ipv6Address ( uint8_t  address[16])

Constructs an Ipv6Address by using the input 16 bytes.

Parameters
addressthe 128-bit address
Warning
the parameter must point on a 16 bytes integer array!

Definition at line 305 of file ipv6-address.cc.

References m_address, and NS_LOG_FUNCTION.

ns3::Ipv6Address::Ipv6Address ( Ipv6Address const &  addr)

Copy constructor.

Parameters
addrIpv6Address object

Definition at line 287 of file ipv6-address.cc.

References m_address.

ns3::Ipv6Address::Ipv6Address ( Ipv6Address const *  addr)

Copy constructor.

Parameters
addrIpv6Address pointer

Definition at line 293 of file ipv6-address.cc.

References m_address.

ns3::Ipv6Address::~Ipv6Address ( )

Destructor.

Definition at line 312 of file ipv6-address.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

Ipv6Address ns3::Ipv6Address::CombinePrefix ( Ipv6Prefix const &  prefix)

Combine this address with a prefix.

Parameters
prefixa IPv6 prefix
Returns
an IPv6 address that is this address combined (bitwise AND) with a prefix, yielding an IPv6 network address.

Definition at line 674 of file ipv6-address.cc.

References m_address, NS_LOG_FUNCTION, and Set().

Referenced by ns3::Ipv6L3Protocol::GetInterfaceForPrefix(), ns3::RipNg::HandleRequests(), ns3::RipNg::HandleResponses(), ns3::Ipv6AddressHelper::Ipv6AddressHelper(), IsDocumentation(), ns3::Ipv6InterfaceAddress::IsInSameSubnet(), IsLinkLocal(), ns3::Ipv6AddressHelper::NewAddress(), ns3::RipNg::NotifyAddAddress(), ns3::Ipv6StaticRouting::NotifyAddAddress(), ns3::RipNg::NotifyInterfaceUp(), ns3::RipNg::NotifyRemoveAddress(), ns3::Ipv6StaticRouting::NotifyRemoveAddress(), and ns3::Ipv6AddressHelper::SetBase().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Address ns3::Ipv6Address::ConvertTo ( void  ) const
private

convert the IPv6Address object to an Address object.

Returns
the Address object corresponding to this object.

Definition at line 768 of file ipv6-address.cc.

References GetType(), NS_LOG_FUNCTION, and Serialize().

Referenced by operator Address().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ipv6Address ns3::Ipv6Address::Deserialize ( const uint8_t  buf[16])
static

Deserialize this address.

Parameters
bufbuffer to read address from
Returns
an Ipv6Address

Definition at line 337 of file ipv6-address.cc.

References NS_LOG_FUNCTION.

Referenced by ns3::Inet6SocketAddress::ConvertFrom(), ConvertFrom(), ns3::Ipv6PacketInfoTag::Deserialize(), ns3::SixLowPanIphc::Deserialize(), ns3::PbbAddressBlockIpv6::DeserializeAddress(), and ns3::PbbMessageIpv6::DeserializeOriginatorAddress().

+ Here is the caller graph for this function:

Ipv6Address ns3::Ipv6Address::GetAllHostsMulticast ( )
static

Get the "all hosts multicast" address.

Returns
the "ff02::3/8" Ipv6Address representation

Definition at line 806 of file ipv6-address.cc.

References NS_LOG_FUNCTION_NOARGS.

Ipv6Address ns3::Ipv6Address::GetAllNodesMulticast ( )
static

Get the "all nodes multicast" address.

Returns
the "ff02::2/8" Ipv6Address representation

Definition at line 792 of file ipv6-address.cc.

References NS_LOG_FUNCTION_NOARGS.

Referenced by ns3::Icmpv6L4Protocol::ForgeNS(), ns3::Icmpv6L4Protocol::HandleNS(), ns3::Radvd::HandleRead(), ns3::Radvd::Send(), ns3::Icmpv6L4Protocol::SendNS(), and ns3::Radvd::StartApplication().

+ Here is the caller graph for this function:

Ipv6Address ns3::Ipv6Address::GetAllRoutersMulticast ( )
static

Get the "all routers multicast" address.

Returns
the "ff02::2/8" Ipv6Address representation

Definition at line 799 of file ipv6-address.cc.

References NS_LOG_FUNCTION_NOARGS.

Referenced by ns3::Icmpv6L4Protocol::FunctionDadTimeout(), ns3::Ipv6EndPointDemux::Lookup(), and ns3::Radvd::StartApplication().

+ Here is the caller graph for this function:

Ipv6Address ns3::Ipv6Address::GetAny ( void  )
static

Get the "any" (::) Ipv6Address.

Returns
the "any" (::) Ipv6Address

Definition at line 827 of file ipv6-address.cc.

References NS_LOG_FUNCTION_NOARGS.

Referenced by ns3::Ipv6L3Protocol::AddAutoconfiguredAddress(), ns3::Ipv6EndPointDemux::Allocate(), ns3::Ipv6RawSocketImpl::Bind(), ns3::VirtualUdpSocketImpl::Bind(), ns3::UdpSocketImpl::Bind(), ns3::VirtualTcpSocketBase::Bind(), ns3::TcpSocketBase::Bind(), ns3::SixLowPanNetDevice::DecompressLowPanIphc(), ns3::RipNg::DoSendRouteUpdate(), ns3::VirtualUdpSocketImpl::DoSendTo(), ns3::UdpSocketImpl::DoSendTo(), ns3::Icmpv6L4Protocol::ForgeNA(), ns3::Icmpv6L4Protocol::ForgeNS(), ns3::Ipv6RawSocketImpl::ForwardUp(), ns3::Ipv6InterfaceContainer::GetLinkLocalAddress(), ns3::Icmpv6L4Protocol::HandleNS(), ns3::RipNg::HandleRequests(), ns3::RipNg::HandleResponses(), ns3::Icmpv6L4Protocol::HandleRS(), ns3::Ipv6L3Protocol::IpMulticastForward(), ns3::Socket::Ipv6LeaveGroup(), ns3::Ipv6RawSocketImpl::Ipv6RawSocketImpl(), ns3::Ipv6EndPointDemux::Lookup(), ns3::SixLowPanNetDevice::MakeGlobalAddressFromMac(), ns3::SixLowPanNetDevice::MakeLinkLocalAddressFromMac(), ns3::Ipv6L3Protocol::RemoveAutoconfiguredAddress(), ns3::Icmpv6L4Protocol::SendNA(), ns3::Icmpv6L4Protocol::SendNS(), SendPacket(), ns3::Ipv6L3Protocol::SendRealOut(), ns3::RipNg::SendRouteRequest(), ns3::Icmpv6L4Protocol::SendRS(), ns3::Ipv6InterfaceContainer::SetDefaultRoute(), ns3::Ipv6InterfaceContainer::SetDefaultRouteInAllNodes(), UanExperiment::SetupApplications(), ns3::Ipv6EndPointDemux::SimpleLookup(), ns3::UdpEchoServer::StartApplication(), and ns3::UdpServer::StartApplication().

+ Here is the caller graph for this function:

void ns3::Ipv6Address::GetBytes ( uint8_t  buf[16]) const

Get the bytes corresponding to the address.

Parameters
bufbuffer to store the data
Returns
bytes of the address

Definition at line 841 of file ipv6-address.cc.

References m_address, and NS_LOG_FUNCTION.

Referenced by ns3::SixLowPanNetDevice::CompressLowPanHc1(), ns3::SixLowPanNetDevice::CompressLowPanIphc(), ns3::Ipv6Prefix::IsMatch(), MakeAutoconfiguredAddress(), ns3::Ipv6AddressHelper::NewAddress(), ns3::Ipv6AddressHelper::NewNetwork(), ns3::Ipv6AddressHash::operator()(), and ns3::WriteTo().

+ Here is the caller graph for this function:

Ipv4Address ns3::Ipv6Address::GetIpv4MappedAddress ( ) const

Return the Ipv4 address.

Returns
Ipv4 address

Definition at line 353 of file ipv6-address.cc.

References ns3::Ipv4Address::Deserialize(), NS_LOG_FUNCTION, and Serialize().

Referenced by ns3::VirtualTcpSocketBase::Connect(), ns3::TcpSocketBase::Connect(), ns3::VirtualUdpSocketImpl::DoSendTo(), ns3::UdpSocketImpl::DoSendTo(), ns3::TcpL4Protocol::SendPacketV6(), and ns3::VirtualTcpL4Protocol::SendPacketV6().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ipv6Address ns3::Ipv6Address::GetLoopback ( void  )
static

Get the loopback address.

Returns
the "::1/128" Ipv6Address representation.

Definition at line 813 of file ipv6-address.cc.

References NS_LOG_FUNCTION_NOARGS.

Referenced by ns3::Ipv6L3Protocol::RemoveAddress(), ns3::Ipv6Interface::RemoveAddress(), and ns3::Ipv6L3Protocol::SetupLoopback().

+ Here is the caller graph for this function:

Ipv6Address ns3::Ipv6Address::GetOnes ( void  )
static

Get the "all-1" IPv6 address (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff).

Returns
all-1 Ipv6Address representation

Definition at line 834 of file ipv6-address.cc.

References NS_LOG_FUNCTION_NOARGS.

uint8_t ns3::Ipv6Address::GetType ( void  )
staticprivate

Return the Type of address.

Returns
type of address

Definition at line 785 of file ipv6-address.cc.

References NS_LOG_FUNCTION_NOARGS, and ns3::Address::Register().

Referenced by ConvertFrom(), ConvertTo(), and IsMatchingType().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::Ipv6Address::IsAllHostsMulticast ( ) const

If the IPv6 address is "all hosts multicast" (ff02::3/8).

Deprecated:
This function is deprecated because the address has been removed from RFCs.
Returns
true if "all hosts multicast", false otherwise

Definition at line 730 of file ipv6-address.cc.

References NS_LOG_FUNCTION.

bool ns3::Ipv6Address::IsAllNodesMulticast ( ) const

If the IPv6 address is "all nodes multicast" (ff02::1/8).

Returns
true if "all nodes multicast", false otherwise

Definition at line 711 of file ipv6-address.cc.

References NS_LOG_FUNCTION.

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

+ Here is the caller graph for this function:

bool ns3::Ipv6Address::IsAllRoutersMulticast ( ) const

If the IPv6 address is "all routers multicast" (ff02::2/8).

Returns
true if "all routers multicast", false otherwise

Definition at line 720 of file ipv6-address.cc.

References NS_LOG_FUNCTION.

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

+ Here is the caller graph for this function:

bool ns3::Ipv6Address::IsDocumentation ( ) const

If the IPv6 address is a documentation address (2001:DB8::/32).

Returns
true if the address is documentation, false otherwise

Definition at line 745 of file ipv6-address.cc.

References CombinePrefix(), and NS_LOG_FUNCTION.

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::Ipv6Address::IsEqual ( const Ipv6Address other) const

Comparison operation between two Ipv6Addresses.

Parameters
otherthe IPv6 address to which to compare thisaddress
Returns
true if the addresses are equal, false otherwise

Definition at line 858 of file ipv6-address.cc.

References m_address, and NS_LOG_FUNCTION.

Referenced by LteIpv6RoutingTestCase::Checker(), ns3::Icmpv6L4Protocol::HandleRedirection(), ns3::Ipv6RoutingTableEntry::IsDefault(), ns3::Ipv6RoutingTableEntry::IsGateway(), and ns3::Ipv6L3Protocol::Receive().

+ Here is the caller graph for this function:

bool ns3::Ipv6Address::IsIpv4MappedAddress ( ) const

If the address is an IPv4-mapped address.

Returns
true if address is an IPv4-mapped address, otherwise false.

Definition at line 662 of file ipv6-address.cc.

References m_address, and NS_LOG_FUNCTION.

Referenced by ns3::VirtualTcpSocketBase::Connect(), ns3::TcpSocketBase::Connect(), ns3::VirtualUdpSocketImpl::DoSendTo(), ns3::UdpSocketImpl::DoSendTo(), Print(), ns3::VirtualUdpL4Protocol::Receive(), ns3::UdpL4Protocol::Receive(), ns3::TcpL4Protocol::SendPacketV6(), and ns3::VirtualTcpL4Protocol::SendPacketV6().

+ Here is the caller graph for this function:

bool ns3::Ipv6Address::IsLinkLocalMulticast ( ) const

If the IPv6 address is link-local multicast (ff02::/16).

Returns
true if link-local multicast, false otherwise

Definition at line 652 of file ipv6-address.cc.

References m_address, and NS_LOG_FUNCTION.

Referenced by ns3::Ipv6InterfaceAddress::IsInSameSubnet(), ns3::RipNg::Lookup(), ns3::Ipv6StaticRouting::LookupStatic(), ns3::Ipv6L3Protocol::Send(), ns3::Ipv6InterfaceAddress::SetAddress(), and ns3::Ipv6L3Protocol::SourceAddressSelection().

+ Here is the caller graph for this function:

bool ns3::Ipv6Address::IsLocalhost ( void  ) const

If the IPv6 address is localhost (::1).

Returns
true if localhost, false otherwise

Definition at line 635 of file ipv6-address.cc.

References NS_LOG_FUNCTION.

Referenced by ns3::Ipv6Interface::AddAddress(), and ns3::Ipv6InterfaceAddress::SetAddress().

+ Here is the caller graph for this function:

bool ns3::Ipv6Address::IsSolicitedMulticast ( ) const

If the IPv6 address is a Solicited multicast address.

Returns
true if it is, false otherwise

Definition at line 694 of file ipv6-address.cc.

References NS_LOG_FUNCTION, and Serialize().

+ Here is the call graph for this function:

Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress ( Mac16Address  addr,
Ipv6Address  prefix 
)
static

Make the autoconfigured IPv6 address with Mac16Address.

The EUI-64 scheme used is based on the RFC 4944.

Parameters
addrthe MAC address (16 bits).
prefixthe IPv6 prefix
Returns
autoconfigured IPv6 address

Definition at line 364 of file ipv6-address.cc.

References ns3::Mac16Address::CopyTo(), GetBytes(), NS_LOG_FUNCTION, and Set().

Referenced by ns3::Ipv6L3Protocol::AddAutoconfiguredAddress(), ns3::SixLowPanNetDevice::MakeGlobalAddressFromMac(), ns3::Ipv6AddressHelper::NewAddress(), and ns3::Ipv6L3Protocol::RemoveAutoconfiguredAddress().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress ( Mac48Address  addr,
Ipv6Address  prefix 
)
static

Make the autoconfigured IPv6 address with Mac48Address.

The EUI-64 scheme used is based on RFC 2464.

Parameters
addrthe MAC address (48 bits).
prefixthe IPv6 prefix
Returns
autoconfigured IPv6 address

Definition at line 382 of file ipv6-address.cc.

References ns3::Mac48Address::CopyTo(), GetBytes(), NS_LOG_FUNCTION, and Set().

+ Here is the call graph for this function:

Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress ( Mac64Address  addr,
Ipv6Address  prefix 
)
static

Make the autoconfigured IPv6 address with Mac64Address.

Parameters
addrthe MAC address (64 bits).
prefixthe IPv6 prefix
Returns
autoconfigured IPv6 address

Definition at line 402 of file ipv6-address.cc.

References ns3::Mac64Address::CopyTo(), GetBytes(), NS_LOG_FUNCTION, and Set().

+ Here is the call graph for this function:

Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress ( Mac8Address  addr,
Ipv6Address  prefix 
)
static

Make the autoconfigured IPv6 address with Mac8Address.

The EUI-64 scheme used is loosely based on the RFC 2464.

Parameters
addrthe Mac8Address address (8 bits).
prefixthe IPv6 prefix
Returns
autoconfigured IPv6 address

Definition at line 418 of file ipv6-address.cc.

References ns3::Mac8Address::CopyTo(), GetBytes(), NS_LOG_FUNCTION, and Set().

+ Here is the call graph for this function:

Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress ( Mac16Address  mac)
static

Make the autoconfigured link-local IPv6 address with Mac16Address.

The EUI-64 scheme used is based on the RFC 4944.

Parameters
macthe MAC address (16 bits).
Returns
autoconfigured link-local IPv6 address

Definition at line 437 of file ipv6-address.cc.

References ns3::Mac16Address::CopyTo(), NS_LOG_FUNCTION, and Set().

Referenced by ns3::Ipv6Interface::DoSetup(), and ns3::SixLowPanNetDevice::MakeLinkLocalAddressFromMac().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress ( Mac48Address  mac)
static

Make the autoconfigured link-local IPv6 address with Mac48Address.

The EUI-64 scheme used is based on RFC 2464.

Parameters
macthe MAC address (48 bits).
Returns
autoconfigured link-local IPv6 address

Definition at line 457 of file ipv6-address.cc.

References ns3::Mac48Address::CopyTo(), NS_LOG_FUNCTION, and Set().

+ Here is the call graph for this function:

Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress ( Mac64Address  mac)
static

Make the autoconfigured link-local IPv6 address with Mac64Address.

Parameters
macthe MAC address (64 bits).
Returns
autoconfigured link-local IPv6 address

Definition at line 479 of file ipv6-address.cc.

References ns3::Mac64Address::CopyTo(), NS_LOG_FUNCTION, and Set().

+ Here is the call graph for this function:

Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress ( Mac8Address  mac)
static

Make the autoconfigured link-local IPv6 address with Mac8Address.

The EUI-64 scheme used is loosely based on the RFC 2464.

Parameters
macthe MAC address (8 bits).
Returns
autoconfigured link-local IPv6 address

Definition at line 497 of file ipv6-address.cc.

References ns3::Mac8Address::CopyTo(), NS_LOG_FUNCTION, and Set().

+ Here is the call graph for this function:

Ipv6Address ns3::Ipv6Address::MakeIpv4MappedAddress ( Ipv4Address  addr)
static

Make the Ipv4-mapped IPv6 address.

Parameters
addrthe IPv4 address
Returns
Ipv4-mapped IPv6 address

Definition at line 344 of file ipv6-address.cc.

References NS_LOG_FUNCTION, and ns3::Ipv4Address::Serialize().

Referenced by ns3::UdpL4Protocol::Receive(), ns3::VirtualUdpL4Protocol::Receive(), ns3::TcpL4Protocol::Receive(), and ns3::VirtualTcpL4Protocol::Receive().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ipv6Address ns3::Ipv6Address::MakeSolicitedAddress ( Ipv6Address  addr)
static

Make the solicited IPv6 address.

Parameters
addrthe IPv6 address
Returns
Solicited IPv6 address

Definition at line 518 of file ipv6-address.cc.

References NS_LOG_FUNCTION, Serialize(), and Set().

Referenced by ns3::Ipv6Interface::AddAddress(), ns3::Icmpv6L4Protocol::DoDAD(), ns3::NdiscCache::Entry::FunctionRetransmitTimeout(), and ns3::Icmpv6L4Protocol::Lookup().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ns3::Ipv6Address::operator Address ( ) const

Convert to Address object.

Definition at line 763 of file ipv6-address.cc.

References ConvertTo().

+ Here is the call graph for this function:

void ns3::Ipv6Address::Print ( std::ostream &  os) const

Print this address to the given output stream.

The print format is in the typical "2001:660:4701::1".

Parameters
osthe output stream to which this Ipv6Address is printed

Definition at line 540 of file ipv6-address.cc.

References first::address, IsIpv4MappedAddress(), m_address, and NS_LOG_FUNCTION.

Referenced by ns3::operator<<(), ns3::PbbAddressBlockIpv6::PrintAddress(), and ns3::PbbMessageIpv6::PrintOriginatorAddress().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::Ipv6Address::Set ( char const *  address)

Sets an Ipv6Address by parsing the input C-string.

Parameters
addressthe C-string containing the IPv6 address (e.g. 2001:660:4701::1).

Definition at line 318 of file ipv6-address.cc.

References ns3::AsciiToIpv6Host(), m_address, and NS_LOG_FUNCTION.

Referenced by CombinePrefix(), ns3::RipNgRte::Deserialize(), ns3::Icmpv6Redirection::Deserialize(), MakeAutoconfiguredAddress(), MakeAutoconfiguredLinkLocalAddress(), MakeSolicitedAddress(), and ns3::ReadFrom().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::Ipv6Address::Set ( uint8_t  address[16])

Set an Ipv6Address by using the input 16 bytes.

Parameters
addressthe 128-bit address
Warning
the parameter must point on a 16 bytes integer array!

Definition at line 324 of file ipv6-address.cc.

References m_address, and NS_LOG_FUNCTION.

Friends And Related Function Documentation

bool operator!= ( Ipv6Address const &  a,
Ipv6Address const &  b 
)
friend

Not equal to operator.

Parameters
athe first operand.
bthe first operand.
Returns
true if the operands are not equal.

Definition at line 594 of file ipv6-address.h.

bool operator< ( Ipv6Address const &  a,
Ipv6Address const &  b 
)
friend

Less than to operator.

Parameters
athe first operand.
bthe first operand.
Returns
true if the first operand is less than the second.

Definition at line 599 of file ipv6-address.h.

bool operator== ( Ipv6Address const &  a,
Ipv6Address const &  b 
)
friend

Equal to operator.

Parameters
athe first operand.
bthe first operand.
Returns
true if the operands are equal.

Definition at line 589 of file ipv6-address.h.

Member Data Documentation

uint8_t ns3::Ipv6Address::m_address[16]
private

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