Communication between libsasl and plug-ins is accomplished through the following structures:
sasl_utils_t – The sasl_utils_t structure contains a number of utility functions, along with the three contexts:
This structure contains a number of utility functions that serve as a convenience for plug-in writers. Many of the functions are pointers to public interfaces in libsasl. Plug-ins do not need to call libsasl directly, unless for some reason the plug-in needs to be a SASL consumer.
libsasl creates three contexts for sasl_utils_t:
sasl_conn_t *conn
sasl_rand_t *rpool
void *getopt_context
In some cases, such as loading plug-ins, the conn variable in sasl_utils_t is not actually associated with a connection. In other cases, conn is the SASL consumer's SASL connection context. The rpool variable is used for random number generation functions. getopt_context is the context that should be used with the getopt() function.
sasl_getopt_t(3SASL), sasl_log_t(3SASL), and sasl_getcallback_t(3SASL)
sasl_out_params_t – libsasl creates the sasl_out_params_t structure and passes the structure to mech_step() in the client or server. This structure communicates the following information to libsasl: authentication status, the authid, the authzid, maxbuf, the negotiated ssf, and information for encoding and decoding data
sasl_client_params_t – The sasl_client_params_t structure is used by libsasl to pass the client state to a SASL client mechanism. The client mechanism's mech_new(), mech_step(), and mech_idle() entry points are used to send this state data. The canon_user_client() entry point also requires client state to be passed along.
sasl_server_params_t – The sasl_server_params_t structure performs a similar function to sasl_client_params_t on the server side.