.TH "MEMCACHED_GET_SASL_CALLBACKS" "3" "April 14, 2011" "0.47" "libmemcached" .SH NAME memcached_get_sasl_callbacks \- libmemcached Documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .\" Man page generated from reStructeredText. . .SH LIBRARY .sp C Client Library for memcached (libmemcached, \-lmemcached) .SH SYNOPSIS .sp .nf .ft C #include void memcached_set_sasl_callbacks(memcached_st *ptr, const sasl_callback_t *callbacks) const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr) memcached_return memcached_set_sasl_auth_data(memcached_st *ptr, const char *username, const char *password) memcached_return memcached_destroy_sasl_auth_data(memcached_st *ptr) .ft P .fi .SH DESCRIPTION .sp libmemcached(3) allows you to plug in your own callbacks function used by libsasl to perform SASL authentication. .sp Please note that SASL requires the memcached binary protocol, and you have to specify the callbacks before you connect to the server. .sp memcached_set_sasl_auth_data() is a helper function for you defining the basic functionality for you, but it will store the username and password in memory. If you choose to use this method you have to call memcached_destroy_sasl_auth_data before calling memcached_free to avoid a memory leak. You should NOT call memcached_destroy_sasl_auth_data if you specify your own callback function with memcached_set_sasl_callbacks(). .sp You as a client user have to initialize libsasl by using sasl_client_init before enabling it in libmemcached, and you have to shut down libsasl by calling sasl_done() when you are done using SASL from libmemcached. .SH RETURN .sp memcached_get_sasl_callbacks() returns the callbacks currently used by this memcached handle. memcached_get_sasl_set_auth_data() returns MEMCACHED_SUCCESS upon success. .SH HOME .sp To find out more information please check: \fI\%http://libmemcached.org/\fP .SH AUTHOR .sp Brian Aker, <\fI\%brian@tangent.org\fP> .sp Trond Norbye, <\fI\%trond.norbye@gmail.com\fP> .SH SEE ALSO .sp \fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP .SH AUTHOR Brian Aker .SH COPYRIGHT 2011, Brian Aker DataDifferential, http://datadifferential.com/ .\" Generated by docutils manpage writer. .\" .