IPv6 address associated with an interface. More...
#include "ipv6-interface-address.h"
 Collaboration diagram for ns3::Ipv6InterfaceAddress:
 Collaboration diagram for ns3::Ipv6InterfaceAddress:| Public Types | |
| enum | Scope_e { HOST, LINKLOCAL, GLOBAL } | 
| Address scope.  More... | |
| enum | State_e { TENTATIVE, DEPRECATED, PREFERRED, PERMANENT, HOMEADDRESS, TENTATIVE_OPTIMISTIC, INVALID } | 
| State of an address associated with an interface.  More... | |
| Public Member Functions | |
| Ipv6InterfaceAddress () | |
| Default constructor.  More... | |
| Ipv6InterfaceAddress (Ipv6Address address) | |
| Constructor.  More... | |
| Ipv6InterfaceAddress (Ipv6Address address, Ipv6Prefix prefix) | |
| Constructor.  More... | |
| Ipv6InterfaceAddress (Ipv6Address address, Ipv6Prefix prefix, bool onLink) | |
| Constructor.  More... | |
| Ipv6InterfaceAddress (const Ipv6InterfaceAddress &o) | |
| Copy constructor.  More... | |
| ~Ipv6InterfaceAddress () | |
| Destructor.  More... | |
| Ipv6Address | GetAddress () const | 
| Get the IPv6 address.  More... | |
| uint32_t | GetNsDadUid () const | 
| Get the latest DAD probe packet UID.  More... | |
| bool | GetOnLink () const | 
| Get the on-link property.  More... | |
| Ipv6Prefix | GetPrefix () const | 
| Get the IPv6 prefix.  More... | |
| Ipv6InterfaceAddress::Scope_e | GetScope () const | 
| Get address scope.  More... | |
| Ipv6InterfaceAddress::State_e | GetState () const | 
| Get the address state.  More... | |
| bool | IsInSameSubnet (Ipv6Address b) const | 
| Checks if the address is in the same subnet.  More... | |
| void | SetAddress (Ipv6Address address) | 
| Set IPv6 address (and scope).  More... | |
| void | SetNsDadUid (uint32_t uid) | 
| Set the latest DAD probe packet UID.  More... | |
| void | SetOnLink (bool onLink) | 
| Get the on-link property.  More... | |
| void | SetScope (Ipv6InterfaceAddress::Scope_e scope) | 
| Set the scope.  More... | |
| void | SetState (Ipv6InterfaceAddress::State_e state) | 
| Set the state.  More... | |
| Private Attributes | |
| Ipv6Address | m_address | 
| The IPv6 address.  More... | |
| uint32_t | m_nsDadUid | 
| Last DAD probe packet UID.  More... | |
| bool | m_onLink | 
| The address belongs to an on-link network.  More... | |
| Ipv6Prefix | m_prefix | 
| The IPv6 prefix.  More... | |
| Scope_e | m_scope | 
| Scope of the address.  More... | |
| State_e | m_state | 
| State of the address.  More... | |
| Friends | |
| bool | operator!= (Ipv6InterfaceAddress const &a, Ipv6InterfaceAddress const &b) | 
| Not equal to operator.  More... | |
| bool | operator== (Ipv6InterfaceAddress const &a, Ipv6InterfaceAddress const &b) | 
| Equal to operator.  More... | |
IPv6 address associated with an interface.
Definition at line 37 of file ipv6-interface-address.h.
Address scope.
| Enumerator | |
|---|---|
| HOST | Localhost (::1/128) | 
| LINKLOCAL | Link-local address (fe80::/64) | 
| GLOBAL | Global address (2000::/3) | 
Definition at line 59 of file ipv6-interface-address.h.
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) | 
Definition at line 44 of file ipv6-interface-address.h.
| ns3::Ipv6InterfaceAddress::Ipv6InterfaceAddress | ( | ) | 
Default constructor.
Definition at line 33 of file ipv6-interface-address.cc.
References NS_LOG_FUNCTION.
| ns3::Ipv6InterfaceAddress::Ipv6InterfaceAddress | ( | Ipv6Address | address | ) | 
Constructor.
Prefix is 64 by default.
| address | the IPv6 address to set | 
Definition at line 44 of file ipv6-interface-address.cc.
References first::address, m_nsDadUid, m_onLink, m_prefix, NS_LOG_FUNCTION, SetAddress(), SetState(), and TENTATIVE_OPTIMISTIC.
 Here is the call graph for this function:
 Here is the call graph for this function:| ns3::Ipv6InterfaceAddress::Ipv6InterfaceAddress | ( | Ipv6Address | address, | 
| Ipv6Prefix | prefix | ||
| ) | 
Constructor.
| address | IPv6 address to set | 
| prefix | IPv6 prefix | 
Definition at line 54 of file ipv6-interface-address.cc.
References first::address, m_nsDadUid, m_onLink, m_prefix, NS_LOG_FUNCTION, SetAddress(), SetState(), and TENTATIVE_OPTIMISTIC.
 Here is the call graph for this function:
 Here is the call graph for this function:| ns3::Ipv6InterfaceAddress::Ipv6InterfaceAddress | ( | Ipv6Address | address, | 
| Ipv6Prefix | prefix, | ||
| bool | onLink | ||
| ) | 
Constructor.
| address | IPv6 address to set | 
| prefix | IPv6 prefix | 
| onLink | on-link property | 
Definition at line 64 of file ipv6-interface-address.cc.
References first::address, m_nsDadUid, m_onLink, m_prefix, NS_LOG_FUNCTION, SetAddress(), SetState(), and TENTATIVE_OPTIMISTIC.
 Here is the call graph for this function:
 Here is the call graph for this function:| ns3::Ipv6InterfaceAddress::Ipv6InterfaceAddress | ( | const Ipv6InterfaceAddress & | o | ) | 
Copy constructor.
| o | object to copy | 
Definition at line 74 of file ipv6-interface-address.cc.
| ns3::Ipv6InterfaceAddress::~Ipv6InterfaceAddress | ( | ) | 
| Ipv6Address ns3::Ipv6InterfaceAddress::GetAddress | ( | void | ) | const | 
Get the IPv6 address.
Definition at line 89 of file ipv6-interface-address.cc.
References m_address, and NS_LOG_FUNCTION.
Referenced by ns3::Ipv6Interface::AddAddress(), IpAddressHelperTestCasev6::DoRun(), Ipv6L3ProtocolTestCase::DoRun(), Ipv6PacketInfoTagTest::DoRun(), ns3::Icmpv6L4Protocol::FunctionDadTimeout(), ns3::Ipv6Interface::GetAddressMatchingDestination(), ns3::AnimationInterface::GetIpv6Address(), ns3::AnimationInterface::GetIpv6Addresses(), ns3::Ipv6InterfaceContainer::GetLinkLocalAddress(), ns3::Icmpv6L4Protocol::HandleEchoRequest(), ns3::Icmpv6L4Protocol::HandleNA(), ns3::Icmpv6L4Protocol::HandleNS(), ns3::Ipv6L3Protocol::IpForward(), ns3::Icmpv6L4Protocol::Lookup(), ns3::Ipv6StaticRouting::NotifyInterfaceUp(), ns3::operator<<(), ns3::Ipv6L3Protocol::Receive(), ns3::Ipv6L3Protocol::RemoveAutoconfiguredAddress(), ns3::Ping6::Send(), UanExperiment::SendPackets(), and ns3::Ipv6L3Protocol::SendRealOut().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| uint32_t ns3::Ipv6InterfaceAddress::GetNsDadUid | ( | ) | const | 
Get the latest DAD probe packet UID.
Definition at line 198 of file ipv6-interface-address.cc.
References m_nsDadUid, and NS_LOG_FUNCTION.
Referenced by ns3::Icmpv6L4Protocol::HandleNS().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| bool ns3::Ipv6InterfaceAddress::GetOnLink | ( | ) | const | 
Get the on-link property.
Definition at line 210 of file ipv6-interface-address.cc.
References m_onLink, and NS_LOG_FUNCTION.
Referenced by ns3::Ipv6StaticRouting::NotifyInterfaceUp().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| Ipv6Prefix ns3::Ipv6InterfaceAddress::GetPrefix | ( | ) | const | 
Get the IPv6 prefix.
Definition at line 124 of file ipv6-interface-address.cc.
References m_prefix, and NS_LOG_FUNCTION.
Referenced by ns3::Ipv6Interface::GetAddressMatchingDestination(), ns3::Ipv6StaticRouting::NotifyInterfaceUp(), and ns3::operator<<().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| Ipv6InterfaceAddress::Scope_e ns3::Ipv6InterfaceAddress::GetScope | ( | void | ) | const | 
Get address scope.
Definition at line 148 of file ipv6-interface-address.cc.
References m_scope, and NS_LOG_FUNCTION.
Referenced by ns3::RipNg::DoSendRouteUpdate(), ns3::Ipv6InterfaceContainer::GetLinkLocalAddress(), ns3::RipNg::HandleRequests(), and ns3::operator<<().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| Ipv6InterfaceAddress::State_e ns3::Ipv6InterfaceAddress::GetState | ( | void | ) | const | 
Get the address state.
Definition at line 136 of file ipv6-interface-address.cc.
References m_state, and NS_LOG_FUNCTION.
Referenced by Ipv6DadTest::DoRun(), ns3::Icmpv6L4Protocol::FunctionDadTimeout(), and ns3::Icmpv6L4Protocol::HandleNA().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| bool ns3::Ipv6InterfaceAddress::IsInSameSubnet | ( | Ipv6Address | b | ) | const | 
Checks if the address is in the same subnet.
| b | the address to check | 
Definition at line 154 of file ipv6-interface-address.cc.
References ns3::Ipv6Address::CombinePrefix(), ns3::Ipv6Address::IsLinkLocal(), ns3::Ipv6Address::IsLinkLocalMulticast(), m_address, m_prefix, and NS_LOG_FUNCTION.
Referenced by ns3::Ping6::Send().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| void ns3::Ipv6InterfaceAddress::SetAddress | ( | Ipv6Address | address | ) | 
Set IPv6 address (and scope).
| address | IPv6 address to set | 
Definition at line 95 of file ipv6-interface-address.cc.
References first::address, GLOBAL, HOST, LINKLOCAL, m_address, m_prefix, m_scope, and NS_LOG_FUNCTION.
Referenced by Ipv6InterfaceAddress().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| void ns3::Ipv6InterfaceAddress::SetNsDadUid | ( | uint32_t | uid | ) | 
Set the latest DAD probe packet UID.
| uid | packet uid | 
Definition at line 204 of file ipv6-interface-address.cc.
References m_nsDadUid, and NS_LOG_FUNCTION.
| void ns3::Ipv6InterfaceAddress::SetOnLink | ( | bool | onLink | ) | 
Get the on-link property.
| onLink | the on-link property | 
Definition at line 216 of file ipv6-interface-address.cc.
References m_onLink, and NS_LOG_FUNCTION.
| void ns3::Ipv6InterfaceAddress::SetScope | ( | Ipv6InterfaceAddress::Scope_e | scope | ) | 
Set the scope.
| scope | the scope of address | 
Definition at line 142 of file ipv6-interface-address.cc.
References m_scope, and NS_LOG_FUNCTION.
| void ns3::Ipv6InterfaceAddress::SetState | ( | Ipv6InterfaceAddress::State_e | state | ) | 
Set the state.
| state | the state | 
Definition at line 130 of file ipv6-interface-address.cc.
References m_state, and NS_LOG_FUNCTION.
Referenced by Ipv6InterfaceAddress().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | friend | 
Not equal to operator.
| a | the first operand | 
| b | the first operand | 
Definition at line 255 of file ipv6-interface-address.h.
| 
 | friend | 
Equal to operator.
| a | the first operand | 
| b | the first operand | 
Definition at line 249 of file ipv6-interface-address.h.
| 
 | private | 
The IPv6 address.
Definition at line 193 of file ipv6-interface-address.h.
Referenced by GetAddress(), IsInSameSubnet(), ns3::operator!=(), ns3::operator==(), and SetAddress().
| 
 | private | 
Last DAD probe packet UID.
Definition at line 236 of file ipv6-interface-address.h.
Referenced by GetNsDadUid(), Ipv6InterfaceAddress(), and SetNsDadUid().
| 
 | private | 
The address belongs to an on-link network.
Definition at line 213 of file ipv6-interface-address.h.
Referenced by GetOnLink(), Ipv6InterfaceAddress(), and SetOnLink().
| 
 | private | 
The IPv6 prefix.
Definition at line 198 of file ipv6-interface-address.h.
Referenced by GetPrefix(), Ipv6InterfaceAddress(), IsInSameSubnet(), ns3::operator!=(), ns3::operator==(), and SetAddress().
| 
 | private | 
Scope of the address.
Definition at line 208 of file ipv6-interface-address.h.
Referenced by GetScope(), ns3::operator!=(), ns3::operator==(), SetAddress(), and SetScope().
| 
 | private | 
State of the address.
Definition at line 203 of file ipv6-interface-address.h.
Referenced by GetState(), ns3::operator!=(), ns3::operator==(), and SetState().