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

Function sppp_pap_TO

freebsd/net/if_spppsubr.c:4547–4578  ·  view source on GitHub ↗

* That's the timeout routine if we are authenticator. Since the * authenticator is basically passive in PAP, we can't do much here. */

Source from the content-addressed store, hash-verified

4545 * authenticator is basically passive in PAP, we can't do much here.
4546 */
4547static void
4548sppp_pap_TO(void *cookie)
4549{
4550 struct sppp *sp = (struct sppp *)cookie;
4551 STDDCL;
4552
4553 SPPP_LOCK(sp);
4554 if (debug)
4555 log(LOG_DEBUG, SPP_FMT "pap TO(%s) rst_counter = %d\n",
4556 SPP_ARGS(ifp),
4557 sppp_state_name(sp->state[IDX_PAP]),
4558 sp->rst_counter[IDX_PAP]);
4559
4560 if (--sp->rst_counter[IDX_PAP] < 0)
4561 /* TO- event */
4562 switch (sp->state[IDX_PAP]) {
4563 case STATE_REQ_SENT:
4564 pap.tld(sp);
4565 sppp_cp_change_state(&pap, sp, STATE_CLOSED);
4566 break;
4567 }
4568 else
4569 /* TO+ event, not very much we could do */
4570 switch (sp->state[IDX_PAP]) {
4571 case STATE_REQ_SENT:
4572 /* sppp_cp_change_state() will restart the timer */
4573 sppp_cp_change_state(&pap, sp, STATE_REQ_SENT);
4574 break;
4575 }
4576
4577 SPPP_UNLOCK(sp);
4578}
4579
4580/*
4581 * That's the timeout handler if we are peer. Since the peer is active,

Callers

nothing calls this directly

Calls 3

sppp_state_nameFunction · 0.85
sppp_cp_change_stateFunction · 0.85
logFunction · 0.50

Tested by

no test coverage detected