tfUserIpsecExecute

Jump to: navigation, search

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


#include <trsocket.h>


int tfUserIpsecExecute (tt8Bit blockingMode);


Function Description

This executes the IPsec task.


Usage

This function executes the IPsec task. Proper use of this function is dependent on the context from within which it is called.

When using a multi-tasking Operating System:

Starting the IPsec Task:
  1. Call tfInitTreck(), tfInitTreckOptions(), and tfStartTreck().
  2. Create the task which will run the IPsec Task as required by the host Operating System.
  3. Call tfUserIpsecExecute(TM_BLOCKING_ON). The function will not return unless it has already been started (in which case the return value will be TM_EPERM).
  4. The IPsec Task will start when tfUseIpsec() is called.
Terminating the IPsec Task:
  1. The IPsec task will terminate when tfIpsecUninitialize() is called.

When using a looping executive (Super Loop):

Starting the IPsec Task:
  1. Call tfUserIpsecExecute(TM_BLOCKING_OFF) periodically.
  2. The IPsec Task will start when tfUseIpsec() is called.
Terminating the IPsec Task:
  1. The IPsec task will terminate when tfIpsecUninitialize() is called.


Parameters

  • blockingMode
    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