/* * run the server state machine. */ static void eap_sim_stateenter(EAP_HANDLER *handler, struct eap_sim_server_state *ess, enum eapsim_serverstates newstate) { switch(newstate) { case eapsim_server_start: /* * send the EAP-SIM Start message, listing the * versions that we support. */ eap_sim_sendstart(handler); break; case eapsim_server_challenge: /* * send the EAP-SIM Challenge message. */ eap_sim_sendchallenge(handler); break; case eapsim_server_success: /* * send the EAP Success message */ eap_sim_sendsuccess(handler); handler->eap_ds->request->code = PW_EAP_SUCCESS; break; default: /* * nothing to do for this transition. */ break; } ess->state = newstate; /* build the target packet */ eap_sim_compose(handler); }
/** Run the server state machine * */ static void eap_sim_stateenter(eap_handler_t *handler, eap_sim_state_t *ess, enum eapsim_serverstates newstate) { switch(newstate) { /* * Send the EAP-SIM Start message, listing the versions that we support. */ case EAPSIM_SERVER_START: eap_sim_sendstart(handler); break; /* * Send the EAP-SIM Challenge message. */ case EAPSIM_SERVER_CHALLENGE: eap_sim_sendchallenge(handler); break; /* * Send the EAP Success message */ case EAPSIM_SERVER_SUCCESS: eap_sim_sendsuccess(handler); handler->eap_ds->request->code = PW_EAP_SUCCESS; break; /* * Nothing to do for this transition. */ default: break; } ess->state = newstate; /* build the target packet */ eap_sim_compose(handler); }