]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/eap.h
pppd: Add support for registering ppp interface via Linux rtnetlink API
[ppp.git] / pppd / eap.h
index 087baad83eed8ca2dd4a2405626165d7e3ca66f7..5d582bc6e2db60ad61ec194ec55347674dcffa8e 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
 
@@ -59,6 +61,18 @@ extern "C" {
 #define        EAPT_NOKIACARD          18      /* Nokia IP smart card */
 #define        EAPT_SRP                19      /* Secure Remote Password */
 /* 20 is deprecated */
+#define        EAPT_TTLS               21      /* EAP Tunneled TLS Authentication Protocol RFC5281 */
+#define        EAPT_RAS                22      /* Remote Access Service */
+#define        EAPT_AKA                23      /* EAP method for 3rd Generation Authentication and Key Agreement RFC4187 */
+#define        EAPT_3COM               24      /* EAP-3Com Wireless */
+#define        EAPT_PEAP               25      /* Protected EAP */
+#define        EAPT_MSCHAPV2           26      /* EAP-MSCHAPv2 RFC-draft-kamath-pppext-eap-mschapv2-02 */
+
+/* OpCodes for MSCHAPv2 */
+#define CHAP_CHALLENGE         1
+#define CHAP_RESPONSE          2
+#define CHAP_SUCCESS           3
+#define CHAP_FAILURE           4
 
 /* EAP SRP-SHA1 Subtypes */
 #define        EAPSRP_CHALLENGE        1       /* Request 1 - Challenge */
@@ -98,6 +112,7 @@ enum eap_state_code {
        eapSRP2,        /* Sent EAP SRP-SHA1 Subtype 2 */
        eapSRP3,        /* Sent EAP SRP-SHA1 Subtype 3 */
        eapMD5Chall,    /* Sent MD5-Challenge */
+       eapMSCHAPv2Chall,       /* Sent MSCHAPv2-Challenge */
        eapOpen,        /* Completed authentication */
        eapSRP4,        /* Sent EAP SRP-SHA1 Subtype 4 */
        eapBadAuth      /* Failed authentication */
@@ -107,7 +122,7 @@ enum eap_state_code {
        "Initial", "Pending", "Closed", "Listen", "Identify", \
        "TlsStart", "TlsRecv", "TlsSendAck", "TlsSend", "TlsRecvAck", "TlsRecvClient",\
        "TlsSendAlert", "TlsRecvAlertAck" , "TlsRecvSuccess", "TlsRecvFailure", \
-       "SRP1", "SRP2", "SRP3", "MD5Chall", "Open", "SRP4", "BadAuth"
+       "SRP1", "SRP2", "SRP3", "MD5Chall", "MSCHAPv2Chall", "Open", "SRP4", "BadAuth"
 
 #ifdef USE_EAPTLS
 #define        eap_client_active(esp)  ((esp)->es_client.ea_state != eapInitial &&\
@@ -133,6 +148,9 @@ struct eap_auth {
        enum eap_state_code ea_state;
 #ifdef USE_EAPTLS
        enum eap_state_code ea_prev_state;
+#endif
+#ifdef CHAPMS
+        struct chap_digest_type *digest;
 #endif
        u_char ea_id;           /* Current id */
        u_char ea_requests;     /* Number of Requests sent/received */
@@ -151,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 USE_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 */
@@ -175,8 +196,8 @@ typedef struct eap_state {
 
 extern eap_state eap_states[];
 
-void eap_authwithpeer __P((int unit, char *localname));
-void eap_authpeer __P((int unit, char *localname));
+void eap_authwithpeer (int unit, char *localname);
+void eap_authpeer (int unit, char *localname);
 
 extern struct protent eap_protent;