MCPcopy Create free account
hub / github.com/F-Stack/f-stack / nd6_llinfo_settimer_locked

Function nd6_llinfo_settimer_locked

freebsd/netinet6/nd6.c:524–550  ·  view source on GitHub ↗

* ND6 timer routine to handle ND6 entries */

Source from the content-addressed store, hash-verified

522 * ND6 timer routine to handle ND6 entries
523 */
524static void
525nd6_llinfo_settimer_locked(struct llentry *ln, long tick)
526{
527 int canceled;
528
529 LLE_WLOCK_ASSERT(ln);
530
531 if (tick < 0) {
532 ln->la_expire = 0;
533 ln->ln_ntick = 0;
534 canceled = callout_stop(&ln->lle_timer);
535 } else {
536 ln->la_expire = time_uptime + tick / hz;
537 LLE_ADDREF(ln);
538 if (tick > INT_MAX) {
539 ln->ln_ntick = tick - INT_MAX;
540 canceled = callout_reset(&ln->lle_timer, INT_MAX,
541 nd6_llinfo_timer, ln);
542 } else {
543 ln->ln_ntick = 0;
544 canceled = callout_reset(&ln->lle_timer, tick,
545 nd6_llinfo_timer, ln);
546 }
547 }
548 if (canceled > 0)
549 LLE_REMREF(ln);
550}
551
552/*
553 * Gets source address of the first packet in hold queue

Callers 3

nd6_llinfo_setstateFunction · 0.85
nd6_llinfo_timerFunction · 0.85
nd6_freeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected