#include <cat/cat.h>
int catssl_setdb(catssl_info *info, catdb_func *func, void *handle);
NULL, session resumption will not be used. The handle argument can contain arbitrary data that will be passed to the function.
This function should match the following prototype:
typedef int catdb_func(int op,
const catdb_data *data,
void *handle);
The data argument is a structure that should look as follows:
typedef struct catdb_data {
cat_data key;
cat_data value;
} catdb_data;
where cat_data is the following structure:
typedef struct cat_data {
int len;
void *data;
} cat_data;
What the function is expected to do depends on the op argument. If successful, it should return 0. Any other return value is considered a fatal error.
The op argument should be one of the following values:
If the length of the supplied data is greater than zero, it is compared with the data stored under key in the database. If the data does not match, CAT_EBUSY is returned.
Returns CAT_OK.