Writing an Outflow Hook Tutorial

This topic describes how to write an outflow hook.

  1. The CIp6Hook() is a base class for all hook protocols.

  2. The OpenL() function is used to open a hook for a data flow

  3. The following are the parameters of OpenL() function:

    1. aHead – Contains the address information of the flow

    2. aFlow – Flow for the active hook

  4. The ReadyL() function sets the data packet in a ready state.

  5. The IP protocol calls the ApplyL() function to create an outflow hook. The following are the parameters of an ApplyL() function:

    1. aPacket – A complete packet to be processed by the hook. It includes the IP header

    2. aInfo - Information block associated with the packet

How to write an Outflow Hook example

The following is an example code for how to write an outflow hook:

MFlowHook* OpenL(TPacketHead &aHead, CFlowContext *aFlow);
TInt ReadyL(TPacketHead& aHead);
TInt ApplyL(RMBufSendPacket& aPacket, RMBufSendInfo& aInfo);
Related concepts
Creating an ESK File