eapol/eapol_framework/eapol_common/include/eapol_rsna_key_data_payloads.h
changeset 52 c23bdf5a328a
parent 33 938269283a16
equal deleted inserted replaced
51:e863583e6720 52:c23bdf5a328a
    22 #if !defined(_EAPOL_RSNA_KEY_DATA_PAYLOADS_H_)
    22 #if !defined(_EAPOL_RSNA_KEY_DATA_PAYLOADS_H_)
    23 #define _EAPOL_RSNA_KEY_DATA_PAYLOADS_H_
    23 #define _EAPOL_RSNA_KEY_DATA_PAYLOADS_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_EAPOL_RSNA_KEY_DATA_PAYLOADS_H)
       
    29 	#define EAP_CLASS_VISIBILITY_EAPOL_RSNA_KEY_DATA_PAYLOADS_H EAP_NONSHARABLE 
       
    30 	#define EAP_FUNC_VISIBILITY_EAPOL_RSNA_KEY_DATA_PAYLOADS_H 
       
    31 	#define EAP_C_FUNC_VISIBILITY_EAPOL_RSNA_KEY_DATA_PAYLOADS_H 
       
    32 	#define EAP_FUNC_EXPORT_EAPOL_RSNA_KEY_DATA_PAYLOADS_H 
       
    33 	#define EAP_C_FUNC_EXPORT_EAPOL_RSNA_KEY_DATA_PAYLOADS_H 
       
    34 #elif defined(EAP_EXPORT_EAPOL_RSNA_KEY_DATA_PAYLOADS_H)
       
    35 	#define EAP_CLASS_VISIBILITY_EAPOL_RSNA_KEY_DATA_PAYLOADS_H EAP_EXPORT 
       
    36 	#define EAP_FUNC_VISIBILITY_EAPOL_RSNA_KEY_DATA_PAYLOADS_H EAP_FUNC_EXPORT 
       
    37 	#define EAP_C_FUNC_VISIBILITY_EAPOL_RSNA_KEY_DATA_PAYLOADS_H EAP_C_FUNC_EXPORT 
       
    38 	#define EAP_FUNC_EXPORT_EAPOL_RSNA_KEY_DATA_PAYLOADS_H EAP_FUNC_EXPORT 
       
    39 	#define EAP_C_FUNC_EXPORT_EAPOL_RSNA_KEY_DATA_PAYLOADS_H EAP_C_FUNC_EXPORT 
       
    40 #else
       
    41 	#define EAP_CLASS_VISIBILITY_EAPOL_RSNA_KEY_DATA_PAYLOADS_H EAP_IMPORT 
       
    42 	#define EAP_FUNC_VISIBILITY_EAPOL_RSNA_KEY_DATA_PAYLOADS_H EAP_FUNC_IMPORT 
       
    43 	#define EAP_C_FUNC_VISIBILITY_EAPOL_RSNA_KEY_DATA_PAYLOADS_H EAP_C_FUNC_IMPORT 
       
    44 	#define EAP_FUNC_EXPORT_EAPOL_RSNA_KEY_DATA_PAYLOADS_H 
       
    45 	#define EAP_C_FUNC_EXPORT_EAPOL_RSNA_KEY_DATA_PAYLOADS_H 
       
    46 #endif
       
    47 // End: added by script change_export_macros.sh.
    27 #include "eapol_rsna_key_data_header.h"
    48 #include "eapol_rsna_key_data_header.h"
    28 #include "eap_array.h"
    49 #include "eap_array.h"
    29 
    50 
    30 
    51 
    31 
    52 
    32 class EAP_EXPORT eapol_rsna_variable_data_c
    53 class EAP_CLASS_VISIBILITY_EAPOL_RSNA_KEY_DATA_PAYLOADS_H eapol_rsna_variable_data_c
    33 : public eap_variable_data_c
    54 : public eap_variable_data_c
    34 {
    55 {
    35 private:
    56 private:
    36 	//--------------------------------------------------
    57 	//--------------------------------------------------
    37 
    58 
    45 
    66 
    46 	//--------------------------------------------------
    67 	//--------------------------------------------------
    47 public:
    68 public:
    48 	//--------------------------------------------------
    69 	//--------------------------------------------------
    49 
    70 
    50 	EAP_FUNC_IMPORT virtual ~eapol_rsna_variable_data_c();
    71 	EAP_FUNC_VISIBILITY_EAPOL_RSNA_KEY_DATA_PAYLOADS_H virtual ~eapol_rsna_variable_data_c();
    51 
    72 
    52 	EAP_FUNC_IMPORT eapol_rsna_variable_data_c(
    73 	EAP_FUNC_VISIBILITY_EAPOL_RSNA_KEY_DATA_PAYLOADS_H eapol_rsna_variable_data_c(
    53 		abs_eap_am_tools_c * const tools,
    74 		abs_eap_am_tools_c * const tools,
    54 		const bool is_RSNA_when_true,
    75 		const bool is_RSNA_when_true,
    55 		const bool is_WPXM_when_true);
    76 		const bool is_WPXM_when_true);
    56 
    77 
    57 	EAP_FUNC_IMPORT const eapol_rsna_key_data_header_c * get_original_header() const;
    78 	EAP_FUNC_VISIBILITY_EAPOL_RSNA_KEY_DATA_PAYLOADS_H const eapol_rsna_key_data_header_c * get_original_header() const;
    58 
    79 
    59 	EAP_FUNC_IMPORT eap_status_e set_buffer(
    80 	EAP_FUNC_VISIBILITY_EAPOL_RSNA_KEY_DATA_PAYLOADS_H eap_status_e set_buffer(
    60 		const eapol_rsna_key_data_header_c * const original_header,
    81 		const eapol_rsna_key_data_header_c * const original_header,
    61 		u8_t *buffer,
    82 		u8_t *buffer,
    62 		const u32_t buffer_length,
    83 		const u32_t buffer_length,
    63 		const bool free_buffer,
    84 		const bool free_buffer,
    64 		const bool is_writable);
    85 		const bool is_writable);
    69 
    90 
    70 //--------------------------------------------------
    91 //--------------------------------------------------
    71 
    92 
    72 
    93 
    73 // 
    94 // 
    74 class EAP_EXPORT eapol_rsna_key_data_payloads_c
    95 class EAP_CLASS_VISIBILITY_EAPOL_RSNA_KEY_DATA_PAYLOADS_H eapol_rsna_key_data_payloads_c
    75 {
    96 {
    76 private:
    97 private:
    77 	//--------------------------------------------------
    98 	//--------------------------------------------------
    78 
    99 
    79 	abs_eap_am_tools_c * const m_am_tools;
   100 	abs_eap_am_tools_c * const m_am_tools;
   116 		eapol_rsna_key_data_payload_status_must_be,
   137 		eapol_rsna_key_data_payload_status_must_be,
   117 		eapol_rsna_key_data_payload_status_must_not_be
   138 		eapol_rsna_key_data_payload_status_must_not_be
   118 	};
   139 	};
   119 
   140 
   120 
   141 
   121 	EAP_FUNC_IMPORT virtual ~eapol_rsna_key_data_payloads_c();
   142 	EAP_FUNC_VISIBILITY_EAPOL_RSNA_KEY_DATA_PAYLOADS_H virtual ~eapol_rsna_key_data_payloads_c();
   122 
   143 
   123 	EAP_FUNC_IMPORT eapol_rsna_key_data_payloads_c(
   144 	EAP_FUNC_VISIBILITY_EAPOL_RSNA_KEY_DATA_PAYLOADS_H eapol_rsna_key_data_payloads_c(
   124 		abs_eap_am_tools_c * const tools,
   145 		abs_eap_am_tools_c * const tools,
   125 		const bool is_RSNA_when_true,
   146 		const bool is_RSNA_when_true,
   126 		const bool is_WPXM_when_true);
   147 		const bool is_WPXM_when_true);
   127 
   148 
   128 	EAP_FUNC_IMPORT bool check_one_payload(
   149 	EAP_FUNC_VISIBILITY_EAPOL_RSNA_KEY_DATA_PAYLOADS_H bool check_one_payload(
   129 		const eapol_rsna_key_data_payload_status_e status,
   150 		const eapol_rsna_key_data_payload_status_e status,
   130 		const eapol_rsna_variable_data_c * const payload);
   151 		const eapol_rsna_variable_data_c * const payload);
   131 
   152 
   132 	EAP_FUNC_IMPORT bool check_one_payload(
   153 	EAP_FUNC_VISIBILITY_EAPOL_RSNA_KEY_DATA_PAYLOADS_H bool check_one_payload(
   133 		const eapol_rsna_key_data_payload_status_e status,
   154 		const eapol_rsna_key_data_payload_status_e status,
   134 		const eap_array_c<eap_variable_data_c> * const payload);
   155 		const eap_array_c<eap_variable_data_c> * const payload);
   135 
   156 
   136 	/** This function checks the correct set of payloads are included in the message.
   157 	/** This function checks the correct set of payloads are included in the message.
   137 	 *  NOTE do not change the order of parameters.
   158 	 *  NOTE do not change the order of parameters.
   138 	 *  Add new payload type to the last of the parameter list.
   159 	 *  Add new payload type to the last of the parameter list.
   139 	 */
   160 	 */
   140 	EAP_FUNC_IMPORT bool check_payloads(
   161 	EAP_FUNC_VISIBILITY_EAPOL_RSNA_KEY_DATA_PAYLOADS_H bool check_payloads(
   141 		const eapol_rsna_key_data_payload_status_e key_id_and_group_key,
   162 		const eapol_rsna_key_data_payload_status_e key_id_and_group_key,
   142 		const eapol_rsna_key_data_payload_status_e sta_key,
   163 		const eapol_rsna_key_data_payload_status_e sta_key,
   143 		const eapol_rsna_key_data_payload_status_e pmkid,
   164 		const eapol_rsna_key_data_payload_status_e pmkid,
   144 		const eapol_rsna_key_data_payload_status_e one_or_more_RSN_IE
   165 		const eapol_rsna_key_data_payload_status_e one_or_more_RSN_IE
   145 		);
   166 		);