wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/abs_wlan_eapol_callback_interface.h
changeset 0 c40eb8fe8501
child 24 e717b8f55620
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2001-2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Interface to EAPOL authentication protocols.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef ABS_WLAN_EAPOL_CALLBACK_INTERFACE_H
       
    20 #define ABS_WLAN_EAPOL_CALLBACK_INTERFACE_H
       
    21 
       
    22 #include "core_type_list.h"
       
    23 #include "core_wlan_eapol_if_message.h"
       
    24 
       
    25 
       
    26 /// The abs_wlan_eapol_callback_interface_c class defines the interface the EAPOL
       
    27 /// will use with the partner class.
       
    28 class abs_wlan_eapol_callback_interface_c
       
    29 {
       
    30 public:
       
    31 	//--------------------------------------------------
       
    32 
       
    33 	// Destructor
       
    34 	virtual ~abs_wlan_eapol_callback_interface_c()
       
    35 	{
       
    36 	}
       
    37 
       
    38 	// Constructor
       
    39 	abs_wlan_eapol_callback_interface_c()
       
    40 	{
       
    41 	}
       
    42 
       
    43     /** 
       
    44      * EAPOL could send packets to partner class with this function.
       
    45      */
       
    46 	virtual core_error_e packet_send(
       
    47         network_id_c * send_network_id,
       
    48         u8_t * packet_data,
       
    49         u32_t packet_data_length,
       
    50         bool_t send_unencrypted ) = 0;
       
    51 
       
    52 	/**
       
    53 	 * This function call tells lower layer to associate with the selected 802.11 authentication mode.
       
    54 	 */
       
    55 	virtual core_error_e associate(
       
    56         wlan_eapol_if_eapol_key_authentication_mode_e authentication_mode ) = 0;
       
    57 
       
    58 	/**
       
    59 	 * Lower layer must return value of self_disassociation when it calls disassociation().
       
    60 	 * This tells the cause of disassociation.
       
    61 	 */
       
    62 	virtual core_error_e disassociate(
       
    63         network_id_c * receive_network_id,
       
    64 		const bool_t self_disassociation) = 0;
       
    65 
       
    66 	/**
       
    67 	 * The packet_data_session_key() function passes one traffic encryption key to 
       
    68 	 * the lower layers. Ultimately the key can end up to the WLAN hardware.
       
    69 	 */
       
    70 	virtual core_error_e packet_data_session_key(
       
    71         network_id_c * send_network_id,
       
    72         session_key_c * key
       
    73 		) = 0;
       
    74 
       
    75 	/**
       
    76 	 * This is notification of internal state transition.
       
    77 	 * This is used for notifications, debugging and protocol testing.
       
    78 	 * The primal notifications are wlan_eapol_if_eapol_wlan_authentication_state_authentication_successfull
       
    79 	 * and wlan_eapol_if_eap_state_authentication_terminated_unsuccessfully.
       
    80 	 * These two notifications are sent from EAP-protocol layer (wlan_eapol_if_eap_protocol_layer_eap).
       
    81 	 */
       
    82 	virtual void state_notification(
       
    83 		state_notification_c * state ) = 0;
       
    84 
       
    85 	/**
       
    86 	 * This function call tells lower layer to re-associate with the selected network ID,
       
    87 	 * authentication type and PMKID.
       
    88 	 */
       
    89 	virtual core_error_e reassociate(
       
    90         network_id_c * send_network_id,
       
    91         const wlan_eapol_if_eapol_key_authentication_type_e authentication_type,
       
    92         u8_t * PMKID,
       
    93         u32_t PMKID_length ) = 0;
       
    94 
       
    95     /**
       
    96      * The complete_check_pmksa_cache() function completes check_pmksa_cache query.
       
    97      */
       
    98     virtual core_error_e complete_check_pmksa_cache(
       
    99         core_type_list_c<network_id_c> & network_id_list ) = 0;
       
   100 
       
   101     /**
       
   102      * The complete_start_wpx_fast_roam_reassociation() function completes start_wpx_fast_roam_reassociation function.
       
   103      */
       
   104     virtual core_error_e complete_start_wpx_fast_roam_reassociation(
       
   105         network_id_c * receive_network_id,
       
   106         u8_t * reassociation_request_ie,
       
   107         u32_t reassociation_request_ie_length ) = 0;
       
   108 
       
   109     /**
       
   110      * The new_protected_setup_credentials() function gives credentials got from 
       
   111      * Protected Setup negotiation.
       
   112      */
       
   113     virtual core_error_e new_protected_setup_credentials(
       
   114         core_type_list_c< protected_setup_credential_c > & credential_list ) = 0;
       
   115 
       
   116     /**
       
   117      * The handle_error() function tells about error from EAPOL side.
       
   118      */
       
   119     virtual void handle_error(
       
   120         wlan_eapol_if_error_e errorcode,
       
   121         wlan_eapol_if_message_type_function_e function ) = 0;
       
   122 
       
   123 	//--------------------------------------------------
       
   124 }; // class abs_wlan_eapol_callback_interface_c
       
   125 
       
   126 #endif //#ifndef ABS_WLAN_EAPOL_CALLBACK_INTERFACE_H
       
   127 
       
   128 //--------------------------------------------------
       
   129 
       
   130 
       
   131 // End.