|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
24 #include "ns3/assert.h"
36 m_state (TENTATIVE_OPTIMISTIC),
75 : m_address (o.m_address),
76 m_prefix (o.m_prefix),
79 m_onLink (o.m_onLink),
80 m_nsDadUid (o.m_nsDadUid)
106 else if (
address.IsLinkLocal ())
112 else if (
address.IsLinkLocalMulticast ())
227 m_dadTimer.SetArguments (interface,
m_address);
228 m_dadTimer.Schedule (
Seconds (1));
232 void Ipv6InterfaceAddress::StopDadTimer ()
235 m_dadTimer.Cancel ();
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Ipv6Prefix m_prefix
The IPv6 prefix.
Ipv6Prefix GetPrefix() const
Get the IPv6 prefix.
IPv6 address associated with an interface.
uint32_t m_nsDadUid
Last DAD probe packet UID.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ipv6Address GetAddress() const
Get the IPv6 address.
State_e m_state
State of the address.
Describes an IPv6 address.
@ LINKLOCAL
Link-local address (fe80::/64)
State_e
State of an address associated with an interface.
static EventId Schedule(Time const &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
void SetNsDadUid(uint32_t uid)
Set the latest DAD probe packet UID.
Ipv6Address m_address
The IPv6 address.
void FunctionDadTimeout(Ipv6Interface *interface, Ipv6Address addr)
Function called when DAD timeout.
bool IsLinkLocal() const
If the IPv6 address is a link-local address (fe80::/64).
Ipv6Address CombinePrefix(Ipv6Prefix const &prefix) const
Combine this address with a prefix.
bool m_onLink
The address belongs to an on-link network.
static void Cancel(const EventId &id)
Set the cancel bit on this event: the event's associated function will not be invoked when it expires...
void SetScope(Ipv6InterfaceAddress::Scope_e scope)
Set the scope.
@ TENTATIVE_OPTIMISTIC
Address is tentative but we are optimistic so we can send packet even if DAD is not yet finished.
bool IsLinkLocalMulticast() const
If the IPv6 address is link-local multicast (ff02::/16).
bool GetOnLink() const
Get the on-link property.
void SetAddress(Ipv6Address address)
Set IPv6 address (and scope).
Ipv6InterfaceAddress::Scope_e GetScope() const
Get address scope.
bool IsInSameSubnet(Ipv6Address b) const
Checks if the address is in the same subnet.
uint32_t GetNsDadUid() const
Get the latest DAD probe packet UID.
Time Seconds(double value)
Construct a Time in the indicated unit.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
@ GLOBAL
Global address (2000::/3)
void SetOnLink(bool onLink)
Get the on-link property.
Ipv6InterfaceAddress::State_e GetState() const
Get the address state.
std::ostream & operator<<(std::ostream &os, const Angles &a)
Describes an IPv6 prefix.
Ipv6InterfaceAddress()
Default constructor.
@ HOST
Localhost (::1/128)
void SetState(Ipv6InterfaceAddress::State_e state)
Set the state.
Scope_e m_scope
Scope of the address.
~Ipv6InterfaceAddress()
Destructor.