1libssh2_trace_sethandler(3)         libssh2        libssh2_trace_sethandler(3)
2
3
4

NAME

6       libssh2_trace_sethandler - set a trace output handler
7

SYNOPSIS

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
17       libssh2_trace_sethandler(LIBSSH2_SESSION *session,
18                                void *context,
19                                libssh2_trace_handler_func callback);
20

DESCRIPTION

22       libssh2_trace_sethandler  installs  a trace output handler for your ap‐
23       plication.  By default, when tracing has been switched on via a call to
24       libssh2_trace(),  all  output  is  written  to stderr.  By calling this
25       method  and  passing  a  function  pointer  that   matches   the   lib‐
26       ssh2_trace_handler_func  prototype, libssh2 will call back as it gener‐
27       ates trace output.  This can be used to capture the  trace  output  and
28       put  it into a log file or diagnostic window.  This function has no ef‐
29       fect unless libssh2 was built to support this  option,  and  a  typical
30       "release build" might not.
31
32       context  can  be used to pass arbitrary user defined data back into the
33       callback when invoked.
34

AVAILABILITY

36       Added in libssh2 version 1.2.3
37
38
39
40libssh2                           15 Jan 2010      libssh2_trace_sethandler(3)
Impressum