| 4219 | } |
| 4220 | |
| 4221 | static void |
| 4222 | sppp_chap_TO(void *cookie) |
| 4223 | { |
| 4224 | struct sppp *sp = (struct sppp *)cookie; |
| 4225 | STDDCL; |
| 4226 | |
| 4227 | SPPP_LOCK(sp); |
| 4228 | if (debug) |
| 4229 | log(LOG_DEBUG, SPP_FMT "chap TO(%s) rst_counter = %d\n", |
| 4230 | SPP_ARGS(ifp), |
| 4231 | sppp_state_name(sp->state[IDX_CHAP]), |
| 4232 | sp->rst_counter[IDX_CHAP]); |
| 4233 | |
| 4234 | if (--sp->rst_counter[IDX_CHAP] < 0) |
| 4235 | /* TO- event */ |
| 4236 | switch (sp->state[IDX_CHAP]) { |
| 4237 | case STATE_REQ_SENT: |
| 4238 | chap.tld(sp); |
| 4239 | sppp_cp_change_state(&chap, sp, STATE_CLOSED); |
| 4240 | break; |
| 4241 | } |
| 4242 | else |
| 4243 | /* TO+ (or TO*) event */ |
| 4244 | switch (sp->state[IDX_CHAP]) { |
| 4245 | case STATE_OPENED: |
| 4246 | /* TO* event */ |
| 4247 | sp->rst_counter[IDX_CHAP] = sp->lcp.max_configure; |
| 4248 | /* FALLTHROUGH */ |
| 4249 | case STATE_REQ_SENT: |
| 4250 | chap.scr(sp); |
| 4251 | /* sppp_cp_change_state() will restart the timer */ |
| 4252 | sppp_cp_change_state(&chap, sp, STATE_REQ_SENT); |
| 4253 | break; |
| 4254 | } |
| 4255 | |
| 4256 | SPPP_UNLOCK(sp); |
| 4257 | } |
| 4258 | |
| 4259 | static void |
| 4260 | sppp_chap_tlu(struct sppp *sp) |
nothing calls this directly
no test coverage detected