|
1 /* |
|
2 * Copyright (c) 2005-2008 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: Implementation of the WlanPrivacyModeFilterNone class |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 11 % |
|
20 */ |
|
21 |
|
22 #include "config.h" |
|
23 #include "UmacPrivacyModeFilterNone.h" |
|
24 |
|
25 // ================= MEMBER FUNCTIONS ======================= |
|
26 |
|
27 // ----------------------------------------------------------------------------- |
|
28 // |
|
29 // ----------------------------------------------------------------------------- |
|
30 // |
|
31 TBool WlanPrivacyModeFilterNone::operator()( |
|
32 const SDataFrameHeader& aFrameheader, |
|
33 TBool aUserDataEnabled, |
|
34 TUint16 aEthernetType, |
|
35 TBool /* aUnicastKeyExists */, |
|
36 TBool /* aAesOrTkipOrWapiEncrypted */ ) const |
|
37 { |
|
38 TBool ret( EFalse ); |
|
39 |
|
40 if ( ( // allow all that have WEP bit off |
|
41 !( aFrameheader.IsWepBitSet() ) |
|
42 // AND are going to protocol stack |
|
43 && aEthernetType != KEapolType |
|
44 // AND user data is enabled |
|
45 && aUserDataEnabled |
|
46 ) |
|
47 // OR are EAPOL frames |
|
48 || aEthernetType == KEapolType |
|
49 // OR are our test frames |
|
50 || aEthernetType == KBounceType |
|
51 ) |
|
52 { |
|
53 ret = ETrue; |
|
54 } |
|
55 else |
|
56 { |
|
57 OsTracePrint( KRxFrame, (TUint8*) |
|
58 ("UMAC: WlanPrivacyModeFilterNone::operator: frame filtered") ); |
|
59 OsTracePrint( KRxFrame, (TUint8*) |
|
60 ("UMAC: WlanPrivacyModeFilterNone::operator: wep bit: %d"), |
|
61 aFrameheader.IsWepBitSet() ); |
|
62 OsTracePrint( KRxFrame, (TUint8*) |
|
63 ("UMAC: WlanPrivacyModeFilterNone::operator: ether type: 0x%04x"), |
|
64 aEthernetType ); |
|
65 OsTracePrint( KRxFrame, (TUint8*) |
|
66 ("UMAC: WlanPrivacyModeFilterNone::operator: UserDataEnabled: %d"), |
|
67 aUserDataEnabled ); |
|
68 } |
|
69 |
|
70 return ret; |
|
71 } |