tfUserIpsecHandoffExecute

Jump to: navigation, search

Table of Contents >> IPsec/IKE Programmer's Reference >> Independent IPsec/IKE Tasks


#include <trsocket.h>


int tfUserIpsecHandoffExecute (tt8Bit blockingMode);


Function Description

This executes the IPsec Handoff task.


Usage

When using an Operating System, create a task, and start it (but after tfInitTreck() and tfStartTreck() have been called). From that task call tfUserIpsecHandoffExecute() as described below. tfUserIpsecHandoffExecute() will return TM_EPERM when IPsec is not running.

The user can execute the IPsec handoff code in either blocking mode (typically from a task), or non blocking mode (typically from a main loop):

  • In blocking mode, call tfUserIpsecHandoffExecute(TM_BLOCKING_ON) once.
  • In non blocking mode, call tfUserIpsecHandoffExecute(TM_BLOCKING_OFF) periodically.


Note Note: The task can be started once tfUseIpsec() is called. The task may be stopped after tfIpsecUninitialize() has been called.


Finally, it's important to note that TM_IPSEC_HANDOFF_TASK_MAX_QUEUE_SIZE controls the maximum size of the buffers residing in the IPsec handoff task queue. When a new buffer would exceed this size, the queue refuses to accept it and it is discarded.


Parameters

  • blockingState
    This is set to either TM_BLOCKING_ON or TM_BLOCKING_OFF.



Returns

  • TM_ENOERROR
    This indicates success.
  • TM_EPERM
    This indicates that the IPsec Task is not running. This is because tfUseIpsec() has not been called.


Table of Contents >> IPsec/IKE Programmer's Reference >> Independent IPsec/IKE Tasks