Symbian3/PDK/Source/GUID-88AB6957-6D2B-5668-8CC3-4E426E68C9B7.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Tue, 30 Mar 2010 11:56:28 +0100
changeset 5 f345bda72bc4
parent 3 46218c8b8afa
child 14 578be2adaf3e
permissions -rw-r--r--
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE task
  PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="GUID-88AB6957-6D2B-5668-8CC3-4E426E68C9B7" xml:lang="en"><title> Writing
an Outflow Hook Tutorial</title><shortdesc>This topic describes how to write an outflow hook. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
<steps id="GUID-D4E429B8-3A1C-588C-9EE6-F775E0313136">
<step id="GUID-8717451F-4919-56FB-B138-F345D33302E0"><cmd>The <xref href="GUID-1A52EC87-DAD1-32C8-B530-295A65EB7292.dita"><apiname>CIp6Hook()</apiname></xref> is
a base class for all hook protocols. </cmd>
</step>
<step id="GUID-E4679FA1-3277-5EC6-B626-19E5C4478A02"><cmd/>
<info>The <xref href="GUID-AA660261-7FCC-3F15-A105-56A3B4227F69.dita"><apiname>OpenL()</apiname></xref> function is used to open a hook for a
data flow </info>
</step>
<step id="GUID-17AFBFA2-AC47-58CA-9FDB-119983B4E78F"><cmd/>
<info>The following are the parameters of <codeph>OpenL()</codeph> function: </info>

<substeps id="GUID-C1E8AD02-7B40-5B25-869E-BA56463957C9">
<substep id="GUID-3E005B91-6025-5792-A4D3-42E5159770D8"><cmd/>
<info>aHead – Contains the address information of the flow </info>
</substep>
<substep id="GUID-482AA3EE-996F-5697-A818-F9AB2FDE11CE"><cmd/>
<info>aFlow – Flow for the active hook </info>
</substep>
</substeps>
</step>
<step id="GUID-70020D9B-F194-51D8-9E6B-C15F31EDE828"><cmd/>
<info>The <xref href="GUID-CC13332D-76B3-3991-AF40-1E5E949A2A39.dita"><apiname>ReadyL()</apiname></xref> function sets the data packet in a ready
state. </info>
</step>
<step id="GUID-1F43DE42-67CE-58A5-8C9F-744EA1C9006D"><cmd/>
<info>The IP protocol calls the <xref href="GUID-10F2F06B-003E-3F29-AE09-6A85D3682729.dita"><apiname>ApplyL()</apiname></xref> function to create
an outflow hook. The following are the parameters of an <codeph>ApplyL()</codeph> function: </info>

<substeps id="GUID-3CE4ED97-5233-5E44-A7EC-84DD3997F9C7">
<substep id="GUID-0ECFBF5A-C7EF-546F-9AF8-10EF2849C9C4"><cmd/>
<info>aPacket – A complete packet to be processed by the hook. It includes
the IP header </info>
</substep>
<substep id="GUID-AC6BEE87-5A0F-5B8C-9042-70EB01E572A4"><cmd/>
<info>aInfo - Information block associated with the packet </info>
</substep>
</substeps>
</step>
</steps>
<example><title>How to write an Outflow Hook example </title> <p>The following
is an example code for how to write an outflow hook: </p> <codeblock id="GUID-9FD24324-3B1C-5B2B-A811-79791E6DA0E7" xml:space="preserve">
MFlowHook* OpenL(TPacketHead &amp;aHead, CFlowContext *aFlow);
TInt ReadyL(TPacketHead&amp; aHead);
TInt ApplyL(RMBufSendPacket&amp; aPacket, RMBufSendInfo&amp; aInfo);
</codeblock> </example>
</taskbody><related-links>
<link href="GUID-340C57A4-B799-502D-8B86-39955E2F4268.dita"><linktext>Creating
an ESK File</linktext></link>
<link href="GUID-6998404B-CC51-5337-B04F-8444C32B99C9.dita"><linktext>Writing an
Inbound                 Hook</linktext></link>
</related-links></task>