tfIkeUserExecute

Jump to: navigation, search

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


#include <trsocket.h>


int tfIkeUserExecute (tt8Bit blockingState);


Function Description

This executes the IKE task.


Usage

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

When using a multi-tasking Operating System:

Starting the IKE Task:
  1. Call tfInitTreck(), tfInitTreckOptions(), and tfStartTreck().
  2. Create the task which will run the IKE Task as required by the host Operating System.
  3. Call tfIkeUserExecute(TM_BLOCKING_ON). The function will not return unless it has already been started (in which case the return value will be TM_EPERM).
Terminating the IKE Task:
  1. Call tfIkeTaskShutdown() from a separate task. Note that this will terminate any IKE processing and remove all SAs.
  2. Call tfTimerExecute() to cleanup any remaining IKE structures and timers.

When using a looping executive (Super Loop):

Starting the IKE Task:
  1. Call tfIkeUserExecute(TM_BLOCKING_OFF) periodically.
Terminating the IKE Task:
  1. Call tfIkeTaskShutdown().
  2. Call tfIkeUserExecute(TM_BLOCKING_OFF).
  3. Call tfTimerExecute() to cleanup any remaining IKE structures and timers.

Limitations

The IKE Task is limited to processing incoming IKE messages and sending the associated response. The IKE Task also handles IKE shutdown.


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 IKE Task is already running.


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