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

Function sppp_cp_change_state

freebsd/net/if_spppsubr.c:2081–2104  ·  view source on GitHub ↗

* Change the state of a control protocol in the state automaton. * Takes care of starting/stopping the restart timer. */

Source from the content-addressed store, hash-verified

2079 * Takes care of starting/stopping the restart timer.
2080 */
2081static void
2082sppp_cp_change_state(const struct cp *cp, struct sppp *sp, int newstate)
2083{
2084 sp->state[cp->protoidx] = newstate;
2085
2086 callout_stop (&sp->ch[cp->protoidx]);
2087
2088 switch (newstate) {
2089 case STATE_INITIAL:
2090 case STATE_STARTING:
2091 case STATE_CLOSED:
2092 case STATE_STOPPED:
2093 case STATE_OPENED:
2094 break;
2095 case STATE_CLOSING:
2096 case STATE_STOPPING:
2097 case STATE_REQ_SENT:
2098 case STATE_ACK_RCVD:
2099 case STATE_ACK_SENT:
2100 callout_reset(&sp->ch[cp->protoidx], sp->lcp.timeout,
2101 cp->TO, (void *)sp);
2102 break;
2103 }
2104}
2105
2106/*
2107 *--------------------------------------------------------------------------*

Callers 14

sppp_cp_inputFunction · 0.85
sppp_up_eventFunction · 0.85
sppp_down_eventFunction · 0.85
sppp_open_eventFunction · 0.85
sppp_close_eventFunction · 0.85
sppp_to_eventFunction · 0.85
sppp_chap_inputFunction · 0.85
sppp_chap_openFunction · 0.85
sppp_chap_closeFunction · 0.85
sppp_chap_TOFunction · 0.85
sppp_pap_inputFunction · 0.85
sppp_pap_openFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected