sasl_getcallback_t - callback function to lookup a sasl_callback_t for a connection — Cyrus SASL 2.1.27 documentation

- Home
- Cyrus IMAP
- Download
- Contribute

# sasl_getcallback_t - callback function to lookup a sasl_callback_t for a connection

## Synopsis

    #include <sasl/saslplug.h>

    int sasl_getcallback_t(sasl_conn_t *conn,
                   unsigned long callbacknum,
                             int (**proc)( ),
                             void **pcontext);

## Description

`int sasl_getcallback_t(sasl_conn_t *conn,`
`unsigned long callbacknum,`
`int (**proc)( ),`
`void **pcontext);`

  The sasl_getcallback_t() function is a callback to lookup a sasl_callback_t for a connection.

  Parameters: | conn – The connection to lookup a callback for. callbacknum – The number of the callback. proc – Pointer to the callback function. The value of proc is set to NULL upon failure. pcontext – Pointer to the callback context. The value of pcontext is set to NULL upon failure.

## Return value

SASL callback functions should return SASL return codes. See sasl_errors(3) for a complete list. `SASL_OK` typically indicates success.

- `SASL_FAIL`: Unable to find a callback of the requested type.
- `SASL_INTERACT`: The caller must use interaction to get data.

## Conforming to

RFC 4422

## See Also

sasl(3), sasl_errors(3), sasl_callbacks(3)