Patch from Masao Nishiku to implement PEAP version 0. It works
[freeradius.git] / src / modules / rlm_eap / types / rlm_eap_peap / eap_peap.h
1 /*
2  * eap_peap.h 
3  *
4  * Version:     $Id$
5  *
6  *   This program is free software; you can redistribute it and/or modify
7  *   it under the terms of the GNU General Public License as published by
8  *   the Free Software Foundation; either version 2 of the License, or
9  *   (at your option) any later version.
10  *
11  *   This program is distributed in the hope that it will be useful,
12  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *   GNU General Public License for more details.
15  *
16  *   You should have received a copy of the GNU General Public License
17  *   along with this program; if not, write to the Free Software
18  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  * Copyright 2003 Alan DeKok <aland@freeradius.org>
21  */
22 #ifndef _EAP_PEAP_H
23 #define _EAP_PEAP_H
24
25 #include "rlm_eap.h"
26 #include "rlm_eap_tls.h"
27
28 typedef struct peap_tunnel_t {
29         VALUE_PAIR      *username;
30         VALUE_PAIR      *state;
31         int             status;
32         int             default_eap_type;
33 } peap_tunnel_t;
34
35 #define PEAP_STATUS_START_PART2 0
36 #define PEAP_STATUS_SENT_TLV_SUCCESS 1
37 #define PEAP_STATUS_SENT_TLV_FAILURE 2
38
39 #define EAP_TLV_SUCCESS (1)
40 #define EAP_TLV_FAILURE (2)
41 #define EAP_TLV_ACK_RESULT (3)
42
43 #define PW_EAP_TLV 33
44
45 /*
46  *      Process the PEAP portion of an EAP-PEAP request.
47  */
48 int eappeap_process(EAP_HANDLER *handler, tls_session_t *tls_session);
49 #endif /* _EAP_PEAP_H */