25 #include "ns3/assert.h" 
   26 #include "ns3/packet.h" 
   28 #include "ns3/boolean.h" 
   29 #include "ns3/ipv6-routing-protocol.h" 
   30 #include "ns3/ipv6-route.h" 
   31 #include "ns3/pointer.h" 
   32 #include "ns3/string.h" 
   33 #include "ns3/integer.h" 
   68     .SetGroupName (
"Internet")
 
   70     .AddAttribute (
"DAD", 
"Always do DAD check.",
 
   74     .AddAttribute (
"SolicitationJitter", 
"The jitter in ms a node is allowed to wait before sending any solicitation. Some jitter aims to prevent collisions. By default, the model will wait for a duration in ms defined by a uniform random-variable between 0 and SolicitationJitter",
 
   75                    StringValue (
"ns3::UniformRandomVariable[Min=0.0|Max=10.0]"),
 
   77                    MakePointerChecker<RandomVariableStream> ())
 
   78     .AddAttribute (
"MaxMulticastSolicit", 
"Neighbor Discovery node constants: max multicast solicitations.",
 
   81                    MakeIntegerChecker<uint8_t> ())
 
   82     .AddAttribute (
"MaxUnicastSolicit", 
"Neighbor Discovery node constants: max unicast solicitations.",
 
   85                    MakeIntegerChecker<uint8_t> ())
 
   86     .AddAttribute (
"ReachableTime", 
"Neighbor Discovery node constants: reachable time.",
 
   90     .AddAttribute (
"RetransmissionTime", 
"Neighbor Discovery node constants: retransmission timer.",
 
   94     .AddAttribute (
"DelayFirstProbe", 
"Neighbor Discovery node constants: delay for the first probe.",
 
  141       Ptr<Node> node = this->GetObject<Node> ();
 
  144           Ptr<Ipv6> ipv6 = this->GetObject<Ipv6> ();
 
  150               ipv6->AggregateObject (rawFactory);
 
  206   interface->
SetNsDadUid (target, p.first->GetUid ());
 
  224   p->CopyData (&type, 
sizeof(type));
 
  229       if (ipv6->IsForwarding (ipv6->GetInterfaceForDevice (interface->
GetDevice ())))
 
  235       if (!ipv6->IsForwarding (ipv6->GetInterfaceForDevice (interface->
GetDevice ())))
 
  279                                 const uint8_t payload[8])
 
  281   NS_LOG_FUNCTION (
this << source << icmp << info << ipHeader << payload);
 
  289   if (nextHeader != Icmpv6L4Protocol::PROT_NUMBER)
 
  304   uint8_t* buf = 
new uint8_t[packet->
GetSize ()];
 
  346           ipv6->AddAutoconfiguredAddress (ipv6->GetInterfaceForDevice (interface->
GetDevice ()), prefixHdr.GetPrefix (), prefixHdr.GetPrefixLength (),
 
  347                                           prefixHdr.GetFlags (), prefixHdr.GetValidTime (), prefixHdr.GetPreferredTime (), defaultRouter);
 
  383   entry = cache->
Lookup (src);
 
  387       entry = cache->
Add (src);
 
  390       entry->MarkReachable ();
 
  391       entry->StartReachableTimer ();
 
  395       std::list<NdiscCache::Ipv6PayloadHeaderPair> waiting;
 
  396       if (entry->IsIncomplete ())
 
  398           entry->StopNudTimer ();
 
  400           waiting = entry->MarkReachable (lla.
GetAddress ());
 
  401           entry->StartReachableTimer ();
 
  403           for (std::list<NdiscCache::Ipv6PayloadHeaderPair>::const_iterator it = waiting.begin (); it != waiting.end (); it++)
 
  407           entry->ClearWaitingPacket ();
 
  411           if (entry->GetMacAddress () != lla.
GetAddress ())
 
  415               entry->SetRouter (
true);
 
  419               if (!entry->IsReachable () || !entry->IsPermanent ())
 
  421                   entry->StopNudTimer ();
 
  422                   waiting = entry->MarkReachable (lla.
GetAddress ());
 
  423                   if (entry->IsProbe ())
 
  425                       for (std::list<NdiscCache::Ipv6PayloadHeaderPair>::const_iterator it = waiting.begin (); it != waiting.end (); it++)
 
  430                   if (!entry->IsPermanent ())
 
  432                       entry->StartReachableTimer ();
 
  456       packet->
CopyData (&type, 
sizeof(type));
 
  465       entry = cache->
Lookup (src);
 
  468           entry = cache->
Add (src);
 
  492   for (i = 0; i < nb; i++)
 
  527       packet->
CopyData (&type, 
sizeof(type));
 
  537       entry = cache->
Lookup (src);
 
  540           entry = cache->
Add (src);
 
  560   if (ipv6->IsForwarding (ipv6->GetInterfaceForDevice (interface->
GetDevice ())))
 
  565   hardwareAddress = interface->
GetDevice ()->GetAddress ();
 
  580   NS_LOG_LOGIC (
"Send RS ( from " << src << 
" to " << dst << 
")");
 
  586   ipHeader.SetSourceAddress (src);
 
  587   ipHeader.SetDestinationAddress (dst);
 
  589   ipHeader.SetPayloadLength (p->
GetSize ());
 
  590   ipHeader.SetHopLimit (255);
 
  629   std::list<NdiscCache::Ipv6PayloadHeaderPair> waiting;
 
  632   entry = cache->
Lookup (target);
 
  643       for (i = 0; i < nb; i++)
 
  668   packet->
CopyData (&type, 
sizeof(type));
 
  687           for (std::list<NdiscCache::Ipv6PayloadHeaderPair>::const_iterator it = waiting.begin (); it != waiting.end (); it++)
 
  730                           for (std::list<NdiscCache::Ipv6PayloadHeaderPair>::const_iterator it = waiting.begin (); it != waiting.end (); it++)
 
  787       entry = cache->
Lookup (redirTarget);
 
  790           entry = cache->
Add (redirTarget);
 
  793           entry->SetMacAddress (llOptionHeader.
GetAddress ());
 
  798           if (entry->IsIncomplete () || entry->GetMacAddress () != llOptionHeader.
GetAddress ())
 
  801               if (entry->GetMacAddress () != llOptionHeader.
GetAddress ())
 
  803                   entry->SetMacAddress (llOptionHeader.
GetAddress ());
 
  817   if (redirTarget.
IsEqual (redirDestination))
 
  819       ipv6->GetRoutingProtocol ()->NotifyAddRoute (redirDestination, 
Ipv6Prefix (128), 
Ipv6Address (
"::"), ipv6->GetInterfaceForAddress (dst));
 
  823       uint32_t ifIndex = ipv6->GetInterfaceForAddress (dst);
 
  824       ipv6->GetRoutingProtocol ()->NotifyAddRoute (redirDestination, 
Ipv6Prefix (128), redirTarget, ifIndex);
 
  860   Forward (src, timeexceeded, timeexceeded.
GetCode (), ipHeader, payload);
 
  921   NS_ASSERT (ipv6 != 0 && ipv6->GetRoutingProtocol () != 0);
 
  928   header.SetDestinationAddress (dst);
 
  929   route = ipv6->GetRoutingProtocol ()->RouteOutput (packet, header, oif, err);
 
  950   NS_LOG_FUNCTION (
this << src << dst << hardwareAddress << static_cast<uint32_t> (flags));
 
  955   NS_LOG_LOGIC (
"Send NA ( from " << src << 
" to " << dst << 
" target " << src << 
")");
 
  956   na.SetIpv6Target (src);
 
  972   na.CalculatePseudoHeaderChecksum (src, dst, p->
GetSize () + na.GetSerializedSize (), 
PROT_NUMBER);
 
 1006   NS_LOG_LOGIC (
"Send NS ( from " << src << 
" to " << dst << 
" target " << target << 
")");
 
 1009   ns.CalculatePseudoHeaderChecksum (src, dst, p->
GetSize () + ns.GetSerializedSize (), 
PROT_NUMBER);
 
 1017       NS_LOG_LOGIC (
"Destination is Multicast, using DelayedSendMessage");
 
 1035   NS_LOG_LOGIC (
"Send RS ( from " << src << 
" to " << dst << 
")");
 
 1037   rs.CalculatePseudoHeaderChecksum (src, dst, p->
GetSize () + rs.GetSerializedSize (), 
PROT_NUMBER);
 
 1045       NS_LOG_LOGIC (
"Destination is Multicast, using DelayedSendMessage");
 
 1054   uint32_t malformedPacketSize = malformedPacket->
GetSize ();
 
 1057   NS_LOG_LOGIC (
"Send Destination Unreachable ( to " << dst << 
" code " << (uint32_t)code << 
" )");
 
 1060   if (malformedPacketSize <= 1280 - 48)
 
 1078   uint32_t malformedPacketSize = malformedPacket->
GetSize ();
 
 1084   if (malformedPacketSize <= 1280 - 48)
 
 1101   NS_LOG_FUNCTION (
this << malformedPacket << dst << static_cast<uint32_t> (code));
 
 1103   uint32_t malformedPacketSize = malformedPacket->
GetSize ();
 
 1106   NS_LOG_LOGIC (
"Send Time Exceeded ( to " << dst << 
" code " << (uint32_t)code << 
" )");
 
 1109   if (malformedPacketSize <= 1280 - 48)
 
 1125   NS_LOG_FUNCTION (
this << malformedPacket << dst << static_cast<uint32_t> (code) << ptr);
 
 1127   uint32_t malformedPacketSize = malformedPacket->
GetSize ();
 
 1130   NS_LOG_LOGIC (
"Send Parameter Error ( to " << dst << 
" code " << (uint32_t)code << 
" )");
 
 1133   if (malformedPacketSize <= 1280 - 48 )
 
 1150   NS_LOG_FUNCTION (
this << redirectedPacket << dst << redirTarget << redirDestination << redirHardwareTarget);
 
 1151   uint32_t llaSize = 0;
 
 1153   uint32_t redirectedPacketSize = redirectedPacket->
GetSize ();
 
 1156   NS_LOG_LOGIC (
"Send Redirection ( to " << dst << 
" target " << redirTarget << 
" destination " << redirDestination << 
" )");
 
 1160   if ((redirectedPacketSize % 8) != 0)
 
 1162       Ptr<Packet> pad = Create<Packet> (8 - (redirectedPacketSize % 8));
 
 1173   if (redirectedPacketSize <= (1280 - 56 - llaSize))
 
 1175       redirectedOptionHeader.
SetPacket (redirectedPacket);
 
 1180       redirectedOptionHeader.
SetPacket (fragment);
 
 1191   redirectionHeader.
SetTarget (redirTarget);
 
 1201   NS_LOG_FUNCTION (
this << src << dst << hardwareAddress << (uint32_t)flags);
 
 1207   NS_LOG_LOGIC (
"Send NA ( from " << src << 
" to " << dst << 
")");
 
 1230   ipHeader.SetSourceAddress (src);
 
 1231   ipHeader.SetDestinationAddress (dst);
 
 1233   ipHeader.SetPayloadLength (p->
GetSize ());
 
 1234   ipHeader.SetHopLimit (255);
 
 1253   NS_LOG_LOGIC (
"Send NS ( from " << src << 
" to " << dst << 
" target " << target << 
")");
 
 1259   ipHeader.SetSourceAddress (src);
 
 1260   ipHeader.SetDestinationAddress (dst);
 
 1262   ipHeader.SetPayloadLength (p->
GetSize ());
 
 1263   ipHeader.SetHopLimit (255);
 
 1274       if ((*i)->GetDevice () == device)
 
 1291   cache->
SetDevice (device, interface, 
this);
 
 1299   NS_LOG_FUNCTION (
this << dst << device << cache << hardwareDestination);
 
 1330   NS_LOG_FUNCTION (
this << p << ipHeader << dst << device << cache << hardwareDestination);
 
 1412   for (i = 0; i < nb; i++)
 
 1436       if (!ipv6->IsForwarding (ipv6->GetInterfaceForDevice (interface->
GetDevice ())) && addr.
IsLinkLocal ())
 
void DelayedSendMessage(Ptr< Packet > packet, Ipv6Address src, Ipv6Address dst, uint8_t ttl)
Helper function used during delayed solicitation. 
bool IsAny() const 
If the IPv6 address is the "Any" address. 
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer. 
void Dispose(void)
Dispose of this Object. 
std::list< Ipv6PayloadHeaderPair > MarkStale(Address mac)
Changes the state to this entry to STALE. 
void SetPacket(Ptr< Packet > packet)
Set the redirected packet. 
ICMPv6 redirected option. 
uint16_t GetId() const 
Get the ID of the packet. 
uint32_t GetNsDadUid() const 
Get the latest DAD probe packet UID. 
Simulation virtual time values and global simulation resolution. 
bool Lookup(Ipv6Address dst, Ptr< NetDevice > device, Ptr< NdiscCache > cache, Address *hardwareDestination)
Lookup in the ND cache for the IPv6 address. 
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
void SetStream(int64_t stream)
Specifies the stream number for the RngStream. 
ICMPv6 Error Parameter Error header. 
void SetState(Ipv6Address address, Ipv6InterfaceAddress::State_e state)
Update state of an interface address. 
SocketErrno
Enumeration of the possible errors returned by a socket. 
AttributeValue implementation for Boolean. 
ICMPv6 Router Advertisement header. 
ICMPv6 Neighbor Advertisement header. 
void SendNA(Ipv6Address src, Ipv6Address dst, Address *hardwareAddress, uint8_t flags)
Send a Neighbor Adverstisement. 
void HandleNS(Ptr< Packet > p, Ipv6Address const &src, Ipv6Address const &dst, Ptr< Ipv6Interface > interface)
Receive Neighbor Solicitation method. 
virtual uint32_t GetSerializedSize() const 
Get the serialized size. 
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system. 
Address GetMacAddress() const 
Get the MAC address of this entry. 
NdiscCache::Entry * Add(Ipv6Address to)
Add an entry. 
Ptr< Packet > GetPacket() const 
Get the incorrect packet. 
Ipv6Address GetTarget() const 
Get the IPv6 target address. 
Ptr< T > GetObject(void) const 
Get a pointer to the requested aggregated Object. 
Access to the IPv6 forwarding table, interfaces, and configuration. 
Hold variables of type string. 
void StopNudTimer()
Stop NUD timer and reset the NUD retransmission counter. 
virtual uint32_t GetSerializedSize() const 
Get the serialized size. 
ICMPv6 Error Time Exceeded header. 
IPv6 layer implementation. 
Ptr< Node > m_node
The node. 
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
void AddPacketTag(const Tag &tag) const 
Add a packet tag. 
ICMPv6 Router Solicitation header. 
void SendRS(Ipv6Address src, Ipv6Address dst, Address hardwareAddress)
Send a Router Solicitation. 
ICMPv6 Neighbor Solicitation header. 
bool IsLinkLocal() const 
If the IPv6 address is a link-local address (fe80::/64). 
uint64_t GetUid(void) const 
Returns the packet's Uid. 
bool IsNull(void) const 
Check for null implementation. 
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
virtual void ReceiveIcmp(Ipv4Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo, Ipv4Address payloadSource, Ipv4Address payloadDestination, const uint8_t payload[8])
Called from lower-level layers to send the ICMP packet up in the stack. 
U * PeekPointer(const Ptr< U > &p)
Hold a signed integer type. 
static Ipv6Address GetAny()
Get the "any" (::) Ipv6Address. 
Ipv6InterfaceAddress GetAddress(uint32_t index) const 
Get an address from IPv6 interface. 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
IPv6 address associated with an interface. 
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit. 
void SetPtr(uint32_t ptr)
Set the pointer field. 
static const uint8_t PROT_NUMBER
ICMPv6 protocol number (58). 
virtual IpL4Protocol::DownTargetCallback6 GetDownTarget6(void) const 
This method allows a caller to get the current down target callback set for this L4 protocol (IPv6 ca...
bool GetFlagS() const 
Get the S flag. 
uint32_t GetSize(void) const 
Returns the the size in bytes of the packet (including the zero-filled initial payload). 
bool IsEqual(const Ipv6Address &other) const 
Comparison operation between two Ipv6Addresses. 
virtual ~Icmpv6L4Protocol()
Destructor. 
std::list< Ipv6PayloadHeaderPair > MarkReachable(Address mac)
Changes the state to this entry to REACHABLE. 
virtual void DoDispose(void)
Destructor implementation. 
void SetDevice(Ptr< NetDevice > device, Ptr< Ipv6Interface > interface, Ptr< Icmpv6L4Protocol > icmpv6)
Set the device and interface. 
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function. 
void SetMtu(uint32_t mtu)
Set the MTU. 
void SetNode(Ptr< Node > node)
Set the node. 
void SetPacket(Ptr< Packet > p)
Set the incorrect packet. 
This class implements a tag that carries the socket-specific TTL of a packet to the IP layer...
void SetTarget(Ipv6Address target)
Set the IPv6 target address. 
virtual int GetProtocolNumber() const 
Get the protocol number. 
Icmpv6L4Protocol()
Constructor. 
uint16_t GetLifeTime() const 
Get the node Life time (Neighbor Discovery). 
virtual double GetValue(void)=0
Get the next random value as a double drawn from the distribution. 
a polymophic address class 
Time m_delayFirstProbe
Neighbor Discovery node constants: delay for the first probe. 
void SetPacket(Ptr< Packet > p)
Set the incorrect packet. 
static void FunctionDadTimeout(Ptr< Icmpv6L4Protocol > icmpv6, Ipv6Interface *interface, Ipv6Address addr)
Function called when DAD timeout. 
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range. 
virtual enum IpL4Protocol::RxStatus Receive(Ptr< Packet > p, Ipv4Header const &header, Ptr< Ipv4Interface > interface)
Receive method. 
void SendErrorTooBig(Ptr< Packet > malformedPacket, Ipv6Address dst, uint32_t mtu)
Send an error Too Big. 
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
Ptr< const AttributeAccessor > MakeIntegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Ptr< Ipv6Interface > GetInterface() const 
Get the Ipv6Interface associated with this cache. 
void NotifyNewAggregate()
This method is called by AddAgregate and completes the aggregation by setting the node in the ICMPv6 ...
bool IsDelay() const 
Is the entry DELAY. 
Ptr< Packet > CreateFragment(uint32_t start, uint32_t length) const 
Create a new packet which contains a fragment of the original packet. 
virtual void Send(Ptr< Packet > packet, Ipv6Address source, Ipv6Address destination, uint8_t protocol, Ptr< Ipv6Route > route)=0
Higher-level layers call this method to send a packet down the stack to the MAC and PHY layers...
void AddAtEnd(Ptr< const Packet > packet)
Concatenate the input packet at the end of the current packet. 
bool GetFlagR() const 
Get the R flag. 
The IPv6 representation of a network interface. 
ICMPv6 Error Destination Unreachable header. 
void HandleRedirection(Ptr< Packet > p, Ipv6Address const &src, Ipv6Address const &dst, Ptr< Ipv6Interface > interface)
Receive Redirection method. 
Ipv6Address GetAddress() const 
Get the IPv6 address. 
uint8_t GetMaxMulticastSolicit() const 
Neighbor Discovery node constants: max multicast solicitations. 
void Send(Ptr< Packet > p, const Ipv6Header &hdr, Ipv6Address dest)
Send a packet through this interface. 
Ipv6Address GetIpv6Target() const 
Get the IPv6 target field. 
uint32_t GetNAddresses(void) const 
Get number of addresses on this IPv6 interface. 
Time m_retransmissionTime
Neighbor Discovery node constants: retransmission timer. 
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay. 
void Forward(Ipv6Address source, Icmpv6Header icmp, uint32_t info, Ipv6Header ipHeader, const uint8_t payload[8])
Notify an ICMPv6 reception to upper layers (if requested). 
void SendErrorParameterError(Ptr< Packet > malformedPacket, Ipv6Address dst, uint8_t code, uint32_t ptr)
Send an error Parameter Error. 
Ptr< Packet > GetPacket() const 
Get the incorrect packet. 
void SetTtl(uint8_t ttl)
Set the tag's TTL. 
AttributeValue implementation for Time. 
void SetIpv6Target(Ipv6Address target)
Set the IPv6 target field. 
void HandleTimeExceeded(Ptr< Packet > p, Ipv6Address const &src, Ipv6Address const &dst, Ptr< Ipv6Interface > interface)
Receive Time Exceeded method. 
NdiscCache::Ipv6PayloadHeaderPair ForgeNS(Ipv6Address src, Ipv6Address dst, Ipv6Address target, Address hardwareAddress)
Forge a Neighbor Solicitation. 
uint8_t m_maxMulticastSolicit
Neighbor Discovery node constants: max multicast solicitations. 
NdiscCache::Ipv6PayloadHeaderPair ForgeEchoRequest(Ipv6Address src, Ipv6Address dst, uint16_t id, uint16_t seq, Ptr< Packet > data)
Forge an Echo Request. 
void Flush()
Flush the cache. 
void SendErrorTimeExceeded(Ptr< Packet > malformedPacket, Ipv6Address dst, uint8_t code)
Send an error Time Exceeded. 
static Ipv6Address GetZero()
Get the 0 (::) Ipv6Address. 
Address is tentative but we are optimistic so we can send packet even if DAD is not yet finished...
NdiscCache::Ipv6PayloadHeaderPair ForgeRS(Ipv6Address src, Ipv6Address dst, Address hardwareAddress)
Forge a Router Solicitation. 
bool IsAlwaysDad() const 
Is the node must do DAD. 
Time GetReachableTime() const 
Neighbor Discovery node constants: reachable time. 
uint8_t GetLength(void) const 
Get the length of the underlying address. 
ICMPv6 Redirection header. 
Ptr< Packet > GetPacket() const 
Get the incorrect packet. 
An implementation of the ICMPv6 protocol. 
Ptr< NdiscCache > FindCache(Ptr< NetDevice > device)
Get the cache corresponding to the device. 
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
virtual Ptr< NetDevice > GetDevice() const 
Get the NetDevice. 
void SetPacket(Ptr< Packet > p)
Set the incorrect packet. 
Ptr< RandomVariableStream > m_solicitationJitter
Random jitter before sending solicitations. 
bool GetFlagO() const 
Get the O flag. 
void HandleRS(Ptr< Packet > p, Ipv6Address const &src, Ipv6Address const &dst, Ptr< Ipv6Interface > interface)
Receive Router Solicitation method. 
Time m_reachableTime
Neighbor Discovery node constants: reachable time. 
void StartRetransmitTimer()
Start retransmit timer. 
uint16_t GetSeq() const 
Get the sequence number. 
void SetNsDadUid(Ipv6Address address, uint32_t uid)
Update NS DAD packet UID of an interface address. 
void ClearWaitingPacket()
Clear the waiting packet list. 
virtual uint32_t GetSerializedSize() const 
Get the serialized size. 
void HandleEchoRequest(Ptr< Packet > p, Ipv6Address const &src, Ipv6Address const &dst, Ptr< Ipv6Interface > interface)
Receive Echo Request method. 
Time GetDelayFirstProbe() const 
Neighbor Discovery node constants : delay for the first probe. 
void HandleParameterError(Ptr< Packet > p, Ipv6Address const &src, Ipv6Address const &dst, Ptr< Ipv6Interface > interface)
Receive Parameter Error method. 
Ptr< Packet > Copy(void) const 
performs a COW copy of the packet. 
uint8_t GetMaxUnicastSolicit() const 
Neighbor Discovery node constants: max unicast solicitations. 
bool IsProbe() const 
Is the entry PROBE. 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
void SendErrorDestinationUnreachable(Ptr< Packet > malformedPacket, Ipv6Address dst, uint8_t code)
Send an error Destination Unreachable. 
void SendEchoReply(Ipv6Address src, Ipv6Address dst, uint16_t id, uint16_t seq, Ptr< Packet > data)
Send a Echo Reply. 
static TypeId GetTypeId()
Get the type ID. 
virtual IpL4Protocol::DownTargetCallback GetDownTarget(void) const 
This method allows a caller to get the current down target callback set for this L4 protocol (IPv4 ca...
Ptr< const AttributeChecker > MakeBooleanChecker(void)
static uint16_t GetStaticProtocolNumber()
Get ICMPv6 protocol number. 
Ipv6InterfaceAddress::State_e GetState() const 
Get the address state. 
void StartDelayTimer()
Start delay timer. 
IpL4Protocol::DownTargetCallback6 m_downTarget
callback to Ipv6::Send 
bool IsMulticast() const 
If the IPv6 address is multicast (ff00::/8). 
static Ipv6Address GetAllNodesMulticast()
Get the "all nodes multicast" address. 
void StartReachableTimer()
Start the reachable timer. 
bool m_alwaysDad
Always do DAD ? 
bool IsIncomplete() const 
Is the entry INCOMPLETE. 
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
L4 Protocol abstract base class. 
uint8_t m_maxUnicastSolicit
Neighbor Discovery node constants: max unicast solicitations. 
void SendMessage(Ptr< Packet > packet, Ipv6Address src, Ipv6Address dst, uint8_t ttl)
Send a packet via ICMPv6, note that packet already contains ICMPv6 header. 
virtual void SetDownTarget(IpL4Protocol::DownTargetCallback cb)
This method allows a caller to set the current down target callback set for this L4 protocol (IPv4 ca...
void Remove(NdiscCache::Entry *entry)
Delete an entry. 
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
void SetFlagR(bool r)
Set the R flag. 
virtual uint32_t GetSerializedSize() const 
Get the serialized size. 
void SendRedirection(Ptr< Packet > redirectedPacket, Ipv6Address src, Ipv6Address dst, Ipv6Address redirTarget, Ipv6Address redirDestination, Address redirHardwareTarget)
Send an ICMPv6 Redirection. 
void SetMacAddress(Address mac)
Set the MAC address of this entry. 
void SetFlagS(bool s)
Set the S flag. 
CacheList m_cacheList
A list of cache by device. 
void DoDAD(Ipv6Address target, Ptr< Ipv6Interface > interface)
Do the Duplication Address Detection (DAD). 
virtual void SetDownTarget6(IpL4Protocol::DownTargetCallback6 cb)
This method allows a caller to set the current down target callback set for this L4 protocol (IPv6 ca...
Ipv6InterfaceAddress GetLinkLocalAddress() const 
Get link-local address from IPv6 interface. 
Describes an IPv6 address. 
Address is tentative, no packet can be sent unless DAD finished. 
NdiscCache::Entry * Lookup(Ipv6Address dst)
Lookup in the cache. 
void HandleRA(Ptr< Packet > p, Ipv6Address const &src, Ipv6Address const &dst, Ptr< Ipv6Interface > interface)
Receive Router Advertisement method. 
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN. 
void ReceiveLLA(Icmpv6OptionLinkLayerAddress lla, Ipv6Address const &src, Ipv6Address const &dst, Ptr< Ipv6Interface > interface)
Link layer address option processing. 
void MarkDelay()
Change the state to this entry to DELAY. 
virtual int GetVersion() const 
Get the version of the protocol. 
void SetDestination(Ipv6Address destination)
Set the IPv6 destination address. 
Time Seconds(double value)
Construct a Time in the indicated unit. 
Invalid state (after a DAD failed) 
void MarkIncomplete(Ipv6PayloadHeaderPair p)
Changes the state to this entry to INCOMPLETE. 
Describes an IPv6 prefix. 
virtual void DoDispose()
Dispose this object. 
void Nullify(void)
Discard the implementation, set it to null. 
Ipv6Address GetDestination() const 
Get the IPv6 destination address. 
Ipv6Address GetIpv6Target() const 
Get the IPv6 target field. 
uint32_t CopyData(uint8_t *buffer, uint32_t size) const 
Copy the packet contents to a byte buffer. 
bool IsPermanent() const 
Is the entry PERMANENT. 
A record that holds information about a NdiscCache entry. 
void HandleNA(Ptr< Packet > p, Ipv6Address const &src, Ipv6Address const &dst, Ptr< Ipv6Interface > interface)
Receive Neighbor Advertisement method. 
void SetRouter(bool router)
Set the node type. 
ICMPv6 link-layer address option. 
void SetSeq(uint16_t seq)
Set the sequence number. 
virtual void NotifyNewAggregate(void)
Notify all Objects aggregated to this one of a new Object being aggregated. 
std::pair< Ptr< Packet >, Ipv6Header > Ipv6PayloadHeaderPair
Pair of a packet and an Ipv4 header. 
Address GetAddress() const 
Get the hardware address. 
void HandlePacketTooBig(Ptr< Packet > p, Ipv6Address const &src, Ipv6Address const &dst, Ptr< Ipv6Interface > interface)
Receive Packet Too Big method. 
bool IsReachable() const 
Is the entry REACHABLE. 
void SetPacket(Ptr< Packet > p)
Set the incorrect packet. 
uint32_t GetMtu() const 
Get the MTU field. 
virtual uint32_t GetSerializedSize() const 
Get the serialized size. 
ICMPv6 Error Too Big header. 
Time GetRetransmissionTime() const 
Neighbor Discovery node constants: retransmission timer. 
a unique identifier for an interface. 
void AddWaitingPacket(Ipv6PayloadHeaderPair p)
Add a packet (or replace old value) in the queue. 
Ptr< Packet > GetPacket() const 
Get the incorrect packet. 
Ipv6InterfaceAddress GetAddressMatchingDestination(Ipv6Address dst)
Get an address which is in the same network prefix as destination. 
virtual uint32_t GetSerializedSize() const 
Get the serialized size. 
void SetFlagO(bool o)
Set the O flag. 
Ptr< NetDevice > GetDevice() const 
Get the NetDevice associated with this cache. 
TypeId SetParent(TypeId tid)
Set the parent TypeId. 
void SendNS(Ipv6Address src, Ipv6Address dst, Ipv6Address target, Address hardwareAddress)
Send a Neighbor Solicitation. 
NdiscCache::Ipv6PayloadHeaderPair ForgeNA(Ipv6Address src, Ipv6Address dst, Address *hardwareAddress, uint8_t flags)
Forge a Neighbor Advertisement. 
bool IsStale() const 
Is the entry STALE. 
void AddHeader(const Header &header)
Add header to this packet. 
Ptr< NdiscCache > CreateCache(Ptr< NetDevice > device, Ptr< Ipv6Interface > interface)
Create a neighbor cache. 
void SetId(uint16_t id)
Set the ID of the packet. 
void HandleDestinationUnreachable(Ptr< Packet > p, Ipv6Address const &src, Ipv6Address const &dst, Ptr< Ipv6Interface > interface)
Receive Destination Unreachable method. 
static Ipv6Address MakeSolicitedAddress(Ipv6Address addr)
Make the solicited IPv6 address. 
static Ipv6Address GetAllRoutersMulticast()
Get the "all routers multicast" address. 
void SetAddress(Address addr)
Set the hardware address.