22 #if !defined(_AKA_RESULT_H_) |
22 #if !defined(_AKA_RESULT_H_) |
23 #define _AKA_RESULT_H_ |
23 #define _AKA_RESULT_H_ |
24 |
24 |
25 #include "eap_variable_data.h" |
25 #include "eap_variable_data.h" |
26 #include "eap_am_export.h" |
26 #include "eap_am_export.h" |
|
27 // Start: added by script change_export_macros.sh. |
|
28 #if defined(EAP_NO_EXPORT_EAP_TYPE_AKA_PAYLOADS_H) |
|
29 #define EAP_CLASS_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H EAP_NONSHARABLE |
|
30 #define EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H |
|
31 #define EAP_C_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H |
|
32 #define EAP_FUNC_EXPORT_EAP_TYPE_AKA_PAYLOADS_H |
|
33 #define EAP_C_FUNC_EXPORT_EAP_TYPE_AKA_PAYLOADS_H |
|
34 #elif defined(EAP_EXPORT_EAP_TYPE_AKA_PAYLOADS_H) |
|
35 #define EAP_CLASS_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H EAP_EXPORT |
|
36 #define EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H EAP_FUNC_EXPORT |
|
37 #define EAP_C_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H EAP_C_FUNC_EXPORT |
|
38 #define EAP_FUNC_EXPORT_EAP_TYPE_AKA_PAYLOADS_H EAP_FUNC_EXPORT |
|
39 #define EAP_C_FUNC_EXPORT_EAP_TYPE_AKA_PAYLOADS_H EAP_C_FUNC_EXPORT |
|
40 #else |
|
41 #define EAP_CLASS_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H EAP_IMPORT |
|
42 #define EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H EAP_FUNC_IMPORT |
|
43 #define EAP_C_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H EAP_C_FUNC_IMPORT |
|
44 #define EAP_FUNC_EXPORT_EAP_TYPE_AKA_PAYLOADS_H |
|
45 #define EAP_C_FUNC_EXPORT_EAP_TYPE_AKA_PAYLOADS_H |
|
46 #endif |
|
47 // End: added by script change_export_macros.sh. |
27 #include "eap_type_aka_header.h" |
48 #include "eap_type_aka_header.h" |
28 |
49 |
29 |
50 |
30 |
51 |
31 class EAP_EXPORT aka_fixed_data_c |
52 class EAP_CLASS_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H aka_fixed_data_c |
32 { |
53 { |
33 private: |
54 private: |
34 //-------------------------------------------------- |
55 //-------------------------------------------------- |
35 |
56 |
36 bool m_is_valid; |
57 bool m_is_valid; |
44 |
65 |
45 //-------------------------------------------------- |
66 //-------------------------------------------------- |
46 public: |
67 public: |
47 //-------------------------------------------------- |
68 //-------------------------------------------------- |
48 |
69 |
49 EAP_FUNC_IMPORT virtual ~aka_fixed_data_c(); |
70 EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H virtual ~aka_fixed_data_c(); |
50 |
71 |
51 EAP_FUNC_IMPORT aka_fixed_data_c( |
72 EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H aka_fixed_data_c( |
52 abs_eap_am_tools_c * const tools); |
73 abs_eap_am_tools_c * const tools); |
53 |
74 |
54 EAP_FUNC_IMPORT bool get_is_valid() const; |
75 EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H bool get_is_valid() const; |
55 |
76 |
56 EAP_FUNC_IMPORT const aka_payload_AT_header_c * get_original_header(); |
77 EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H const aka_payload_AT_header_c * get_original_header(); |
57 |
78 |
58 EAP_FUNC_IMPORT u16_t get_type(abs_eap_am_tools_c * const m_am_tools) const; |
79 EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H u16_t get_type(abs_eap_am_tools_c * const m_am_tools) const; |
59 |
80 |
60 EAP_FUNC_IMPORT u16_t get_data(abs_eap_am_tools_c * const m_am_tools) const; |
81 EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H u16_t get_data(abs_eap_am_tools_c * const m_am_tools) const; |
61 |
82 |
62 EAP_FUNC_IMPORT void set_data( |
83 EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H void set_data( |
63 const aka_payload_AT_header_c * const original_header, |
84 const aka_payload_AT_header_c * const original_header, |
64 const u16_t type, const u16_t data); |
85 const u16_t type, const u16_t data); |
65 |
86 |
66 //-------------------------------------------------- |
87 //-------------------------------------------------- |
67 }; // class aka_fixed_data_c |
88 }; // class aka_fixed_data_c |
68 |
89 |
69 |
90 |
70 class EAP_EXPORT aka_variable_data_c |
91 class EAP_CLASS_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H aka_variable_data_c |
71 { |
92 { |
72 private: |
93 private: |
73 //-------------------------------------------------- |
94 //-------------------------------------------------- |
74 |
95 |
75 abs_eap_am_tools_c * const m_am_tools; |
96 abs_eap_am_tools_c * const m_am_tools; |
86 |
107 |
87 //-------------------------------------------------- |
108 //-------------------------------------------------- |
88 public: |
109 public: |
89 //-------------------------------------------------- |
110 //-------------------------------------------------- |
90 |
111 |
91 EAP_FUNC_IMPORT virtual ~aka_variable_data_c(); |
112 EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H virtual ~aka_variable_data_c(); |
92 |
113 |
93 EAP_FUNC_IMPORT aka_variable_data_c(abs_eap_am_tools_c * const tools); |
114 EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H aka_variable_data_c(abs_eap_am_tools_c * const tools); |
94 |
115 |
95 EAP_FUNC_IMPORT const aka_payload_AT_header_c * get_original_header() const; |
116 EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H const aka_payload_AT_header_c * get_original_header() const; |
96 |
117 |
97 EAP_FUNC_IMPORT eap_status_e set_buffer( |
118 EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H eap_status_e set_buffer( |
98 const aka_payload_AT_header_c * const original_header, |
119 const aka_payload_AT_header_c * const original_header, |
99 u8_t *buffer, |
120 u8_t *buffer, |
100 const u32_t buffer_length, |
121 const u32_t buffer_length, |
101 const bool free_buffer, |
122 const bool free_buffer, |
102 const bool is_writable); |
123 const bool is_writable); |
103 |
124 |
104 EAP_FUNC_IMPORT bool get_payload_included() const; |
125 EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H bool get_payload_included() const; |
105 |
126 |
106 EAP_FUNC_IMPORT u32_t get_data_length() const; |
127 EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H u32_t get_data_length() const; |
107 |
128 |
108 EAP_FUNC_IMPORT u8_t * get_data(const u32_t data_length) const; |
129 EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H u8_t * get_data(const u32_t data_length) const; |
109 |
130 |
110 EAP_FUNC_IMPORT eap_variable_data_c * get_payload_buffer(); |
131 EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H eap_variable_data_c * get_payload_buffer(); |
111 |
132 |
112 EAP_FUNC_IMPORT bool get_is_valid() const; |
133 EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H bool get_is_valid() const; |
113 |
134 |
114 EAP_FUNC_IMPORT eap_status_e reset(); |
135 EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H eap_status_e reset(); |
115 |
136 |
116 //-------------------------------------------------- |
137 //-------------------------------------------------- |
117 }; // class aka_variable_data_c |
138 }; // class aka_variable_data_c |
118 |
139 |
119 |
140 |
120 //-------------------------------------------------- |
141 //-------------------------------------------------- |
121 |
142 |
122 |
143 |
123 // |
144 // |
124 class EAP_EXPORT aka_payloads_c |
145 class EAP_CLASS_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H aka_payloads_c |
125 { |
146 { |
126 private: |
147 private: |
127 //-------------------------------------------------- |
148 //-------------------------------------------------- |
128 |
149 |
129 abs_eap_am_tools_c * const m_am_tools; |
150 abs_eap_am_tools_c * const m_am_tools; |
193 eap_aka_payload_status_must_be, |
214 eap_aka_payload_status_must_be, |
194 eap_aka_payload_status_must_not_be |
215 eap_aka_payload_status_must_not_be |
195 }; |
216 }; |
196 |
217 |
197 |
218 |
198 EAP_FUNC_IMPORT virtual ~aka_payloads_c(); |
219 EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H virtual ~aka_payloads_c(); |
199 |
220 |
200 EAP_FUNC_IMPORT aka_payloads_c( |
221 EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H aka_payloads_c( |
201 abs_eap_am_tools_c * const tools); |
222 abs_eap_am_tools_c * const tools); |
202 |
223 |
203 EAP_FUNC_IMPORT bool check_one_payload( |
224 EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H bool check_one_payload( |
204 const eap_aka_payload_status_e status, |
225 const eap_aka_payload_status_e status, |
205 const aka_variable_data_c * const payload); |
226 const aka_variable_data_c * const payload); |
206 |
227 |
207 /** This function checks the correct set of payloads are included in the message. |
228 /** This function checks the correct set of payloads are included in the message. |
208 * NOTE do not change the order of parameters. |
229 * NOTE do not change the order of parameters. |
209 * Add new payload type to the last of the parameter list. |
230 * Add new payload type to the last of the parameter list. |
210 */ |
231 */ |
211 EAP_FUNC_IMPORT bool check_payloads( |
232 EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H bool check_payloads( |
212 const eap_aka_payload_status_e nonce_s, |
233 const eap_aka_payload_status_e nonce_s, |
213 const eap_aka_payload_status_e MAC, |
234 const eap_aka_payload_status_e MAC, |
214 const eap_aka_payload_status_e ENCR_DATA, |
235 const eap_aka_payload_status_e ENCR_DATA, |
215 const eap_aka_payload_status_e IDENTITY, |
236 const eap_aka_payload_status_e IDENTITY, |
216 const eap_aka_payload_status_e padding, |
237 const eap_aka_payload_status_e padding, |
351 void set_includes_other_version_than_1(const bool includes_other_version_than_1); |
372 void set_includes_other_version_than_1(const bool includes_other_version_than_1); |
352 |
373 |
353 bool get_includes_other_version_than_1(); |
374 bool get_includes_other_version_than_1(); |
354 |
375 |
355 |
376 |
356 EAP_FUNC_IMPORT bool get_is_valid() const; |
377 EAP_FUNC_VISIBILITY_EAP_TYPE_AKA_PAYLOADS_H bool get_is_valid() const; |
357 |
378 |
358 //-------------------------------------------------- |
379 //-------------------------------------------------- |
359 }; // class aka_payloads_c |
380 }; // class aka_payloads_c |
360 |
381 |
361 |
382 |