Describes an IPv6 address. More...
#include "ipv6-address.h"
Public Member Functions | |
Ipv6Address () | |
Default constructor. | |
Ipv6Address (const char *address) | |
Constructs an Ipv6Address by parsing the input C-string. | |
Ipv6Address (const Ipv6Address &addr) | |
Copy constructor. | |
Ipv6Address (const Ipv6Address *addr) | |
Copy constructor. | |
Ipv6Address (uint8_t address[16]) | |
Constructs an Ipv6Address by using the input 16 bytes. | |
~Ipv6Address () | |
Destructor. | |
Ipv6Address | CombinePrefix (const Ipv6Prefix &prefix) const |
Combine this address with a prefix. | |
Address | ConvertTo () const |
convert the IPv6Address object to an Address object. | |
void | GetBytes (uint8_t buf[16]) const |
Get the bytes corresponding to the address. | |
Ipv4Address | GetIpv4MappedAddress () const |
Return the Ipv4 address. | |
bool | HasPrefix (const Ipv6Prefix &prefix) const |
Compares an address and a prefix. | |
bool | IsAllNodesMulticast () const |
If the IPv6 address is "all nodes multicast" (ff02::1/8). | |
bool | IsAllRoutersMulticast () const |
If the IPv6 address is "all routers multicast" (ff02::2/8). | |
bool | IsAny () const |
If the IPv6 address is the "Any" address. | |
bool | IsDocumentation () const |
If the IPv6 address is a documentation address (2001:DB8::/32). | |
bool | IsInitialized () const |
bool | IsIpv4MappedAddress () const |
If the address is an IPv4-mapped address. | |
bool | IsLinkLocal () const |
If the IPv6 address is a link-local address (fe80::/64). | |
bool | IsLinkLocalMulticast () const |
If the IPv6 address is link-local multicast (ff02::/16). | |
bool | IsLocalhost () const |
If the IPv6 address is localhost (::1). | |
bool | IsMulticast () const |
If the IPv6 address is multicast (ff00::/8). | |
bool | IsSolicitedMulticast () const |
If the IPv6 address is a Solicited multicast address. | |
operator Address () const | |
Convert to Address object. | |
void | Print (std::ostream &os) const |
Print this address to the given output stream. | |
void | Serialize (uint8_t buf[16]) const |
Serialize this address to a 16-byte buffer. | |
void | Set (const char *address) |
Sets an Ipv6Address by parsing the input C-string. | |
void | Set (uint8_t address[16]) |
Set an Ipv6Address by using the input 16 bytes. | |
Static Public Member Functions | |
static Ipv6Address | ConvertFrom (const Address &address) |
Convert the Address object into an Ipv6Address ones. | |
static Ipv6Address | Deserialize (const uint8_t buf[16]) |
Deserialize this address. | |
static Ipv6Address | GetAllHostsMulticast () |
Get the "all hosts multicast" address. | |
static Ipv6Address | GetAllNodesMulticast () |
Get the "all nodes multicast" address. | |
static Ipv6Address | GetAllRoutersMulticast () |
Get the "all routers multicast" address. | |
static Ipv6Address | GetAny () |
Get the "any" (::) Ipv6Address. | |
static Ipv6Address | GetLoopback () |
Get the loopback address. | |
static Ipv6Address | GetOnes () |
Get the "all-1" IPv6 address (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff). | |
static Ipv6Address | GetZero () |
Get the 0 (::) Ipv6Address. | |
static bool | IsMatchingType (const Address &address) |
If the Address matches the type. | |
static Ipv6Address | MakeAutoconfiguredAddress (Address addr, Ipv6Address prefix) |
Make the autoconfigured IPv6 address from a Mac address. | |
static Ipv6Address | MakeAutoconfiguredAddress (Address addr, Ipv6Prefix prefix) |
Make the autoconfigured IPv6 address from a Mac address. | |
static Ipv6Address | MakeAutoconfiguredAddress (Mac16Address addr, Ipv6Address prefix) |
Make the autoconfigured IPv6 address with Mac16Address. | |
static Ipv6Address | MakeAutoconfiguredAddress (Mac48Address addr, Ipv6Address prefix) |
Make the autoconfigured IPv6 address with Mac48Address. | |
static Ipv6Address | MakeAutoconfiguredAddress (Mac64Address addr, Ipv6Address prefix) |
Make the autoconfigured IPv6 address with Mac64Address. | |
static Ipv6Address | MakeAutoconfiguredAddress (Mac8Address addr, Ipv6Address prefix) |
Make the autoconfigured IPv6 address with Mac8Address. | |
static Ipv6Address | MakeAutoconfiguredLinkLocalAddress (Address mac) |
Make the autoconfigured link-local IPv6 address from a Mac address. | |
static Ipv6Address | MakeAutoconfiguredLinkLocalAddress (Mac16Address mac) |
Make the autoconfigured link-local IPv6 address with Mac16Address. | |
static Ipv6Address | MakeAutoconfiguredLinkLocalAddress (Mac48Address mac) |
Make the autoconfigured link-local IPv6 address with Mac48Address. | |
static Ipv6Address | MakeAutoconfiguredLinkLocalAddress (Mac64Address mac) |
Make the autoconfigured link-local IPv6 address with Mac64Address. | |
static Ipv6Address | MakeAutoconfiguredLinkLocalAddress (Mac8Address mac) |
Make the autoconfigured link-local IPv6 address with Mac8Address. | |
static Ipv6Address | MakeIpv4MappedAddress (Ipv4Address addr) |
Make the Ipv4-mapped IPv6 address. | |
static Ipv6Address | MakeSolicitedAddress (Ipv6Address addr) |
Make the solicited IPv6 address. | |
Static Private Member Functions | |
static uint8_t | GetType () |
Return the Type of address. | |
Private Attributes | |
uint8_t | m_address [16] |
The address representation on 128 bits (16 bytes). | |
bool | m_initialized |
IPv6 address has been explicitly initialized to a valid value. | |
Friends | |
bool | operator!= (const Ipv6Address &a, const Ipv6Address &b) |
Not equal to operator. | |
bool | operator< (const Ipv6Address &a, const Ipv6Address &b) |
Less than to operator. | |
bool | operator== (const Ipv6Address &a, const Ipv6Address &b) |
Equal to operator. | |
Describes an IPv6 address.
Definition at line 48 of file ipv6-address.h.
ns3::Ipv6Address::Ipv6Address | ( | ) |
Default constructor.
Definition at line 152 of file ipv6-address.cc.
References m_address, m_initialized, and NS_LOG_FUNCTION.
Referenced by MakeIpv4MappedAddress().
ns3::Ipv6Address::Ipv6Address | ( | const char * | 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 173 of file ipv6-address.cc.
References m_address, m_initialized, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
ns3::Ipv6Address::Ipv6Address | ( | uint8_t | address[16] | ) |
Constructs an Ipv6Address by using the input 16 bytes.
address | the 128-bit address |
Definition at line 187 of file ipv6-address.cc.
References m_address, m_initialized, and NS_LOG_FUNCTION.
ns3::Ipv6Address::Ipv6Address | ( | const Ipv6Address & | addr | ) |
Copy constructor.
addr | Ipv6Address object |
Definition at line 159 of file ipv6-address.cc.
References m_address, and m_initialized.
ns3::Ipv6Address::Ipv6Address | ( | const Ipv6Address * | addr | ) |
Copy constructor.
addr | Ipv6Address pointer |
Definition at line 166 of file ipv6-address.cc.
References m_address, and m_initialized.
ns3::Ipv6Address::~Ipv6Address | ( | ) |
Ipv6Address ns3::Ipv6Address::CombinePrefix | ( | const Ipv6Prefix & | prefix | ) | const |
Combine this address with a prefix.
prefix | a IPv6 prefix |
Definition at line 579 of file ipv6-address.cc.
References m_address, NS_LOG_FUNCTION, and Set().
Referenced by ns3::Ipv6AddressHelper::Ipv6AddressHelper(), ns3::RipNg::HandleRequests(), ns3::RipNg::HandleResponses(), HasPrefix(), IsDocumentation(), ns3::Ipv6InterfaceAddress::IsInSameSubnet(), IsLinkLocal(), ns3::Ipv6AddressGeneratorImpl::IsNetworkAllocated(), IsSolicitedMulticast(), MakeAutoconfiguredAddress(), ns3::Ipv6AddressHelper::NewAddress(), ns3::Ipv6StaticRouting::NotifyInterfaceUp(), and ns3::Ipv6AddressHelper::SetBase().
|
static |
Convert the Address object into an Ipv6Address ones.
address | address to convert |
Definition at line 679 of file ipv6-address.cc.
References Deserialize(), GetType(), NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by PingTestCase::DoRun(), ns3::UdpSocketImpl::DoSend(), ns3::UdpSocketImpl::GetPeerName(), ns3::ThreeGppHttpClient::OpenConnection(), ns3::PbbAddressBlockIpv6::PrintAddress(), ns3::PbbMessageIpv6::PrintOriginatorAddress(), ns3::Ping::PrintReport(), ns3::UdpEchoClient::Send(), ns3::Ping::Send(), ns3::TcpL4Protocol::SendPacket(), ns3::UdpTraceClient::SendPacket(), UanExperiment::SendSinglePacket(), ns3::PbbAddressBlockIpv6::SerializeAddress(), ns3::PbbMessageIpv6::SerializeOriginatorAddress(), ns3::ThreeGppHttpServer::StartApplication(), ns3::UdpClient::StartApplication(), ns3::UdpEchoClient::StartApplication(), ns3::UdpTraceClient::StartApplication(), and ns3::Ping::StartApplication().
Address ns3::Ipv6Address::ConvertTo | ( | ) | const |
convert the IPv6Address object to an Address object.
Definition at line 670 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 232 of file ipv6-address.cc.
References m_initialized, and NS_LOG_FUNCTION.
Referenced by ns3::SixLowPanNetDevice::CleanPrefix(), ns3::Inet6SocketAddress::ConvertFrom(), ConvertFrom(), ns3::SixLowPanNetDevice::DecompressLowPanIphc(), ns3::Ipv6PacketInfoTag::Deserialize(), ns3::PbbAddressBlockIpv6::DeserializeAddress(), and ns3::PbbMessageIpv6::DeserializeOriginatorAddress().
|
static |
Get the "all hosts multicast" address.
Definition at line 713 of file ipv6-address.cc.
References NS_LOG_FUNCTION_NOARGS.
|
static |
Get the "all nodes multicast" address.
Definition at line 697 of file ipv6-address.cc.
References NS_LOG_FUNCTION_NOARGS.
Referenced by PingTestSuite::PingTestSuite(), LrWpanAckTestCase::DoRun(), ns3::Radvd::HandleRead(), ns3::Radvd::Send(), ns3::Icmpv6L4Protocol::SendNS(), and ns3::Radvd::StartApplication().
|
static |
Get the "all routers multicast" address.
Definition at line 705 of file ipv6-address.cc.
References NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::Icmpv6L4Protocol::FunctionDadTimeout(), ns3::Ipv6EndPointDemux::Lookup(), and ns3::Radvd::StartApplication().
|
static |
Get the "any" (::) Ipv6Address.
Definition at line 737 of file ipv6-address.cc.
References NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::Ipv6RawSocketImpl::Ipv6RawSocketImpl(), ns3::Ipv6L3Protocol::AddAutoconfiguredAddress(), ns3::Ipv6EndPointDemux::Allocate(), ns3::Ipv6RawSocketImpl::Bind(), ns3::TcpSocketBase::Bind(), ns3::UdpSocketImpl::Bind(), ns3::SixLowPanNetDevice::CompressLowPanIphc(), ns3::SixLowPanNetDevice::DecompressLowPanIphc(), IcmpV6EchoReplyTestCase::DoRun(), IcmpV6TimeExceedTestCase::DoRun(), DualStackTestCase::DoRun(), Ipv6PacketInfoTagTest::DoRun(), Ipv6RawSocketImplTest::DoRun(), TcpEndPointBug2211Test::DoRun(), Udp6SocketLoopbackTest::DoRun(), SixlowpanIphcStatefulImplTest::DoRun(), ns3::RipNg::DoSendRouteUpdate(), ns3::UdpSocketImpl::DoSendTo(), ns3::Icmpv6L4Protocol::ForgeNA(), 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::Ipv6EndPointDemux::Lookup(), MakeAutoconfiguredAddress(), MakeAutoconfiguredLinkLocalAddress(), ns3::Ipv6L3Protocol::RemoveAutoconfiguredAddress(), NeighborCacheExample::Run(), ns3::Icmpv6L4Protocol::SendNA(), ns3::Icmpv6L4Protocol::SendNS(), ns3::RipNg::SendRouteRequest(), ns3::Ipv6InterfaceContainer::SetDefaultRoute(), ns3::Ipv6InterfaceContainer::SetDefaultRouteInAllNodes(), UanExperiment::SetupApplications(), TcpTestCase::SetupDefaultSim6(), ns3::Ipv6EndPointDemux::SimpleLookup(), ns3::UdpEchoServer::StartApplication(), ns3::UdpServer::StartApplication(), Ipv6FragmentationTest::StartClient(), and SixlowpanFragmentationTest::StartClient().
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 753 of file ipv6-address.cc.
References m_address, and NS_LOG_FUNCTION.
Referenced by ns3::SixLowPanNetDevice::CompressLowPanHc1(), ns3::SixLowPanNetDevice::CompressLowPanIphc(), ns3::SixLowPanNetDevice::DecompressLowPanIphc(), ns3::Ipv6AddressGeneratorImpl::Init(), ns3::Ipv6AddressGeneratorImpl::InitAddress(), ns3::Ipv6Prefix::IsMatch(), MakeAutoconfiguredAddress(), ns3::Ipv6AddressHelper::NewAddress(), ns3::Ipv6AddressHelper::NewNetwork(), ns3::Ipv6AddressGeneratorImpl::NextNetwork(), ns3::Icmpv6OptionPrefixInformation::Serialize(), and ns3::WriteTo().
Ipv4Address ns3::Ipv6Address::GetIpv4MappedAddress | ( | ) | const |
Return the Ipv4 address.
Definition at line 267 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::SendPacketV6().
|
static |
Get the loopback address.
Definition at line 721 of file ipv6-address.cc.
References NS_LOG_FUNCTION_NOARGS.
Referenced by Ipv6L3ProtocolTestCase::DoRun(), TcpEndPointBug2211Test::DoRun(), ns3::Ipv6Interface::RemoveAddress(), ns3::Ipv6L3Protocol::RemoveAddress(), ns3::Ipv6L3Protocol::SetupLoopback(), and ns3::Ipv6L3Protocol::SourceAddressSelection().
|
static |
Get the "all-1" IPv6 address (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff).
Definition at line 745 of file ipv6-address.cc.
References NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::SixLowPanNetDevice::AddContext(), ns3::SixLowPanNetDevice::FindMulticastCompressionContext(), ns3::SixLowPanNetDevice::FindUnicastCompressionContext(), HasPrefix(), and MakeAutoconfiguredAddress().
|
staticprivate |
Return the Type of address.
Definition at line 689 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 729 of file ipv6-address.cc.
References NS_LOG_FUNCTION_NOARGS, and zero.
Referenced by ns3::Ipv6AddressHelper::Ipv6AddressHelper(), ns3::TapFdNetDeviceHelper::TapFdNetDeviceHelper(), ns3::Ipv6RoutingTableEntry::CreateDefaultRoute(), ns3::TapFdNetDeviceHelper::CreateFileDescriptor(), ns3::Ipv6FlowClassifier::FindFlow(), ns3::Icmpv6L4Protocol::HandleRA(), ns3::Ipv6RoutingTableEntry::IsDefault(), ns3::Ipv6RoutingTableEntry::IsGateway(), ns3::RipNg::Lookup(), ns3::Ipv6StaticRouting::LookupStatic(), ns3::Ipv6AddressHelper::NewAddress(), ns3::Ipv6StaticRouting::NotifyAddRoute(), ns3::Ipv6StaticRouting::NotifyRemoveRoute(), ns3::NixVectorRouting< T >::RouteOutput(), ns3::Ipv6L3Protocol::Send(), and ns3::Ipv6AddressHelper::SetBase().
bool ns3::Ipv6Address::HasPrefix | ( | const Ipv6Prefix & | prefix | ) | const |
Compares an address and a prefix.
prefix | the prefix to compare with |
Definition at line 647 of file ipv6-address.cc.
References CombinePrefix(), GetOnes(), and NS_LOG_FUNCTION.
bool ns3::Ipv6Address::IsAllNodesMulticast | ( | ) | const |
If the IPv6 address is "all nodes multicast" (ff02::1/8).
Definition at line 609 of file ipv6-address.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::Ipv6L3Protocol::Receive().
bool ns3::Ipv6Address::IsAllRoutersMulticast | ( | ) | const |
If the IPv6 address is "all routers multicast" (ff02::2/8).
Definition at line 619 of file ipv6-address.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::Ipv6L3Protocol::Receive().
bool ns3::Ipv6Address::IsAny | ( | ) | const |
If the IPv6 address is the "Any" address.
Definition at line 631 of file ipv6-address.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::Ipv6Interface::AddAddress(), ns3::Ipv6L3Protocol::AddAutoconfiguredAddress(), ns3::Icmpv6L4Protocol::ForgeRS(), ns3::NdiscCache::Entry::FunctionDelayTimeout(), ns3::NdiscCache::Entry::FunctionProbeTimeout(), ns3::NdiscCache::Entry::FunctionRetransmitTimeout(), ns3::Ipv6RawSocketImpl::GetPeerName(), ns3::Icmpv6L4Protocol::HandleNS(), ns3::Ipv6L3Protocol::IpForward(), ns3::Ipv6RawSocketImpl::Ipv6JoinGroup(), ns3::UdpSocketImpl::Ipv6JoinGroup(), ns3::Socket::Ipv6LeaveGroup(), ns3::RipNg::Lookup(), ns3::Ipv6StaticRouting::LookupStatic(), MakeAutoconfiguredAddress(), MakeAutoconfiguredLinkLocalAddress(), ns3::Icmpv6L4Protocol::SendRS(), ns3::Ipv6RawSocketImpl::SendTo(), and ns3::Ipv6L3Protocol::SourceAddressSelection().
bool ns3::Ipv6Address::IsDocumentation | ( | ) | const |
If the IPv6 address is a documentation address (2001:DB8::/32).
Definition at line 639 of file ipv6-address.cc.
References CombinePrefix(), and NS_LOG_FUNCTION.
Referenced by ns3::Ipv6L3Protocol::IpForward().
bool ns3::Ipv6Address::IsInitialized | ( | ) | const |
Definition at line 768 of file ipv6-address.cc.
References m_initialized, and NS_LOG_FUNCTION.
bool ns3::Ipv6Address::IsIpv4MappedAddress | ( | ) | const |
If the address is an IPv4-mapped address.
Definition at line 566 of file ipv6-address.cc.
References m_address, and NS_LOG_FUNCTION.
Referenced by ns3::TcpSocketBase::Connect(), ns3::UdpSocketImpl::DoSendTo(), ns3::UdpL4Protocol::Receive(), and ns3::TcpL4Protocol::SendPacketV6().
bool ns3::Ipv6Address::IsLinkLocal | ( | ) | const |
If the IPv6 address is a link-local address (fe80::/64).
Definition at line 760 of file ipv6-address.cc.
References CombinePrefix(), and NS_LOG_FUNCTION.
Referenced by ns3::Ipv6StaticRouting::AddHostRouteTo(), ns3::RipNg::AddNetworkRouteTo(), ns3::Ipv6StaticRouting::AddNetworkRouteTo(), ns3::SixLowPanNetDevice::CompressLowPanHc1(), ns3::SixLowPanNetDevice::CompressLowPanIphc(), PingTestCase::DoRun(), Ipv6L3ProtocolTestCase::DoRun(), ns3::Icmpv6L4Protocol::FunctionDadTimeout(), ns3::AnimationInterface::GetIpv6Address(), ns3::Icmpv6L4Protocol::HandleNS(), ns3::RipNg::HandleRequests(), ns3::RipNg::HandleResponses(), ns3::Ipv6L3Protocol::IpForward(), ns3::Ipv6InterfaceAddress::IsInSameSubnet(), ns3::Icmpv6L4Protocol::Lookup(), ns3::RipNg::RouteInput(), ns3::Ipv6L3Protocol::Send(), and ns3::Ipv6L3Protocol::SourceAddressSelection().
bool ns3::Ipv6Address::IsLinkLocalMulticast | ( | ) | const |
If the IPv6 address is link-local multicast (ff02::/16).
Definition at line 559 of file ipv6-address.cc.
References m_address, and NS_LOG_FUNCTION.
Referenced by PingTestCase::DoRun(), ns3::Ipv6InterfaceAddress::IsInSameSubnet(), ns3::RipNg::Lookup(), ns3::Ipv6StaticRouting::LookupStatic(), ns3::Ipv6L3Protocol::Send(), and ns3::Ipv6L3Protocol::SourceAddressSelection().
bool ns3::Ipv6Address::IsLocalhost | ( | ) | const |
If the IPv6 address is localhost (::1).
Definition at line 544 of file ipv6-address.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::Ipv6Interface::AddAddress(), and ns3::Ipv6L3Protocol::SourceAddressSelection().
|
static |
If the Address matches the type.
address | other address |
Definition at line 658 of file ipv6-address.cc.
References GetType(), and NS_LOG_FUNCTION.
Referenced by ns3::UdpHeader::CalculateHeaderChecksum(), ns3::UdpSocketImpl::DoSend(), ns3::UdpSocketImpl::GetPeerName(), ns3::ThreeGppHttpClient::OpenConnection(), ns3::Ping::PrintReport(), ns3::UdpEchoClient::Send(), ns3::TcpL4Protocol::SendPacket(), ns3::UdpTraceClient::SendPacket(), ns3::ThreeGppHttpServer::StartApplication(), ns3::UdpClient::StartApplication(), ns3::UdpEchoClient::StartApplication(), ns3::UdpTraceClient::StartApplication(), and ns3::Ping::StartApplication().
bool ns3::Ipv6Address::IsMulticast | ( | ) | const |
If the IPv6 address is multicast (ff00::/8).
Definition at line 552 of file ipv6-address.cc.
References m_address, and NS_LOG_FUNCTION.
Referenced by ns3::UdpSocketImpl::Bind(), ns3::UdpSocketImpl::BindToNetDevice(), ns3::Ipv6FlowClassifier::Classify(), ns3::SixLowPanNetDevice::CompressLowPanIphc(), ns3::UdpSocketImpl::DoSendTo(), ns3::Icmpv6L4Protocol::HandleEchoRequest(), ns3::Ipv6L3Protocol::IpForward(), ns3::Ipv6L3Protocol::LocalDeliver(), ns3::Ipv6ExtensionLooseRouting::Process(), ns3::Ipv6Extension::ProcessOptions(), ns3::Ipv6L3Protocol::Receive(), ns3::Ipv6StaticRouting::RouteInput(), ns3::RipNg::RouteInput(), ns3::Ipv6L3Protocol::RouteInputError(), ns3::Ipv6StaticRouting::RouteOutput(), ns3::RipNg::RouteOutput(), ns3::Ipv6Interface::Send(), ns3::Icmpv6L4Protocol::SendNS(), ns3::Icmpv6L4Protocol::SendRS(), and ns3::Ping::StartApplication().
bool ns3::Ipv6Address::IsSolicitedMulticast | ( | ) | const |
If the IPv6 address is a Solicited multicast address.
Definition at line 600 of file ipv6-address.cc.
References CombinePrefix(), and NS_LOG_FUNCTION.
|
static |
Make the autoconfigured IPv6 address from a Mac address.
Actually the MAC supported are: Mac8, Mac16, Mac48, and Mac64.
addr | the MAC address. |
prefix | the IPv6 prefix |
Definition at line 279 of file ipv6-address.cc.
References ns3::Mac16Address::ConvertFrom(), ns3::Mac48Address::ConvertFrom(), ns3::Mac64Address::ConvertFrom(), ns3::Mac8Address::ConvertFrom(), GetAny(), IsAny(), ns3::Mac16Address::IsMatchingType(), ns3::Mac48Address::IsMatchingType(), ns3::Mac64Address::IsMatchingType(), ns3::Mac8Address::IsMatchingType(), MakeAutoconfiguredAddress(), and NS_ABORT_MSG.
Referenced by ns3::Ipv6L3Protocol::AddAutoconfiguredAddress(), ns3::SixLowPanNetDevice::CompressLowPanIphc(), ns3::SixLowPanNetDevice::DecompressLowPanHc1(), SixlowpanIphcStatefulImplTest::DoRun(), MakeAutoconfiguredAddress(), ns3::Ipv6AddressHelper::NewAddress(), and ns3::Ipv6L3Protocol::RemoveAutoconfiguredAddress().
|
static |
Make the autoconfigured IPv6 address from a Mac address.
Actually the MAC supported are: Mac8, Mac16, Mac48, and Mac64.
addr | the MAC address. |
prefix | the IPv6 prefix |
Definition at line 308 of file ipv6-address.cc.
References CombinePrefix(), GetOnes(), and MakeAutoconfiguredAddress().
|
static |
Make the autoconfigured IPv6 address with Mac16Address.
The EUI-64 scheme used is based on the RFC 4944.
addr | the MAC address (16 bits). |
prefix | the IPv6 prefix |
Definition at line 315 of file ipv6-address.cc.
References ns3::Mac16Address::CopyTo(), GetBytes(), NS_LOG_FUNCTION, and Set().
|
static |
Make the autoconfigured IPv6 address with Mac48Address.
The EUI-64 scheme used is based on RFC 2464.
addr | the MAC address (48 bits). |
prefix | the IPv6 prefix |
Definition at line 335 of file ipv6-address.cc.
References ns3::Mac48Address::CopyTo(), GetBytes(), NS_LOG_FUNCTION, and Set().
|
static |
Make the autoconfigured IPv6 address with Mac64Address.
addr | the MAC address (64 bits). |
prefix | the IPv6 prefix |
Definition at line 356 of file ipv6-address.cc.
References ns3::Mac64Address::CopyTo(), GetBytes(), NS_LOG_FUNCTION, and Set().
|
static |
Make the autoconfigured IPv6 address with Mac8Address.
The EUI-64 scheme used is loosely based on the RFC 2464.
addr | the Mac8Address address (8 bits). |
prefix | the IPv6 prefix |
Definition at line 373 of file ipv6-address.cc.
References ns3::Mac8Address::CopyTo(), GetBytes(), NS_LOG_FUNCTION, and Set().
|
static |
Make the autoconfigured link-local IPv6 address from a Mac address.
Actually the MAC supported are: Mac8, Mac16, Mac48, and Mac64.
mac | the MAC address. |
Definition at line 394 of file ipv6-address.cc.
References ns3::Mac16Address::ConvertFrom(), ns3::Mac48Address::ConvertFrom(), ns3::Mac64Address::ConvertFrom(), ns3::Mac8Address::ConvertFrom(), GetAny(), IsAny(), ns3::Mac16Address::IsMatchingType(), ns3::Mac48Address::IsMatchingType(), ns3::Mac64Address::IsMatchingType(), ns3::Mac8Address::IsMatchingType(), MakeAutoconfiguredLinkLocalAddress(), and NS_ABORT_MSG.
Referenced by ns3::SixLowPanNetDevice::CompressLowPanHc1(), ns3::SixLowPanNetDevice::CompressLowPanIphc(), ns3::SixLowPanNetDevice::DecompressLowPanHc1(), ns3::SixLowPanNetDevice::DecompressLowPanIphc(), ns3::Ipv6Interface::DoSetup(), and MakeAutoconfiguredLinkLocalAddress().
|
static |
Make the autoconfigured link-local IPv6 address with Mac16Address.
The EUI-64 scheme used is based on the RFC 4944.
mac | the MAC address (16 bits). |
Definition at line 423 of file ipv6-address.cc.
References ns3::Mac16Address::CopyTo(), NS_LOG_FUNCTION, and Set().
|
static |
Make the autoconfigured link-local IPv6 address with Mac48Address.
The EUI-64 scheme used is based on RFC 2464.
mac | the MAC address (48 bits). |
Definition at line 444 of file ipv6-address.cc.
References ns3::Mac48Address::CopyTo(), NS_LOG_FUNCTION, and Set().
|
static |
Make the autoconfigured link-local IPv6 address with Mac64Address.
mac | the MAC address (64 bits). |
Definition at line 467 of file ipv6-address.cc.
References ns3::Mac64Address::CopyTo(), NS_LOG_FUNCTION, and Set().
|
static |
Make the autoconfigured link-local IPv6 address with Mac8Address.
The EUI-64 scheme used is loosely based on the RFC 2464.
mac | the MAC address (8 bits). |
Definition at line 486 of file ipv6-address.cc.
References ns3::Mac8Address::CopyTo(), NS_LOG_FUNCTION, and Set().
|
static |
Make the Ipv4-mapped IPv6 address.
addr | the IPv4 address |
Definition at line 241 of file ipv6-address.cc.
References Ipv6Address(), NS_LOG_FUNCTION, and ns3::Ipv4Address::Serialize().
Referenced by EpcTftClassifierTestCase::EpcTftClassifierTestCase(), EpcTftClassifierTestCase::BuildNameString(), ns3::MockNetDevice::GetMulticast(), ns3::UdpL4Protocol::Receive(), and ns3::TcpL4Protocol::Receive().
|
static |
Make the solicited IPv6 address.
addr | the IPv6 address |
Definition at line 508 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().
ns3::Ipv6Address::operator Address | ( | ) | const |
Convert to Address object.
Definition at line 664 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 531 of file ipv6-address.cc.
References m_address, and NS_LOG_FUNCTION.
Referenced by 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 225 of file ipv6-address.cc.
References m_address, and NS_LOG_FUNCTION.
Referenced by ns3::Icmpv6Header::CalculatePseudoHeaderChecksum(), ns3::SixLowPanNetDevice::CompressLowPanIphc(), ns3::Inet6SocketAddress::ConvertTo(), ConvertTo(), Ipv6AddressTestCase::DoRun(), GetIpv4MappedAddress(), ns3::Mac48Address::GetMulticast(), ns3::Ipv6QueueDiscItem::Hash(), MakeSolicitedAddress(), ns3::Icmpv6NS::Serialize(), ns3::Icmpv6NA::Serialize(), ns3::Icmpv6Redirection::Serialize(), ns3::RipNgRte::Serialize(), ns3::Ipv6PacketInfoTag::Serialize(), ns3::PbbAddressBlockIpv6::SerializeAddress(), and ns3::PbbMessageIpv6::SerializeOriginatorAddress().
void ns3::Ipv6Address::Set | ( | const char * | 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 202 of file ipv6-address.cc.
References m_address, m_initialized, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
Referenced by EpcTftClassifierTestSuite::EpcTftClassifierTestSuite(), CombinePrefix(), ns3::Icmpv6NS::Deserialize(), ns3::Icmpv6NA::Deserialize(), ns3::Icmpv6Redirection::Deserialize(), ns3::RipNgRte::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 216 of file ipv6-address.cc.
References m_address, m_initialized, and NS_LOG_FUNCTION.
|
friend |
Not equal to operator.
a | the first operand. |
b | the first operand. |
Definition at line 661 of file ipv6-address.h.
|
friend |
Less than to operator.
a | the first operand. |
b | the first operand. |
Definition at line 666 of file ipv6-address.h.
|
friend |
Equal to operator.
a | the first operand. |
b | the first operand. |
Definition at line 655 of file ipv6-address.h.
|
private |
The address representation on 128 bits (16 bytes).
Definition at line 416 of file ipv6-address.h.
Referenced by Ipv6Address(), CombinePrefix(), GetBytes(), IsIpv4MappedAddress(), IsLinkLocalMulticast(), IsMulticast(), Print(), Serialize(), and Set().
|
private |
IPv6 address has been explicitly initialized to a valid value.
Definition at line 417 of file ipv6-address.h.
Referenced by Ipv6Address(), Deserialize(), IsInitialized(), and Set().