24#if PPP_SUPPORT && EAP_SUPPORT
38#define EAP_HEADERLEN 4
48#define EAPT_IDENTITY 1
49#define EAPT_NOTIFICATION 2
58#define EAPT_KEA_VALIDATE 12
60#define EAPT_DEFENDER 14
63#define EAPT_CISCOWIRELESS 17
64#define EAPT_NOKIACARD 18
69#define EAPSRP_CHALLENGE 1
72#define EAPSRP_CVALIDATOR 2
73#define EAPSRP_SVALIDATOR 3
75#define EAPSRP_LWRECHALLENGE 4
77#define SRPVAL_EBIT 0x00000001
79#define SRP_PSEUDO_ID "pseudo_"
80#define SRP_PSEUDO_LEN 7
82#define MD5_SIGNATURE_SIZE 16
83#define EAP_MIN_CHALLENGE_LENGTH 17
84#define EAP_MAX_CHALLENGE_LENGTH 24
85#define EAP_MIN_MAX_POWER_OF_TWO_CHALLENGE_LENGTH 3
88 "Initial", "Pending", "Closed", "Listen", "Identify", \
89 "SRP1", "SRP2", "SRP3", "MD5Chall", "Open", "SRP4", "BadAuth"
91#define eap_client_active(pcb) ((pcb)->eap.es_client.ea_state == eapListen)
93#define eap_server_active(pcb) \
94 ((pcb)->eap.es_server.ea_state >= eapIdentify && \
95 (pcb)->eap.es_server.ea_state <= eapMD5Chall)
118 char ea_peer[MAXNAMELEN +1];
123 enum eap_state_code ea_state;
131#ifndef EAP_MAX_CHALLENGE_LENGTH
132#define EAP_MAX_CHALLENGE_LENGTH 24
134typedef struct eap_state {
135 struct eap_auth es_client;
137 struct eap_auth es_server;
141 int es_lwrechallenge;
145 u_char es_challenge[EAP_MAX_CHALLENGE_LENGTH];
152#define EAP_DEFTIMEOUT 3
153#define EAP_DEFTRANSMITS 10
154#define EAP_DEFREQTIME 20
155#define EAP_DEFALLOWREQ 20
158void eap_authwithpeer(ppp_pcb *pcb,
const char *localname);
159void eap_authpeer(ppp_pcb *pcb,
const char *localname);
161extern const struct protent eap_protent;