View | Details | Raw Unified | Return to bug 1826
Collapse All | Expand All

(-)a/src/internet/model/ipv6-interface.cc (-3 / +16 lines)
 Lines 116-123    Link Here 
116
      return; /* no NDISC cache for ip6-localhost */
116
      return; /* no NDISC cache for ip6-localhost */
117
    }
117
    }
118
118
119
  Ptr<Icmpv6L4Protocol> icmpv6 = m_node->GetObject<Ipv6L3Protocol> ()->GetIcmpv6 ();
119
  Ptr<IpL4Protocol> proto = m_node->GetObject<Ipv6> ()->GetProtocol (Icmpv6L4Protocol::GetStaticProtocolNumber ());
120
  m_ndCache = icmpv6->CreateCache (m_device, this);
120
  Ptr<Icmpv6L4Protocol> icmpv6;
121
  if (proto)
122
    {
123
      icmpv6 = proto->GetObject <Icmpv6L4Protocol> ();
124
    }
125
  if (icmpv6)
126
    {
127
      m_ndCache = icmpv6->CreateCache (m_device, this);
128
    }
121
}
129
}
122
130
123
void Ipv6Interface::SetNode (Ptr<Node> node)
131
void Ipv6Interface::SetNode (Ptr<Node> node)
 Lines 216-222    Link Here 
216
      if (!addr.IsAny () || !addr.IsLocalhost ())
224
      if (!addr.IsAny () || !addr.IsLocalhost ())
217
        {
225
        {
218
          /* DAD handling */
226
          /* DAD handling */
219
          Ptr<Icmpv6L4Protocol> icmpv6 = m_node->GetObject<Ipv6L3Protocol> ()->GetIcmpv6 ();
227
          Ptr<IpL4Protocol> proto = m_node->GetObject<Ipv6> ()->GetProtocol (Icmpv6L4Protocol::GetStaticProtocolNumber ());
228
          Ptr<Icmpv6L4Protocol> icmpv6;
229
          if (proto)
230
            {
231
              icmpv6 = proto->GetObject <Icmpv6L4Protocol> ();
232
            }
220
233
221
          if (icmpv6 && icmpv6->IsAlwaysDad ())
234
          if (icmpv6 && icmpv6->IsAlwaysDad ())
222
            {
235
            {
(-)a/src/internet/model/ipv6.h (+8 lines)
 Lines 31-36    Link Here 
31
31
32
#include "ns3/ipv6-address.h"
32
#include "ns3/ipv6-address.h"
33
#include "ipv6-interface-address.h"
33
#include "ipv6-interface-address.h"
34
#include "ns3/ip-l4-protocol.h"
34
35
35
namespace ns3 {
36
namespace ns3 {
36
37
 Lines 304-309    Link Here 
304
  virtual void SetForwarding (uint32_t interface, bool val) = 0;
305
  virtual void SetForwarding (uint32_t interface, bool val) = 0;
305
306
306
  /**
307
  /**
308
   * \brief Get L4 protocol by protocol number.
309
   * \param protocolNumber protocol number
310
   * \return corresponding Ipv6L4Protocol or 0 if not found
311
   */
312
  virtual Ptr<IpL4Protocol> GetProtocol (int protocolNumber) const = 0;
313
314
  /**
307
   * \brief Register the IPv6 Extensions.
315
   * \brief Register the IPv6 Extensions.
308
   */
316
   */
309
  virtual void RegisterExtensions () = 0;
317
  virtual void RegisterExtensions () = 0;

Return to bug 1826