Lines Matching full:state
2 * fsm.c - {Link, IP} Control Protocol Finite State Machine.
76 * Initialize fsm state.
80 f->state = PPP_FSM_INITIAL; in fsm_init()
92 switch( f->state ){ in fsm_lowerup()
94 f->state = PPP_FSM_CLOSED; in fsm_lowerup()
99 f->state = PPP_FSM_STOPPED; in fsm_lowerup()
103 f->state = PPP_FSM_REQSENT; in fsm_lowerup()
108 FSMDEBUG(("%s: Up event in state %d!", PROTO_NAME(f), f->state)); in fsm_lowerup()
120 switch( f->state ){ in fsm_lowerdown()
122 f->state = PPP_FSM_INITIAL; in fsm_lowerdown()
126 f->state = PPP_FSM_STARTING; in fsm_lowerdown()
132 f->state = PPP_FSM_INITIAL; in fsm_lowerdown()
140 f->state = PPP_FSM_STARTING; in fsm_lowerdown()
147 f->state = PPP_FSM_STARTING; in fsm_lowerdown()
151 FSMDEBUG(("%s: Down event in state %d!", PROTO_NAME(f), f->state)); in fsm_lowerdown()
161 switch( f->state ){ in fsm_open()
163 f->state = PPP_FSM_STARTING; in fsm_open()
170 f->state = PPP_FSM_STOPPED; in fsm_open()
174 f->state = PPP_FSM_REQSENT; in fsm_open()
179 f->state = PPP_FSM_STOPPING; in fsm_open()
203 if( f->state != PPP_FSM_OPENED ) in terminate_layer()
219 f->state = nextstate == PPP_FSM_CLOSING ? PPP_FSM_CLOSED : PPP_FSM_STOPPED; in terminate_layer()
228 f->state = nextstate; in terminate_layer()
235 * the PPP_FSM_CLOSED state.
240 switch( f->state ){ in fsm_close()
242 f->state = PPP_FSM_INITIAL; in fsm_close()
245 f->state = PPP_FSM_CLOSED; in fsm_close()
248 f->state = PPP_FSM_CLOSING; in fsm_close()
270 switch (f->state) { in fsm_timeout()
277 f->state = (f->state == PPP_FSM_CLOSING)? PPP_FSM_CLOSED: PPP_FSM_STOPPED; in fsm_timeout()
294 f->state = PPP_FSM_STOPPED; in fsm_timeout()
303 if( f->state == PPP_FSM_ACKRCVD ) in fsm_timeout()
304 f->state = PPP_FSM_REQSENT; in fsm_timeout()
309 FSMDEBUG(("%s: Timeout event in state %d!", PROTO_NAME(f), f->state)); in fsm_timeout()
345 if( f->state == PPP_FSM_INITIAL || f->state == PPP_FSM_STARTING ){ in fsm_input()
346 FSMDEBUG(("fsm_input(%x): Rcvd packet in state %d.", in fsm_input()
347 f->protocol, f->state)); in fsm_input()
395 switch( f->state ){ in fsm_rconfreq()
409 f->state = PPP_FSM_REQSENT; in fsm_rconfreq()
415 f->state = PPP_FSM_REQSENT; in fsm_rconfreq()
437 if (f->state == PPP_FSM_ACKRCVD) { in fsm_rconfreq()
439 f->state = PPP_FSM_OPENED; in fsm_rconfreq()
443 f->state = PPP_FSM_ACKSENT; in fsm_rconfreq()
448 if (f->state != PPP_FSM_ACKRCVD) in fsm_rconfreq()
449 f->state = PPP_FSM_REQSENT; in fsm_rconfreq()
473 switch (f->state) { in fsm_rconfack()
480 f->state = PPP_FSM_ACKRCVD; in fsm_rconfack()
488 f->state = PPP_FSM_REQSENT; in fsm_rconfack()
493 f->state = PPP_FSM_OPENED; in fsm_rconfack()
504 f->state = PPP_FSM_REQSENT; in fsm_rconfack()
541 switch (f->state) { in fsm_rconfnakrej()
552 f->state = PPP_FSM_STOPPED; /* kludge for stopping CCP */ in fsm_rconfnakrej()
561 f->state = PPP_FSM_REQSENT; in fsm_rconfnakrej()
569 f->state = PPP_FSM_REQSENT; in fsm_rconfnakrej()
583 switch (f->state) { in fsm_rtermreq()
586 f->state = PPP_FSM_REQSENT; /* Start over but keep trying */ in fsm_rtermreq()
595 f->state = PPP_FSM_STOPPING; in fsm_rtermreq()
612 switch (f->state) { in fsm_rtermack()
615 f->state = PPP_FSM_CLOSED; in fsm_rtermack()
621 f->state = PPP_FSM_STOPPED; in fsm_rtermack()
627 f->state = PPP_FSM_REQSENT; in fsm_rtermack()
634 f->state = PPP_FSM_REQSENT; in fsm_rtermack()
656 if( f->state == PPP_FSM_ACKRCVD ) in fsm_rcoderej()
657 f->state = PPP_FSM_REQSENT; in fsm_rcoderej()
667 switch( f->state ){ in fsm_protreject()
673 f->state = PPP_FSM_CLOSED; in fsm_protreject()
686 f->state = PPP_FSM_STOPPED; in fsm_protreject()
696 FSMDEBUG(("%s: Protocol-reject event in state %d!", in fsm_protreject()
697 PROTO_NAME(f), f->state)); in fsm_protreject()
712 if( f->state != PPP_FSM_REQSENT && f->state != PPP_FSM_ACKRCVD && f->state != PPP_FSM_ACKSENT ){ in fsm_sconfreq()