eapol/eapol_framework/wapi_common/include/abs_wapi_wlan_authentication.h
changeset 18 7aac0b9e8906
parent 17 8840d3e38314
child 20 8b3129ac4c0f
equal deleted inserted replaced
17:8840d3e38314 18:7aac0b9e8906
     1 /*
       
     2 * ============================================================================
       
     3 *  Name        : ./accesssec/eapol/eapol_framework/wapi_common/include/abs_wapi_wlan_authentication.h
       
     4 *  Part of     : WAPI / WAPI       *** Info from the SWAD
       
     5 *  Description : WAPI authentication
       
     6 *  Version     : %version: 6.1.1 % << Don't touch! Updated by Synergy at check-out.
       
     7 *
       
     8 *  Copyright © 2001-2009 Nokia.  All rights reserved.
       
     9 *  This material, including documentation and any related computer
       
    10 *  programs, is protected by copyright controlled by Nokia.  All
       
    11 *  rights are reserved.  Copying, including reproducing, storing,
       
    12 *  adapting or translating, any or all of this material requires the
       
    13 *  prior written consent of Nokia.  This material also contains
       
    14 *  confidential information which may not be disclosed to others
       
    15 *  without the prior written consent of Nokia.
       
    16 * ============================================================================
       
    17 * Template version: 4.2
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 #if !defined(_ABS_WAPI_WLAN_AUTHENTICATION_H_)
       
    23 #define _ABS_WAPI_WLAN_AUTHENTICATION_H_
       
    24 
       
    25 #include "eap_header.h" // << TODO: this needs to be created
       
    26 #include "eap_array.h"
       
    27 
       
    28 class abs_wapi_core_c;
       
    29 class eap_am_network_id_c;
       
    30 class eap_buf_chain_wr_c;
       
    31 class eapol_session_key_c;
       
    32 class abs_eap_state_notification_c;
       
    33 
       
    34 /// The abs_wapi_wlan_authentication_c class defines the interface 
       
    35 /// the wapi_wlan_authentication_c class will use with its partner class.
       
    36 class EAP_EXPORT abs_wapi_wlan_authentication_c
       
    37 {
       
    38 private:
       
    39 	//--------------------------------------------------
       
    40 
       
    41 	//--------------------------------------------------
       
    42 protected:
       
    43 	//--------------------------------------------------
       
    44 
       
    45 	//--------------------------------------------------
       
    46 public:
       
    47 	//--------------------------------------------------
       
    48 
       
    49 	// 
       
    50 	virtual ~abs_wapi_wlan_authentication_c()
       
    51 	{
       
    52 	}
       
    53 
       
    54 	// 
       
    55 	abs_wapi_wlan_authentication_c()
       
    56 	{
       
    57 	}
       
    58 
       
    59 	// Look at abs_eap_base_type_c::packet_send().
       
    60 	virtual eap_status_e packet_send(
       
    61 		const eap_am_network_id_c * const send_network_id, ///< source includes local address, destination includes remote address.
       
    62 		eap_buf_chain_wr_c * const sent_packet,
       
    63 		const u32_t header_offset,
       
    64 		const u32_t data_length,
       
    65 		const u32_t buffer_length) = 0;
       
    66 
       
    67 	// Look at abs_eap_base_type_c::get_header_offset().
       
    68 	virtual u32_t get_header_offset(
       
    69 		u32_t * const MTU,
       
    70 		u32_t * const trailer_length) = 0;
       
    71 
       
    72 	/**
       
    73 	 * This function call tells lower layer to associate with 
       
    74 	 * the selected 802.11 authentication mode.
       
    75 	 * In WAPI only the open mode is allowed.
       
    76 	 */
       
    77 	virtual eap_status_e associate(
       
    78 		eapol_key_802_11_authentication_mode_e authentication_mode) = 0;
       
    79 
       
    80 	/**
       
    81 	 * Lower layer must return value of self_disassociation when
       
    82 	 * it calls eapol_wlan_authentication_c::disassociation().
       
    83 	 * This tells eapol_wlan_authentication_c object the cause
       
    84 	 * of disassociation.
       
    85 	 */
       
    86 	virtual eap_status_e disassociate(
       
    87 		const eap_am_network_id_c * const receive_network_id, ///< source includes remote address, destination includes local address.
       
    88 		const bool self_disassociation) = 0;
       
    89 
       
    90 	/**
       
    91 	 * The packet_data_session_key() function passes one traffic encryption key to 
       
    92 	 * the lower layers. Ultimately the key can end up to the WLAN hardware.
       
    93 	 * @see abs_wapi_core_c::packet_data_session_key(). 
       
    94 	 */
       
    95 	virtual eap_status_e packet_data_session_key(
       
    96 		const eap_am_network_id_c * const send_network_id, ///< source includes local address, destination includes remote address.
       
    97 		const eapol_session_key_c * const key 
       
    98 		) = 0;
       
    99 
       
   100 	/**
       
   101 	 * This is notification of internal state transition.
       
   102 	 * This is used for notifications, debugging and protocol testing.
       
   103 	 * The primal notifications are eap_state_variable_e::eap_state_authentication_finished_successfully
       
   104 	 * and eap_state_variable_e::eap_state_authentication_terminated_unsuccessfully.
       
   105 	 * These two notifications are sent from WAPI layer (eap_protocol_layer_e::eap_protocol_layer_wapi).
       
   106 	 */
       
   107 	virtual void state_notification(
       
   108 		const abs_eap_state_notification_c * const state) = 0;
       
   109 
       
   110 	/**
       
   111 	 * This function call tells lower layer to re-associate with the selected network ID,
       
   112 	 * authentication type and WAPI BKID.
       
   113 	 */
       
   114 	virtual eap_status_e reassociate(
       
   115 		const eap_am_network_id_c * const send_network_id,
       
   116 		const eapol_key_authentication_type_e authentication_type,
       
   117 		const eap_variable_data_c * const BKID) = 0;
       
   118 
       
   119 	//--------------------------------------------------
       
   120 }; // class abs_wapi_wlan_authentication_c
       
   121 
       
   122 #endif //#if !defined(_ABS_WAPI_WLAN_AUTHENTICATION_H_)
       
   123 
       
   124 //--------------------------------------------------
       
   125 
       
   126 
       
   127 // End.