1libssh2_session_init_ex(3) libssh2 manual libssh2_session_init_ex(3)
2
3
4
6 libssh2_session_init_ex - initializes an SSH session object
7
9 #include <libssh2.h>
10
11 LIBSSH2_SESSION * libssh2_session_init_ex(LIBSSH2_ALLOC_FUNC((*myal‐
12 loc)), LIBSSH2_FREE_FUNC((*myfree)), LIBSSH2_REALLOC_FUNC((*myreal‐
13 loc)), void *abstract);
14
15 LIBSSH2_SESSION * libssh2_session_init(void);
16
17
19 myalloc - Custom allocator function. Refer to the section on Callbacks
20 for implementing an allocator callback. Pass a value of NULL to use the
21 default system allocator.
22
23 myfree - Custom de-allocator function. Refer to the section on Call‐
24 backs for implementing a deallocator callback. Pass a value of NULL to
25 use the default system deallocator.
26
27 myrealloc - Custom re-allocator function. Refer to the section on Call‐
28 backs for implementing a reallocator callback. Pass a value of NULL to
29 use the default system reallocator.
30
31 abstract - Arbitrary pointer to application specific callback data.
32 This value will be passed to any callback function associated with the
33 named session instance.
34
35 Initializes an SSH session object. By default system memory allocators
36 (malloc(), free(), realloc()) will be used for any dynamically allo‐
37 cated memory blocks. Alternate memory allocation functions may be spec‐
38 ified using the extended version of this API call, and/or optional
39 application specific data may be attached to the session object.
40
41 This method must be called first, prior to configuring session options
42 or starting up an SSH session with a remote server.
43
45 Pointer to a newly allocated LIBSSH2_SESSION instance, or NULL on
46 errors.
47
49 libssh2_session_free(3) libssh2_session_startup(3)
50
51
52
53libssh2 0.15 1 Jun 2007 libssh2_session_init_ex(3)