diff --git a/docs/libssh2_banner_set.3 b/docs/libssh2_banner_set.3 index d0617de..8838f69 100644 --- a/docs/libssh2_banner_set.3 +++ b/docs/libssh2_banner_set.3 @@ -18,7 +18,7 @@ instead! Set the banner that will be sent to the remote host when the SSH session is started with -.BR libssh2_session_startup(3) +.BR libssh2_session_handshake(3) This is optional; a banner corresponding to the protocol and libssh2 version will be sent by default. .SH RETURN VALUE Return 0 on success or negative on failure. It returns diff --git a/docs/libssh2_session_banner_set.3 b/docs/libssh2_session_banner_set.3 index b1d445a..f5eb2c7 100644 --- a/docs/libssh2_session_banner_set.3 +++ b/docs/libssh2_session_banner_set.3 @@ -15,7 +15,7 @@ libssh2_session_banner_set(LIBSSH2_SESSION *session, const char *banner); banner Set the banner that will be sent to the remote host when the SSH session is -started with \fIlibssh2_session_startup(3)\fP This is optional; a banner +started with \fIlibssh2_session_handshake(3)\fP This is optional; a banner corresponding to the protocol and libssh2 version will be sent by default. .SH RETURN VALUE Returns 0 on success or negative on failure. It returns LIBSSH2_ERROR_EAGAIN diff --git a/docs/libssh2_session_init_ex.3 b/docs/libssh2_session_init_ex.3 index 3028f8d..5e4ef06 100644 --- a/docs/libssh2_session_init_ex.3 +++ b/docs/libssh2_session_init_ex.3 @@ -39,4 +39,4 @@ starting up an SSH session with a remote server. Pointer to a newly allocated LIBSSH2_SESSION instance, or NULL on errors. .SH SEE ALSO .BR libssh2_session_free(3) -.BR libssh2_session_startup(3) +.BR libssh2_session_handshake(3) diff --git a/docs/libssh2_session_method_pref.3 b/docs/libssh2_session_method_pref.3 index 971a789..323c817 100644 --- a/docs/libssh2_session_method_pref.3 +++ b/docs/libssh2_session_method_pref.3 @@ -20,7 +20,7 @@ ignored and not sent to the remote host during protocol negotiation. Set preferred methods to be negotiated. These preferrences must be set prior to calling -.BR libssh2_session_startup(3) +.BR libssh2_session_handshake(3) as they are used during the protocol initiation phase. .SH RETURN VALUE @@ -37,4 +37,4 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se. .SH SEE ALSO .BR libssh2_session_init_ex(3) -.BR libssh2_session_startup(3) +.BR libssh2_session_handshake(3) diff --git a/example/direct_tcpip.c b/example/direct_tcpip.c index c066042..6aa9845 100644 --- a/example/direct_tcpip.c +++ b/example/direct_tcpip.c @@ -116,7 +116,7 @@ int main(int argc, char *argv[]) /* ... start it up. This will trade welcome banners, exchange keys, * and setup crypto, compression, and MAC layers */ - rc = libssh2_session_startup(session, sock); + rc = libssh2_session_handshake(session, sock); if(rc) { fprintf(stderr, "Error when starting up SSH session: %d\n", rc); return -1; diff --git a/example/scp.c b/example/scp.c index 3e16749..7377cc6 100644 --- a/example/scp.c +++ b/example/scp.c @@ -96,7 +96,7 @@ int main(int argc, char *argv[]) /* ... start it up. This will trade welcome banners, exchange keys, * and setup crypto, compression, and MAC layers */ - rc = libssh2_session_startup(session, sock); + rc = libssh2_session_handshake(session, sock); if(rc) { fprintf(stderr, "Failure establishing SSH session: %d\n", rc); return -1; diff --git a/example/scp_nonblock.c b/example/scp_nonblock.c index 7240049..f9e7072 100644 --- a/example/scp_nonblock.c +++ b/example/scp_nonblock.c @@ -152,7 +152,7 @@ int main(int argc, char *argv[]) /* ... start it up. This will trade welcome banners, exchange keys, * and setup crypto, compression, and MAC layers */ - while ((rc = libssh2_session_startup(session, sock)) == + while ((rc = libssh2_session_handshake(session, sock)) == LIBSSH2_ERROR_EAGAIN); if (rc) { fprintf(stderr, "Failure establishing SSH session: %d\n", rc); diff --git a/example/scp_write.c b/example/scp_write.c index 4df4ed5..b38157b 100644 --- a/example/scp_write.c +++ b/example/scp_write.c @@ -115,7 +115,7 @@ int main(int argc, char *argv[]) /* ... start it up. This will trade welcome banners, exchange keys, * and setup crypto, compression, and MAC layers */ - rc = libssh2_session_startup(session, sock); + rc = libssh2_session_handshake(session, sock); if(rc) { fprintf(stderr, "Failure establishing SSH session: %d\n", rc); return -1; diff --git a/example/scp_write_nonblock.c b/example/scp_write_nonblock.c index 8be5fed..d8bdc0f 100644 --- a/example/scp_write_nonblock.c +++ b/example/scp_write_nonblock.c @@ -156,7 +156,7 @@ int main(int argc, char *argv[]) /* ... start it up. This will trade welcome banners, exchange keys, * and setup crypto, compression, and MAC layers */ - while ((rc = libssh2_session_startup(session, sock)) + while ((rc = libssh2_session_handshake(session, sock)) == LIBSSH2_ERROR_EAGAIN); if(rc) { fprintf(stderr, "Failure establishing SSH session: %d\n", rc); diff --git a/example/sftp.c b/example/sftp.c index ec42031..e69b3c3 100644 --- a/example/sftp.c +++ b/example/sftp.c @@ -158,7 +158,7 @@ int main(int argc, char *argv[]) /* ... start it up. This will trade welcome banners, exchange keys, * and setup crypto, compression, and MAC layers */ - rc = libssh2_session_startup(session, sock); + rc = libssh2_session_handshake(session, sock); if(rc) { fprintf(stderr, "Failure establishing SSH session: %d\n", rc); return -1; diff --git a/example/sftp_RW_nonblock.c b/example/sftp_RW_nonblock.c index 64575b3..7bc9eb2 100644 --- a/example/sftp_RW_nonblock.c +++ b/example/sftp_RW_nonblock.c @@ -100,7 +100,7 @@ int main(int argc, char *argv[]) /* ... start it up. This will trade welcome banners, exchange keys, * and setup crypto, compression, and MAC layers */ - rc = libssh2_session_startup(session, sock); + rc = libssh2_session_handshake(session, sock); if(rc) { fprintf(stderr, "Failure establishing SSH session: %d\n", rc); return -1; diff --git a/example/sftp_append.c b/example/sftp_append.c index 0e9dc85..731d21a 100644 --- a/example/sftp_append.c +++ b/example/sftp_append.c @@ -117,7 +117,7 @@ int main(int argc, char *argv[]) /* ... start it up. This will trade welcome banners, exchange keys, * and setup crypto, compression, and MAC layers */ - rc = libssh2_session_startup(session, sock); + rc = libssh2_session_handshake(session, sock); if(rc) { fprintf(stderr, "Failure establishing SSH session: %d\n", rc); return -1; diff --git a/example/sftp_mkdir.c b/example/sftp_mkdir.c index 5680289..39af8f0 100644 --- a/example/sftp_mkdir.c +++ b/example/sftp_mkdir.c @@ -98,7 +98,7 @@ int main(int argc, char *argv[]) /* ... start it up. This will trade welcome banners, exchange keys, * and setup crypto, compression, and MAC layers */ - rc = libssh2_session_startup(session, sock); + rc = libssh2_session_handshake(session, sock); if(rc) { fprintf(stderr, "Failure establishing SSH session: %d\n", rc); return -1; diff --git a/example/sftp_mkdir_nonblock.c b/example/sftp_mkdir_nonblock.c index f7bd6a9..0d5ee90 100644 --- a/example/sftp_mkdir_nonblock.c +++ b/example/sftp_mkdir_nonblock.c @@ -101,7 +101,7 @@ int main(int argc, char *argv[]) /* ... start it up. This will trade welcome banners, exchange keys, * and setup crypto, compression, and MAC layers */ - rc = libssh2_session_startup(session, sock); + rc = libssh2_session_handshake(session, sock); if(rc) { fprintf(stderr, "Failure establishing SSH session: %d\n", rc); return -1; diff --git a/example/sftp_nonblock.c b/example/sftp_nonblock.c index 23d0b08..284d1ba 100644 --- a/example/sftp_nonblock.c +++ b/example/sftp_nonblock.c @@ -154,7 +154,7 @@ int main(int argc, char *argv[]) /* ... start it up. This will trade welcome banners, exchange keys, * and setup crypto, compression, and MAC layers */ - while ((rc = libssh2_session_startup(session, sock)) == + while ((rc = libssh2_session_handshake(session, sock)) == LIBSSH2_ERROR_EAGAIN); if (rc) { fprintf(stderr, "Failure establishing SSH session: %d\n", rc); diff --git a/example/sftp_write.c b/example/sftp_write.c index cdbe627..9415ce4 100644 --- a/example/sftp_write.c +++ b/example/sftp_write.c @@ -116,7 +116,7 @@ int main(int argc, char *argv[]) /* ... start it up. This will trade welcome banners, exchange keys, * and setup crypto, compression, and MAC layers */ - rc = libssh2_session_startup(session, sock); + rc = libssh2_session_handshake(session, sock); if(rc) { fprintf(stderr, "Failure establishing SSH session: %d\n", rc); return -1; diff --git a/example/sftp_write_nonblock.c b/example/sftp_write_nonblock.c index e8324b1..2e09f19 100644 --- a/example/sftp_write_nonblock.c +++ b/example/sftp_write_nonblock.c @@ -159,7 +159,7 @@ int main(int argc, char *argv[]) /* ... start it up. This will trade welcome banners, exchange keys, * and setup crypto, compression, and MAC layers */ - while ((rc = libssh2_session_startup(session, sock)) + while ((rc = libssh2_session_handshake(session, sock)) == LIBSSH2_ERROR_EAGAIN); if (rc) { fprintf(stderr, "Failure establishing SSH session: %d\n", rc); diff --git a/example/sftp_write_sliding.c b/example/sftp_write_sliding.c index c04acad..5e207ca 100644 --- a/example/sftp_write_sliding.c +++ b/example/sftp_write_sliding.c @@ -159,7 +159,7 @@ int main(int argc, char *argv[]) /* ... start it up. This will trade welcome banners, exchange keys, * and setup crypto, compression, and MAC layers */ - while ((rc = libssh2_session_startup(session, sock)) + while ((rc = libssh2_session_handshake(session, sock)) == LIBSSH2_ERROR_EAGAIN); if (rc) { fprintf(stderr, "Failure establishing SSH session: %d\n", rc); diff --git a/example/sftpdir.c b/example/sftpdir.c index 6d5f5ce..57f8b3b 100644 --- a/example/sftpdir.c +++ b/example/sftpdir.c @@ -99,7 +99,7 @@ int main(int argc, char *argv[]) /* ... start it up. This will trade welcome banners, exchange keys, * and setup crypto, compression, and MAC layers */ - rc = libssh2_session_startup(session, sock); + rc = libssh2_session_handshake(session, sock); if(rc) { fprintf(stderr, "Failure establishing SSH session: %d\n", rc); return -1; diff --git a/example/sftpdir_nonblock.c b/example/sftpdir_nonblock.c index 74aa85c..f7de323 100644 --- a/example/sftpdir_nonblock.c +++ b/example/sftpdir_nonblock.c @@ -105,7 +105,8 @@ int main(int argc, char *argv[]) /* ... start it up. This will trade welcome banners, exchange keys, * and setup crypto, compression, and MAC layers */ - while ((rc = libssh2_session_startup(session, sock)) == LIBSSH2_ERROR_EAGAIN); + while ((rc = libssh2_session_handshake(session, sock)) == + LIBSSH2_ERROR_EAGAIN); if(rc) { fprintf(stderr, "Failure establishing SSH session: %d\n", rc); return -1; diff --git a/example/ssh2.c b/example/ssh2.c index 493f4d0..d5e6166 100644 --- a/example/ssh2.c +++ b/example/ssh2.c @@ -115,7 +115,7 @@ int main(int argc, char *argv[]) * banners, exchange keys, and setup crypto, compression, and MAC layers */ session = libssh2_session_init(); - if (libssh2_session_startup(session, sock)) { + if (libssh2_session_handshake(session, sock)) { fprintf(stderr, "Failure establishing SSH session\n"); return -1; } diff --git a/example/ssh2_agent.c b/example/ssh2_agent.c index 49b5b1a..ab7a8c3 100644 --- a/example/ssh2_agent.c +++ b/example/ssh2_agent.c @@ -94,7 +94,7 @@ int main(int argc, char *argv[]) * banners, exchange keys, and setup crypto, compression, and MAC layers */ session = libssh2_session_init(); - if (libssh2_session_startup(session, sock)) { + if (libssh2_session_handshake(session, sock)) { fprintf(stderr, "Failure establishing SSH session\n"); return 1; } diff --git a/example/ssh2_echo.c b/example/ssh2_echo.c index f25b622..1fd8f3f 100644 --- a/example/ssh2_echo.c +++ b/example/ssh2_echo.c @@ -138,7 +138,7 @@ int main(int argc, char *argv[]) /* ... start it up. This will trade welcome banners, exchange keys, * and setup crypto, compression, and MAC layers */ - while ((rc = libssh2_session_startup(session, sock)) == + while ((rc = libssh2_session_handshake(session, sock)) == LIBSSH2_ERROR_EAGAIN); if (rc) { fprintf(stderr, "Failure establishing SSH session: %d\n", rc); diff --git a/example/ssh2_exec.c b/example/ssh2_exec.c index 461accf..b45cd41 100644 --- a/example/ssh2_exec.c +++ b/example/ssh2_exec.c @@ -142,7 +142,7 @@ int main(int argc, char *argv[]) /* ... start it up. This will trade welcome banners, exchange keys, * and setup crypto, compression, and MAC layers */ - while ((rc = libssh2_session_startup(session, sock)) == + while ((rc = libssh2_session_handshake(session, sock)) == LIBSSH2_ERROR_EAGAIN); if (rc) { fprintf(stderr, "Failure establishing SSH session: %d\n", rc); diff --git a/example/subsystem_netconf.c b/example/subsystem_netconf.c index dfc35a0..0203bdc 100644 --- a/example/subsystem_netconf.c +++ b/example/subsystem_netconf.c @@ -148,7 +148,7 @@ int main(int argc, char *argv[]) /* ... start it up. This will trade welcome banners, exchange keys, * and setup crypto, compression, and MAC layers */ - rc = libssh2_session_startup(session, sock); + rc = libssh2_session_handshake(session, sock); if(rc) { fprintf(stderr, "Error when starting up SSH session: %d\n", rc); return -1; diff --git a/example/x11.c b/example/x11.c index 05e316f..cff451c 100644 --- a/example/x11.c +++ b/example/x11.c @@ -296,8 +296,8 @@ main (int argc, char *argv[]) return -1; } /* Open a session */ - session = libssh2_session_init (); - rc = libssh2_session_startup (session, sock); + session = libssh2_session_init(); + rc = libssh2_session_handshake(session, sock); if (rc != 0) { fprintf(stderr, "Failed Start the SSH session\n"); return -1;