equal
deleted
inserted
replaced
365 } |
365 } |
366 |
366 |
367 void NdiscCache::Entry::StartReachableTimer () |
367 void NdiscCache::Entry::StartReachableTimer () |
368 { |
368 { |
369 NS_LOG_FUNCTION_NOARGS (); |
369 NS_LOG_FUNCTION_NOARGS (); |
|
370 if (m_reachableTimer.IsRunning ()) |
|
371 { |
|
372 m_reachableTimer.Cancel (); |
|
373 } |
370 m_reachableTimer.SetFunction (&NdiscCache::Entry::FunctionReachableTimeout, this); |
374 m_reachableTimer.SetFunction (&NdiscCache::Entry::FunctionReachableTimeout, this); |
371 m_reachableTimer.SetDelay (MilliSeconds (Icmpv6L4Protocol::REACHABLE_TIME)); |
375 m_reachableTimer.SetDelay (MilliSeconds (Icmpv6L4Protocol::REACHABLE_TIME)); |
372 m_reachableTimer.Schedule (); |
376 m_reachableTimer.Schedule (); |
373 } |
377 } |
374 |
378 |
379 } |
383 } |
380 |
384 |
381 void NdiscCache::Entry::StartProbeTimer () |
385 void NdiscCache::Entry::StartProbeTimer () |
382 { |
386 { |
383 NS_LOG_FUNCTION_NOARGS (); |
387 NS_LOG_FUNCTION_NOARGS (); |
|
388 if (m_probeTimer.IsRunning ()) |
|
389 { |
|
390 m_probeTimer.Cancel (); |
|
391 } |
384 m_probeTimer.SetFunction (&NdiscCache::Entry::FunctionProbeTimeout, this); |
392 m_probeTimer.SetFunction (&NdiscCache::Entry::FunctionProbeTimeout, this); |
385 m_probeTimer.SetDelay (MilliSeconds (Icmpv6L4Protocol::RETRANS_TIMER)); |
393 m_probeTimer.SetDelay (MilliSeconds (Icmpv6L4Protocol::RETRANS_TIMER)); |
386 m_probeTimer.Schedule (); |
394 m_probeTimer.Schedule (); |
387 } |
395 } |
388 |
396 |
395 |
403 |
396 |
404 |
397 void NdiscCache::Entry::StartDelayTimer () |
405 void NdiscCache::Entry::StartDelayTimer () |
398 { |
406 { |
399 NS_LOG_FUNCTION_NOARGS (); |
407 NS_LOG_FUNCTION_NOARGS (); |
|
408 if (m_delayTimer.IsRunning ()) |
|
409 { |
|
410 m_delayTimer.Cancel (); |
|
411 } |
400 m_delayTimer.SetFunction (&NdiscCache::Entry::FunctionDelayTimeout, this); |
412 m_delayTimer.SetFunction (&NdiscCache::Entry::FunctionDelayTimeout, this); |
401 m_delayTimer.SetDelay (Seconds (Icmpv6L4Protocol::DELAY_FIRST_PROBE_TIME)); |
413 m_delayTimer.SetDelay (Seconds (Icmpv6L4Protocol::DELAY_FIRST_PROBE_TIME)); |
402 m_delayTimer.Schedule (); |
414 m_delayTimer.Schedule (); |
403 } |
415 } |
404 |
416 |
410 } |
422 } |
411 |
423 |
412 void NdiscCache::Entry::StartRetransmitTimer () |
424 void NdiscCache::Entry::StartRetransmitTimer () |
413 { |
425 { |
414 NS_LOG_FUNCTION_NOARGS (); |
426 NS_LOG_FUNCTION_NOARGS (); |
|
427 if (m_retransTimer.IsRunning ()) |
|
428 { |
|
429 m_retransTimer.Cancel (); |
|
430 } |
415 m_retransTimer.SetFunction (&NdiscCache::Entry::FunctionRetransmitTimeout, this); |
431 m_retransTimer.SetFunction (&NdiscCache::Entry::FunctionRetransmitTimeout, this); |
416 m_retransTimer.SetDelay (MilliSeconds (Icmpv6L4Protocol::RETRANS_TIMER)); |
432 m_retransTimer.SetDelay (MilliSeconds (Icmpv6L4Protocol::RETRANS_TIMER)); |
417 m_retransTimer.Schedule (); |
433 m_retransTimer.Schedule (); |
418 } |
434 } |
419 |
435 |