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... | |
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 Mac48Address. 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 Mac48Address. 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... | |
ns3::Ipv6Address::Ipv6Address | ( | ) |
Default constructor.
Definition at line 282 of file ipv6-address.cc.
References m_address, and NS_LOG_FUNCTION.
ns3::Ipv6Address::Ipv6Address | ( | char const * | address | ) |
Constructs an Ipv6Address by parsing the input C-string.
address | the C-string containing the IPv6 address (e.g. 2001:660:4701::1). |
Definition at line 300 of file ipv6-address.cc.
References ns3::AsciiToIpv6Host(), m_address, and NS_LOG_FUNCTION.
ns3::Ipv6Address::Ipv6Address | ( | uint8_t | address[16] | ) |
Constructs an Ipv6Address by using the input 16 bytes.
address | the 128-bit address |
Definition at line 306 of file ipv6-address.cc.
References m_address, and NS_LOG_FUNCTION.
ns3::Ipv6Address::Ipv6Address | ( | Ipv6Address const & | addr | ) |
Copy constructor.
addr | Ipv6Address object |
Definition at line 288 of file ipv6-address.cc.
References m_address.
ns3::Ipv6Address::Ipv6Address | ( | Ipv6Address const * | addr | ) |
Copy constructor.
addr | Ipv6Address pointer |
Definition at line 294 of file ipv6-address.cc.
References m_address.
ns3::Ipv6Address::~Ipv6Address | ( | ) |
Ipv6Address ns3::Ipv6Address::CombinePrefix | ( | Ipv6Prefix const & | prefix | ) |
Combine this address with a prefix.
prefix | a IPv6 prefix |
Definition at line 635 of file ipv6-address.cc.
References m_address, NS_LOG_FUNCTION, and Set().
Referenced by ns3::Ipv6L3Protocol::GetInterfaceForPrefix(), IsDocumentation(), IsLinkLocal(), ns3::Ipv6StaticRouting::NotifyAddAddress(), and ns3::Ipv6StaticRouting::NotifyRemoveAddress().
|
static |
Convert the Address object into an Ipv6Address ones.
address | address to convert |
Definition at line 732 of file ipv6-address.cc.
References ns3::Address::CheckCompatible(), ns3::Address::CopyTo(), Deserialize(), GetType(), NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by ns3::UdpSocketImpl::DoSendTo(), ns3::PbbAddressBlockIpv6::PrintAddress(), ns3::PbbMessageIpv6::PrintOriginatorAddress(), ns3::UdpClient::Send(), ns3::UdpEchoClient::Send(), ns3::UdpTraceClient::SendPacket(), ns3::PbbAddressBlockIpv6::SerializeAddress(), ns3::PbbMessageIpv6::SerializeOriginatorAddress(), ns3::UdpClient::StartApplication(), ns3::UdpTraceClient::StartApplication(), and ns3::UdpEchoClient::StartApplication().
|
private |
convert the IPv6Address object to an Address object.
Definition at line 724 of file ipv6-address.cc.
References GetType(), NS_LOG_FUNCTION, and Serialize().
|
static |
Deserialize this address.
buf | buffer to read address from |
Definition at line 338 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().
|
static |
Get the "all hosts multicast" address.
Definition at line 762 of file ipv6-address.cc.
References NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::Ipv6StaticRouting::LookupStatic(), ns3::Ipv6ListRouting::RouteInput(), and ns3::Ipv6StaticRouting::SourceAddressSelection().
|
static |
Get the "all nodes multicast" address.
Definition at line 748 of file ipv6-address.cc.
References NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::Icmpv6L4Protocol::ForgeNS(), ns3::Icmpv6L4Protocol::HandleNS(), ns3::Ipv6StaticRouting::LookupStatic(), main(), ns3::Ipv6ListRouting::RouteInput(), ns3::Radvd::Send(), ns3::Icmpv6L4Protocol::SendNS(), ns3::Ipv6StaticRouting::SourceAddressSelection(), and ns3::Radvd::StartApplication().
|
static |
Get the "all routers multicast" address.
Definition at line 755 of file ipv6-address.cc.
References NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::Icmpv6L4Protocol::FunctionDadTimeout(), ns3::Ipv6EndPointDemux::Lookup(), ns3::Ipv6StaticRouting::LookupStatic(), ns3::Ipv6ListRouting::RouteInput(), and ns3::Ipv6StaticRouting::SourceAddressSelection().
|
static |
Get the "any" (::) Ipv6Address.
Definition at line 783 of file ipv6-address.cc.
References NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::Ipv6L3Protocol::AddAutoconfiguredAddress(), ns3::Ipv6EndPointDemux::Allocate(), ns3::UdpSocketImpl::Bind(), ns3::Ipv6RawSocketImpl::Bind(), ns3::TcpSocketBase::Bind(), ns3::SixLowPanNetDevice::DecompressLowPanIphc(), ns3::UdpSocketImpl::DoSendTo(), ns3::Icmpv6L4Protocol::ForgeNA(), ns3::Icmpv6L4Protocol::ForgeNS(), ns3::Ipv6RawSocketImpl::ForwardUp(), ns3::Ipv6InterfaceContainer::GetLinkLocalAddress(), ns3::Icmpv6L4Protocol::HandleNS(), ns3::Icmpv6L4Protocol::HandleRS(), ns3::Ipv6L3Protocol::IpMulticastForward(), ns3::Ipv6RawSocketImpl::Ipv6RawSocketImpl(), ns3::Ipv6EndPointDemux::Lookup(), main(), ns3::SixLowPanNetDevice::MakeGlobalAddressFromMac(), ns3::SixLowPanNetDevice::MakeLinkLocalAddressFromMac(), ns3::Ipv6L3Protocol::RemoveAutoconfiguredAddress(), ns3::Icmpv6L4Protocol::SendNA(), ns3::Icmpv6L4Protocol::SendNS(), ns3::Ipv6L3Protocol::SendRealOut(), ns3::Icmpv6L4Protocol::SendRS(), ns3::Ipv6InterfaceContainer::SetDefaultRoute(), ns3::Ipv6InterfaceContainer::SetDefaultRouteInAllNodes(), ns3::Ipv6EndPointDemux::SimpleLookup(), ns3::UdpEchoServer::StartApplication(), and ns3::UdpServer::StartApplication().
void ns3::Ipv6Address::GetBytes | ( | uint8_t | buf[16] | ) | const |
Get the bytes corresponding to the address.
buf | buffer to store the data |
Definition at line 797 of file ipv6-address.cc.
References m_address, and NS_LOG_FUNCTION.
Referenced by ns3::Ipv6AddressGeneratorImpl::AddAllocated(), ns3::SixLowPanNetDevice::CompressLowPanHc1(), ns3::SixLowPanNetDevice::CompressLowPanIphc(), ns3::Ipv6AddressGeneratorImpl::Init(), ns3::Ipv6AddressGeneratorImpl::InitAddress(), ns3::Ipv6Prefix::IsMatch(), MakeAutoconfiguredAddress(), ns3::Ipv6AddressGeneratorImpl::NextNetwork(), ns3::Ipv6AddressHash::operator()(), ns3::Icmpv6OptionPrefixInformation::Serialize(), and ns3::WriteTo().
Ipv4Address ns3::Ipv6Address::GetIpv4MappedAddress | ( | ) | const |
Return the Ipv4 address.
Definition at line 354 of file ipv6-address.cc.
References ns3::Ipv4Address::Deserialize(), NS_LOG_FUNCTION, and Serialize().
Referenced by ns3::TcpSocketBase::Connect(), ns3::UdpSocketImpl::DoSendTo(), and ns3::TcpL4Protocol::SendPacket().
|
static |
Get the loopback address.
Definition at line 769 of file ipv6-address.cc.
References NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::Ipv6L3ProtocolTestCase::DoRun(), ns3::Ipv6Interface::RemoveAddress(), ns3::Ipv6L3Protocol::RemoveAddress(), and ns3::Ipv6L3Protocol::SetupLoopback().
|
static |
Get the "all-1" IPv6 address (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff).
Definition at line 790 of file ipv6-address.cc.
References NS_LOG_FUNCTION_NOARGS.
|
staticprivate |
Return the Type of address.
Definition at line 741 of file ipv6-address.cc.
References NS_LOG_FUNCTION_NOARGS, and ns3::Address::Register().
Referenced by ConvertFrom(), ConvertTo(), and IsMatchingType().
|
static |
Get the 0 (::) Ipv6Address.
Definition at line 776 of file ipv6-address.cc.
References NS_LOG_FUNCTION_NOARGS, and zero.
Referenced by ns3::Ipv6RoutingTableEntry::CreateDefaultRoute(), ns3::Icmpv6L4Protocol::HandleRA(), ns3::Ipv6RoutingTableEntry::IsDefault(), ns3::Ipv6RoutingTableEntry::IsGateway(), ns3::Ipv6StaticRouting::LookupStatic(), ns3::Ipv6StaticRouting::NotifyAddRoute(), ns3::Ipv6StaticRouting::NotifyRemoveRoute(), and ns3::Ipv6L3Protocol::Send().
bool ns3::Ipv6Address::IsAllHostsMulticast | ( | ) | const |
If the IPv6 address is "all hosts multicast" (ff02::3/8).
Definition at line 686 of file ipv6-address.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::Ipv6L3Protocol::Send().
bool ns3::Ipv6Address::IsAllNodesMulticast | ( | ) | const |
If the IPv6 address is "all nodes multicast" (ff02::1/8).
Definition at line 672 of file ipv6-address.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::Ipv6L3Protocol::Send().
bool ns3::Ipv6Address::IsAllRoutersMulticast | ( | ) | const |
If the IPv6 address is "all routers multicast" (ff02::2/8).
Definition at line 679 of file ipv6-address.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::Ipv6L3Protocol::Send().
bool ns3::Ipv6Address::IsAny | ( | ) | const |
If the IPv6 address is the "Any" address.
Definition at line 693 of file ipv6-address.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::Ipv6Interface::AddAddress(), ns3::Ipv6L3Protocol::AddAutoconfiguredAddress(), ns3::NdiscCache::Entry::FunctionDelayTimeout(), ns3::NdiscCache::Entry::FunctionProbeTimeout(), ns3::NdiscCache::Entry::FunctionRetransmitTimeout(), ns3::Icmpv6L4Protocol::HandleNS(), ns3::Ipv6L3Protocol::IpForward(), ns3::Ipv6StaticRouting::LookupStatic(), ns3::SixLowPanNetDevice::MakeGlobalAddressFromMac(), ns3::SixLowPanNetDevice::MakeLinkLocalAddressFromMac(), and ns3::Ipv6RawSocketImpl::SendTo().
bool ns3::Ipv6Address::IsDocumentation | ( | ) | const |
If the IPv6 address is a documentation address (2001:DB8::/32).
Definition at line 701 of file ipv6-address.cc.
References CombinePrefix(), and NS_LOG_FUNCTION.
Referenced by ns3::Ipv6L3Protocol::IpForward().
bool ns3::Ipv6Address::IsEqual | ( | const Ipv6Address & | other | ) | const |
Comparison operation between two Ipv6Addresses.
other | the IPv6 address to which to compare thisaddress |
Definition at line 814 of file ipv6-address.cc.
References m_address, and NS_LOG_FUNCTION.
Referenced by ns3::Icmpv6L4Protocol::HandleRedirection(), ns3::Ipv6RoutingTableEntry::IsDefault(), ns3::Ipv6RoutingTableEntry::IsGateway(), ns3::Ipv6ListRouting::RouteInput(), and ns3::Ipv6StaticRouting::RouteInput().
bool ns3::Ipv6Address::IsIpv4MappedAddress | ( | ) | const |
If the address is an IPv4-mapped address.
Definition at line 623 of file ipv6-address.cc.
References m_address, and NS_LOG_FUNCTION.
Referenced by ns3::TcpSocketBase::Connect(), ns3::UdpSocketImpl::DoSendTo(), Print(), ns3::UdpL4Protocol::Receive(), and ns3::TcpL4Protocol::SendPacket().
bool ns3::Ipv6Address::IsLinkLocal | ( | ) | const |
If the IPv6 address is a link-local address (fe80::/64).
Definition at line 803 of file ipv6-address.cc.
References CombinePrefix(), IsMulticast(), and NS_LOG_FUNCTION.
Referenced by ns3::Ipv6StaticRouting::AddHostRouteTo(), ns3::Ipv6StaticRouting::AddNetworkRouteTo(), ns3::SixLowPanNetDevice::CompressLowPanHc1(), ns3::SixLowPanNetDevice::CompressLowPanIphc(), ns3::Ipv6L3ProtocolTestCase::DoRun(), ns3::Icmpv6L4Protocol::FunctionDadTimeout(), ns3::Ipv6InterfaceContainer::GetLinkLocalAddress(), ns3::Icmpv6L4Protocol::HandleNS(), ns3::Ipv6L3Protocol::IpForward(), ns3::Icmpv6L4Protocol::Lookup(), ns3::Ipv6L3Protocol::Send(), and ns3::Ipv6InterfaceAddress::SetAddress().
bool ns3::Ipv6Address::IsLinkLocalMulticast | ( | ) | const |
If the IPv6 address is link-local multicast (ff02::/16).
Definition at line 613 of file ipv6-address.cc.
References m_address, and NS_LOG_FUNCTION.
Referenced by ns3::Ipv6InterfaceAddress::SetAddress().
bool ns3::Ipv6Address::IsLocalhost | ( | ) | const |
If the IPv6 address is localhost (::1).
Definition at line 596 of file ipv6-address.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::Ipv6Interface::AddAddress(), and ns3::Ipv6InterfaceAddress::SetAddress().
|
static |
If the Address matches the type.
address | other address |
Definition at line 713 of file ipv6-address.cc.
References ns3::Address::CheckCompatible(), GetType(), and NS_LOG_FUNCTION.
Referenced by ns3::UdpHeader::CalculateHeaderChecksum(), ns3::UdpSocketImpl::DoSendTo(), ns3::UdpClient::Send(), ns3::UdpEchoClient::Send(), ns3::UdpTraceClient::SendPacket(), ns3::UdpClient::StartApplication(), ns3::UdpTraceClient::StartApplication(), and ns3::UdpEchoClient::StartApplication().
bool ns3::Ipv6Address::IsMulticast | ( | void | ) | const |
If the IPv6 address is multicast (ff00::/8).
Definition at line 603 of file ipv6-address.cc.
References m_address, and NS_LOG_FUNCTION.
Referenced by ns3::SixLowPanNetDevice::CompressLowPanIphc(), ns3::UdpSocketImpl::DoSendTo(), ns3::Icmpv6L4Protocol::HandleEchoRequest(), ns3::Ipv6L3Protocol::IpForward(), IsLinkLocal(), ns3::Ipv6L3Protocol::LocalDeliver(), ns3::Ipv6ExtensionLooseRouting::Process(), ns3::Ipv6Extension::ProcessOptions(), ns3::Ipv6ListRouting::RouteInput(), ns3::Ipv6StaticRouting::RouteInput(), ns3::Ipv6StaticRouting::RouteOutput(), ns3::Ipv6Interface::Send(), ns3::Icmpv6L4Protocol::SendNS(), and ns3::Icmpv6L4Protocol::SendRS().
bool ns3::Ipv6Address::IsSolicitedMulticast | ( | ) | const |
If the IPv6 address is a Solicited multicast address.
Definition at line 655 of file ipv6-address.cc.
References NS_LOG_FUNCTION, and Serialize().
Referenced by ns3::Ipv6StaticRouting::LookupStatic(), and ns3::Ipv6L3Protocol::Send().
|
static |
Make the autoconfigured IPv6 address with Mac16Address.
addr | the MAC address (16 bits). |
prefix | the IPv6 prefix |
Definition at line 365 of file ipv6-address.cc.
References ns3::Mac16Address::CopyTo(), GetBytes(), NS_LOG_FUNCTION, and Set().
Referenced by ns3::Ipv6L3Protocol::AddAutoconfiguredAddress(), main(), ns3::SixLowPanNetDevice::MakeGlobalAddressFromMac(), ns3::Ipv6AddressHelper::NewAddress(), and ns3::Ipv6L3Protocol::RemoveAutoconfiguredAddress().
|
static |
Make the autoconfigured IPv6 address with Mac48Address.
addr | the MAC address (48 bits). |
prefix | the IPv6 prefix |
Definition at line 383 of file ipv6-address.cc.
References ns3::Mac48Address::CopyTo(), GetBytes(), NS_LOG_FUNCTION, and Set().
|
static |
Make the autoconfigured IPv6 address with Mac48Address.
addr | the MAC address (64 bits). |
prefix | the IPv6 prefix |
Definition at line 403 of file ipv6-address.cc.
References ns3::Mac64Address::CopyTo(), GetBytes(), NS_LOG_FUNCTION, and Set().
|
static |
Make the autoconfigured link-local IPv6 address with Mac16Address.
mac | the MAC address (16 bits). |
Definition at line 419 of file ipv6-address.cc.
References ns3::Mac16Address::CopyTo(), NS_LOG_FUNCTION, and Set().
Referenced by ns3::Ipv6Interface::DoSetup(), and ns3::SixLowPanNetDevice::MakeLinkLocalAddressFromMac().
|
static |
Make the autoconfigured link-local IPv6 address with Mac48Address.
mac | the MAC address (48 bits). |
Definition at line 439 of file ipv6-address.cc.
References ns3::Mac48Address::CopyTo(), NS_LOG_FUNCTION, and Set().
|
static |
Make the autoconfigured link-local IPv6 address with Mac48Address.
mac | the MAC address (64 bits). |
Definition at line 461 of file ipv6-address.cc.
References ns3::Mac64Address::CopyTo(), NS_LOG_FUNCTION, and Set().
|
static |
Make the Ipv4-mapped IPv6 address.
addr | the IPv4 address |
Definition at line 345 of file ipv6-address.cc.
References NS_LOG_FUNCTION, and ns3::Ipv4Address::Serialize().
Referenced by ns3::TcpL4Protocol::Receive(), and ns3::UdpL4Protocol::Receive().
|
static |
Make the solicited IPv6 address.
addr | the IPv6 address |
Definition at line 479 of file ipv6-address.cc.
References NS_LOG_FUNCTION, Serialize(), and Set().
Referenced by ns3::Icmpv6L4Protocol::DoDAD(), ns3::NdiscCache::Entry::FunctionRetransmitTimeout(), and ns3::Icmpv6L4Protocol::Lookup().
ns3::Ipv6Address::operator Address | ( | ) | const |
Convert to Address object.
Definition at line 719 of file ipv6-address.cc.
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".
os | the output stream to which this Ipv6Address is printed |
Definition at line 501 of file ipv6-address.cc.
References first::address, IsIpv4MappedAddress(), m_address, and NS_LOG_FUNCTION.
Referenced by main(), ns3::operator<<(), ns3::PbbAddressBlockIpv6::PrintAddress(), and ns3::PbbMessageIpv6::PrintOriginatorAddress().
void ns3::Ipv6Address::Serialize | ( | uint8_t | buf[16] | ) | const |
Serialize this address to a 16-byte buffer.
buf | the output buffer to which this address gets overwritten with this Ipv6Address |
Definition at line 332 of file ipv6-address.cc.
References m_address, and NS_LOG_FUNCTION.
Referenced by ns3::Icmpv6Header::CalculatePseudoHeaderChecksum(), ns3::Inet6SocketAddress::ConvertTo(), ConvertTo(), Ipv6AddressTestCase1::DoRun(), GetIpv4MappedAddress(), ns3::Mac48Address::GetMulticast(), IsSolicitedMulticast(), MakeSolicitedAddress(), ns3::Ipv6PacketInfoTag::Serialize(), ns3::Icmpv6NS::Serialize(), ns3::Icmpv6NA::Serialize(), ns3::SixLowPanIphc::Serialize(), ns3::Icmpv6Redirection::Serialize(), ns3::PbbAddressBlockIpv6::SerializeAddress(), and ns3::PbbMessageIpv6::SerializeOriginatorAddress().
void ns3::Ipv6Address::Set | ( | char const * | address | ) |
Sets an Ipv6Address by parsing the input C-string.
address | the C-string containing the IPv6 address (e.g. 2001:660:4701::1). |
Definition at line 319 of file ipv6-address.cc.
References ns3::AsciiToIpv6Host(), m_address, and NS_LOG_FUNCTION.
Referenced by CombinePrefix(), ns3::Icmpv6NS::Deserialize(), ns3::Icmpv6NA::Deserialize(), ns3::Icmpv6Redirection::Deserialize(), MakeAutoconfiguredAddress(), MakeAutoconfiguredLinkLocalAddress(), MakeSolicitedAddress(), and ns3::ReadFrom().
void ns3::Ipv6Address::Set | ( | uint8_t | address[16] | ) |
Set an Ipv6Address by using the input 16 bytes.
address | the 128-bit address |
Definition at line 325 of file ipv6-address.cc.
References m_address, and NS_LOG_FUNCTION.
|
friend |
Not equal to operator.
a | the first operand |
b | the first operand |
Definition at line 562 of file ipv6-address.h.
|
friend |
Less than to operator.
a | the first operand |
b | the first operand |
Definition at line 567 of file ipv6-address.h.
|
friend |
Equal to operator.
a | the first operand |
b | the first operand |
Definition at line 557 of file ipv6-address.h.
|
private |
The address representation on 128 bits (16 bytes).
Definition at line 351 of file ipv6-address.h.
Referenced by CombinePrefix(), GetBytes(), Ipv6Address(), IsEqual(), IsIpv4MappedAddress(), IsLinkLocalMulticast(), IsMulticast(), ns3::operator!=(), ns3::operator<(), ns3::operator==(), Print(), Serialize(), and Set().