eap_ttls.h
Go to the documentation of this file.
00001 /*
00002  * EAP server/peer: EAP-TTLS (RFC 5281)
00003  * Copyright (c) 2004-2007, Jouni Malinen <j@w1.fi>
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License version 2 as
00007  * published by the Free Software Foundation.
00008  *
00009  * Alternatively, this software may be distributed under the terms of BSD
00010  * license.
00011  *
00012  * See README and COPYING for more details.
00013  */
00014 
00015 #ifndef EAP_TTLS_H
00016 #define EAP_TTLS_H
00017 
00018 struct ttls_avp {
00019         be32 avp_code;
00020         be32 avp_length; /* 8-bit flags, 24-bit length;
00021                           * length includes AVP header */
00022         /* optional 32-bit Vendor-ID */
00023         /* Data */
00024 };
00025 
00026 struct ttls_avp_vendor {
00027         be32 avp_code;
00028         be32 avp_length; /* 8-bit flags, 24-bit length;
00029                           * length includes AVP header */
00030         be32 vendor_id;
00031         /* Data */
00032 };
00033 
00034 #define AVP_FLAGS_VENDOR 0x80
00035 #define AVP_FLAGS_MANDATORY 0x40
00036 
00037 #define AVP_PAD(start, pos) \
00038 do { \
00039         int __pad; \
00040         __pad = (4 - (((pos) - (start)) & 3)) & 3; \
00041         os_memset((pos), 0, __pad); \
00042         pos += __pad; \
00043 } while (0)
00044 
00045 
00046 /* RFC 2865 */
00047 #define RADIUS_ATTR_USER_NAME 1
00048 #define RADIUS_ATTR_USER_PASSWORD 2
00049 #define RADIUS_ATTR_CHAP_PASSWORD 3
00050 #define RADIUS_ATTR_REPLY_MESSAGE 18
00051 #define RADIUS_ATTR_CHAP_CHALLENGE 60
00052 #define RADIUS_ATTR_EAP_MESSAGE 79
00053 
00054 /* RFC 2548 */
00055 #define RADIUS_VENDOR_ID_MICROSOFT 311
00056 #define RADIUS_ATTR_MS_CHAP_RESPONSE 1
00057 #define RADIUS_ATTR_MS_CHAP_ERROR 2
00058 #define RADIUS_ATTR_MS_CHAP_NT_ENC_PW 6
00059 #define RADIUS_ATTR_MS_CHAP_CHALLENGE 11
00060 #define RADIUS_ATTR_MS_CHAP2_RESPONSE 25
00061 #define RADIUS_ATTR_MS_CHAP2_SUCCESS 26
00062 #define RADIUS_ATTR_MS_CHAP2_CPW 27
00063 
00064 #define EAP_TTLS_MSCHAPV2_CHALLENGE_LEN 16
00065 #define EAP_TTLS_MSCHAPV2_RESPONSE_LEN 50
00066 #define EAP_TTLS_MSCHAP_CHALLENGE_LEN 8
00067 #define EAP_TTLS_MSCHAP_RESPONSE_LEN 50
00068 #define EAP_TTLS_CHAP_CHALLENGE_LEN 16
00069 #define EAP_TTLS_CHAP_PASSWORD_LEN 16
00070 
00071 #endif /* EAP_TTLS_H */


wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Jan 2 2014 11:26:37