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

Function sctp_AddTimeOut

freebsd/netinet/libalias/alias_sctp.c:2404–2414  ·  view source on GitHub ↗

---------------------------------------------------------------------- * 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

Source from the content-addressed store, hash-verified

2402 * @param assoc
2403 */
2404static void
2405sctp_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

Callers 3

ID_processFunction · 0.85
sctp_ResetTimeOutFunction · 0.85
sctp_CheckTimersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected