1
1

libssh2_session_startup(3) => libssh2_session_handshake(3)

Propagate for the current function in docs and examples.
libssh2_session_startup() is deprecated.
Этот коммит содержится в:
Daniel Stenberg 2011-09-09 23:17:04 +02:00
родитель 7229d989e7
Коммит 7ed53e21fd
26 изменённых файлов: 29 добавлений и 28 удалений

Просмотреть файл

@ -18,7 +18,7 @@ instead!
Set the banner that will be sent to the remote host when the SSH session is Set the banner that will be sent to the remote host when the SSH session is
started with 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. This is optional; a banner corresponding to the protocol and libssh2 version will be sent by default.
.SH RETURN VALUE .SH RETURN VALUE
Return 0 on success or negative on failure. It returns Return 0 on success or negative on failure. It returns

Просмотреть файл

@ -15,7 +15,7 @@ libssh2_session_banner_set(LIBSSH2_SESSION *session, const char *banner);
banner banner
Set the banner that will be sent to the remote host when the SSH session is 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. corresponding to the protocol and libssh2 version will be sent by default.
.SH RETURN VALUE .SH RETURN VALUE
Returns 0 on success or negative on failure. It returns LIBSSH2_ERROR_EAGAIN Returns 0 on success or negative on failure. It returns LIBSSH2_ERROR_EAGAIN

Просмотреть файл

@ -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. Pointer to a newly allocated LIBSSH2_SESSION instance, or NULL on errors.
.SH SEE ALSO .SH SEE ALSO
.BR libssh2_session_free(3) .BR libssh2_session_free(3)
.BR libssh2_session_startup(3) .BR libssh2_session_handshake(3)

Просмотреть файл

@ -20,7 +20,7 @@ ignored and not sent to the remote host during protocol negotiation.
Set preferred methods to be negotiated. These Set preferred methods to be negotiated. These
preferrences must be set prior to calling 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. as they are used during the protocol initiation phase.
.SH RETURN VALUE .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 .SH SEE ALSO
.BR libssh2_session_init_ex(3) .BR libssh2_session_init_ex(3)
.BR libssh2_session_startup(3) .BR libssh2_session_handshake(3)

Просмотреть файл

@ -116,7 +116,7 @@ int main(int argc, char *argv[])
/* ... start it up. This will trade welcome banners, exchange keys, /* ... start it up. This will trade welcome banners, exchange keys,
* and setup crypto, compression, and MAC layers * and setup crypto, compression, and MAC layers
*/ */
rc = libssh2_session_startup(session, sock); rc = libssh2_session_handshake(session, sock);
if(rc) { if(rc) {
fprintf(stderr, "Error when starting up SSH session: %d\n", rc); fprintf(stderr, "Error when starting up SSH session: %d\n", rc);
return -1; return -1;

Просмотреть файл

@ -96,7 +96,7 @@ int main(int argc, char *argv[])
/* ... start it up. This will trade welcome banners, exchange keys, /* ... start it up. This will trade welcome banners, exchange keys,
* and setup crypto, compression, and MAC layers * and setup crypto, compression, and MAC layers
*/ */
rc = libssh2_session_startup(session, sock); rc = libssh2_session_handshake(session, sock);
if(rc) { if(rc) {
fprintf(stderr, "Failure establishing SSH session: %d\n", rc); fprintf(stderr, "Failure establishing SSH session: %d\n", rc);
return -1; return -1;

Просмотреть файл

@ -152,7 +152,7 @@ int main(int argc, char *argv[])
/* ... start it up. This will trade welcome banners, exchange keys, /* ... start it up. This will trade welcome banners, exchange keys,
* and setup crypto, compression, and MAC layers * and setup crypto, compression, and MAC layers
*/ */
while ((rc = libssh2_session_startup(session, sock)) == while ((rc = libssh2_session_handshake(session, sock)) ==
LIBSSH2_ERROR_EAGAIN); LIBSSH2_ERROR_EAGAIN);
if (rc) { if (rc) {
fprintf(stderr, "Failure establishing SSH session: %d\n", rc); fprintf(stderr, "Failure establishing SSH session: %d\n", rc);

Просмотреть файл

@ -115,7 +115,7 @@ int main(int argc, char *argv[])
/* ... start it up. This will trade welcome banners, exchange keys, /* ... start it up. This will trade welcome banners, exchange keys,
* and setup crypto, compression, and MAC layers * and setup crypto, compression, and MAC layers
*/ */
rc = libssh2_session_startup(session, sock); rc = libssh2_session_handshake(session, sock);
if(rc) { if(rc) {
fprintf(stderr, "Failure establishing SSH session: %d\n", rc); fprintf(stderr, "Failure establishing SSH session: %d\n", rc);
return -1; return -1;

Просмотреть файл

@ -156,7 +156,7 @@ int main(int argc, char *argv[])
/* ... start it up. This will trade welcome banners, exchange keys, /* ... start it up. This will trade welcome banners, exchange keys,
* and setup crypto, compression, and MAC layers * and setup crypto, compression, and MAC layers
*/ */
while ((rc = libssh2_session_startup(session, sock)) while ((rc = libssh2_session_handshake(session, sock))
== LIBSSH2_ERROR_EAGAIN); == LIBSSH2_ERROR_EAGAIN);
if(rc) { if(rc) {
fprintf(stderr, "Failure establishing SSH session: %d\n", rc); fprintf(stderr, "Failure establishing SSH session: %d\n", rc);

Просмотреть файл

@ -158,7 +158,7 @@ int main(int argc, char *argv[])
/* ... start it up. This will trade welcome banners, exchange keys, /* ... start it up. This will trade welcome banners, exchange keys,
* and setup crypto, compression, and MAC layers * and setup crypto, compression, and MAC layers
*/ */
rc = libssh2_session_startup(session, sock); rc = libssh2_session_handshake(session, sock);
if(rc) { if(rc) {
fprintf(stderr, "Failure establishing SSH session: %d\n", rc); fprintf(stderr, "Failure establishing SSH session: %d\n", rc);
return -1; return -1;

Просмотреть файл

@ -100,7 +100,7 @@ int main(int argc, char *argv[])
/* ... start it up. This will trade welcome banners, exchange keys, /* ... start it up. This will trade welcome banners, exchange keys,
* and setup crypto, compression, and MAC layers * and setup crypto, compression, and MAC layers
*/ */
rc = libssh2_session_startup(session, sock); rc = libssh2_session_handshake(session, sock);
if(rc) { if(rc) {
fprintf(stderr, "Failure establishing SSH session: %d\n", rc); fprintf(stderr, "Failure establishing SSH session: %d\n", rc);
return -1; return -1;

Просмотреть файл

@ -117,7 +117,7 @@ int main(int argc, char *argv[])
/* ... start it up. This will trade welcome banners, exchange keys, /* ... start it up. This will trade welcome banners, exchange keys,
* and setup crypto, compression, and MAC layers * and setup crypto, compression, and MAC layers
*/ */
rc = libssh2_session_startup(session, sock); rc = libssh2_session_handshake(session, sock);
if(rc) { if(rc) {
fprintf(stderr, "Failure establishing SSH session: %d\n", rc); fprintf(stderr, "Failure establishing SSH session: %d\n", rc);
return -1; return -1;

Просмотреть файл

@ -98,7 +98,7 @@ int main(int argc, char *argv[])
/* ... start it up. This will trade welcome banners, exchange keys, /* ... start it up. This will trade welcome banners, exchange keys,
* and setup crypto, compression, and MAC layers * and setup crypto, compression, and MAC layers
*/ */
rc = libssh2_session_startup(session, sock); rc = libssh2_session_handshake(session, sock);
if(rc) { if(rc) {
fprintf(stderr, "Failure establishing SSH session: %d\n", rc); fprintf(stderr, "Failure establishing SSH session: %d\n", rc);
return -1; return -1;

Просмотреть файл

@ -101,7 +101,7 @@ int main(int argc, char *argv[])
/* ... start it up. This will trade welcome banners, exchange keys, /* ... start it up. This will trade welcome banners, exchange keys,
* and setup crypto, compression, and MAC layers * and setup crypto, compression, and MAC layers
*/ */
rc = libssh2_session_startup(session, sock); rc = libssh2_session_handshake(session, sock);
if(rc) { if(rc) {
fprintf(stderr, "Failure establishing SSH session: %d\n", rc); fprintf(stderr, "Failure establishing SSH session: %d\n", rc);
return -1; return -1;

Просмотреть файл

@ -154,7 +154,7 @@ int main(int argc, char *argv[])
/* ... start it up. This will trade welcome banners, exchange keys, /* ... start it up. This will trade welcome banners, exchange keys,
* and setup crypto, compression, and MAC layers * and setup crypto, compression, and MAC layers
*/ */
while ((rc = libssh2_session_startup(session, sock)) == while ((rc = libssh2_session_handshake(session, sock)) ==
LIBSSH2_ERROR_EAGAIN); LIBSSH2_ERROR_EAGAIN);
if (rc) { if (rc) {
fprintf(stderr, "Failure establishing SSH session: %d\n", rc); fprintf(stderr, "Failure establishing SSH session: %d\n", rc);

Просмотреть файл

@ -116,7 +116,7 @@ int main(int argc, char *argv[])
/* ... start it up. This will trade welcome banners, exchange keys, /* ... start it up. This will trade welcome banners, exchange keys,
* and setup crypto, compression, and MAC layers * and setup crypto, compression, and MAC layers
*/ */
rc = libssh2_session_startup(session, sock); rc = libssh2_session_handshake(session, sock);
if(rc) { if(rc) {
fprintf(stderr, "Failure establishing SSH session: %d\n", rc); fprintf(stderr, "Failure establishing SSH session: %d\n", rc);
return -1; return -1;

Просмотреть файл

@ -159,7 +159,7 @@ int main(int argc, char *argv[])
/* ... start it up. This will trade welcome banners, exchange keys, /* ... start it up. This will trade welcome banners, exchange keys,
* and setup crypto, compression, and MAC layers * and setup crypto, compression, and MAC layers
*/ */
while ((rc = libssh2_session_startup(session, sock)) while ((rc = libssh2_session_handshake(session, sock))
== LIBSSH2_ERROR_EAGAIN); == LIBSSH2_ERROR_EAGAIN);
if (rc) { if (rc) {
fprintf(stderr, "Failure establishing SSH session: %d\n", rc); fprintf(stderr, "Failure establishing SSH session: %d\n", rc);

Просмотреть файл

@ -159,7 +159,7 @@ int main(int argc, char *argv[])
/* ... start it up. This will trade welcome banners, exchange keys, /* ... start it up. This will trade welcome banners, exchange keys,
* and setup crypto, compression, and MAC layers * and setup crypto, compression, and MAC layers
*/ */
while ((rc = libssh2_session_startup(session, sock)) while ((rc = libssh2_session_handshake(session, sock))
== LIBSSH2_ERROR_EAGAIN); == LIBSSH2_ERROR_EAGAIN);
if (rc) { if (rc) {
fprintf(stderr, "Failure establishing SSH session: %d\n", rc); fprintf(stderr, "Failure establishing SSH session: %d\n", rc);

Просмотреть файл

@ -99,7 +99,7 @@ int main(int argc, char *argv[])
/* ... start it up. This will trade welcome banners, exchange keys, /* ... start it up. This will trade welcome banners, exchange keys,
* and setup crypto, compression, and MAC layers * and setup crypto, compression, and MAC layers
*/ */
rc = libssh2_session_startup(session, sock); rc = libssh2_session_handshake(session, sock);
if(rc) { if(rc) {
fprintf(stderr, "Failure establishing SSH session: %d\n", rc); fprintf(stderr, "Failure establishing SSH session: %d\n", rc);
return -1; return -1;

Просмотреть файл

@ -105,7 +105,8 @@ int main(int argc, char *argv[])
/* ... start it up. This will trade welcome banners, exchange keys, /* ... start it up. This will trade welcome banners, exchange keys,
* and setup crypto, compression, and MAC layers * 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) { if(rc) {
fprintf(stderr, "Failure establishing SSH session: %d\n", rc); fprintf(stderr, "Failure establishing SSH session: %d\n", rc);
return -1; return -1;

Просмотреть файл

@ -115,7 +115,7 @@ int main(int argc, char *argv[])
* banners, exchange keys, and setup crypto, compression, and MAC layers * banners, exchange keys, and setup crypto, compression, and MAC layers
*/ */
session = libssh2_session_init(); session = libssh2_session_init();
if (libssh2_session_startup(session, sock)) { if (libssh2_session_handshake(session, sock)) {
fprintf(stderr, "Failure establishing SSH session\n"); fprintf(stderr, "Failure establishing SSH session\n");
return -1; return -1;
} }

Просмотреть файл

@ -94,7 +94,7 @@ int main(int argc, char *argv[])
* banners, exchange keys, and setup crypto, compression, and MAC layers * banners, exchange keys, and setup crypto, compression, and MAC layers
*/ */
session = libssh2_session_init(); session = libssh2_session_init();
if (libssh2_session_startup(session, sock)) { if (libssh2_session_handshake(session, sock)) {
fprintf(stderr, "Failure establishing SSH session\n"); fprintf(stderr, "Failure establishing SSH session\n");
return 1; return 1;
} }

Просмотреть файл

@ -138,7 +138,7 @@ int main(int argc, char *argv[])
/* ... start it up. This will trade welcome banners, exchange keys, /* ... start it up. This will trade welcome banners, exchange keys,
* and setup crypto, compression, and MAC layers * and setup crypto, compression, and MAC layers
*/ */
while ((rc = libssh2_session_startup(session, sock)) == while ((rc = libssh2_session_handshake(session, sock)) ==
LIBSSH2_ERROR_EAGAIN); LIBSSH2_ERROR_EAGAIN);
if (rc) { if (rc) {
fprintf(stderr, "Failure establishing SSH session: %d\n", rc); fprintf(stderr, "Failure establishing SSH session: %d\n", rc);

Просмотреть файл

@ -142,7 +142,7 @@ int main(int argc, char *argv[])
/* ... start it up. This will trade welcome banners, exchange keys, /* ... start it up. This will trade welcome banners, exchange keys,
* and setup crypto, compression, and MAC layers * and setup crypto, compression, and MAC layers
*/ */
while ((rc = libssh2_session_startup(session, sock)) == while ((rc = libssh2_session_handshake(session, sock)) ==
LIBSSH2_ERROR_EAGAIN); LIBSSH2_ERROR_EAGAIN);
if (rc) { if (rc) {
fprintf(stderr, "Failure establishing SSH session: %d\n", rc); fprintf(stderr, "Failure establishing SSH session: %d\n", rc);

Просмотреть файл

@ -148,7 +148,7 @@ int main(int argc, char *argv[])
/* ... start it up. This will trade welcome banners, exchange keys, /* ... start it up. This will trade welcome banners, exchange keys,
* and setup crypto, compression, and MAC layers * and setup crypto, compression, and MAC layers
*/ */
rc = libssh2_session_startup(session, sock); rc = libssh2_session_handshake(session, sock);
if(rc) { if(rc) {
fprintf(stderr, "Error when starting up SSH session: %d\n", rc); fprintf(stderr, "Error when starting up SSH session: %d\n", rc);
return -1; return -1;

Просмотреть файл

@ -296,8 +296,8 @@ main (int argc, char *argv[])
return -1; return -1;
} }
/* Open a session */ /* Open a session */
session = libssh2_session_init (); session = libssh2_session_init();
rc = libssh2_session_startup (session, sock); rc = libssh2_session_handshake(session, sock);
if (rc != 0) { if (rc != 0) {
fprintf(stderr, "Failed Start the SSH session\n"); fprintf(stderr, "Failed Start the SSH session\n");
return -1; return -1;