1libssh2_trace_sethandler(3) libssh2 manual libssh2_trace_sethandler(3)
2
3
4
6 libssh2_trace_sethandler - set a trace output handler
7
9 #include <libssh2.h>
10
11 typedef void (*libssh2_trace_handler_func)(LIBSSH2_SESSION *session,
12 void* context,
13 const char *data,
14 size_t length);
15
16 int libssh2_trace_sethandler(LIBSSH2_SESSION *session,
17 void* context,
18 libssh2_trace_handler_func callback);
19
21 libssh2_trace_sethandler installs a trace output handler for your
22 application. By default, when tracing has been switched on via a call
23 to libssh2_trace(), all output is written to stderr. By calling this
24 method and passing a function pointer that matches the lib‐
25 ssh2_trace_handler_func prototype, libssh2 will call back as it gener‐
26 ates trace output. This can be used to capture the trace output and
27 put it into a log file or diagnostic window. This function has no
28 effect unless libssh2 was built to support this option, and a typical
29 "release build" might not.
30
31 context can be used to pass arbitrary user defined data back into the
32 callback when invoked.
33
35 Added in libssh2 version 1.2.3
36
37
38
39libssh2 1.2.3 15 Jan 2010 libssh2_trace_sethandler(3)