24 #include "ns3/assert.h"
36 m_state (TENTATIVE_OPTIMISTIC),
62 : m_address (o.m_address),
63 m_prefix (o.m_prefix),
66 m_nsDadUid (o.m_nsDadUid)
201 m_dadTimer.SetArguments (interface,
m_address);
202 m_dadTimer.Schedule (
Seconds (1));
206 void Ipv6InterfaceAddress::StopDadTimer ()
209 m_dadTimer.Cancel ();
State_e m_state
State of the address.
void SetScope(Ipv6InterfaceAddress::Scope_e scope)
Set the scope.
uint32_t GetNsDadUid() const
Get the latest DAD probe packet UID.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
bool IsLinkLocalMulticast() const
If the IPv6 address is link-local multicast (ff02::/16).
bool IsLinkLocal() const
If the IPv6 address is a link-local address (fe80::/64).
void SetNsDadUid(uint32_t uid)
Set the latest DAD probe packet UID.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
IPv6 address associated with an interface.
Link-local address (fe80::/64)
uint32_t m_nsDadUid
Last DAD probe packet UID.
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...
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event to expire at the relative time "time" is reached.
static void FunctionDadTimeout(Ptr< Icmpv6L4Protocol > icmpv6, Ipv6Interface *interface, Ipv6Address addr)
Function called when DAD timeout.
Ipv6Address GetAddress() const
Get the IPv6 address.
Ipv6InterfaceAddress()
Default constructor.
Ipv6Address m_address
The IPv6 address.
void SetState(Ipv6InterfaceAddress::State_e state)
Set the state.
Ipv6Prefix GetPrefix() const
Get the IPv6 prefix.
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
bool IsInSameSubnet(Ipv6Address b) const
Checks if the address is in the same subnet.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Global address (2000::/3)
Ipv6InterfaceAddress::State_e GetState() const
Get the address state.
~Ipv6InterfaceAddress()
Destructor.
Describes an IPv6 address.
void SetAddress(Ipv6Address address)
Set IPv6 address (and scope).
Ipv6InterfaceAddress::Scope_e GetScope() const
Get address scope.
Ipv6Prefix m_prefix
The IPv6 prefix.
State_e
State of an address associated with an interface.
Time Seconds(double value)
Construct a Time in the indicated unit.
Describes an IPv6 prefix.
Scope_e m_scope
Scope of the address.
Address is tentative but we are optimistic so we can send packet even if DAD is not yet finished...
bool IsLocalhost() const
If the IPv6 address is localhost (::1).
Ipv6Address CombinePrefix(Ipv6Prefix const &prefix)
Combine this address with a prefix.