26
|
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 |
* %version: 11 %
|
|
20 |
*/
|
|
21 |
|
|
22 |
#if !defined(_EAP_AM_STACK_H_)
|
|
23 |
#define _EAP_AM_STACK_H_
|
|
24 |
|
|
25 |
#include "eap_tools.h"
|
|
26 |
#include "eap_status.h"
|
|
27 |
#include "eap_am_export.h"
|
49
|
28 |
// Start: added by script change_export_macros.sh.
|
|
29 |
#if defined(EAP_NO_EXPORT_EAP_AM_STACK_H)
|
|
30 |
#define EAP_CLASS_VISIBILITY_EAP_AM_STACK_H EAP_NONSHARABLE
|
|
31 |
#define EAP_FUNC_VISIBILITY_EAP_AM_STACK_H
|
|
32 |
#define EAP_C_FUNC_VISIBILITY_EAP_AM_STACK_H
|
|
33 |
#define EAP_FUNC_EXPORT_EAP_AM_STACK_H
|
|
34 |
#define EAP_C_FUNC_EXPORT_EAP_AM_STACK_H
|
|
35 |
#elif defined(EAP_EXPORT_EAP_AM_STACK_H)
|
|
36 |
#define EAP_CLASS_VISIBILITY_EAP_AM_STACK_H EAP_EXPORT
|
|
37 |
#define EAP_FUNC_VISIBILITY_EAP_AM_STACK_H EAP_FUNC_EXPORT
|
|
38 |
#define EAP_C_FUNC_VISIBILITY_EAP_AM_STACK_H EAP_C_FUNC_EXPORT
|
|
39 |
#define EAP_FUNC_EXPORT_EAP_AM_STACK_H EAP_FUNC_EXPORT
|
|
40 |
#define EAP_C_FUNC_EXPORT_EAP_AM_STACK_H EAP_C_FUNC_EXPORT
|
|
41 |
#else
|
|
42 |
#define EAP_CLASS_VISIBILITY_EAP_AM_STACK_H EAP_IMPORT
|
|
43 |
#define EAP_FUNC_VISIBILITY_EAP_AM_STACK_H EAP_FUNC_IMPORT
|
|
44 |
#define EAP_C_FUNC_VISIBILITY_EAP_AM_STACK_H EAP_C_FUNC_IMPORT
|
|
45 |
#define EAP_FUNC_EXPORT_EAP_AM_STACK_H
|
|
46 |
#define EAP_C_FUNC_EXPORT_EAP_AM_STACK_H
|
|
47 |
#endif
|
|
48 |
// End: added by script change_export_macros.sh.
|
26
|
49 |
#include "eap_expanded_type.h"
|
|
50 |
#include "eap_array.h"
|
|
51 |
#include "eap_database_reference_if.h"
|
|
52 |
#include "eapol_key_types.h"
|
|
53 |
|
|
54 |
class abs_eap_am_message_if_c;
|
|
55 |
class eap_configuration_field_c;
|
|
56 |
class eap_variable_data_c;
|
|
57 |
class abs_eap_am_tools_c;
|
|
58 |
class abs_eap_base_type_c;
|
|
59 |
class eap_base_type_c;
|
|
60 |
class eap_am_network_id_c;
|
|
61 |
class abs_eap_am_stack_c;
|
|
62 |
class abs_eap_configuration_if_c;
|
|
63 |
|
|
64 |
/** @file */
|
|
65 |
|
|
66 |
/// This class is the common part of EAP message interface.
|
|
67 |
/// This class is interface to the message creation and parsing function.
|
49
|
68 |
class EAP_CLASS_VISIBILITY_EAP_AM_STACK_H eap_am_stack_c
|
26
|
69 |
: public eap_database_reference_if_c
|
|
70 |
{
|
|
71 |
|
|
72 |
private:
|
|
73 |
|
|
74 |
// ----------------------------------------------------------------------
|
|
75 |
|
|
76 |
public:
|
|
77 |
|
|
78 |
virtual ~eap_am_stack_c()
|
|
79 |
{
|
|
80 |
}
|
|
81 |
|
|
82 |
virtual bool get_is_valid() = 0;
|
|
83 |
|
|
84 |
virtual eap_status_e set_partner(
|
|
85 |
abs_eap_am_stack_c * const partner
|
|
86 |
#if defined(USE_EAP_SIMPLE_CONFIG)
|
|
87 |
, abs_eap_configuration_if_c * const configuration_if
|
|
88 |
#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
|
|
89 |
) = 0;
|
|
90 |
|
|
91 |
// This is documented in abs_eap_stack_interface_c::configure().
|
|
92 |
virtual eap_status_e configure(
|
|
93 |
const eap_variable_data_c * const client_configuration) = 0;
|
|
94 |
|
|
95 |
// This is documented in abs_eap_stack_interface_c::shutdown().
|
|
96 |
virtual eap_status_e shutdown() = 0;
|
|
97 |
|
|
98 |
virtual eap_status_e read_configure(
|
|
99 |
const eap_configuration_field_c * const field,
|
|
100 |
eap_variable_data_c * const data) = 0;
|
|
101 |
|
|
102 |
virtual eap_status_e set_timer(
|
|
103 |
abs_eap_base_timer_c * const p_initializer,
|
|
104 |
const u32_t p_id,
|
|
105 |
void * const p_data,
|
|
106 |
const u32_t p_time_ms) = 0;
|
|
107 |
|
|
108 |
virtual eap_status_e cancel_timer(
|
|
109 |
abs_eap_base_timer_c * const p_initializer,
|
|
110 |
const u32_t p_id) = 0;
|
|
111 |
|
|
112 |
virtual eap_status_e check_is_valid_eap_type(
|
|
113 |
const eap_type_value_e eap_type) = 0;
|
|
114 |
|
|
115 |
virtual eap_status_e get_eap_type_list(
|
|
116 |
eap_array_c<eap_type_value_e> * const eap_type_list) = 0;
|
|
117 |
|
|
118 |
virtual eap_status_e load_module(
|
|
119 |
const eap_type_value_e type,
|
|
120 |
const eap_type_value_e tunneling_type,
|
|
121 |
abs_eap_base_type_c * const partner,
|
|
122 |
eap_base_type_c ** const eap_type,
|
|
123 |
const bool is_client_when_true,
|
|
124 |
const eap_am_network_id_c * const receive_network_id) = 0;
|
|
125 |
|
|
126 |
virtual eap_status_e get_802_11_authentication_mode(
|
|
127 |
const eap_am_network_id_c * const receive_network_id,
|
|
128 |
const eapol_key_authentication_type_e authentication_type) = 0;
|
|
129 |
|
|
130 |
// ----------------------------------------------------------------------
|
|
131 |
};
|
|
132 |
|
49
|
133 |
EAP_FUNC_VISIBILITY_EAP_AM_STACK_H eap_am_stack_c * new_eap_am_stack_c(
|
26
|
134 |
abs_eap_am_tools_c * const tools,
|
|
135 |
const bool is_client_when_true);
|
|
136 |
|
|
137 |
#endif //#if !defined(_EAP_AM_STACK_H_)
|
|
138 |
|
|
139 |
|
|
140 |
//--------------------------------------------------
|
|
141 |
// End
|