Top |
int | pskc_global_init () |
void | pskc_global_done () |
void | (*pskc_log_func) () |
void | pskc_global_log () |
void | pskc_free () |
The library is initialized using pskc_global_init()
which is a
thread-unsafe function that should be called when the code that
needs the PSKC library functionality is initialized. When the
application no longer needs to use the PSKC Library, it can call
pskc_global_done()
to release resources.
The pskc_free()
function is used to de-allocate memory that was
allocated by the library earlier and returned to the caller.
For debugging, you can implement a function of the pskc_log_func
signature and call pskc_global_log()
to make the library output
some messages that may provide additional information.
int
pskc_global_init (void
);
This function initializes the PSKC library. Every user of this
library needs to call this function before using other functions.
You should call pskc_global_done()
when use of the PSKC library is
no longer needed.
void
pskc_global_done (void
);
This function deinitializes the PSKC library, which were
initialized using pskc_global_init()
. After calling this function,
no other PSKC library function may be called except for to
re-initialize the library using pskc_global_init()
.
void
pskc_global_log (pskc_log_func log_func
);
Enable global debug logging function. The function will be invoked to print various debugging information.
pskc_log_func
is of the form,
void (*pskc_log_func) (const char *msg);
The container and keypackage variables may be NULL if they are not relevant for the debug information printed.