]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/eap.h
Fix include paths for plugins to use the public API of pppd
[ppp.git] / pppd / eap.h
index f72fe61bcbfe1c3d30379a42817d67e6b6530130..fbc72017da68a60ae74b2b425edf29db7ee2aeb9 100644 (file)
@@ -20,6 +20,8 @@
  * $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
 
@@ -122,13 +124,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 && \
@@ -144,15 +146,18 @@ 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 PPP_WITH_CHAPMS
+        struct chap_digest_type *digest;
 #endif
        u_char ea_id;           /* Current id */
        u_char ea_requests;     /* Number of Requests sent/received */
        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
 };
@@ -164,6 +169,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 */
@@ -177,12 +185,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 */