27 #include <abs_eap_core.h> |
27 #include <abs_eap_core.h> |
28 #include <abs_eap_wimax_authentication.h> |
28 #include <abs_eap_wimax_authentication.h> |
29 #include <eap_type_selection.h> |
29 #include <eap_type_selection.h> |
30 #include <eap_array.h> |
30 #include <eap_array.h> |
31 #include <abs_eap_am_tools.h> |
31 #include <abs_eap_am_tools.h> |
|
32 #include "eap_am_export.h" |
|
33 // Start: added by script change_export_macros.sh. |
|
34 #if defined(EAP_NO_EXPORT_EAP_WIMAX_AUTHENTICATION_H) |
|
35 #define EAP_CLASS_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H EAP_NONSHARABLE |
|
36 #define EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H |
|
37 #define EAP_C_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H |
|
38 #define EAP_FUNC_EXPORT_EAP_WIMAX_AUTHENTICATION_H |
|
39 #define EAP_C_FUNC_EXPORT_EAP_WIMAX_AUTHENTICATION_H |
|
40 #elif defined(EAP_EXPORT_EAP_WIMAX_AUTHENTICATION_H) |
|
41 #define EAP_CLASS_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H EAP_EXPORT |
|
42 #define EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H EAP_FUNC_EXPORT |
|
43 #define EAP_C_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H EAP_C_FUNC_EXPORT |
|
44 #define EAP_FUNC_EXPORT_EAP_WIMAX_AUTHENTICATION_H EAP_FUNC_EXPORT |
|
45 #define EAP_C_FUNC_EXPORT_EAP_WIMAX_AUTHENTICATION_H EAP_C_FUNC_EXPORT |
|
46 #else |
|
47 #define EAP_CLASS_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H EAP_IMPORT |
|
48 #define EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H EAP_FUNC_IMPORT |
|
49 #define EAP_C_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H EAP_C_FUNC_IMPORT |
|
50 #define EAP_FUNC_EXPORT_EAP_WIMAX_AUTHENTICATION_H |
|
51 #define EAP_C_FUNC_EXPORT_EAP_WIMAX_AUTHENTICATION_H |
|
52 #endif |
|
53 // End: added by script change_export_macros.sh. |
|
54 |
32 |
55 |
33 // FORWARD DECLARATIONS |
56 // FORWARD DECLARATIONS |
34 class eap_session_core_c; |
57 class eap_session_core_c; |
35 class eap_am_tools_symbian_c; |
58 class eap_am_tools_symbian_c; |
36 class eap_file_config_c; |
59 class eap_file_config_c; |
37 |
60 |
38 |
61 |
39 // CLASS DECLARATION |
62 // CLASS DECLARATION |
40 class EAP_EXPORT eap_wimax_authentication_c |
63 class EAP_CLASS_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H eap_wimax_authentication_c |
41 : public abs_eap_am_wimax_authentication_c |
64 : public abs_eap_am_wimax_authentication_c |
42 , public abs_eap_core_c |
65 , public abs_eap_core_c |
43 { |
66 { |
44 public: |
67 public: |
45 |
68 |
46 EAP_FUNC_IMPORT eap_wimax_authentication_c( |
69 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H eap_wimax_authentication_c( |
47 abs_eap_am_tools_c* const tools, |
70 abs_eap_am_tools_c* const tools, |
48 abs_eap_wimax_authentication_c* const partner, |
71 abs_eap_wimax_authentication_c* const partner, |
49 eap_am_wimax_authentication_c* const am_wauth, |
72 eap_am_wimax_authentication_c* const am_wauth, |
50 const bool is_client_when_true); |
73 const bool is_client_when_true); |
51 |
74 |
52 #if defined(EXPORT_DESTRUCTORS) |
75 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H virtual ~eap_wimax_authentication_c(); // For GCC compilation |
53 EAP_FUNC_IMPORT virtual ~eap_wimax_authentication_c(); // For GCC compilation |
|
54 #else |
|
55 virtual ~eap_wimax_authentication_c(); // For RVCT compilation |
|
56 #endif |
|
57 |
76 |
58 /////////////////////////////////// |
77 /////////////////////////////////// |
59 /* These are called by the lower */ |
78 /* These are called by the lower */ |
60 /* layer (= Wimax engine). */ |
79 /* layer (= Wimax engine). */ |
61 |
80 |
62 EAP_FUNC_IMPORT static eap_wimax_authentication_c* new_eap_wimax_authentication_c( |
81 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H static eap_wimax_authentication_c* new_eap_wimax_authentication_c( |
63 abs_eap_am_tools_c* const tools, |
82 abs_eap_am_tools_c* const tools, |
64 abs_eap_wimax_authentication_c* const partner, |
83 abs_eap_wimax_authentication_c* const partner, |
65 const bool is_client_when_true); |
84 const bool is_client_when_true); |
66 |
85 |
67 EAP_FUNC_IMPORT eap_status_e shutdown(); |
86 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H eap_status_e shutdown(); |
68 |
87 |
69 EAP_FUNC_IMPORT eap_status_e cancel_all_authentication_sessions(); |
88 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H eap_status_e cancel_all_authentication_sessions(); |
70 |
89 |
71 EAP_FUNC_IMPORT eap_status_e packet_process( |
90 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H eap_status_e packet_process( |
72 const eap_am_network_id_c * const receive_network_id, |
91 const eap_am_network_id_c * const receive_network_id, |
73 eap_general_header_base_c * const packet_data, |
92 eap_general_header_base_c * const packet_data, |
74 const u32_t packet_length); |
93 const u32_t packet_length); |
75 |
94 |
76 EAP_FUNC_IMPORT eap_status_e eap_acknowledge( |
95 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H eap_status_e eap_acknowledge( |
77 const eap_am_network_id_c * const receive_network_id); |
96 const eap_am_network_id_c * const receive_network_id); |
78 |
97 |
79 EAP_FUNC_IMPORT eap_status_e configure(); |
98 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H eap_status_e configure(); |
80 |
99 |
81 |
100 |
82 /** |
101 /** |
83 * This function indicates the routing realms and NAI decoration |
102 * This function indicates the routing realms and NAI decoration |
84 * to the adaptation module. The values are needed in the generation of |
103 * to the adaptation module. The values are needed in the generation of |
100 * a string in the format "{avp1|avp2|avp3}", which the EAP stack copies to NAI. The NAI |
119 * a string in the format "{avp1|avp2|avp3}", which the EAP stack copies to NAI. The NAI |
101 * above becomes |
120 * above becomes |
102 * "RoutingRealm2!RoutingRealm3!HomeRealm!{avp1|avp2|avp3}username@RoutingRealm1". |
121 * "RoutingRealm2!RoutingRealm3!HomeRealm!{avp1|avp2|avp3}username@RoutingRealm1". |
103 */ |
122 */ |
104 |
123 |
105 EAP_FUNC_IMPORT eap_status_e set_wimax_parameters( |
124 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H eap_status_e set_wimax_parameters( |
106 eap_variable_data_c* const routing_info, |
125 eap_variable_data_c* const routing_info, |
107 eap_variable_data_c* const nai_decoration); |
126 eap_variable_data_c* const nai_decoration); |
108 |
127 |
109 EAP_FUNC_IMPORT bool get_is_valid(); |
128 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H bool get_is_valid(); |
110 |
129 |
111 EAP_FUNC_IMPORT bool get_is_client(); |
130 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H bool get_is_client(); |
112 |
131 |
113 |
132 |
114 //-------------------------------------------------- |
133 //-------------------------------------------------- |
115 |
134 |
116 |
135 |
117 /////////////////////////////////////////// |
136 /////////////////////////////////////////// |
118 /* These are called by eap_session_core. */ |
137 /* These are called by eap_session_core. */ |
119 /* See abs_eap_core.h for descriptions. */ |
138 /* See abs_eap_core.h for descriptions. */ |
120 |
139 |
121 EAP_FUNC_IMPORT eap_status_e packet_send( |
140 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H eap_status_e packet_send( |
122 const eap_am_network_id_c * const network_id, |
141 const eap_am_network_id_c * const network_id, |
123 eap_buf_chain_wr_c * const sent_packet, |
142 eap_buf_chain_wr_c * const sent_packet, |
124 const u32_t header_offset, |
143 const u32_t header_offset, |
125 const u32_t data_length, |
144 const u32_t data_length, |
126 const u32_t buffer_length); |
145 const u32_t buffer_length); |
127 |
146 |
128 EAP_FUNC_IMPORT u32_t get_header_offset( |
147 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H u32_t get_header_offset( |
129 u32_t * const MTU, |
148 u32_t * const MTU, |
130 u32_t * const trailer_length); |
149 u32_t * const trailer_length); |
131 |
150 |
132 EAP_FUNC_IMPORT eap_status_e load_module( |
151 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H eap_status_e load_module( |
133 const eap_type_value_e type, |
152 const eap_type_value_e type, |
134 const eap_type_value_e /* tunneling_type */, |
153 const eap_type_value_e /* tunneling_type */, |
135 abs_eap_base_type_c * const partner, |
154 abs_eap_base_type_c * const partner, |
136 eap_base_type_c ** const eap_type, |
155 eap_base_type_c ** const eap_type, |
137 const bool is_client_when_true, |
156 const bool is_client_when_true, |
138 const eap_am_network_id_c * const receive_network_id); |
157 const eap_am_network_id_c * const receive_network_id); |
139 |
158 |
140 EAP_FUNC_IMPORT eap_status_e unload_module(const eap_type_value_e eap_type); |
159 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H eap_status_e unload_module(const eap_type_value_e eap_type); |
141 |
160 |
142 EAP_FUNC_IMPORT eap_status_e restart_authentication( |
161 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H eap_status_e restart_authentication( |
143 const eap_am_network_id_c * const receive_network_id, |
162 const eap_am_network_id_c * const receive_network_id, |
144 const bool is_client_when_true, |
163 const bool is_client_when_true, |
145 const bool force_clean_restart, |
164 const bool force_clean_restart, |
146 const bool from_timer = false); |
165 const bool from_timer = false); |
147 |
166 |
148 EAP_FUNC_IMPORT eap_status_e packet_data_crypto_keys( |
167 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H eap_status_e packet_data_crypto_keys( |
149 const eap_am_network_id_c * const send_network_id, |
168 const eap_am_network_id_c * const send_network_id, |
150 const eap_master_session_key_c * const master_session_key |
169 const eap_master_session_key_c * const master_session_key |
151 ); |
170 ); |
152 |
171 |
153 EAP_FUNC_IMPORT eap_status_e read_configure( |
172 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H eap_status_e read_configure( |
154 const eap_configuration_field_c * const field, |
173 const eap_configuration_field_c * const field, |
155 eap_variable_data_c * const data); |
174 eap_variable_data_c * const data); |
156 |
175 |
157 EAP_FUNC_IMPORT eap_status_e write_configure( |
176 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H eap_status_e write_configure( |
158 const eap_configuration_field_c * const field, |
177 const eap_configuration_field_c * const field, |
159 eap_variable_data_c * const data); |
178 eap_variable_data_c * const data); |
160 |
179 |
161 EAP_FUNC_IMPORT void state_notification( |
180 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H void state_notification( |
162 const abs_eap_state_notification_c * const state); |
181 const abs_eap_state_notification_c * const state); |
163 |
182 |
164 EAP_FUNC_IMPORT eap_status_e asynchronous_init_remove_eap_session( |
183 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H eap_status_e asynchronous_init_remove_eap_session( |
165 const eap_am_network_id_c * const send_network_id); |
184 const eap_am_network_id_c * const send_network_id); |
166 |
185 |
167 EAP_FUNC_IMPORT eap_status_e set_timer( |
186 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H eap_status_e set_timer( |
168 abs_eap_base_timer_c * const initializer, |
187 abs_eap_base_timer_c * const initializer, |
169 const u32_t id, |
188 const u32_t id, |
170 void * const data, |
189 void * const data, |
171 const u32_t time_ms); |
190 const u32_t time_ms); |
172 |
191 |
173 EAP_FUNC_IMPORT eap_status_e cancel_timer( |
192 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H eap_status_e cancel_timer( |
174 abs_eap_base_timer_c * const initializer, |
193 abs_eap_base_timer_c * const initializer, |
175 const u32_t id); |
194 const u32_t id); |
176 |
195 |
177 EAP_FUNC_IMPORT eap_status_e cancel_all_timers(); |
196 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H eap_status_e cancel_all_timers(); |
178 |
197 |
179 EAP_FUNC_IMPORT eap_status_e check_is_valid_eap_type(const eap_type_value_e eap_type); |
198 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H eap_status_e check_is_valid_eap_type(const eap_type_value_e eap_type); |
180 |
199 |
181 EAP_FUNC_IMPORT eap_status_e get_eap_type_list( |
200 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H eap_status_e get_eap_type_list( |
182 eap_array_c<eap_type_value_e> * const eap_type_list); |
201 eap_array_c<eap_type_value_e> * const eap_type_list); |
183 |
202 |
184 EAP_FUNC_IMPORT eap_status_e add_rogue_ap(eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list); |
203 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H eap_status_e add_rogue_ap(eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list); |
185 |
204 |
186 EAP_FUNC_IMPORT eap_status_e set_session_timeout( |
205 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H eap_status_e set_session_timeout( |
187 const u32_t session_timeout_ms); |
206 const u32_t session_timeout_ms); |
188 |
207 |
189 //-------------------------------------------------- |
208 //-------------------------------------------------- |
190 |
209 |
191 private: |
210 private: |
192 |
211 |
193 EAP_FUNC_IMPORT eap_status_e create_upper_stack(); |
212 EAP_FUNC_VISIBILITY_EAP_WIMAX_AUTHENTICATION_H eap_status_e create_upper_stack(); |
194 |
213 |
195 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
214 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
196 |
215 |
197 /// Pointer to the tools class |
216 /// Pointer to the tools class |
198 abs_eap_am_tools_c * m_am_tools; |
217 abs_eap_am_tools_c * m_am_tools; |