X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Feap.h;h=8e363e9e59d173cbbaf02a3f3f676cfb1d7352c0;hb=76016e1b948b7d9675b4e0750d1f943d96d9523b;hp=956b2ea895c850ab3667c20d955742a3db6a3809;hpb=2883dd07101bf851e2ea368f0c04c91aea85cff2;p=ppp.git diff --git a/pppd/eap.h b/pppd/eap.h index 956b2ea..8e363e9 100644 --- a/pppd/eap.h +++ b/pppd/eap.h @@ -20,15 +20,21 @@ * $Id: eap.h,v 1.2 2003/06/11 23:56:26 paulus Exp $ */ -#include "pppdconf.h" - #ifndef PPP_EAP_H #define PPP_EAP_H +#include "pppdconf.h" + #ifdef __cplusplus extern "C" { #endif + +#ifndef PPP_EAP +#define PPP_EAP 0xc227 +#endif + + /* * Packet header = Code, id, length. */ @@ -88,7 +94,6 @@ extern "C" { #define SRP_PSEUDO_ID "pseudo_" #define SRP_PSEUDO_LEN 7 -#define MD5_SIGNATURE_SIZE 16 #define MIN_CHALLENGE_LENGTH 16 #define MAX_CHALLENGE_LENGTH 24 @@ -124,13 +129,13 @@ enum eap_state_code { "TlsSendAlert", "TlsRecvAlertAck" , "TlsRecvSuccess", "TlsRecvFailure", \ "SRP1", "SRP2", "SRP3", "MD5Chall", "MSCHAPv2Chall", "Open", "SRP4", "BadAuth" -#ifdef USE_EAPTLS +#ifdef PPP_WITH_EAPTLS #define eap_client_active(esp) ((esp)->es_client.ea_state != eapInitial &&\ (esp)->es_client.ea_state != eapPending &&\ (esp)->es_client.ea_state != eapClosed) #else #define eap_client_active(esp) ((esp)->es_client.ea_state == eapListen) -#endif /* USE_EAPTLS */ +#endif /* PPP_WITH_EAPTLS */ #define eap_server_active(esp) \ ((esp)->es_server.ea_state >= eapIdentify && \ @@ -146,10 +151,10 @@ struct eap_auth { u_short ea_namelen; /* Length of our name */ u_short ea_peerlen; /* Length of peer's name */ enum eap_state_code ea_state; -#ifdef USE_EAPTLS +#ifdef PPP_WITH_EAPTLS enum eap_state_code ea_prev_state; #endif -#ifdef CHAPMS +#ifdef PPP_WITH_CHAPMS struct chap_digest_type *digest; #endif u_char ea_id; /* Current id */ @@ -157,7 +162,7 @@ struct eap_auth { u_char ea_responses; /* Number of Responses */ u_char ea_type; /* One of EAPT_* */ u_int32_t ea_keyflags; /* SRP shared key usage flags */ -#ifdef USE_EAPTLS +#ifdef PPP_WITH_EAPTLS bool ea_using_eaptls; #endif }; @@ -169,6 +174,9 @@ typedef struct eap_state { int es_unit; /* Interface unit number */ struct eap_auth es_client; /* Client (authenticatee) data */ struct eap_auth es_server; /* Server (authenticator) data */ +#ifdef PPP_WITH_PEAP + struct peap_state *ea_peap; /* Client PEAP (authenticator) data */ +#endif int es_savedtime; /* Saved timeout */ int es_rechallenge; /* EAP rechallenge interval */ int es_lwrechallenge; /* SRP lightweight rechallenge inter */ @@ -182,12 +190,12 @@ typedef struct eap_state { * Timeouts. */ #define EAP_DEFTIMEOUT 3 /* Timeout (seconds) for rexmit */ -#ifdef USE_EAPTLS +#ifdef PPP_WITH_EAPTLS #define EAP_DEFTRANSMITS 30 /* max # times to transmit */ /* certificates can be long ... */ #else #define EAP_DEFTRANSMITS 10 /* max # times to transmit */ -#endif /* USE_EAPTLS */ +#endif /* PPP_WITH_EAPTLS */ #define EAP_DEFREQTIME 20 /* Time to wait for peer request */ #define EAP_DEFALLOWREQ 20 /* max # times to accept requests */