1 /* eap.h
2  * Extenal definitions for EAP Extensible Authentication Protocol dissection
3  * RFC 2284, RFC 3748
4  *
5  * Wireshark - Network traffic analyzer
6  * By Gerald Combs <gerald@wireshark.org>
7  * Copyright 1998 Gerald Combs
8  *
9  * SPDX-License-Identifier: GPL-2.0-or-later
10  */
11 
12 #ifndef __EAP_H__
13 #define __EAP_H__
14 
15 #include "ws_symbol_export.h"
16 #include "value_string.h"
17 
18 /* http://www.iana.org/assignments/eap-numbers */
19 #define EAP_REQUEST     1
20 #define EAP_RESPONSE    2
21 #define EAP_SUCCESS     3
22 #define EAP_FAILURE     4
23 #define EAP_INITIATE    5 /* [RFC5296] */
24 #define EAP_FINISH      6 /* [RFC5296] */
25 
26 WS_DLL_PUBLIC const value_string eap_code_vals[];
27 
28 #define EAP_TYPE_ID          1
29 #define EAP_TYPE_NOTIFY      2
30 #define EAP_TYPE_NAK         3
31 #define EAP_TYPE_MD5         4
32 #define EAP_TYPE_TLS        13
33 #define EAP_TYPE_LEAP       17
34 #define EAP_TYPE_SIM        18
35 #define EAP_TYPE_TTLS       21
36 #define EAP_TYPE_AKA        23
37 #define EAP_TYPE_PEAP       25
38 #define EAP_TYPE_MSCHAPV2   26
39 #define EAP_TYPE_FAST       43
40 #define EAP_TYPE_PAX        46
41 #define EAP_TYPE_PSK        47
42 #define EAP_TYPE_SAKE       48
43 #define EAP_TYPE_AKA_PRIME  50
44 #define EAP_TYPE_GPSK       51
45 #define EAP_TYPE_TEAP       55
46 #define EAP_TYPE_EXT       254
47 
48 WS_DLL_PUBLIC value_string_ext eap_type_vals_ext;
49 
50 #define SIM_START 10
51 #define SIM_CHALLENGE 11
52 #define SIM_NOTIFICATION 12
53 #define SIM_RE_AUTHENTICATION 13
54 #define SIM_CLIENT_ERROR 14
55 
56 WS_DLL_PUBLIC const value_string eap_sim_subtype_vals[];
57 
58 #define AKA_CHALLENGE 1
59 #define AKA_AUTHENTICATION_REJECT 2
60 #define AKA_SYNCHRONIZATION_FAILURE 4
61 #define AKA_IDENTITY 5
62 #define AKA_NOTIFICATION 12
63 #define AKA_REAUTHENTICATION 13
64 #define AKA_CLIENT_ERROR 14
65 
66 WS_DLL_PUBLIC const value_string eap_aka_subtype_vals[];
67 
68 #define MS_CHAP_V2_CHALLENGE 1
69 #define MS_CHAP_V2_RESPONSE 2
70 #define MS_CHAP_V2_SUCCESS 3
71 #define MS_CHAP_V2_FAILURE 4
72 #define MS_CHAP_V2_CHANGE_PASSWORD 7
73 
74 WS_DLL_PUBLIC const value_string eap_ms_chap_v2_opcode_vals[];
75 
76 typedef struct _eap_vendor_context {
77   guint32   vendor_type;
78   guint32   vendor_id;
79   guint8    eap_code;
80   guint8    eap_identifier;
81 } eap_vendor_context;
82 
83 #endif
84