---------------------------------------------------------------------- * TIMER QUEUE CODE * ---------------------------------------------------------------------- */ @addtogroup Timer * * The timer queue management functions are designed to operate efficiently with * a minimum of interaction with the queues. * * Once a timeout is set in the queue it will not be a
| 2402 | * @param assoc |
| 2403 | */ |
| 2404 | static void |
| 2405 | sctp_AddTimeOut(struct libalias *la, struct sctp_nat_assoc *assoc) |
| 2406 | { |
| 2407 | int add_loc; |
| 2408 | LIBALIAS_LOCK_ASSERT(la); |
| 2409 | add_loc = assoc->exp - la->sctpNatTimer.loc_time + la->sctpNatTimer.cur_loc; |
| 2410 | if (add_loc >= SN_TIMER_QUEUE_SIZE) |
| 2411 | add_loc -= SN_TIMER_QUEUE_SIZE; |
| 2412 | LIST_INSERT_HEAD(&la->sctpNatTimer.TimerQ[add_loc], assoc, timer_Q); |
| 2413 | assoc->exp_loc = add_loc; |
| 2414 | } |
| 2415 | |
| 2416 | /** @ingroup Timer |
| 2417 | * @brief Remove an association from timer queue |
no outgoing calls
no test coverage detected