23 #define _EAPOL_RC4_KEY_HEADER_H_ |
23 #define _EAPOL_RC4_KEY_HEADER_H_ |
24 |
24 |
25 #include "eapol_header.h" |
25 #include "eapol_header.h" |
26 #include "eapol_key_header.h" |
26 #include "eapol_key_header.h" |
27 #include "eap_general_header_base.h" |
27 #include "eap_general_header_base.h" |
|
28 #include "eap_am_export.h" |
|
29 // Start: added by script change_export_macros.sh. |
|
30 #if defined(EAP_NO_EXPORT_EAPOL_RC4_KEY_HEADER_H) |
|
31 #define EAP_CLASS_VISIBILITY_EAPOL_RC4_KEY_HEADER_H EAP_NONSHARABLE |
|
32 #define EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H |
|
33 #define EAP_C_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H |
|
34 #define EAP_FUNC_EXPORT_EAPOL_RC4_KEY_HEADER_H |
|
35 #define EAP_C_FUNC_EXPORT_EAPOL_RC4_KEY_HEADER_H |
|
36 #elif defined(EAP_EXPORT_EAPOL_RC4_KEY_HEADER_H) |
|
37 #define EAP_CLASS_VISIBILITY_EAPOL_RC4_KEY_HEADER_H EAP_EXPORT |
|
38 #define EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H EAP_FUNC_EXPORT |
|
39 #define EAP_C_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H EAP_C_FUNC_EXPORT |
|
40 #define EAP_FUNC_EXPORT_EAPOL_RC4_KEY_HEADER_H EAP_FUNC_EXPORT |
|
41 #define EAP_C_FUNC_EXPORT_EAPOL_RC4_KEY_HEADER_H EAP_C_FUNC_EXPORT |
|
42 #else |
|
43 #define EAP_CLASS_VISIBILITY_EAPOL_RC4_KEY_HEADER_H EAP_IMPORT |
|
44 #define EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H EAP_FUNC_IMPORT |
|
45 #define EAP_C_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H EAP_C_FUNC_IMPORT |
|
46 #define EAP_FUNC_EXPORT_EAPOL_RC4_KEY_HEADER_H |
|
47 #define EAP_C_FUNC_EXPORT_EAPOL_RC4_KEY_HEADER_H |
|
48 #endif |
|
49 // End: added by script change_export_macros.sh. |
|
50 |
28 |
51 |
29 |
52 |
30 //------------------------------------------------------ |
53 //------------------------------------------------------ |
31 |
54 |
32 |
55 |
126 EAPOL_RC4_EAPOL_KEY_MAXIMUM_SIZE = 0xffff, |
149 EAPOL_RC4_EAPOL_KEY_MAXIMUM_SIZE = 0xffff, |
127 }; |
150 }; |
128 |
151 |
129 |
152 |
130 // |
153 // |
131 EAP_FUNC_IMPORT virtual ~eapol_RC4_key_header_c(); |
154 EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H virtual ~eapol_RC4_key_header_c(); |
132 |
155 |
133 // |
156 // |
134 EAP_FUNC_IMPORT eapol_RC4_key_header_c( |
157 EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H eapol_RC4_key_header_c( |
135 abs_eap_am_tools_c * const tools, |
158 abs_eap_am_tools_c * const tools, |
136 void * const header_begin, |
159 void * const header_begin, |
137 const u32_t header_buffer_length); |
160 const u32_t header_buffer_length); |
138 |
161 |
139 EAP_FUNC_IMPORT eapol_protocol_version_e get_eapol_protocol_version() const; |
162 EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H eapol_protocol_version_e get_eapol_protocol_version() const; |
140 |
163 |
141 EAP_FUNC_IMPORT eapol_packet_type_e get_eapol_packet_type() const; |
164 EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H eapol_packet_type_e get_eapol_packet_type() const; |
142 |
165 |
143 EAP_FUNC_IMPORT u16_t get_eapol_packet_body_length() const; |
166 EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H u16_t get_eapol_packet_body_length() const; |
144 |
167 |
145 EAP_FUNC_IMPORT eapol_key_descriptor_type_e get_key_descriptor_type() const; |
168 EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H eapol_key_descriptor_type_e get_key_descriptor_type() const; |
146 |
169 |
147 EAP_FUNC_IMPORT u16_t get_key_length() const; |
170 EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H u16_t get_key_length() const; |
148 |
171 |
149 EAP_FUNC_IMPORT u8_t *get_replay_counter(); |
172 EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H u8_t *get_replay_counter(); |
150 |
173 |
151 EAP_FUNC_IMPORT u8_t *get_key_IV(); |
174 EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H u8_t *get_key_IV(); |
152 |
175 |
153 EAP_FUNC_IMPORT eapol_RC4_key_flags_e get_key_flag() const; |
176 EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H eapol_RC4_key_flags_e get_key_flag() const; |
154 |
177 |
155 EAP_FUNC_IMPORT u8_t get_key_index() const; |
178 EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H u8_t get_key_index() const; |
156 |
179 |
157 EAP_FUNC_IMPORT u8_t *get_key_signature() const; |
180 EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H u8_t *get_key_signature() const; |
158 |
181 |
159 EAP_FUNC_IMPORT static u16_t get_header_length(); |
182 EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H static u16_t get_header_length(); |
160 |
183 |
161 EAP_FUNC_IMPORT u8_t * get_key() const; |
184 EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H u8_t * get_key() const; |
162 |
185 |
163 // - - - - - - - - - - - - - - - - - - - - - - - - |
186 // - - - - - - - - - - - - - - - - - - - - - - - - |
164 |
187 |
165 EAP_FUNC_IMPORT eap_status_e set_eapol_protocol_version(eapol_protocol_version_e version); |
188 EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H eap_status_e set_eapol_protocol_version(eapol_protocol_version_e version); |
166 |
189 |
167 EAP_FUNC_IMPORT eap_status_e set_eapol_packet_type(eapol_packet_type_e type); |
190 EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H eap_status_e set_eapol_packet_type(eapol_packet_type_e type); |
168 |
191 |
169 EAP_FUNC_IMPORT eap_status_e set_eapol_packet_body_length(u16_t eapol_length); |
192 EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H eap_status_e set_eapol_packet_body_length(u16_t eapol_length); |
170 |
193 |
171 EAP_FUNC_IMPORT eap_status_e set_key_descriptor_type(eapol_key_descriptor_type_e eapol_key_descriptor_type); |
194 EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H eap_status_e set_key_descriptor_type(eapol_key_descriptor_type_e eapol_key_descriptor_type); |
172 |
195 |
173 EAP_FUNC_IMPORT eap_status_e set_key_length(u16_t length); |
196 EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H eap_status_e set_key_length(u16_t length); |
174 |
197 |
175 EAP_FUNC_IMPORT eap_status_e set_key_flag(eapol_RC4_key_flags_e flags); |
198 EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H eap_status_e set_key_flag(eapol_RC4_key_flags_e flags); |
176 |
199 |
177 EAP_FUNC_IMPORT eap_status_e set_key_index(u8_t index); |
200 EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H eap_status_e set_key_index(u8_t index); |
178 |
201 |
179 // - - - - - - - - - - - - - - - - - - - - - - - - |
202 // - - - - - - - - - - - - - - - - - - - - - - - - |
180 |
203 |
181 EAP_FUNC_IMPORT void zero_key_signature( |
204 EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H void zero_key_signature( |
182 abs_eap_am_tools_c * const m_am_tools |
205 abs_eap_am_tools_c * const m_am_tools |
183 ); |
206 ); |
184 |
207 |
185 // - - - - - - - - - - - - - - - - - - - - - - - - |
208 // - - - - - - - - - - - - - - - - - - - - - - - - |
186 |
209 |
187 EAP_FUNC_IMPORT eap_status_e check_header() const; |
210 EAP_FUNC_VISIBILITY_EAPOL_RC4_KEY_HEADER_H eap_status_e check_header() const; |
188 |
211 |
189 // |
212 // |
190 //-------------------------------------------------- |
213 //-------------------------------------------------- |
191 }; // class eapol_RC4_key_header_c |
214 }; // class eapol_RC4_key_header_c |
192 |
215 |