equal
deleted
inserted
replaced
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 // |
7 // |
8 // Initial Contributors: |
8 // Initial Contributors: |
9 // Nokia Corporation - initial contribution. |
9 // Nokia Corporation - initial contribution. |
10 // |
10 // |
11 // Contributors: |
11 // Contributors: |
24 */ |
24 */ |
25 |
25 |
26 #ifndef __IN_CHK_H__ |
26 #ifndef __IN_CHK_H__ |
27 #define __IN_CHK_H__ |
27 #define __IN_CHK_H__ |
28 |
28 |
29 #include <nifmbuf.h> |
|
30 #include "in_pkt.h" |
29 #include "in_pkt.h" |
|
30 class RMBufChain; |
|
31 class RMBufPktInfo; |
31 |
32 |
32 /** Checksum calculation. |
33 /** Checksum calculation. |
33 |
34 |
34 @publishedAll |
35 @publishedAll |
35 @released |
36 @released |
36 */ |
37 */ |
37 class TChecksum { |
38 class TChecksum { |
38 public: |
39 public: |
39 // TChecksum can be initialized with an old inverted checksum |
40 // TChecksum can be initialized with an old inverted checksum |
40 TChecksum::TChecksum(TUint16 aSum = ~0) : iSum((TUint16)~aSum) {} |
41 TChecksum(TUint16 aSum = ~0) : iSum((TUint16)~aSum) {} |
41 inline void Init(TUint16 aSum = ~0); |
42 inline void Init(TUint16 aSum = ~0); |
42 |
43 |
43 inline TUint32 Sum(); |
44 inline TUint32 Sum(); |
44 inline TUint32 Sum32(); |
45 inline TUint32 Sum32(); |
45 inline void Fold(); |
46 inline void Fold(); |