42 #include "netif/ppp/ppp_opts.h" 43 #if PPP_SUPPORT && EAP_SUPPORT 57 #define EAP_HEADERLEN 4 62 #define EAP_RESPONSE 2 67 #define EAPT_IDENTITY 1 68 #define EAPT_NOTIFICATION 2 70 #define EAPT_MD5CHAP 4 77 #define EAPT_KEA_VALIDATE 12 79 #define EAPT_DEFENDER 14 82 #define EAPT_CISCOWIRELESS 17 83 #define EAPT_NOKIACARD 18 88 #define EAPSRP_CHALLENGE 1 91 #define EAPSRP_CVALIDATOR 2 92 #define EAPSRP_SVALIDATOR 3 94 #define EAPSRP_LWRECHALLENGE 4 96 #define SRPVAL_EBIT 0x00000001 98 #define SRP_PSEUDO_ID "pseudo_" 99 #define SRP_PSEUDO_LEN 7 101 #define MD5_SIGNATURE_SIZE 16 102 #define EAP_MIN_CHALLENGE_LENGTH 17 103 #define EAP_MAX_CHALLENGE_LENGTH 24 104 #define EAP_MIN_MAX_POWER_OF_TWO_CHALLENGE_LENGTH 3 107 "Initial", "Pending", "Closed", "Listen", "Identify", \ 108 "SRP1", "SRP2", "SRP3", "MD5Chall", "Open", "SRP4", "BadAuth" 110 #define eap_client_active(pcb) ((pcb)->eap.es_client.ea_state == eapListen) 112 #define eap_server_active(pcb) \ 113 ((pcb)->eap.es_server.ea_state >= eapIdentify && \ 114 (pcb)->eap.es_server.ea_state <= eapMD5Chall) 120 enum eap_state_code {
137 char ea_peer[MAXNAMELEN +1];
142 enum eap_state_code ea_state;
150 #ifndef EAP_MAX_CHALLENGE_LENGTH 151 #define EAP_MAX_CHALLENGE_LENGTH 24 153 typedef struct eap_state {
154 struct eap_auth es_client;
156 struct eap_auth es_server;
160 int es_lwrechallenge;
164 u_char es_challenge[EAP_MAX_CHALLENGE_LENGTH];
171 #define EAP_DEFTIMEOUT 3 172 #define EAP_DEFTRANSMITS 10 173 #define EAP_DEFREQTIME 20 174 #define EAP_DEFALLOWREQ 20 177 void eap_authwithpeer(ppp_pcb *pcb,
const char *localname);
178 void eap_authpeer(ppp_pcb *pcb,
const char *localname);
180 extern const struct protent eap_protent;