blob: 34cf224679ee246fa672b50a3b593f9e62493dc5 [file] [log] [blame]
Paul Stewartac802ac2013-04-02 15:45:24 -07001// Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef SHILL_EAP_PROTOCOL_H_
6#define SHILL_EAP_PROTOCOL_H_
7
8#include <base/basictypes.h>
9#include <base/compiler_specific.h>
10
11namespace shill {
12
13namespace eap_protocol {
14
15struct ALIGNAS(1) Ieee8021xHdr {
16 uint8 version;
17 uint8 type;
18 uint16 length;
19};
20
21enum IeeeEapolVersion {
22 kIeee8021xEapolVersion2 = 2
23};
24
25enum IeeeEapolType {
26 kIIeee8021xTypeEapPacket = 0,
27 kIIeee8021xTypeEapolStart = 1,
28 kIIeee8021xTypeEapolLogoff = 2,
29 kIIeee8021xTypeEapolKey = 3,
30 kIIeee8021xTypeEapolEncapsulatedAsfAlert = 4
31};
32
33struct ALIGNAS(1) EapHeader {
34 uint8 code;
35 uint8 identifier;
36 uint16 length; // including code and identifier; network byte order
37};
38
39enum EapCode {
40 kEapCodeRequest = 1,
41 kEapCodeRespnose = 2,
42 kEapCodeSuccess = 3,
43 kEapCodeFailure = 4
44};
45
46} // namespace eap_protocol
47
48} // namespace shill
49
50#endif // SHILL_EAP_PROTOCOL_H_