equal
deleted
inserted
replaced
56 m_cacheList.clear (); |
56 m_cacheList.clear (); |
57 m_node = 0; |
57 m_node = 0; |
58 Object::DoDispose (); |
58 Object::DoDispose (); |
59 } |
59 } |
60 |
60 |
61 Ptr<TraceResolver> |
|
62 ArpL3Protocol::CreateTraceResolver (void) |
|
63 { |
|
64 return Create<EmptyTraceResolver> (); |
|
65 } |
|
66 |
|
67 ArpCache * |
61 ArpCache * |
68 ArpL3Protocol::FindCache (Ptr<NetDevice> device) |
62 ArpL3Protocol::FindCache (Ptr<NetDevice> device) |
69 { |
63 { |
70 for (CacheList::const_iterator i = m_cacheList.begin (); i != m_cacheList.end (); i++) |
64 for (CacheList::const_iterator i = m_cacheList.begin (); i != m_cacheList.end (); i++) |
71 { |
65 { |
73 { |
67 { |
74 return *i; |
68 return *i; |
75 } |
69 } |
76 } |
70 } |
77 Ptr<Ipv4L3Protocol> ipv4 = m_node->QueryInterface<Ipv4L3Protocol> (Ipv4L3Protocol::iid); |
71 Ptr<Ipv4L3Protocol> ipv4 = m_node->QueryInterface<Ipv4L3Protocol> (Ipv4L3Protocol::iid); |
78 Ipv4Interface *interface = ipv4->FindInterfaceForDevice (device); |
72 Ptr<Ipv4Interface> interface = ipv4->FindInterfaceForDevice (device); |
79 ArpCache * cache = new ArpCache (device, interface); |
73 ArpCache * cache = new ArpCache (device, interface); |
80 NS_ASSERT (device->IsBroadcast ()); |
74 NS_ASSERT (device->IsBroadcast ()); |
81 device->SetLinkChangeCallback (MakeCallback (&ArpCache::Flush, cache)); |
75 device->SetLinkChangeCallback (MakeCallback (&ArpCache::Flush, cache)); |
82 m_cacheList.push_back (cache); |
76 m_cacheList.push_back (cache); |
83 return cache; |
77 return cache; |