|
1 /* |
|
2 * Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: EAP and WLAN authentication protocols. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // This is enumeration of EAPOL source code. |
|
20 #if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
|
21 #undef EAP_FILE_NUMBER_ENUM |
|
22 #define EAP_FILE_NUMBER_ENUM 25 |
|
23 #undef EAP_FILE_NUMBER_DATE |
|
24 #define EAP_FILE_NUMBER_DATE 1127594498 |
|
25 #endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
|
26 |
|
27 |
|
28 #error Do not use this anymore |
|
29 |
|
30 #include "eap_handle.h" |
|
31 |
|
32 |
|
33 EAP_FUNC_EXPORT eap_handle_c::~eap_handle_c() |
|
34 { |
|
35 } |
|
36 |
|
37 EAP_FUNC_EXPORT eap_handle_c::eap_handle_c( |
|
38 abs_eap_am_tools_c * const tools) |
|
39 : eap_variable_data_c(tools) |
|
40 , m_send_network_id(tools) |
|
41 , m_eap_type(eap_type_none) |
|
42 { |
|
43 } |
|
44 |
|
45 EAP_FUNC_EXPORT eap_handle_c::eap_handle_c( |
|
46 abs_eap_am_tools_c * const tools, |
|
47 eap_variable_data_c * const selector, |
|
48 const eap_am_network_id_c * const network_id, |
|
49 const eap_type_value_e p_eap_type) |
|
50 : eap_variable_data_c(tools) |
|
51 , m_send_network_id(tools, network_id) |
|
52 , m_eap_type(p_eap_type) |
|
53 { |
|
54 eap_status_e status = set_copy_of_buffer(selector); |
|
55 if (status != eap_status_ok) |
|
56 { |
|
57 return; |
|
58 } |
|
59 |
|
60 set_is_valid(); |
|
61 } |
|
62 |
|
63 EAP_FUNC_EXPORT eap_status_e eap_handle_c::set_handle( |
|
64 eap_variable_data_c * const selector, |
|
65 const eap_am_network_id_c * const network_id, |
|
66 const eap_type_value_e p_eap_type) |
|
67 { |
|
68 eap_status_e status = eap_status_process_general_error; |
|
69 |
|
70 if (selector != 0) |
|
71 { |
|
72 status = set_copy_of_buffer(selector); |
|
73 if (status != eap_status_ok) |
|
74 { |
|
75 return EAP_STATUS_RETURN(m_am_tools, status); |
|
76 } |
|
77 } |
|
78 |
|
79 if (network_id != 0) |
|
80 { |
|
81 status = m_send_network_id.set_copy_of_network_id(network_id); |
|
82 if (status != eap_status_ok) |
|
83 { |
|
84 return EAP_STATUS_RETURN(m_am_tools, status); |
|
85 } |
|
86 } |
|
87 |
|
88 m_eap_type = (p_eap_type); |
|
89 |
|
90 return EAP_STATUS_RETURN(m_am_tools, status); |
|
91 } |
|
92 |
|
93 EAP_FUNC_EXPORT eap_am_network_id_c * eap_handle_c::get_send_network_id() const |
|
94 { |
|
95 return &m_send_network_id; |
|
96 } |
|
97 |
|
98 EAP_FUNC_EXPORT eap_type_value_e eap_handle_c::get_eap_type() const |
|
99 { |
|
100 return m_eap_type; |
|
101 } |
|
102 |
|
103 EAP_FUNC_EXPORT void eap_handle_c::reset() |
|
104 { |
|
105 eap_variable_data_c::reset(); |
|
106 m_send_network_id.reset(); |
|
107 m_eap_type = eap_type_none; |
|
108 } |
|
109 |
|
110 |
|
111 |
|
112 |
|
113 |
|
114 // End. |