blob: 1135bd89f0490afc5afd08a46ee81c47efbc61c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
/*++
Module Name:
1x_eapol.h
Abstract:
Data structure and definition about EAPOL, EAP.
See also 1x_kmsm_eapolkey.h for EAPOL-Key.
--*/
#ifndef LIB1x_EAPOL_H
#define LIB1x_EAPOL_H
//#include <libnet.h>
//--------------------------------------------------
// IEEE 802.1x Implementation
//
// File : 1x_eapol.h
// Programmer : Arunesh Mishra
//
// This contains the EAPOL packet routine
// declarations.
//
//
// Copyright (c) Arunesh Mishra 2002
// All rights reserved.
// Maryland Information and Systems Security Lab
// University of Maryland, College Park.
//--------------------------------------------------
#define LIB1X_EAPOL_HDRLEN 4 // Just the header Note:
// is different from struct
#define LIB1X_EAPOL_LOGOFF 2 //0000 0010B
#define LIB1X_EAPOL_EAPPKT 0 //0000 0000B
#define LIB1X_EAPOL_START 1 //0000 0001B
#define LIB1X_EAPOL_KEY 3 //0000 0011B
#define LIB1X_EAPOL_ENCASFALERT 4 //0000 0100B
#ifdef _DATA_PATH
#define REALTEK_802dot1x_TYPE 0xcc
#endif
#define LIB1X_EAP_REQUEST 1
#define LIB1X_EAP_RESPONSE 2
#define LIB1X_EAP_SUCCESS 3
#define LIB1X_EAP_FAILURE 4
#define LIB1X_EAP_HDRLEN 4
#define LIB1X_EAP_RRIDENTITY 1
#define LIB1X_EAP_RRNOTIF 2
#define LIB1X_EAP_RRNAK 3
#define LIB1X_EAP_RRMD5 4
#define LIB1X_EAP_RROTP 5
#define LIB1X_EAP_RRGEN 6
#define LIB1x_EAP_RRLEN 1
#define LIB1X_EAPOL_VER 1 //00000001B
#define LIB1X_RC_LEN 8
#define LIB1X_IV_LEN 16
#define LIB1X_MIC_LEN 16
#define LIB1X_KEY_TYPE_RC4 1
#pragma pack (1) // Set our value.
typedef struct _EAPOL_STRUCT
{
u1Byte protocol_version;
u1Byte packet_type; // This makes it odd in number !
u2Byte packet_body_length;
} EAPOL_STRUCT, *PEAPOL_STRUCT;
typedef struct _EAP_STRUCT
{
u1Byte code; // Identifies the type of EAP packet.
u1Byte identifier; // Aids in matching responses with requests.
u2Byte length; // Length of EAP packet including code, id, len, data fields
} EAP_STRUCT, *PEAP_STRUCT;
#ifdef REMOVE_PACK
#pragma pack()
#endif
//#define EAPOL_PAIRWISE_KEY 0x80
//#define EAPOL_GROUP_KEY 0
//
//#define EAPOL_PAIRWISE_INDEX 0x3
//#define EAPOL_GROUP_INDEX 0x0
//struct lib1x_eapolkey_dot1x
//{
// u1Byte type;
// u2Byte length;
// u1Byte counter[LIB1X_RC_LEN];
// u1Byte iv[LIB1X_IV_LEN];
// u1Byte index;
// u1Byte mic[LIB1X_MIC_LEN];
// u1Byte material[1];
//};
//
//
//struct lib1x_eap_rr
//{
// u1Byte type; // The bytes after this are the data corresponding to the RR type
//};
//
//
#endif
|