tfTreckLogWrite

Jump to: navigation, search

Table of Contents >> IPsec/IKE Programmer's Reference >> Enhanced Logging for IPsec/IKE


#include <trsocket.h>


int tfTreckLogWrite (
tt32Bit module,
tt8Bit level,
ttCharPtr msgPtr,
tt32Bit length
);


Function Description

This is the default logging function called by Treck to output logging messages. The endpoint target is beyond the scope of this documentation. However, this function can be replaced by a user-defined function (noted as user_write here) by defining the following in <trsystem.h>:

 
#define tm_log_level_write user_write
 

Note that user_write must use the same prototype shown for tfTreckLogWrite().



Parameters

  • module
    This is set to one of the Modules.
  • level
    This is set to one of the Logging Levels.
  • msgPtr
    This pointer is set to the beginning of the log message that is to be output.
  • length
    This is set to the length in bytes of the message pointed to by msgPtr.



Returns

  • > 0
    This indicates success and is the number of characters written to the log.
  • <= 0
    This indicates failure. No further specifics are returned.



Table of Contents >> IPsec/IKE Programmer's Reference >> Enhanced Logging for IPsec/IKE