|
1 /* |
|
2 * Copyright (c) 2006 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: trace library |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 5 % |
|
20 */ |
|
21 |
|
22 #include "WlLddWlanLddConfig.h" |
|
23 #include "wlanlddcommon.h" |
|
24 |
|
25 |
|
26 // ======== LOCAL FUNCTIONS ======== |
|
27 |
|
28 // --------------------------------------------------------------------------- |
|
29 // |
|
30 // --------------------------------------------------------------------------- |
|
31 // |
|
32 void os_traceprint( TUint32 aLevel, const TUint8* aString ) |
|
33 { |
|
34 TraceDump( aLevel, (reinterpret_cast<const char*>(aString)) ); |
|
35 } |
|
36 |
|
37 // --------------------------------------------------------------------------- |
|
38 // |
|
39 // --------------------------------------------------------------------------- |
|
40 // |
|
41 void os_traceprint( TUint32 aLevel, const TUint8* aString, TUint32 aArg1 ) |
|
42 { |
|
43 TraceDump( aLevel, (reinterpret_cast<const char*>(aString), aArg1) ); |
|
44 } |
|
45 |
|
46 // --------------------------------------------------------------------------- |
|
47 // |
|
48 // --------------------------------------------------------------------------- |
|
49 // |
|
50 void os_traceprint( |
|
51 TUint32 aLevel, |
|
52 const TUint8* aString, |
|
53 const TUint8* aBeg, |
|
54 // one past last element to be traced |
|
55 const TUint8* aEnd ) |
|
56 { |
|
57 TraceDump( aLevel, (reinterpret_cast<const char*>(aString)) ); |
|
58 |
|
59 while ( aBeg != aEnd ) |
|
60 { |
|
61 TraceDump( aLevel, (("0x%02x"), *aBeg) ); |
|
62 ++aBeg; |
|
63 } |
|
64 } |
|
65 |
|
66 // --------------------------------------------------------------------------- |
|
67 // |
|
68 // --------------------------------------------------------------------------- |
|
69 // |
|
70 void os_traceprint( |
|
71 TUint32 aLevel, |
|
72 const TUint8* aString, |
|
73 const TMacAddress& aMac ) |
|
74 { |
|
75 TraceDump( aLevel, (reinterpret_cast<const char*>(aString)) ); |
|
76 TracePrint( aLevel, aMac ); |
|
77 } |
|
78 |
|
79 // --------------------------------------------------------------------------- |
|
80 // |
|
81 // --------------------------------------------------------------------------- |
|
82 // |
|
83 void os_traceprint( |
|
84 TUint32 aLevel, |
|
85 const TUint8* aString, |
|
86 const Sdot11MacHeader& aDot11Hdr ) |
|
87 { |
|
88 os_traceprint( aLevel, aString ); |
|
89 |
|
90 TraceDump( aLevel, (("frame control type: 0x%02x"), |
|
91 static_cast<TUint32>(aDot11Hdr.iFrameControl.iType) )); |
|
92 TraceDump(aLevel, (("frame control control: 0x%02x"), |
|
93 static_cast<TUint32>(aDot11Hdr.iFrameControl.iControl) )); |
|
94 os_traceprint(aLevel, (TUint8*)("address1:"), aDot11Hdr.iAddress1); |
|
95 os_traceprint(aLevel, (TUint8*)("address2:"), aDot11Hdr.iAddress2); |
|
96 os_traceprint(aLevel, (TUint8*)("address3:"), aDot11Hdr.iAddress3); |
|
97 TraceDump(aLevel, (("sequence control: 0x%02x"), |
|
98 static_cast<TUint32>(aDot11Hdr.iSeqCtl) )); |
|
99 } |