|
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // ip6_frag.h - hooks for IPv6 fragment header |
|
15 // The handler for IPv6 Fragment Header |
|
16 // |
|
17 |
|
18 |
|
19 |
|
20 /** |
|
21 @internalComponent |
|
22 */ |
|
23 #ifndef __IP6_FRAG_H__ |
|
24 #define __IP6_FRAG_H__ |
|
25 |
|
26 #include <in_bind.h> |
|
27 |
|
28 class CFragmentHeaderHook : public CIp6Hook |
|
29 { |
|
30 public: |
|
31 CFragmentHeaderHook(MNetworkService *aNetwork) : iNetwork(aNetwork) {} |
|
32 ~CFragmentHeaderHook() {} |
|
33 static CFragmentHeaderHook *NewL(MNetworkService *aNetwork); |
|
34 /** |
|
35 * Fragments complete IPv4 or IPv6 packet into fragments. |
|
36 * |
|
37 * When called, it has been determined that the packet needs |
|
38 * to be fragmented. |
|
39 * |
|
40 * @param aPacket The packet |
|
41 * @param aMtu The MTU (max frag size) |
|
42 * @retval aFragQ The fragmented result. |
|
43 */ |
|
44 virtual void Fragment(RMBufPacketBase &aPacket, TInt aMtu, RMBufPktQ &aFragQ) = 0; |
|
45 /** |
|
46 * Adds a new IPv4 fragment into reassembly. |
|
47 * |
|
48 * @param aPacket The fragment packet |
|
49 * @param aInfo The info associated with the fragment |
|
50 * @param aHdr The IPv4 header of the fragment |
|
51 */ |
|
52 virtual TInt Ip4ApplyL(RMBufRecvPacket &aPacket, RMBufRecvInfo &aInfo, const TInet6HeaderIP4 &aHdr) = 0; |
|
53 virtual void ConstructL() = 0; |
|
54 |
|
55 protected: |
|
56 MNetworkService *iNetwork; |
|
57 }; |
|
58 |
|
59 #endif |