wlan_bearer/wlanldd/wlan_common/umac_common/inc/umacprivacymodefilters.h
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2006-2009 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:   Declaration of the WlanPrivacyModeFilters class.
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: 7 %
       
    20 */
       
    21 
       
    22 #ifndef WLANPRIVACYMODEFILTERS_H
       
    23 #define WLANPRIVACYMODEFILTERS_H
       
    24 
       
    25 #include "umacoidmsg.h"
       
    26 #include "UmacPrivacyModeFilter.h"
       
    27 #include "UmacPrivacyModeFilterNone.h"
       
    28 #include "UmacPrivacyModeFilterWep.h"
       
    29 #include "UmacPrivacyModeFilterWpa.h"
       
    30 #include "UmacPrivacyModeFilter1x.h"
       
    31 #include "UmacPrivacyModeFilterMixedModeWep.h"
       
    32 #include "UmacPrivacyModeFilterMixedMode1x.h"
       
    33 #include "umacprivacymodefilterwapi.h"
       
    34 
       
    35 
       
    36 struct SDataFrameHeader;
       
    37 
       
    38 /**
       
    39  *  Privacy mode Rx filters context
       
    40  *
       
    41  *  @lib wlanumac.lib
       
    42  *  @since S60 v3.1
       
    43  */
       
    44 class WlanPrivacyModeFilters
       
    45     {
       
    46 
       
    47 public:
       
    48 
       
    49     /**
       
    50     * C++ default constructor.
       
    51     */
       
    52     inline WlanPrivacyModeFilters();
       
    53 
       
    54     /**
       
    55     * Destructor.
       
    56     */
       
    57     inline virtual ~WlanPrivacyModeFilters();
       
    58 
       
    59     /**
       
    60     * Sets desired privacy mode
       
    61     *
       
    62     * @since S60 3.1
       
    63     * @param aEncryptionStatus desired privacy mode
       
    64     * @return ETrue filter set success any other failure
       
    65     */
       
    66     virtual void SetActiveFilter( 
       
    67         TEncryptionStatus aEncryptionStatus );
       
    68 
       
    69     /**
       
    70     * Executes current privacy mode filter
       
    71     *
       
    72     * @since S60 3.1
       
    73     * @param aFrameheader Header of the received frame
       
    74     * @param aUserDataEnabled is protocol stack side datapath 
       
    75     *        enabled or not
       
    76     * @param aEthernetType Ethernet Type of the received frame
       
    77     * @param aUnicastKeyExists AP <-> client unicast key 
       
    78     *        is configured or not 
       
    79     * @param aAesOrTkipOrWapiEncrypted ETrue if the frame is encrypted with AES,
       
    80     *        TKIP or WAPI, EFalse otherwise
       
    81     * @return ETrue if frame can be accepted, EFalse otherwise
       
    82     */
       
    83     inline TBool ExecuteFilter( 
       
    84         const SDataFrameHeader& aFrameheader, 
       
    85         TBool aUserDataEnabled, 
       
    86         TUint16 aEthernetType,
       
    87         TBool aUnicastKeyExists, 
       
    88         TBool aAesOrTkipOrWapiEncrypted ) const;
       
    89 
       
    90 private:
       
    91 
       
    92     // Prohibit copy constructor
       
    93     WlanPrivacyModeFilters( const WlanPrivacyModeFilters& );
       
    94     // Prohibit assigment operator
       
    95     WlanPrivacyModeFilters& operator= 
       
    96         ( const WlanPrivacyModeFilters& );
       
    97 
       
    98 protected: // Data
       
    99 
       
   100     /** privacy mode none filter */
       
   101     WlanPrivacyModeFilterNone            iNone;
       
   102     /** privacy mode 802.11 WEP filter */
       
   103     WlanPrivacyModeFilterWep             iWep;
       
   104     /** privacy mode WPA filter */
       
   105     WlanPrivacyModeFilterWpa             iWpa;
       
   106     /** privacy mode 802.1x filter */
       
   107     WlanPrivacyModeFilter1x              i1x;
       
   108     /** privacy mode mixed cell filter */
       
   109     WlanPrivacyModeFilterMixedModeWep    iMixedModeWep;
       
   110     /** privacy mode 802.1x mixed cell filter */
       
   111     WlanPrivacyModeFilterMixedMode1x     iMixedMode1x;
       
   112     /** privacy mode WAPI filter */
       
   113     WlanPrivacyModeFilterWapi            iWapi;
       
   114     /** currently active privacy filter */
       
   115     MWlanPrivacyModeFilter*              iActiveFilter;
       
   116     };
       
   117 
       
   118 #include "umacprivacymodefilters.inl"
       
   119 
       
   120 #endif // WLANPRIVACYMODEFILTERS_H