summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorPuran Chand <pchand@vmware.com>2017-11-29 13:41:05 +0530
committerAndrew Bartlett <abartlet@samba.org>2017-12-10 04:56:23 +0100
commit2ab9847f54da80352e6ce1f4281649a86558a822 (patch)
tree5fcb526e0a55c3be44f52c1cf5ef1fd6ed534bd6 /source3/include
parentd2b9f18a0d16e1f03a19229bed6e8ffa02744e63 (diff)
downloadsamba-2ab9847f54da80352e6ce1f4281649a86558a822.tar.gz
Added smbc_SetLogCallback which lets third party code to capture libsmbclient logs
Signed-off-by: Puran Chand <pchand@vmware.com> Reviewed-by: Garming Sam <garming@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sun Dec 10 04:56:23 CET 2017 on sn-devel-144
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/libsmbclient.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/include/libsmbclient.h b/source3/include/libsmbclient.h
index b41a2924abd..38ba451a548 100644
--- a/source3/include/libsmbclient.h
+++ b/source3/include/libsmbclient.h
@@ -130,6 +130,11 @@ struct smbc_dirent
};
/*
+ * Logging callback function
+ */
+typedef void (*smbc_debug_callback_fn)(void *private_ptr, int level, const char *msg);
+
+/*
* Flags for smbc_setxattr()
* Specify a bitwise OR of these, or 0 to add or replace as necessary
*/
@@ -470,6 +475,14 @@ smbc_getDebug(SMBCCTX *c);
void
smbc_setDebug(SMBCCTX *c, int debug);
+/**
+ * set log callback function to capture logs from libsmbclient, this
+ * is applied at global level
+ */
+void
+smbc_setLogCallback(SMBCCTX *c, void *private_ptr,
+ smbc_debug_callback_fn fn);
+
/** Get the netbios name used for making connections */
char *
smbc_getNetbiosName(SMBCCTX *c);