-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheap_protocol.h
50 lines (38 loc) · 1.01 KB
/
eap_protocol.h
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
// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SHILL_EAP_PROTOCOL_H_
#define SHILL_EAP_PROTOCOL_H_
#include <base/compiler_specific.h>
namespace shill {
namespace eap_protocol {
struct ALIGNAS(1) Ieee8021xHdr {
uint8_t version;
uint8_t type;
uint16_t length;
};
enum IeeeEapolVersion {
kIeee8021xEapolVersion1 = 1,
kIeee8021xEapolVersion2 = 2
};
enum IeeeEapolType {
kIIeee8021xTypeEapPacket = 0,
kIIeee8021xTypeEapolStart = 1,
kIIeee8021xTypeEapolLogoff = 2,
kIIeee8021xTypeEapolKey = 3,
kIIeee8021xTypeEapolEncapsulatedAsfAlert = 4
};
struct ALIGNAS(1) EapHeader {
uint8_t code;
uint8_t identifier;
uint16_t length; // including code and identifier; network byte order
};
enum EapCode {
kEapCodeRequest = 1,
kEapCodeRespnose = 2,
kEapCodeSuccess = 3,
kEapCodeFailure = 4
};
} // namespace eap_protocol
} // namespace shill
#endif // SHILL_EAP_PROTOCOL_H_