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