5548e2fb54bef33df1ee261e69c0b8a332d12cec
[openwrt-10.03/.git] / package / broadcom-wl / src / driver / proto / eap.h
1 /*
2  * Extensible Authentication Protocol (EAP) definitions
3  *
4  * See
5  * RFC 2284: PPP Extensible Authentication Protocol (EAP)
6  *
7  * Copyright (C) 2002 Broadcom Corporation
8  *
9  * $Id$
10  */
11
12 #ifndef _eap_h_
13 #define _eap_h_
14
15 /* EAP packet format */
16 typedef struct {
17         unsigned char code;     /* EAP code */
18         unsigned char id;       /* Current request ID */
19         unsigned short length;  /* Length including header */
20         unsigned char type;     /* EAP type (optional) */
21         unsigned char data[1];  /* Type data (optional) */
22 } eap_header_t;
23
24 #define EAP_HEADER_LEN 4
25
26 /* EAP codes */
27 #define EAP_REQUEST     1
28 #define EAP_RESPONSE    2
29 #define EAP_SUCCESS     3
30 #define EAP_FAILURE     4
31
32 /* EAP types */
33 #define EAP_IDENTITY            1
34 #define EAP_NOTIFICATION        2
35 #define EAP_NAK                 3
36 #define EAP_MD5                 4
37 #define EAP_OTP                 5
38 #define EAP_GTC                 6
39 #define EAP_TLS                 13
40 #define EAP_EXPANDED            254
41 #define BCM_EAP_SES             10
42 #define BCM_EAP_EXP_LEN         12  /* EAP_LEN 5 + 3 bytes for SMI ID + 4 bytes for ven type */
43 #define BCM_SMI_ID              0x113d
44
45 #endif /* _eap_h_ */