|
1 /* |
|
2 * Copyright (c) 2007 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 stack interface for Wimax. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #if !defined(_EAP_AM_WIMAX_AUTHENTICATION_H_) |
|
20 #define _EAP_AM_WIMAX_AUTHENTICATION_H_ |
|
21 |
|
22 #include <eap_am_export.h> |
|
23 #include <eap_status.h> |
|
24 #include <eap_header.h> |
|
25 #include <eap_array.h> |
|
26 |
|
27 class abs_eap_am_wimax_authentication_c; |
|
28 class abs_eap_am_tools_c; |
|
29 class abs_eap_base_type_c; |
|
30 class eap_base_type_c; |
|
31 class eap_am_network_id_c; |
|
32 class eap_type_selection_c; |
|
33 class abs_eapol_wlan_database_reference_if_c; |
|
34 class abs_eap_state_notification_c; |
|
35 |
|
36 /// This is interface to adaptation module of class eap_wimax_authentication_c. |
|
37 class EAP_EXPORT eap_am_wimax_authentication_c |
|
38 { |
|
39 private: |
|
40 //-------------------------------------------------- |
|
41 |
|
42 //-------------------------------------------------- |
|
43 protected: |
|
44 //-------------------------------------------------- |
|
45 |
|
46 //-------------------------------------------------- |
|
47 public: |
|
48 //-------------------------------------------------- |
|
49 |
|
50 // |
|
51 virtual ~eap_am_wimax_authentication_c(); |
|
52 |
|
53 EAP_FUNC_IMPORT static eap_am_wimax_authentication_c* new_eap_am_wimax_authentication( |
|
54 abs_eap_am_tools_c * const tools, |
|
55 const bool is_client_when_true, |
|
56 const abs_eapol_wlan_database_reference_if_c * const wimax_database_reference |
|
57 ); |
|
58 |
|
59 /// This is documented in abs_eap_stack_interface_c::get_is_valid(). |
|
60 virtual bool get_is_valid() = 0; |
|
61 |
|
62 /// This is documented in abs_eap_stack_interface_c::configure(). |
|
63 virtual eap_status_e configure() = 0; |
|
64 |
|
65 /// This is documented in abs_eap_stack_interface_c::shutdown(). |
|
66 virtual eap_status_e shutdown() = 0; |
|
67 |
|
68 /// Function sets the parther object of this object. |
|
69 virtual eap_status_e set_am_partner( |
|
70 abs_eap_am_wimax_authentication_c * am_partner |
|
71 ) = 0; |
|
72 |
|
73 /// Function resets current EAP-configuration. |
|
74 virtual eap_status_e reset_eap_configuration() = 0; |
|
75 |
|
76 /// This is documented in eap_wimax_authentication.h. |
|
77 virtual eap_status_e set_wimax_parameters( |
|
78 eap_variable_data_c* const routing_info, |
|
79 eap_variable_data_c* const nai_decoration) = 0; |
|
80 |
|
81 /** |
|
82 * The load_module() function function indicates the lower level to |
|
83 * load new module of EAP-type. |
|
84 * @param type is the requested EAP-type. |
|
85 * @param tunneling_type is the EAP-type that tunnels the type. When plain EAP-type is used this parameter is eap_type_none. |
|
86 * @param partner is pointer to the caller object. |
|
87 * The partner of the new created EAP-type object is the caller object. |
|
88 * @param eap_type is a pointer to a pointer of EAP-type object. |
|
89 * Adaptation module sets eap_type pointer to created EAP-type object. |
|
90 * @param is_client_when_true parameter indicates whether the network entity should |
|
91 * act as a client (true) or server (false), in terms of EAP-protocol whether |
|
92 * this network entity is EAP-supplicant (true) or EAP-authenticator (false). |
|
93 * @param receive_network_id includes the addresses (network identity) and packet type. |
|
94 */ |
|
95 virtual eap_status_e load_module( |
|
96 const eap_type_value_e type, |
|
97 const eap_type_value_e tunneling_type, |
|
98 abs_eap_base_type_c * const partner, |
|
99 eap_base_type_c ** const eap_type, |
|
100 const bool is_client_when_true, |
|
101 const eap_am_network_id_c * const receive_network_id ///< source includes remote address, destination includes local address. |
|
102 ) = 0; |
|
103 |
|
104 /** |
|
105 * The unload_module() function unloads the module of a EAP-type. |
|
106 * @param eap_type is the requested EAP-type. |
|
107 */ |
|
108 virtual eap_status_e unload_module( |
|
109 const eap_type_value_e type) = 0; |
|
110 |
|
111 /** |
|
112 * The read_configure() function reads the configuration data identified |
|
113 * by the field string of field_length bytes length. Adaptation module must direct |
|
114 * the query to some persistent store. |
|
115 * @see abs_eap_base_type_c::read_configure(). |
|
116 */ |
|
117 virtual eap_status_e read_configure( |
|
118 const eap_configuration_field_c * const field, |
|
119 eap_variable_data_c * const data) = 0; |
|
120 |
|
121 /** |
|
122 * The write_configure() function writes the configuration data identified |
|
123 * by the field string of field_length bytes length. Adaptation module must direct |
|
124 * the action to some persistent store. |
|
125 * @see abs_eap_base_type_c::write_configure(). |
|
126 */ |
|
127 virtual eap_status_e write_configure( |
|
128 const eap_configuration_field_c * const field, |
|
129 eap_variable_data_c * const data) = 0; |
|
130 |
|
131 /** |
|
132 * This function queries the validity of EAP-type. |
|
133 * Lower layer should return eap_status_ok if this EAP-type is supported. |
|
134 */ |
|
135 virtual eap_status_e check_is_valid_eap_type(const eap_type_value_e eap_type) = 0; |
|
136 |
|
137 /** |
|
138 * This function queries the list of supported EAP-types. |
|
139 * Lower layer should return eap_status_ok if this call succeeds. |
|
140 * @param eap_type_list will include the list of supported EAP-types. Each value in list |
|
141 * is type of u32_t and represent one supported EAP-type. List consists of subsequent u32_t type values. |
|
142 */ |
|
143 virtual eap_status_e get_eap_type_list( |
|
144 eap_array_c<eap_type_value_e> * const eap_type_list) = 0; |
|
145 |
|
146 /** |
|
147 * This is notification of internal state transition. |
|
148 * This is used for notifications, debugging and protocol testing. |
|
149 * The primal notifications are eap_state_variable_e::eap_state_authentication_finished_successfully |
|
150 * and eap_state_variable_e::eap_state_authentication_terminated_unsuccessfully. |
|
151 * These two notifications are sent from EAP-protocol layer (eap_protocol_layer_e::eap_protocol_layer_eap). |
|
152 */ |
|
153 virtual void state_notification( |
|
154 const abs_eap_state_notification_c * const state) = 0; |
|
155 |
|
156 //-------------------------------------------------- |
|
157 }; // class eap_am_wimax_authentication_c |
|
158 |
|
159 #endif //#if !defined(_EAP_AM_WIMAX_AUTHENTICATION_H_) |
|
160 |
|
161 //-------------------------------------------------- |
|
162 |
|
163 |
|
164 |
|
165 // End. |
|
166 |