diff --git a/.gitignore b/.gitignore index 4292e8d6..460bb772 100644 --- a/.gitignore +++ b/.gitignore @@ -39,4 +39,4 @@ libssh2.pc TAGS *~ .DS_Store -build \ No newline at end of file +build diff --git a/Makefile.am b/Makefile.am index ce20ba54..e0489bdb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,45 +11,45 @@ endif pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libssh2.pc -include_HEADERS = \ - include/libssh2.h \ - include/libssh2_publickey.h \ - include/libssh2_sftp.h +include_HEADERS = \ + include/libssh2.h \ + include/libssh2_publickey.h \ + include/libssh2_sftp.h NETWAREFILES = nw/keepscreen.c \ - nw/nwlib.c \ - nw/GNUmakefile \ - nw/test/GNUmakefile + nw/nwlib.c \ + nw/GNUmakefile \ + nw/test/GNUmakefile DSP = win32/libssh2.dsp VCPROJ = win32/libssh2.vcproj DISTCLEANFILES = $(DSP) -VMSFILES = vms/libssh2_make_example.dcl vms/libssh2_make_help.dcl \ -vms/libssh2_make_kit.dcl vms/libssh2_make_lib.dcl vms/man2help.c \ -vms/readme.vms vms/libssh2_config.h +VMSFILES = vms/libssh2_make_example.dcl vms/libssh2_make_help.dcl \ + vms/libssh2_make_kit.dcl vms/libssh2_make_lib.dcl vms/man2help.c \ + vms/readme.vms vms/libssh2_config.h -WIN32FILES = win32/GNUmakefile \ -win32/libssh2_config.h win32/config.mk win32/rules.mk \ -win32/Makefile.Watcom win32/libssh2.dsw win32/tests.dsp $(DSP) \ -win32/msvcproj.head win32/msvcproj.foot win32/libssh2.rc +WIN32FILES = win32/GNUmakefile \ + win32/libssh2_config.h win32/config.mk win32/rules.mk \ + win32/Makefile.Watcom win32/libssh2.dsw win32/tests.dsp $(DSP) \ + win32/msvcproj.head win32/msvcproj.foot win32/libssh2.rc -OS400FILES = os400/README400 os400/initscript.sh os400/make.sh \ -os400/make-src.sh os400/make-rpg.sh os400/make-include.sh \ -os400/os400sys.c os400/ccsid.c \ -os400/libssh2_config.h os400/macros.h os400/libssh2_ccsid.h \ -os400/include/alloca.h os400/include/sys/socket.h os400/include/stdio.h \ -os400/libssh2rpg/libssh2.rpgle.in \ -os400/libssh2rpg/libssh2_ccsid.rpgle.in \ -os400/libssh2rpg/libssh2_publickey.rpgle \ -os400/libssh2rpg/libssh2_sftp.rpgle \ -Makefile.os400qc3.inc +OS400FILES = os400/README400 os400/initscript.sh os400/make.sh \ + os400/make-src.sh os400/make-rpg.sh os400/make-include.sh \ + os400/os400sys.c os400/ccsid.c \ + os400/libssh2_config.h os400/macros.h os400/libssh2_ccsid.h \ + os400/include/alloca.h os400/include/sys/socket.h os400/include/stdio.h \ + os400/libssh2rpg/libssh2.rpgle.in \ + os400/libssh2rpg/libssh2_ccsid.rpgle.in \ + os400/libssh2rpg/libssh2_publickey.rpgle \ + os400/libssh2rpg/libssh2_sftp.rpgle \ + Makefile.os400qc3.inc EXTRA_DIST = $(WIN32FILES) $(NETWAREFILES) get_ver.awk \ - maketgz NMakefile RELEASE-NOTES libssh2.pc.in $(VMSFILES) config.rpath \ - CMakeLists.txt cmake git2news.pl libssh2-style.el README.md $(OS400FILES) \ - buildconf + maketgz NMakefile RELEASE-NOTES libssh2.pc.in $(VMSFILES) config.rpath \ + CMakeLists.txt cmake git2news.pl libssh2-style.el README.md $(OS400FILES) \ + buildconf ACLOCAL_AMFLAGS = -I m4 @@ -110,10 +110,10 @@ $(DSP): win32/msvcproj.head win32/msvcproj.foot Makefile.am win32_srcs='$(WIN32SOURCES)'; \ sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \ for file in $$sorted_srcs; do \ - echo "# Begin Source File"; \ - echo ""; \ - echo "SOURCE=..\\src\\"$$file; \ - echo "# End Source File"; \ + echo "# Begin Source File"; \ + echo ""; \ + echo "SOURCE=..\\src\\"$$file; \ + echo "# End Source File"; \ done; \ echo "# End Group"; \ echo "# Begin Group \"Header Files\""; \ @@ -122,15 +122,14 @@ $(DSP): win32/msvcproj.head win32/msvcproj.foot Makefile.am win32_hdrs='$(WIN32HEADERS)'; \ sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \ for file in $$sorted_hdrs; do \ - echo "# Begin Source File"; \ - echo ""; \ - if [ "$$file" = "libssh2_config.h" ]; \ - then \ - echo "SOURCE=.\\"$$file; \ - else \ - echo "SOURCE=..\\src\\"$$file; \ - fi; \ - echo "# End Source File"; \ + echo "# Begin Source File"; \ + echo ""; \ + if [ "$$file" = "libssh2_config.h" ]; then \ + echo "SOURCE=.\\"$$file; \ + else \ + echo "SOURCE=..\\src\\"$$file; \ + fi; \ + echo "# End Source File"; \ done; \ echo "# End Group"; \ cat $(srcdir)/win32/msvcproj.foot) | \ @@ -142,18 +141,18 @@ $(VCPROJ): win32/vc8proj.head win32/vc8proj.foot Makefile.am win32_srcs='$(WIN32SOURCES)'; \ sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \ for file in $$sorted_srcs; do \ - echo ""; \ + echo ""; \ done; \ - echo ""; \ + echo ""; \ win32_hdrs='$(WIN32HEADERS)'; \ sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \ for file in $$sorted_hdrs; do \ - echo ""; \ + echo ""; \ done; \ cat $(srcdir)/vc8proj.foot) | \ awk '{printf("%s\r\n", gensub("\r", "", "g"))}' > $@ ) checksrc: perl src/checksrc.pl -i4 -m79 -ASIZEOFNOPAREN -ASNPRINTF -ACOPYRIGHT \ - -AFOPENMODE -Wsrc/libssh2_config.h src/*.[ch] include/*.h example/*.c \ - tests/*.[ch] + -AFOPENMODE -Wsrc/libssh2_config.h src/*.[ch] include/*.h example/*.c \ + tests/*.[ch] diff --git a/Makefile.inc b/Makefile.inc index 29273f4a..a6524cde 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -1,9 +1,9 @@ CSOURCES = channel.c comp.c crypt.c hostkey.c kex.c mac.c misc.c \ - packet.c publickey.c scp.c session.c sftp.c userauth.c transport.c \ - userauth_kbd_packet.c \ - version.c knownhost.c agent.c $(CRYPTO_CSOURCES) pem.c keepalive.c global.c \ - blowfish.c bcrypt_pbkdf.c agent_win.c os400qc3.c + packet.c publickey.c scp.c session.c sftp.c userauth.c transport.c \ + userauth_kbd_packet.c \ + version.c knownhost.c agent.c $(CRYPTO_CSOURCES) pem.c keepalive.c global.c \ + blowfish.c bcrypt_pbkdf.c agent_win.c os400qc3.c HHEADERS = libssh2_priv.h $(CRYPTO_HHEADERS) transport.h channel.h comp.h \ - mac.h misc.h packet.h userauth.h session.h sftp.h crypto.h blf.h agent.h \ - userauth_kbd_packet.h os400qc3.h + mac.h misc.h packet.h userauth.h session.h sftp.h crypto.h blf.h agent.h \ + userauth_kbd_packet.h os400qc3.h diff --git a/NMakefile b/NMakefile index 07bc2dda..f0867089 100644 --- a/NMakefile +++ b/NMakefile @@ -15,7 +15,7 @@ SUBDIRS=src all-sub: win32\objects.mk -for %D in ($(SUBDIRS)) do $(MAKE) /nologo /f %D/NMakefile BUILD=$(BUILD) SUBDIR=%D all-sub -clean: +clean: -rmdir 2>NUL /s/q $(TARGET) -del 2>NUL win32\objects.mk diff --git a/docs/INSTALL_AUTOTOOLS b/docs/INSTALL_AUTOTOOLS index 5577886d..a98441df 100644 --- a/docs/INSTALL_AUTOTOOLS +++ b/docs/INSTALL_AUTOTOOLS @@ -256,57 +256,57 @@ Some ./configure options deserve additional comments: * --enable-crypt-none - The SSH2 Transport allows for unencrypted data - transmission using the "none" cipher. Because this is - such a huge security hole, it is typically disabled on - SSH2 implementations and is disabled in libssh2 by - default as well. + The SSH2 Transport allows for unencrypted data + transmission using the "none" cipher. Because this is + such a huge security hole, it is typically disabled on + SSH2 implementations and is disabled in libssh2 by + default as well. - Enabling this option will allow for "none" as a - negotiable method, however it still requires that the - method be advertized by the remote end and that no - more-preferable methods are available. + Enabling this option will allow for "none" as a + negotiable method, however it still requires that the + method be advertized by the remote end and that no + more-preferable methods are available. * --enable-mac-none - The SSH2 Transport also allows implementations to - forego a message authentication code. While this is - less of a security risk than using a "none" cipher, it - is still not recommended as disabling MAC hashes - removes a layer of security. + The SSH2 Transport also allows implementations to + forego a message authentication code. While this is + less of a security risk than using a "none" cipher, it + is still not recommended as disabling MAC hashes + removes a layer of security. - Enabling this option will allow for "none" as a - negotiable method, however it still requires that the - method be advertized by the remote end and that no - more-preferable methods are available. + Enabling this option will allow for "none" as a + negotiable method, however it still requires that the + method be advertized by the remote end and that no + more-preferable methods are available. * --with-libgcrypt * --without-libgcrypt * --with-libgcrypt-prefix=DIR - libssh2 can use the Libgcrypt library - (https://www.gnupg.org/) for cryptographic operations. + libssh2 can use the Libgcrypt library + (https://www.gnupg.org/) for cryptographic operations. One of the cryptographic libraries is required. - Configure will attempt to locate Libgcrypt - automatically. + Configure will attempt to locate Libgcrypt + automatically. - If your installation of Libgcrypt is in another - location, specify it using --with-libgcrypt-prefix. + If your installation of Libgcrypt is in another + location, specify it using --with-libgcrypt-prefix. * --with-openssl * --without-openssl * --with-libssl-prefix=[DIR] - libssh2 can use the OpenSSL library - (https://www.openssl.org) for cryptographic operations. + libssh2 can use the OpenSSL library + (https://www.openssl.org) for cryptographic operations. One of the cryptographic libraries is required. - Configure will attempt to locate OpenSSL in the - default location. + Configure will attempt to locate OpenSSL in the + default location. - If your installation of OpenSSL is in another - location, specify it using --with-libssl-prefix. + If your installation of OpenSSL is in another + location, specify it using --with-libssl-prefix. * --with-mbedtls * --without-mbedtls @@ -326,15 +326,15 @@ Some ./configure options deserve additional comments: * --without-libz * --with-libz-prefix=[DIR] - If present, libssh2 will attempt to use the zlib - (http://www.zlib.org) for payload compression, however - zlib is not required. + If present, libssh2 will attempt to use the zlib + (http://www.zlib.org) for payload compression, however + zlib is not required. - If your installation of Libz is in another location, - specify it using --with-libz-prefix. + If your installation of Libz is in another location, + specify it using --with-libz-prefix. * --enable-debug - Will make the build use more pedantic and strict compiler - options as well as enable the libssh2_trace() function (for - showing debug traces). + Will make the build use more pedantic and strict compiler + options as well as enable the libssh2_trace() function (for + showing debug traces). diff --git a/docs/Makefile.am b/docs/Makefile.am index 30d6ef0b..6b938ba7 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -4,179 +4,179 @@ EXTRA_DIST = template.3 BINDINGS INSTALL_AUTOTOOLS INSTALL_CMAKE.md HACKING TODO AUTHORS CMakeLists.txt HACKING-CRYPTO SECURITY.md dist_man_MANS = \ - libssh2_agent_connect.3 \ - libssh2_agent_disconnect.3 \ - libssh2_agent_free.3 \ - libssh2_agent_get_identity.3 \ - libssh2_agent_get_identity_path.3 \ - libssh2_agent_init.3 \ - libssh2_agent_list_identities.3 \ - libssh2_agent_set_identity_path.3 \ - libssh2_agent_userauth.3 \ - libssh2_banner_set.3 \ - libssh2_base64_decode.3 \ - libssh2_channel_close.3 \ - libssh2_channel_direct_tcpip.3 \ - libssh2_channel_direct_tcpip_ex.3 \ - libssh2_channel_eof.3 \ - libssh2_channel_exec.3 \ - libssh2_channel_flush.3 \ - libssh2_channel_flush_ex.3 \ - libssh2_channel_flush_stderr.3 \ - libssh2_channel_forward_accept.3 \ - libssh2_channel_forward_cancel.3 \ - libssh2_channel_forward_listen.3 \ - libssh2_channel_forward_listen_ex.3 \ - libssh2_channel_free.3 \ - libssh2_channel_get_exit_signal.3 \ - libssh2_channel_get_exit_status.3 \ - libssh2_channel_handle_extended_data.3 \ - libssh2_channel_handle_extended_data2.3 \ - libssh2_channel_ignore_extended_data.3 \ - libssh2_channel_open_ex.3 \ - libssh2_channel_open_session.3 \ - libssh2_channel_process_startup.3 \ - libssh2_channel_read.3 \ - libssh2_channel_read_ex.3 \ - libssh2_channel_read_stderr.3 \ - libssh2_channel_receive_window_adjust.3 \ - libssh2_channel_receive_window_adjust2.3 \ - libssh2_channel_request_auth_agent.3 \ - libssh2_channel_request_pty.3 \ - libssh2_channel_request_pty_ex.3 \ - libssh2_channel_request_pty_size.3 \ - libssh2_channel_request_pty_size_ex.3 \ - libssh2_channel_send_eof.3 \ - libssh2_channel_set_blocking.3 \ - libssh2_channel_setenv.3 \ - libssh2_channel_setenv_ex.3 \ - libssh2_channel_shell.3 \ - libssh2_channel_subsystem.3 \ - libssh2_channel_wait_closed.3 \ - libssh2_channel_wait_eof.3 \ - libssh2_channel_window_read.3 \ - libssh2_channel_window_read_ex.3 \ - libssh2_channel_window_write.3 \ - libssh2_channel_window_write_ex.3 \ - libssh2_channel_write.3 \ - libssh2_channel_write_ex.3 \ - libssh2_channel_write_stderr.3 \ - libssh2_channel_x11_req.3 \ - libssh2_channel_x11_req_ex.3 \ - libssh2_crypto_engine.3 \ - libssh2_exit.3 \ - libssh2_free.3 \ - libssh2_hostkey_hash.3 \ - libssh2_init.3 \ - libssh2_keepalive_config.3 \ - libssh2_keepalive_send.3 \ - libssh2_knownhost_add.3 \ - libssh2_knownhost_addc.3 \ - libssh2_knownhost_check.3 \ - libssh2_knownhost_checkp.3 \ - libssh2_knownhost_del.3 \ - libssh2_knownhost_free.3 \ - libssh2_knownhost_get.3 \ - libssh2_knownhost_init.3 \ - libssh2_knownhost_readfile.3 \ - libssh2_knownhost_readline.3 \ - libssh2_knownhost_writefile.3 \ - libssh2_knownhost_writeline.3 \ - libssh2_poll.3 \ - libssh2_poll_channel_read.3 \ - libssh2_publickey_add.3 \ - libssh2_publickey_add_ex.3 \ - libssh2_publickey_init.3 \ - libssh2_publickey_list_fetch.3 \ - libssh2_publickey_list_free.3 \ - libssh2_publickey_remove.3 \ - libssh2_publickey_remove_ex.3 \ - libssh2_publickey_shutdown.3 \ - libssh2_scp_recv.3 \ - libssh2_scp_recv2.3 \ - libssh2_scp_send.3 \ - libssh2_scp_send64.3 \ - libssh2_scp_send_ex.3 \ - libssh2_session_abstract.3 \ - libssh2_session_banner_get.3 \ - libssh2_session_banner_set.3 \ - libssh2_session_block_directions.3 \ - libssh2_session_callback_set.3 \ - libssh2_session_disconnect.3 \ - libssh2_session_disconnect_ex.3 \ - libssh2_session_flag.3 \ - libssh2_session_free.3 \ - libssh2_session_get_blocking.3 \ - libssh2_session_get_timeout.3 \ - libssh2_session_handshake.3 \ - libssh2_session_hostkey.3 \ - libssh2_session_init.3 \ - libssh2_session_init_ex.3 \ - libssh2_session_last_errno.3 \ - libssh2_session_last_error.3 \ - libssh2_session_set_last_error.3 \ - libssh2_session_method_pref.3 \ - libssh2_session_methods.3 \ - libssh2_session_set_blocking.3 \ - libssh2_session_set_timeout.3 \ - libssh2_session_startup.3 \ - libssh2_session_supported_algs.3 \ - libssh2_sftp_close.3 \ - libssh2_sftp_close_handle.3 \ - libssh2_sftp_closedir.3 \ - libssh2_sftp_fsetstat.3 \ - libssh2_sftp_fstat.3 \ - libssh2_sftp_fstat_ex.3 \ - libssh2_sftp_fstatvfs.3 \ - libssh2_sftp_fsync.3 \ - libssh2_sftp_get_channel.3 \ - libssh2_sftp_init.3 \ - libssh2_sftp_last_error.3 \ - libssh2_sftp_lstat.3 \ - libssh2_sftp_mkdir.3 \ - libssh2_sftp_mkdir_ex.3 \ - libssh2_sftp_open.3 \ - libssh2_sftp_open_ex.3 \ - libssh2_sftp_opendir.3 \ - libssh2_sftp_read.3 \ - libssh2_sftp_readdir.3 \ - libssh2_sftp_readdir_ex.3 \ - libssh2_sftp_readlink.3 \ - libssh2_sftp_realpath.3 \ - libssh2_sftp_rename.3 \ - libssh2_sftp_rename_ex.3 \ - libssh2_sftp_rewind.3 \ - libssh2_sftp_rmdir.3 \ - libssh2_sftp_rmdir_ex.3 \ - libssh2_sftp_seek.3 \ - libssh2_sftp_seek64.3 \ - libssh2_sftp_setstat.3 \ - libssh2_sftp_shutdown.3 \ - libssh2_sftp_stat.3 \ - libssh2_sftp_stat_ex.3 \ - libssh2_sftp_statvfs.3 \ - libssh2_sftp_symlink.3 \ - libssh2_sftp_symlink_ex.3 \ - libssh2_sftp_tell.3 \ - libssh2_sftp_tell64.3 \ - libssh2_sftp_unlink.3 \ - libssh2_sftp_unlink_ex.3 \ - libssh2_sftp_write.3 \ - libssh2_sign_sk.3 \ - libssh2_trace.3 \ - libssh2_trace_sethandler.3 \ - libssh2_userauth_authenticated.3 \ - libssh2_userauth_banner.3 \ - libssh2_userauth_hostbased_fromfile.3 \ - libssh2_userauth_hostbased_fromfile_ex.3 \ - libssh2_userauth_keyboard_interactive.3 \ - libssh2_userauth_keyboard_interactive_ex.3 \ - libssh2_userauth_list.3 \ - libssh2_userauth_password.3 \ - libssh2_userauth_password_ex.3 \ - libssh2_userauth_publickey.3 \ - libssh2_userauth_publickey_fromfile.3 \ - libssh2_userauth_publickey_fromfile_ex.3 \ - libssh2_userauth_publickey_frommemory.3 \ - libssh2_userauth_publickey_sk.3 \ - libssh2_version.3 + libssh2_agent_connect.3 \ + libssh2_agent_disconnect.3 \ + libssh2_agent_free.3 \ + libssh2_agent_get_identity.3 \ + libssh2_agent_get_identity_path.3 \ + libssh2_agent_init.3 \ + libssh2_agent_list_identities.3 \ + libssh2_agent_set_identity_path.3 \ + libssh2_agent_userauth.3 \ + libssh2_banner_set.3 \ + libssh2_base64_decode.3 \ + libssh2_channel_close.3 \ + libssh2_channel_direct_tcpip.3 \ + libssh2_channel_direct_tcpip_ex.3 \ + libssh2_channel_eof.3 \ + libssh2_channel_exec.3 \ + libssh2_channel_flush.3 \ + libssh2_channel_flush_ex.3 \ + libssh2_channel_flush_stderr.3 \ + libssh2_channel_forward_accept.3 \ + libssh2_channel_forward_cancel.3 \ + libssh2_channel_forward_listen.3 \ + libssh2_channel_forward_listen_ex.3 \ + libssh2_channel_free.3 \ + libssh2_channel_get_exit_signal.3 \ + libssh2_channel_get_exit_status.3 \ + libssh2_channel_handle_extended_data.3 \ + libssh2_channel_handle_extended_data2.3 \ + libssh2_channel_ignore_extended_data.3 \ + libssh2_channel_open_ex.3 \ + libssh2_channel_open_session.3 \ + libssh2_channel_process_startup.3 \ + libssh2_channel_read.3 \ + libssh2_channel_read_ex.3 \ + libssh2_channel_read_stderr.3 \ + libssh2_channel_receive_window_adjust.3 \ + libssh2_channel_receive_window_adjust2.3 \ + libssh2_channel_request_auth_agent.3 \ + libssh2_channel_request_pty.3 \ + libssh2_channel_request_pty_ex.3 \ + libssh2_channel_request_pty_size.3 \ + libssh2_channel_request_pty_size_ex.3 \ + libssh2_channel_send_eof.3 \ + libssh2_channel_set_blocking.3 \ + libssh2_channel_setenv.3 \ + libssh2_channel_setenv_ex.3 \ + libssh2_channel_shell.3 \ + libssh2_channel_subsystem.3 \ + libssh2_channel_wait_closed.3 \ + libssh2_channel_wait_eof.3 \ + libssh2_channel_window_read.3 \ + libssh2_channel_window_read_ex.3 \ + libssh2_channel_window_write.3 \ + libssh2_channel_window_write_ex.3 \ + libssh2_channel_write.3 \ + libssh2_channel_write_ex.3 \ + libssh2_channel_write_stderr.3 \ + libssh2_channel_x11_req.3 \ + libssh2_channel_x11_req_ex.3 \ + libssh2_crypto_engine.3 \ + libssh2_exit.3 \ + libssh2_free.3 \ + libssh2_hostkey_hash.3 \ + libssh2_init.3 \ + libssh2_keepalive_config.3 \ + libssh2_keepalive_send.3 \ + libssh2_knownhost_add.3 \ + libssh2_knownhost_addc.3 \ + libssh2_knownhost_check.3 \ + libssh2_knownhost_checkp.3 \ + libssh2_knownhost_del.3 \ + libssh2_knownhost_free.3 \ + libssh2_knownhost_get.3 \ + libssh2_knownhost_init.3 \ + libssh2_knownhost_readfile.3 \ + libssh2_knownhost_readline.3 \ + libssh2_knownhost_writefile.3 \ + libssh2_knownhost_writeline.3 \ + libssh2_poll.3 \ + libssh2_poll_channel_read.3 \ + libssh2_publickey_add.3 \ + libssh2_publickey_add_ex.3 \ + libssh2_publickey_init.3 \ + libssh2_publickey_list_fetch.3 \ + libssh2_publickey_list_free.3 \ + libssh2_publickey_remove.3 \ + libssh2_publickey_remove_ex.3 \ + libssh2_publickey_shutdown.3 \ + libssh2_scp_recv.3 \ + libssh2_scp_recv2.3 \ + libssh2_scp_send.3 \ + libssh2_scp_send64.3 \ + libssh2_scp_send_ex.3 \ + libssh2_session_abstract.3 \ + libssh2_session_banner_get.3 \ + libssh2_session_banner_set.3 \ + libssh2_session_block_directions.3 \ + libssh2_session_callback_set.3 \ + libssh2_session_disconnect.3 \ + libssh2_session_disconnect_ex.3 \ + libssh2_session_flag.3 \ + libssh2_session_free.3 \ + libssh2_session_get_blocking.3 \ + libssh2_session_get_timeout.3 \ + libssh2_session_handshake.3 \ + libssh2_session_hostkey.3 \ + libssh2_session_init.3 \ + libssh2_session_init_ex.3 \ + libssh2_session_last_errno.3 \ + libssh2_session_last_error.3 \ + libssh2_session_set_last_error.3 \ + libssh2_session_method_pref.3 \ + libssh2_session_methods.3 \ + libssh2_session_set_blocking.3 \ + libssh2_session_set_timeout.3 \ + libssh2_session_startup.3 \ + libssh2_session_supported_algs.3 \ + libssh2_sftp_close.3 \ + libssh2_sftp_close_handle.3 \ + libssh2_sftp_closedir.3 \ + libssh2_sftp_fsetstat.3 \ + libssh2_sftp_fstat.3 \ + libssh2_sftp_fstat_ex.3 \ + libssh2_sftp_fstatvfs.3 \ + libssh2_sftp_fsync.3 \ + libssh2_sftp_get_channel.3 \ + libssh2_sftp_init.3 \ + libssh2_sftp_last_error.3 \ + libssh2_sftp_lstat.3 \ + libssh2_sftp_mkdir.3 \ + libssh2_sftp_mkdir_ex.3 \ + libssh2_sftp_open.3 \ + libssh2_sftp_open_ex.3 \ + libssh2_sftp_opendir.3 \ + libssh2_sftp_read.3 \ + libssh2_sftp_readdir.3 \ + libssh2_sftp_readdir_ex.3 \ + libssh2_sftp_readlink.3 \ + libssh2_sftp_realpath.3 \ + libssh2_sftp_rename.3 \ + libssh2_sftp_rename_ex.3 \ + libssh2_sftp_rewind.3 \ + libssh2_sftp_rmdir.3 \ + libssh2_sftp_rmdir_ex.3 \ + libssh2_sftp_seek.3 \ + libssh2_sftp_seek64.3 \ + libssh2_sftp_setstat.3 \ + libssh2_sftp_shutdown.3 \ + libssh2_sftp_stat.3 \ + libssh2_sftp_stat_ex.3 \ + libssh2_sftp_statvfs.3 \ + libssh2_sftp_symlink.3 \ + libssh2_sftp_symlink_ex.3 \ + libssh2_sftp_tell.3 \ + libssh2_sftp_tell64.3 \ + libssh2_sftp_unlink.3 \ + libssh2_sftp_unlink_ex.3 \ + libssh2_sftp_write.3 \ + libssh2_sign_sk.3 \ + libssh2_trace.3 \ + libssh2_trace_sethandler.3 \ + libssh2_userauth_authenticated.3 \ + libssh2_userauth_banner.3 \ + libssh2_userauth_hostbased_fromfile.3 \ + libssh2_userauth_hostbased_fromfile_ex.3 \ + libssh2_userauth_keyboard_interactive.3 \ + libssh2_userauth_keyboard_interactive_ex.3 \ + libssh2_userauth_list.3 \ + libssh2_userauth_password.3 \ + libssh2_userauth_password_ex.3 \ + libssh2_userauth_publickey.3 \ + libssh2_userauth_publickey_fromfile.3 \ + libssh2_userauth_publickey_fromfile_ex.3 \ + libssh2_userauth_publickey_frommemory.3 \ + libssh2_userauth_publickey_sk.3 \ + libssh2_version.3 diff --git a/docs/libssh2_agent_connect.3 b/docs/libssh2_agent_connect.3 index 1c6ff6d9..6482c66f 100644 --- a/docs/libssh2_agent_connect.3 +++ b/docs/libssh2_agent_connect.3 @@ -20,4 +20,3 @@ Added in libssh2 1.2 .SH SEE ALSO .BR libssh2_agent_init(3) .BR libssh2_agent_disconnect(3) - diff --git a/docs/libssh2_agent_get_identity_path.3 b/docs/libssh2_agent_get_identity_path.3 index 58d6dd56..1cbdf7ae 100644 --- a/docs/libssh2_agent_get_identity_path.3 +++ b/docs/libssh2_agent_get_identity_path.3 @@ -19,4 +19,3 @@ Added in libssh2 1.9 .SH SEE ALSO .BR libssh2_agent_init(3) .BR libssh2_agent_set_identity_path(3) - diff --git a/docs/libssh2_agent_list_identities.3 b/docs/libssh2_agent_list_identities.3 index e1e4b545..48a1d6c1 100644 --- a/docs/libssh2_agent_list_identities.3 +++ b/docs/libssh2_agent_list_identities.3 @@ -21,4 +21,3 @@ Added in libssh2 1.2 .SH SEE ALSO .BR libssh2_agent_connect(3) .BR libssh2_agent_get_identity(3) - diff --git a/docs/libssh2_agent_set_identity_path.3 b/docs/libssh2_agent_set_identity_path.3 index 73e1266d..2d75b791 100644 --- a/docs/libssh2_agent_set_identity_path.3 +++ b/docs/libssh2_agent_set_identity_path.3 @@ -19,4 +19,3 @@ Added in libssh2 1.9 .SH SEE ALSO .BR libssh2_agent_init(3) .BR libssh2_agent_get_identity_path(3) - diff --git a/docs/libssh2_agent_userauth.3 b/docs/libssh2_agent_userauth.3 index 3c956fec..8524884a 100644 --- a/docs/libssh2_agent_userauth.3 +++ b/docs/libssh2_agent_userauth.3 @@ -11,12 +11,12 @@ int libssh2_agent_userauth(LIBSSH2_AGENT *agent, const char *username, struct libssh2_agent_publickey *identity); .SH DESCRIPTION -\fIagent\fP - ssh-agent handle as returned by +\fIagent\fP - ssh-agent handle as returned by .BR libssh2_agent_init(3) \fIusername\fP - Remote user name to authenticate as. -\fIidentity\fP - Public key to authenticate with, as returned by +\fIidentity\fP - Public key to authenticate with, as returned by .BR libssh2_agent_get_identity(3) Attempt public key authentication with the help of ssh-agent. diff --git a/docs/libssh2_banner_set.3 b/docs/libssh2_banner_set.3 index 2baa121e..04f6ef58 100644 --- a/docs/libssh2_banner_set.3 +++ b/docs/libssh2_banner_set.3 @@ -4,20 +4,20 @@ libssh2_banner_set - set the SSH protocol banner for the local client .SH SYNOPSIS #include -int +int libssh2_banner_set(LIBSSH2_SESSION *session, const char *banner); .SH DESCRIPTION This function is \fBDEPRECATED\fP. Use \fIlibssh2_session_banner_set(3)\fP instead! -\fIsession\fP - Session instance as returned by +\fIsession\fP - Session instance as returned by .BR libssh2_session_init_ex(3) \fIbanner\fP - A pointer to a user defined banner -Set the banner that will be sent to the remote host when the SSH session is -started with +Set the banner that will be sent to the remote host when the SSH session is +started with .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 diff --git a/docs/libssh2_channel_close.3 b/docs/libssh2_channel_close.3 index 2fe0a0d4..b493395a 100644 --- a/docs/libssh2_channel_close.3 +++ b/docs/libssh2_channel_close.3 @@ -4,17 +4,17 @@ libssh2_channel_close - close a channel .SH SYNOPSIS #include -int +int libssh2_channel_close(LIBSSH2_CHANNEL *channel); .SH DESCRIPTION \fIchannel\fP - active channel stream to set closed status on. -Close an active data channel. In practice this means sending an SSH_MSG_CLOSE -packet to the remote host which serves as instruction that no further data -will be sent to it. The remote host may still send data back until it sends -its own close message in response. To wait for the remote end to close its -connection as well, follow this command with +Close an active data channel. In practice this means sending an SSH_MSG_CLOSE +packet to the remote host which serves as instruction that no further data +will be sent to it. The remote host may still send data back until it sends +its own close message in response. To wait for the remote end to close its +connection as well, follow this command with .BR libssh2_channel_wait_closed(3) .SH RETURN VALUE diff --git a/docs/libssh2_channel_direct_tcpip_ex.3 b/docs/libssh2_channel_direct_tcpip_ex.3 index 481c55ce..5959bc93 100644 --- a/docs/libssh2_channel_direct_tcpip_ex.3 +++ b/docs/libssh2_channel_direct_tcpip_ex.3 @@ -4,14 +4,14 @@ libssh2_channel_direct_tcpip_ex - Tunnel a TCP connection through an SSH session .SH SYNOPSIS #include -LIBSSH2_CHANNEL * +LIBSSH2_CHANNEL * libssh2_channel_direct_tcpip_ex(LIBSSH2_SESSION *session, const char *host, int port, const char *shost, int sport); -LIBSSH2_CHANNEL * +LIBSSH2_CHANNEL * libssh2_channel_direct_tcpip(LIBSSH2_SESSION *session, const char *host, int port); .SH DESCRIPTION -\fIsession\fP - Session instance as returned by +\fIsession\fP - Session instance as returned by .BR libssh2_session_init_ex(3) \fIhost\fP - Third party host to connect to using the SSH host as a proxy. @@ -22,9 +22,9 @@ libssh2_channel_direct_tcpip(LIBSSH2_SESSION *session, const char *host, int por \fIsport\fP - Port to tell the SSH server the connection originated from. -Tunnel a TCP/IP connection through the SSH transport via the remote host to -a third party. Communication from the client to the SSH server remains -encrypted, communication from the server to the 3rd party host travels +Tunnel a TCP/IP connection through the SSH transport via the remote host to +a third party. Communication from the client to the SSH server remains +encrypted, communication from the server to the 3rd party host travels in cleartext. .SH RETURN VALUE diff --git a/docs/libssh2_channel_eof.3 b/docs/libssh2_channel_eof.3 index ed4a074b..9ddc1081 100644 --- a/docs/libssh2_channel_eof.3 +++ b/docs/libssh2_channel_eof.3 @@ -4,7 +4,7 @@ libssh2_channel_eof - check a channel's EOF status .SH SYNOPSIS #include -int +int libssh2_channel_eof(LIBSSH2_CHANNEL *channel); .SH DESCRIPTION \fIchannel\fP - active channel stream to set closed status on. diff --git a/docs/libssh2_channel_flush_ex.3 b/docs/libssh2_channel_flush_ex.3 index 6cd39b2c..61b351ab 100644 --- a/docs/libssh2_channel_flush_ex.3 +++ b/docs/libssh2_channel_flush_ex.3 @@ -4,26 +4,26 @@ libssh2_channel_flush_ex - flush a channel .SH SYNOPSIS #include -int +int libssh2_channel_flush_ex(LIBSSH2_CHANNEL *channel, int streamid); -int +int libssh2_channel_flush(LIBSSH2_CHANNEL *channel); -int +int libssh2_channel_flush_stderr(LIBSSH2_CHANNEL *channel); .SH DESCRIPTION \fIchannel\fP - Active channel stream to flush. -\fIstreamid\fP - Specific substream number to flush. Groups of substreams may +\fIstreamid\fP - Specific substream number to flush. Groups of substreams may be flushed by passing on of the following Constants. .br \fBLIBSSH2_CHANNEL_FLUSH_EXTENDED_DATA\fP: Flush all extended data substreams .br \fBLIBSSH2_CHANNEL_FLUSH_ALL\fP: Flush all substreams -Flush the read buffer for a given channel instance. Individual substreams may +Flush the read buffer for a given channel instance. Individual substreams may be flushed by number or using one of the provided macros. .SH RETURN VALUE diff --git a/docs/libssh2_channel_forward_cancel.3 b/docs/libssh2_channel_forward_cancel.3 index 16f826fb..1bb4c037 100644 --- a/docs/libssh2_channel_forward_cancel.3 +++ b/docs/libssh2_channel_forward_cancel.3 @@ -4,11 +4,11 @@ libssh2_channel_forward_cancel - cancel a forwarded TCP port .SH SYNOPSIS #include -int +int libssh2_channel_forward_cancel(LIBSSH2_LISTENER *listener); .SH DESCRIPTION -\fIlistener\fP - Forwarding listener instance as returned by +\fIlistener\fP - Forwarding listener instance as returned by .BR libssh2_channel_forward_listen_ex(3) Instruct the remote host to stop listening for new connections on a previously requested host/port. diff --git a/docs/libssh2_channel_forward_listen_ex.3 b/docs/libssh2_channel_forward_listen_ex.3 index a358f6ce..22154996 100644 --- a/docs/libssh2_channel_forward_listen_ex.3 +++ b/docs/libssh2_channel_forward_listen_ex.3 @@ -4,10 +4,10 @@ libssh2_channel_forward_listen_ex - listen to inbound connections .SH SYNOPSIS #include -LIBSSH2_LISTENER * +LIBSSH2_LISTENER * libssh2_channel_forward_listen_ex(LIBSSH2_SESSION *session, char *host, int port, int *bound_port, int queue_maxsize); -LIBSSH2_LISTENER * +LIBSSH2_LISTENER * libssh2_channel_forward_listen(LIBSSH2_SESSION *session, int port); .SH DESCRIPTION @@ -15,7 +15,7 @@ Instruct the remote SSH server to begin listening for inbound TCP/IP connections. New connections will be queued by the library until accepted by \fIlibssh2_channel_forward_accept(3)\fP. -\fIsession\fP - instance as returned by libssh2_session_init(). +\fIsession\fP - instance as returned by libssh2_session_init(). \fIhost\fP - specific address to bind to on the remote host. Binding to 0.0.0.0 (default when NULL is passed) will bind to all available addresses. diff --git a/docs/libssh2_channel_free.3 b/docs/libssh2_channel_free.3 index fc76f5a8..9013a4a2 100644 --- a/docs/libssh2_channel_free.3 +++ b/docs/libssh2_channel_free.3 @@ -4,16 +4,16 @@ libssh2_channel_free - free all resources associated with a channel .SH SYNOPSIS #include -int +int libssh2_channel_free(LIBSSH2_CHANNEL *channel); .SH DESCRIPTION \fIchannel\fP - Channel stream to free. -Release all resources associated with a channel stream. If the channel has -not yet been closed with +Release all resources associated with a channel stream. If the channel has +not yet been closed with .BR libssh2_channel_close(3) -, it will be called automatically so that the remote end may know that it +, it will be called automatically so that the remote end may know that it can safely free its own resources. .SH RETURN VALUE diff --git a/docs/libssh2_channel_get_exit_signal.3 b/docs/libssh2_channel_get_exit_signal.3 index 138e7c72..1dc83f8e 100644 --- a/docs/libssh2_channel_get_exit_signal.3 +++ b/docs/libssh2_channel_get_exit_signal.3 @@ -4,7 +4,7 @@ libssh2_channel_get_exit_signal - get the remote exit signal .SH SYNOPSIS #include -int +int libssh2_channel_get_exit_signal(LIBSSH2_CHANNEL *channel, char **exitsignal, size_t *exitsignal_len, char **errmsg, size_t *errmsg_len, char **langtag, size_t *langtag_len); .SH DESCRIPTION @@ -13,10 +13,10 @@ libssh2_channel_get_exit_signal(LIBSSH2_CHANNEL *channel, char **exitsignal, siz \fIexitsignal\fP - If not NULL, is populated by reference with the exit signal (without leading "SIG"). Note that the string is stored in a newly allocated buffer. If the remote program exited cleanly, the referenced string pointer -will be set to NULL. +will be set to NULL. \fIexitsignal_len\fP - If not NULL, is populated by reference with the length -of exitsignal. +of exitsignal. \fIerrmsg\fP - If not NULL, is populated by reference with the error message (if provided by remote server, if not it will be set to NULL). Note that the @@ -24,7 +24,7 @@ string is stored in a newly allocated buffer. \fIerrmsg_len\fP - If not NULL, is populated by reference with the length of errmsg. -\fIlangtag\fP - If not NULL, is populated by reference with the language tag +\fIlangtag\fP - If not NULL, is populated by reference with the language tag (if provided by remote server, if not it will be set to NULL). Note that the string is stored in a newly allocated buffer. diff --git a/docs/libssh2_channel_get_exit_status.3 b/docs/libssh2_channel_get_exit_status.3 index 4a8c9e2f..24ceb3bd 100644 --- a/docs/libssh2_channel_get_exit_status.3 +++ b/docs/libssh2_channel_get_exit_status.3 @@ -4,14 +4,14 @@ libssh2_channel_get_exit_status - get the remote exit code .SH SYNOPSIS #include -int +int libssh2_channel_get_exit_status(LIBSSH2_CHANNEL* channel) .SH DESCRIPTION \fIchannel\fP - Closed channel stream to retrieve exit status from. -Returns the exit code raised by the process running on the remote host at -the other end of the named channel. Note that the exit status may not be +Returns the exit code raised by the process running on the remote host at +the other end of the named channel. Note that the exit status may not be available if the remote end has not yet set its status to closed. .SH RETURN VALUE diff --git a/docs/libssh2_channel_handle_extended_data.3 b/docs/libssh2_channel_handle_extended_data.3 index 8ab24883..d9964776 100644 --- a/docs/libssh2_channel_handle_extended_data.3 +++ b/docs/libssh2_channel_handle_extended_data.3 @@ -4,7 +4,7 @@ libssh2_channel_handle_extended_data - set extended data handling mode .SH SYNOPSIS #include -void +void libssh2_channel_handle_extended_data(LIBSSH2_CHANNEL *channel, int ignore_mode); .SH DESCRIPTION @@ -15,7 +15,7 @@ This function is deprecated. Use the \fIignore_mode\fP - One of the three LIBSSH2_CHANNEL_EXTENDED_DATA_* Constants. .br -\fBLIBSSH2_CHANNEL_EXTENDED_DATA_NORMAL\fP: Queue extended data for eventual +\fBLIBSSH2_CHANNEL_EXTENDED_DATA_NORMAL\fP: Queue extended data for eventual reading .br \fBLIBSSH2_CHANNEL_EXTENDED_DATA_MERGE\fP: Treat extended data and ordinary @@ -23,7 +23,7 @@ data the same. Merge all substreams such that calls to \fIlibssh2_channel_read(3)\fP will pull from all substreams on a first-in/first-out basis. .br -\fBLIBSSH2_CHANNEL_EXTENDED_DATA_IGNORE\fP: Discard all extended data as it +\fBLIBSSH2_CHANNEL_EXTENDED_DATA_IGNORE\fP: Discard all extended data as it arrives. Change how a channel deals with extended data packets. By default all extended diff --git a/docs/libssh2_channel_handle_extended_data2.3 b/docs/libssh2_channel_handle_extended_data2.3 index 8910d8ce..a090e435 100644 --- a/docs/libssh2_channel_handle_extended_data2.3 +++ b/docs/libssh2_channel_handle_extended_data2.3 @@ -4,7 +4,7 @@ libssh2_channel_handle_extended_data2 - set extended data handling mode .SH SYNOPSIS #include -int +int libssh2_channel_handle_extended_data2(LIBSSH2_CHANNEL *channel, int ignore_mode); .SH DESCRIPTION @@ -12,19 +12,19 @@ libssh2_channel_handle_extended_data2(LIBSSH2_CHANNEL *channel, int ignore_mode) \fIignore_mode\fP - One of the three LIBSSH2_CHANNEL_EXTENDED_DATA_* Constants. .br -\fBLIBSSH2_CHANNEL_EXTENDED_DATA_NORMAL\fP: Queue extended data for eventual +\fBLIBSSH2_CHANNEL_EXTENDED_DATA_NORMAL\fP: Queue extended data for eventual reading .br -\fBLIBSSH2_CHANNEL_EXTENDED_DATA_MERGE\fP: Treat extended data and ordinary -data the same. Merge all substreams such that calls to +\fBLIBSSH2_CHANNEL_EXTENDED_DATA_MERGE\fP: Treat extended data and ordinary +data the same. Merge all substreams such that calls to .BR libssh2_channel_read(3) will pull from all substreams on a first-in/first-out basis. .br -\fBLIBSSH2_CHANNEL_EXTENDED_DATA_IGNORE\fP: Discard all extended data as it +\fBLIBSSH2_CHANNEL_EXTENDED_DATA_IGNORE\fP: Discard all extended data as it arrives. -Change how a channel deals with extended data packets. By default all -extended data is queued until read by +Change how a channel deals with extended data packets. By default all +extended data is queued until read by .BR libssh2_channel_read_ex(3) .SH RETURN VALUE diff --git a/docs/libssh2_channel_open_ex.3 b/docs/libssh2_channel_open_ex.3 index 7dec2945..aeacb1af 100644 --- a/docs/libssh2_channel_open_ex.3 +++ b/docs/libssh2_channel_open_ex.3 @@ -11,29 +11,29 @@ LIBSSH2_CHANNEL * libssh2_channel_open_session(session); .SH DESCRIPTION -\fIsession\fP - Session instance as returned by +\fIsession\fP - Session instance as returned by .BR libssh2_session_init_ex(3) -\fIchannel_type\fP - Channel type to open. Typically one of session, -direct-tcpip, or tcpip-forward. The SSH2 protocol allowed for additional +\fIchannel_type\fP - Channel type to open. Typically one of session, +direct-tcpip, or tcpip-forward. The SSH2 protocol allowed for additional types including local, custom channel types. \fIchannel_type_len\fP - Length of channel_type -\fIwindow_size\fP - Maximum amount of unacknowledged data remote host is +\fIwindow_size\fP - Maximum amount of unacknowledged data remote host is allowed to send before receiving an SSH_MSG_CHANNEL_WINDOW_ADJUST packet. -\fIpacket_size\fP - Maximum number of bytes remote host is allowed to send +\fIpacket_size\fP - Maximum number of bytes remote host is allowed to send in a single SSH_MSG_CHANNEL_DATA or SSG_MSG_CHANNEL_EXTENDED_DATA packet. \fImessage\fP - Additional data as required by the selected channel_type. \fImessage_len\fP - Length of message parameter. -Allocate a new channel for exchanging data with the server. This method is -typically called through its macroized form: +Allocate a new channel for exchanging data with the server. This method is +typically called through its macroized form: .BR libssh2_channel_open_session(3) -or via +or via .BR libssh2_channel_direct_tcpip(3) or .BR libssh2_channel_forward_listen(3) @@ -46,7 +46,7 @@ Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. -\fILIBSSH2_ERROR_CHANNEL_FAILURE\fP - +\fILIBSSH2_ERROR_CHANNEL_FAILURE\fP - \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block. diff --git a/docs/libssh2_channel_process_startup.3 b/docs/libssh2_channel_process_startup.3 index 7c279820..b215e2fa 100644 --- a/docs/libssh2_channel_process_startup.3 +++ b/docs/libssh2_channel_process_startup.3 @@ -13,7 +13,7 @@ int libssh2_channel_process_startup(LIBSSH2_CHANNEL *channel, .SH DESCRIPTION \fIchannel\fP - Active session channel instance. -\fIrequest\fP - Type of process to startup. The SSH2 protocol currently +\fIrequest\fP - Type of process to startup. The SSH2 protocol currently defines shell, exec, and subsystem as standard process services. \fIrequest_len\fP - Length of request parameter. @@ -22,7 +22,7 @@ defines shell, exec, and subsystem as standard process services. \fImessage_len\fP - Length of message parameter. -Initiate a request on a session type channel such as returned by +Initiate a request on a session type channel such as returned by .BR libssh2_channel_open_ex(3) .SH RETURN VALUE Return 0 on success or negative on failure. It returns @@ -33,6 +33,6 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. -\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP - +\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP - .SH SEE ALSO .BR libssh2_channel_open_ex(3) diff --git a/docs/libssh2_channel_read_ex.3 b/docs/libssh2_channel_read_ex.3 index 83d7c3e0..bc021a45 100644 --- a/docs/libssh2_channel_read_ex.3 +++ b/docs/libssh2_channel_read_ex.3 @@ -19,9 +19,9 @@ one standard I/O substream (stream_id == 0), and may have up to 2^32 extended data streams as identified by the selected \fIstream_id\fP. The SSH2 protocol currently defines a stream ID of 1 to be the stderr substream. -\fIchannel\fP - active channel stream to read from. +\fIchannel\fP - active channel stream to read from. -\fIstream_id\fP - substream ID number (e.g. 0 or SSH_EXTENDED_DATA_STDERR) +\fIstream_id\fP - substream ID number (e.g. 0 or SSH_EXTENDED_DATA_STDERR) \fIbuf\fP - pointer to storage buffer to read data into diff --git a/docs/libssh2_channel_request_pty_ex.3 b/docs/libssh2_channel_request_pty_ex.3 index 35b5840a..11dda5bb 100644 --- a/docs/libssh2_channel_request_pty_ex.3 +++ b/docs/libssh2_channel_request_pty_ex.3 @@ -4,14 +4,14 @@ libssh2_channel_request_pty_ex - short function description .SH SYNOPSIS #include -int +int libssh2_channel_request_pty_ex(LIBSSH2_CHANNEL *channel, const char *term, unsigned int term_len, const char *modes, unsigned int modes_len, int width, int height, int width_px, int height_px); -int +int libssh2_channel_request_pty(LIBSSH2_CHANNEL *channel, char *term); .SH DESCRIPTION -\fIchannel\fP - Previously opened channel instance such as returned by +\fIchannel\fP - Previously opened channel instance such as returned by .BR libssh2_channel_open_ex(3) \fIterm\fP - Terminal emulation (e.g. vt102, ansi, etc...) @@ -30,8 +30,8 @@ libssh2_channel_request_pty(LIBSSH2_CHANNEL *channel, char *term); \fIheight_px\fP - Height of pty in pixels -Request a PTY on an established channel. Note that this does not make sense -for all channel types and may be ignored by the server despite returning +Request a PTY on an established channel. Note that this does not make sense +for all channel types and may be ignored by the server despite returning success. .SH RETURN VALUE Return 0 on success or negative on failure. It returns @@ -42,6 +42,6 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. -\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP - +\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP - .SH SEE ALSO .BR libssh2_channel_open_ex(3) diff --git a/docs/libssh2_channel_send_eof.3 b/docs/libssh2_channel_send_eof.3 index 0e5975ac..025ef732 100644 --- a/docs/libssh2_channel_send_eof.3 +++ b/docs/libssh2_channel_send_eof.3 @@ -4,11 +4,11 @@ libssh2_channel_send_eof - send EOF to remote server .SH SYNOPSIS #include -int +int libssh2_channel_send_eof(LIBSSH2_CHANNEL *channel); .SH DESCRIPTION -Tell the remote host that no further data will be sent on the specified +Tell the remote host that no further data will be sent on the specified channel. Processes typically interpret this as a closed stdin descriptor. .SH RETURN VALUE diff --git a/docs/libssh2_channel_set_blocking.3 b/docs/libssh2_channel_set_blocking.3 index 55ee4ff0..9ebb7a6b 100644 --- a/docs/libssh2_channel_set_blocking.3 +++ b/docs/libssh2_channel_set_blocking.3 @@ -4,7 +4,7 @@ libssh2_channel_set_blocking - set or clear blocking mode on channel .SH SYNOPSIS #include -void +void libssh2_channel_set_blocking(LIBSSH2_CHANNEL *channel, int blocking); .SH DESCRIPTION \fIchannel\fP - channel stream to set or clean blocking status on. @@ -12,7 +12,7 @@ libssh2_channel_set_blocking(LIBSSH2_CHANNEL *channel, int blocking); \fIblocking\fP - Set to a non-zero value to make the channel block, or zero to make it non-blocking. -Currently this is just a short cut call to +Currently this is just a short cut call to .BR libssh2_session_set_blocking(3) and therefore will affect the session and all channels. .SH RETURN VALUE diff --git a/docs/libssh2_channel_setenv_ex.3 b/docs/libssh2_channel_setenv_ex.3 index 4a5fd3e9..b16dd01f 100644 --- a/docs/libssh2_channel_setenv_ex.3 +++ b/docs/libssh2_channel_setenv_ex.3 @@ -11,10 +11,10 @@ int libssh2_channel_setenv(LIBSSH2_CHANNEL *channel, char *varname, const char *value); .SH DESCRIPTION -\fIchannel\fP - Previously opened channel instance such as returned by +\fIchannel\fP - Previously opened channel instance such as returned by .BR libssh2_channel_open_ex(3) -\fIvarname\fP - Name of environment variable to set on the remote +\fIvarname\fP - Name of environment variable to set on the remote channel instance. \fIvarname_len\fP - Length of passed varname parameter. @@ -36,6 +36,6 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. -\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP - +\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP - .SH SEE ALSO .BR libssh2_channel_open_ex(3) diff --git a/docs/libssh2_channel_wait_closed.3 b/docs/libssh2_channel_wait_closed.3 index 44717368..8cf0911a 100644 --- a/docs/libssh2_channel_wait_closed.3 +++ b/docs/libssh2_channel_wait_closed.3 @@ -4,7 +4,7 @@ libssh2_channel_wait_closed - wait for the remote to close the channel .SH SYNOPSIS #include -int +int libssh2_channel_wait_closed(LIBSSH2_CHANNEL *channel); .SH DESCRIPTION diff --git a/docs/libssh2_channel_wait_eof.3 b/docs/libssh2_channel_wait_eof.3 index 8a3dc475..ef4d8b70 100644 --- a/docs/libssh2_channel_wait_eof.3 +++ b/docs/libssh2_channel_wait_eof.3 @@ -4,7 +4,7 @@ libssh2_channel_wait_eof - wait for the remote to reply to an EOF request .SH SYNOPSIS #include -int +int libssh2_channel_wait_eof(LIBSSH2_CHANNEL *channel); .SH DESCRIPTION diff --git a/docs/libssh2_channel_write_ex.3 b/docs/libssh2_channel_write_ex.3 index cb73648d..1ede81e6 100644 --- a/docs/libssh2_channel_write_ex.3 +++ b/docs/libssh2_channel_write_ex.3 @@ -14,9 +14,9 @@ substream (stream_id == 0), and may have up to 2^32 extended data streams as identified by the selected \fIstream_id\fP. The SSH2 protocol currently defines a stream ID of 1 to be the stderr substream. -\fIchannel\fP - active channel stream to write to. +\fIchannel\fP - active channel stream to write to. -\fIstream_id\fP - substream ID number (e.g. 0 or SSH_EXTENDED_DATA_STDERR) +\fIstream_id\fP - substream ID number (e.g. 0 or SSH_EXTENDED_DATA_STDERR) \fIbuf\fP - pointer to buffer to write @@ -43,8 +43,8 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se. \fILIBSSH2_ERROR_CHANNEL_EOF_SENT\fP - The channel has been requested to be \fILIBSSH2_ERROR_BAD_USE\fP - This can be returned if you ignored a previous -return for LIBSSH2_ERROR_EAGAIN and rather than sending the original buffer with -the original size, you sent a new buffer with a different size. +return for LIBSSH2_ERROR_EAGAIN and rather than sending the original buffer with +the original size, you sent a new buffer with a different size. closed. .SH SEE ALSO diff --git a/docs/libssh2_channel_x11_req_ex.3 b/docs/libssh2_channel_x11_req_ex.3 index e0121bd1..33c3c76c 100644 --- a/docs/libssh2_channel_x11_req_ex.3 +++ b/docs/libssh2_channel_x11_req_ex.3 @@ -11,7 +11,7 @@ int libssh2_channel_x11_req(LIBSSH2_CHANNEL *channel, int screen_number); .SH DESCRIPTION -\fIchannel\fP - Previously opened channel instance such as returned by +\fIchannel\fP - Previously opened channel instance such as returned by .BR libssh2_channel_open_ex(3) \fIsingle_connection\fP - non-zero to only forward a single connection. @@ -22,7 +22,7 @@ libssh2_channel_x11_req(LIBSSH2_CHANNEL *channel, int screen_number); \fIscreen_number\fP - the XLL screen to forward -Request an X11 forwarding on \fIchannel\fP. To use X11 forwarding, +Request an X11 forwarding on \fIchannel\fP. To use X11 forwarding, .BR libssh2_session_callback_set(3) must first be called to set \fBLIBSSH2_CALLBACK_X11\fP. This callback will be invoked when the remote host accepts the X11 forwarding. @@ -37,7 +37,7 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. -\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP - +\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP - .SH SEE ALSO .BR libssh2_channel_open_ex(3) diff --git a/docs/libssh2_hostkey_hash.3 b/docs/libssh2_hostkey_hash.3 index d57fc0dd..12f37261 100644 --- a/docs/libssh2_hostkey_hash.3 +++ b/docs/libssh2_hostkey_hash.3 @@ -8,14 +8,14 @@ const char * libssh2_hostkey_hash(LIBSSH2_SESSION *session, int hash_type); .SH DESCRIPTION -\fIsession\fP - Session instance as returned by +\fIsession\fP - Session instance as returned by .BR libssh2_session_init_ex(3) -\fIhash_type\fP - One of: \fBLIBSSH2_HOSTKEY_HASH_MD5\fP, +\fIhash_type\fP - One of: \fBLIBSSH2_HOSTKEY_HASH_MD5\fP, \fBLIBSSH2_HOSTKEY_HASH_SHA1\fP or \fBLIBSSH2_HOSTKEY_HASH_SHA256\fP. -Returns the computed digest of the remote system's hostkey. The length of -the returned string is hash_type specific (e.g. 16 bytes for MD5, +Returns the computed digest of the remote system's hostkey. The length of +the returned string is hash_type specific (e.g. 16 bytes for MD5, 20 bytes for SHA1, 32 bytes for SHA256). .SH RETURN VALUE Computed hostkey hash value, or NULL if the information is not available diff --git a/docs/libssh2_keepalive_config.3 b/docs/libssh2_keepalive_config.3 index 15e3ab96..62867cf1 100644 --- a/docs/libssh2_keepalive_config.3 +++ b/docs/libssh2_keepalive_config.3 @@ -24,4 +24,3 @@ Nothing Added in libssh2 1.2.5 .SH SEE ALSO .BR libssh2_keepalive_send(3) - diff --git a/docs/libssh2_knownhost_writefile.3 b/docs/libssh2_knownhost_writefile.3 index 48335a01..9ecc4a8d 100644 --- a/docs/libssh2_knownhost_writefile.3 +++ b/docs/libssh2_knownhost_writefile.3 @@ -26,4 +26,3 @@ Added in libssh2 1.2 .SH SEE ALSO .BR libssh2_knownhost_readfile(3) .BR libssh2_knownhost_add(3) - diff --git a/docs/libssh2_knownhost_writeline.3 b/docs/libssh2_knownhost_writeline.3 index c014a6a3..e4c113ec 100644 --- a/docs/libssh2_knownhost_writeline.3 +++ b/docs/libssh2_knownhost_writeline.3 @@ -43,4 +43,3 @@ Added in libssh2 1.2 .BR libssh2_knownhost_get(3) .BR libssh2_knownhost_readline(3) .BR libssh2_knownhost_writefile(3) - diff --git a/docs/libssh2_publickey_add.3 b/docs/libssh2_publickey_add.3 index 666cd942..7fc3eb10 100644 --- a/docs/libssh2_publickey_add.3 +++ b/docs/libssh2_publickey_add.3 @@ -5,7 +5,7 @@ libssh2_publickey_add - convenience macro for \fIlibssh2_publickey_add_ex(3)\fP #include int libssh2_publickey_add(LIBSSH2_PUBLICKEY *pkey, - const unsigned char *name, + const unsigned char *name, const unsigned char *blob, unsigned long blob_len, char overwrite, unsigned long num_attrs, const libssh2_publickey_attribute attrs[]); diff --git a/docs/libssh2_publickey_remove.3 b/docs/libssh2_publickey_remove.3 index 874fdbed..1d4cdeb6 100644 --- a/docs/libssh2_publickey_remove.3 +++ b/docs/libssh2_publickey_remove.3 @@ -5,8 +5,8 @@ libssh2_publickey_remove - convenience macro for \fIlibssh2_publickey_remove_ex( #include int libssh2_publickey_remove(LIBSSH2_PUBLICKEY *pkey, - const unsigned char *name, unsigned long name_len, - const unsigned char *blob, unsigned long blob_len); + const unsigned char *name, unsigned long name_len, + const unsigned char *blob, unsigned long blob_len); .SH DESCRIPTION This is a macro defined in a public libssh2 header file that is using the diff --git a/docs/libssh2_scp_recv.3 b/docs/libssh2_scp_recv.3 index 2edcdd48..2da4fa2c 100644 --- a/docs/libssh2_scp_recv.3 +++ b/docs/libssh2_scp_recv.3 @@ -11,7 +11,7 @@ libssh2_scp_recv(LIBSSH2_SESSION *session, const char *path, struct stat *sb); This function is \fBDEPRECATED\fP. Use \fIlibssh2_scp_recv2(3)\fP instead! -\fIsession\fP - Session instance as returned by +\fIsession\fP - Session instance as returned by .BR libssh2_session_init_ex(3) \fIpath\fP - Full path and filename of file to transfer. That is the remote @@ -25,11 +25,10 @@ Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors. .SH ERRORS \fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. -\fILIBSSH2_ERROR_SCP_PROTOCOL\fP - +\fILIBSSH2_ERROR_SCP_PROTOCOL\fP - \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block. .SH SEE ALSO .BR libssh2_session_init_ex(3) .BR libssh2_channel_open_ex(3) - diff --git a/docs/libssh2_scp_recv2.3 b/docs/libssh2_scp_recv2.3 index 6b48fd14..b7e2ebeb 100644 --- a/docs/libssh2_scp_recv2.3 +++ b/docs/libssh2_scp_recv2.3 @@ -8,7 +8,7 @@ LIBSSH2_CHANNEL * libssh2_scp_recv2(LIBSSH2_SESSION *session, const char *path, struct_stat *sb); .SH DESCRIPTION -\fIsession\fP - Session instance as returned by +\fIsession\fP - Session instance as returned by .BR libssh2_session_init_ex(3) \fIpath\fP - Full path and filename of file to transfer. That is the remote @@ -22,11 +22,10 @@ Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors. .SH ERRORS \fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. -\fILIBSSH2_ERROR_SCP_PROTOCOL\fP - +\fILIBSSH2_ERROR_SCP_PROTOCOL\fP - \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block. .SH SEE ALSO .BR libssh2_session_init_ex(3) .BR libssh2_channel_open_ex(3) - diff --git a/docs/libssh2_scp_send64.3 b/docs/libssh2_scp_send64.3 index 98d7e74f..42a90d9d 100644 --- a/docs/libssh2_scp_send64.3 +++ b/docs/libssh2_scp_send64.3 @@ -9,7 +9,7 @@ LIBSSH2_CHANNEL * libssh2_scp_send64(LIBSSH2_SESSION *session, const char *path, int mode, libssh2_uint64_t size, time_t mtime, time_t atime); .SH DESCRIPTION -\fIsession\fP - Session instance as returned by +\fIsession\fP - Session instance as returned by .BR libssh2_session_init_ex(3) \fIpath\fP - Full path and filename of file to transfer to. That is the remote @@ -24,7 +24,7 @@ compilers. \fImtime\fP - mtime to assign to file being created -\fIatime\fP - atime to assign to file being created (Set this and +\fIatime\fP - atime to assign to file being created (Set this and mtime to zero to instruct remote host to use current time). Send a file to the remote host via SCP. @@ -36,7 +36,7 @@ Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. -\fILIBSSH2_ERROR_SCP_PROTOCOL\fP - +\fILIBSSH2_ERROR_SCP_PROTOCOL\fP - \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block. diff --git a/docs/libssh2_scp_send_ex.3 b/docs/libssh2_scp_send_ex.3 index 8de7083d..c2717057 100644 --- a/docs/libssh2_scp_send_ex.3 +++ b/docs/libssh2_scp_send_ex.3 @@ -12,7 +12,7 @@ libssh2_scp_send_ex(LIBSSH2_SESSION *session, const char *path, int mode, This function has been deemed deprecated since libssh2 1.2.6. See \fIlibssh2_scp_send64(3)\fP. -\fIsession\fP - Session instance as returned by +\fIsession\fP - Session instance as returned by .BR libssh2_session_init_ex(3) \fIpath\fP - Full path and filename of file to transfer to. That is the remote @@ -20,12 +20,12 @@ file name. \fImode\fP - File access mode to create file with -\fIsize\fP - Size of file being transmitted (Must be known +\fIsize\fP - Size of file being transmitted (Must be known ahead of time precisely) \fImtime\fP - mtime to assign to file being created -\fIatime\fP - atime to assign to file being created (Set this and +\fIatime\fP - atime to assign to file being created (Set this and mtime to zero to instruct remote host to use current time). Send a file to the remote host via SCP. @@ -37,7 +37,7 @@ Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. -\fILIBSSH2_ERROR_SCP_PROTOCOL\fP - +\fILIBSSH2_ERROR_SCP_PROTOCOL\fP - \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block. diff --git a/docs/libssh2_session_abstract.3 b/docs/libssh2_session_abstract.3 index d880b09b..1fba1f25 100644 --- a/docs/libssh2_session_abstract.3 +++ b/docs/libssh2_session_abstract.3 @@ -8,7 +8,7 @@ void ** libssh2_session_abstract(LIBSSH2_SESSION *session); .SH DESCRIPTION -\fIsession\fP - Session instance as returned by +\fIsession\fP - Session instance as returned by .BR libssh2_session_init_ex(3) Return a pointer to where the abstract pointer provided to diff --git a/docs/libssh2_session_banner_set.3 b/docs/libssh2_session_banner_set.3 index 5e4161ea..1b6f4c9a 100644 --- a/docs/libssh2_session_banner_set.3 +++ b/docs/libssh2_session_banner_set.3 @@ -4,11 +4,11 @@ libssh2_session_banner_set - set the SSH protocol banner for the local client .SH SYNOPSIS #include -int +int libssh2_session_banner_set(LIBSSH2_SESSION *session, const char *banner); .SH DESCRIPTION -\fIsession\fP - Session instance as returned by +\fIsession\fP - Session instance as returned by .BR libssh2_session_init_ex(3) \fIbanner\fP - A pointer to a zero-terminated string holding the user defined diff --git a/docs/libssh2_session_callback_set.3 b/docs/libssh2_session_callback_set.3 index 6a075cbf..5dd2243c 100644 --- a/docs/libssh2_session_callback_set.3 +++ b/docs/libssh2_session_callback_set.3 @@ -12,12 +12,12 @@ Sets a custom callback handler for a previously initialized session object. Callbacks are triggered by the receipt of special packets at the Transport layer. To disable a callback, set it to NULL. -\fIsession\fP - Session instance as returned by +\fIsession\fP - Session instance as returned by .BR libssh2_session_init_ex(3) \fIcbtype\fP - Callback type. One of the types listed in Callback Types. -\fIcallback\fP - Pointer to custom callback function. The prototype for +\fIcallback\fP - Pointer to custom callback function. The prototype for this function must match the associated callback declaration macro. .SH CALLBACK TYPES .IP LIBSSH2_CALLBACK_IGNORE diff --git a/docs/libssh2_session_disconnect_ex.3 b/docs/libssh2_session_disconnect_ex.3 index 82174f9b..f047bb69 100644 --- a/docs/libssh2_session_disconnect_ex.3 +++ b/docs/libssh2_session_disconnect_ex.3 @@ -4,14 +4,14 @@ libssh2_session_disconnect_ex - terminate transport layer .SH SYNOPSIS #include -int +int libssh2_session_disconnect_ex(LIBSSH2_SESSION *session, int reason, const char *description, const char *lang); -int +int libssh2_session_disconnect(LIBSSH2_SESSION *session, const char *description); .SH DESCRIPTION -\fIsession\fP - Session instance as returned by +\fIsession\fP - Session instance as returned by .BR libssh2_session_init_ex(3) \fIreason\fP - One of the Disconnect Reason constants. @@ -20,14 +20,14 @@ libssh2_session_disconnect(LIBSSH2_SESSION *session, const char *description); \fIlang\fP - Localization string describing the language/encoding of the description provided. -Send a disconnect message to the remote host associated with \fIsession\fP, +Send a disconnect message to the remote host associated with \fIsession\fP, along with a \fIreason\fP symbol and a verbose \fIdescription\fP. -As a convenience, the macro +As a convenience, the macro .BR libssh2_session_disconnect(3) is provided. It calls .BR libssh2_session_disconnect_ex(3) -with \fIreason\fP set to SSH_DISCONNECT_BY_APPLICATION +with \fIreason\fP set to SSH_DISCONNECT_BY_APPLICATION and \fIlang\fP set to an empty string. .SH RETURN VALUE diff --git a/docs/libssh2_session_free.3 b/docs/libssh2_session_free.3 index 96eff0cb..f2dbfeb5 100644 --- a/docs/libssh2_session_free.3 +++ b/docs/libssh2_session_free.3 @@ -4,7 +4,7 @@ libssh2_session_free - frees resources associated with a session instance .SH SYNOPSIS #include -int +int libssh2_session_free(LIBSSH2_SESSION *session); .SH DESCRIPTION Frees all resources associated with a session instance. Typically called after diff --git a/docs/libssh2_session_init_ex.3 b/docs/libssh2_session_init_ex.3 index 5e4ef06c..5f061831 100644 --- a/docs/libssh2_session_init_ex.3 +++ b/docs/libssh2_session_init_ex.3 @@ -4,27 +4,27 @@ libssh2_session_init_ex - initializes an SSH session object .SH SYNOPSIS #include -LIBSSH2_SESSION * +LIBSSH2_SESSION * libssh2_session_init_ex(LIBSSH2_ALLOC_FUNC((*myalloc)), LIBSSH2_FREE_FUNC((*myfree)), LIBSSH2_REALLOC_FUNC((*myrealloc)), void *abstract); LIBSSH2_SESSION * libssh2_session_init(void); .SH DESCRIPTION -\fImyalloc\fP - Custom allocator function. Refer to the section on Callbacks -for implementing an allocator callback. Pass a value of NULL to use the +\fImyalloc\fP - Custom allocator function. Refer to the section on Callbacks +for implementing an allocator callback. Pass a value of NULL to use the default system allocator. -\fImyfree\fP - Custom de-allocator function. Refer to the section on Callbacks -for implementing a deallocator callback. Pass a value of NULL to use the +\fImyfree\fP - Custom de-allocator function. Refer to the section on Callbacks +for implementing a deallocator callback. Pass a value of NULL to use the default system deallocator. -\fImyrealloc\fP - Custom re-allocator function. Refer to the section on -Callbacks for implementing a reallocator callback. Pass a value of NULL to +\fImyrealloc\fP - Custom re-allocator function. Refer to the section on +Callbacks for implementing a reallocator callback. Pass a value of NULL to use the default system reallocator. -\fIabstract\fP - Arbitrary pointer to application specific callback data. -This value will be passed to any callback function associated with the named +\fIabstract\fP - Arbitrary pointer to application specific callback data. +This value will be passed to any callback function associated with the named session instance. Initializes an SSH session object. By default system memory allocators diff --git a/docs/libssh2_session_last_errno.3 b/docs/libssh2_session_last_errno.3 index f9172cbc..e23233bc 100644 --- a/docs/libssh2_session_last_errno.3 +++ b/docs/libssh2_session_last_errno.3 @@ -8,7 +8,7 @@ int libssh2_session_last_errno(LIBSSH2_SESSION *session); .SH DESCRIPTION -\fIsession\fP - Session instance as returned by +\fIsession\fP - Session instance as returned by .BR libssh2_session_init_ex(3) Determine the most recent error condition. diff --git a/docs/libssh2_session_last_error.3 b/docs/libssh2_session_last_error.3 index 2a64dbb7..6bbdbd03 100644 --- a/docs/libssh2_session_last_error.3 +++ b/docs/libssh2_session_last_error.3 @@ -8,18 +8,18 @@ int libssh2_session_last_error(LIBSSH2_SESSION *session, char **errmsg, int *errmsg_len, int want_buf); .SH DESCRIPTION -\fIsession\fP - Session instance as returned by +\fIsession\fP - Session instance as returned by .BR libssh2_session_init_ex(3) -\fIerrmsg\fP - If not NULL, is populated by reference with the human +\fIerrmsg\fP - If not NULL, is populated by reference with the human readable form of the most recent error message. -\fIerrmsg_len\fP - If not NULL, is populated by reference with the length -of errmsg. (The string is NUL-terminated, so the length is only useful as +\fIerrmsg_len\fP - If not NULL, is populated by reference with the length +of errmsg. (The string is NUL-terminated, so the length is only useful as an optimization, to avoid calling strlen.) -\fIwant_buf\fP - If set to a non-zero value, "ownership" of the errmsg -buffer will be given to the calling scope. If necessary, the errmsg buffer +\fIwant_buf\fP - If set to a non-zero value, "ownership" of the errmsg +buffer will be given to the calling scope. If necessary, the errmsg buffer will be duplicated. Determine the most recent error condition and its cause. diff --git a/docs/libssh2_session_method_pref.3 b/docs/libssh2_session_method_pref.3 index dcf77f6d..0af2d855 100644 --- a/docs/libssh2_session_method_pref.3 +++ b/docs/libssh2_session_method_pref.3 @@ -4,21 +4,21 @@ libssh2_session_method_pref - set preferred key exchange method .SH SYNOPSIS #include -int +int libssh2_session_method_pref(LIBSSH2_SESSION *session, int method_type, const char *prefs); .SH DESCRIPTION -\fIsession\fP - Session instance as returned by +\fIsession\fP - Session instance as returned by .BR libssh2_session_init_ex(3) \fImethod_type\fP - One of the Method Type constants. -\fIprefs\fP - Coma delimited list of preferred methods to use with -the most preferred listed first and the least preferred listed last. -If a method is listed which is not supported by libssh2 it will be +\fIprefs\fP - Coma delimited list of preferred methods to use with +the most preferred listed first and the least preferred listed last. +If a method is listed which is not supported by libssh2 it will be 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 preferences must be set prior to calling .BR libssh2_session_handshake(3) as they are used during the protocol initiation phase. diff --git a/docs/libssh2_session_set_blocking.3 b/docs/libssh2_session_set_blocking.3 index b16e0091..a7e9dcd1 100644 --- a/docs/libssh2_session_set_blocking.3 +++ b/docs/libssh2_session_set_blocking.3 @@ -4,11 +4,11 @@ libssh2_session_set_blocking - set or clear blocking mode on session .SH SYNOPSIS #include -void +void libssh2_session_set_blocking(LIBSSH2_SESSION *session, int blocking); .SH DESCRIPTION -\fIsession\fP - session instance as returned by +\fIsession\fP - session instance as returned by .BR libssh2_session_init_ex(3) \fIblocking\fP - Set to a non-zero value to make the channel block, or zero to diff --git a/docs/libssh2_session_startup.3 b/docs/libssh2_session_startup.3 index b59056f7..8e060140 100644 --- a/docs/libssh2_session_startup.3 +++ b/docs/libssh2_session_startup.3 @@ -4,17 +4,17 @@ libssh2_session_startup - begin transport layer .SH SYNOPSIS #include -int +int libssh2_session_startup(LIBSSH2_SESSION *session, int socket); .SH DESCRIPTION Starting in libssh2 version 1.2.8 this function is considered deprecated. Use \fIlibssh2_session_handshake(3)\fP instead. -\fIsession\fP - Session instance as returned by +\fIsession\fP - Session instance as returned by .BR libssh2_session_init_ex(3) -\fIsocket\fP - Connected socket descriptor. Typically a TCP connection -though the protocol allows for any reliable transport and the library will +\fIsocket\fP - Connected socket descriptor. Typically a TCP connection +though the protocol allows for any reliable transport and the library will attempt to use any berkeley socket. Begin transport layer protocol negotiation with the connected host. @@ -25,14 +25,14 @@ Returns 0 on success, negative on failure. \fILIBSSH2_ERROR_BANNER_SEND\fP - Unable to send banner to remote host. -\fILIBSSH2_ERROR_KEX_FAILURE\fP - >Encryption key exchange with the remote +\fILIBSSH2_ERROR_KEX_FAILURE\fP - >Encryption key exchange with the remote host failed. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. \fILIBSSH2_ERROR_SOCKET_DISCONNECT\fP - The socket was disconnected. -\fILIBSSH2_ERROR_PROTO\fP - An invalid SSH protocol response was received on +\fILIBSSH2_ERROR_PROTO\fP - An invalid SSH protocol response was received on the socket. \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block. diff --git a/docs/libssh2_sftp_close_handle.3 b/docs/libssh2_sftp_close_handle.3 index 30e299cf..432e50d3 100644 --- a/docs/libssh2_sftp_close_handle.3 +++ b/docs/libssh2_sftp_close_handle.3 @@ -5,13 +5,13 @@ libssh2_sftp_close_handle - close filehandle #include #include -int +int libssh2_sftp_close_handle(LIBSSH2_SFTP_HANDLE *handle); -int +int libssh2_sftp_close(LIBSSH2_SFTP_HANDLE *handle); -int +int libssh2_sftp_closedir(LIBSSH2_SFTP_HANDLE *handle); .SH DESCRIPTION @@ -33,10 +33,10 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. -\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - -\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was -received on the socket, or an SFTP operation caused an errorcode to +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to be returned by the server. .SH SEE ALSO diff --git a/docs/libssh2_sftp_fstat_ex.3 b/docs/libssh2_sftp_fstat_ex.3 index 107594cf..3c6967b4 100644 --- a/docs/libssh2_sftp_fstat_ex.3 +++ b/docs/libssh2_sftp_fstat_ex.3 @@ -6,7 +6,7 @@ libssh2_sftp_fstat_ex - get or set attributes on an SFTP file handle #include #include -int +int libssh2_sftp_fstat_ex(LIBSSH2_SFTP_HANDLE *handle, LIBSSH2_SFTP_ATTRIBUTES *attrs, int setstat) @@ -16,14 +16,14 @@ libssh2_sftp_fstat_ex(LIBSSH2_SFTP_HANDLE *handle, libssh2_sftp_fstat_ex((handle), (attrs), 1) .fi .SH DESCRIPTION -\fIhandle\fP - SFTP File Handle as returned by +\fIhandle\fP - SFTP File Handle as returned by .BR libssh2_sftp_open_ex(3) \fIattrs\fP - Pointer to an LIBSSH2_SFTP_ATTRIBUTES structure to set file metadata from or into depending on the value of setstat. -\fIsetstat\fP - When non-zero, the file's metadata will be updated -with the data found in attrs according to the values of attrs->flags +\fIsetstat\fP - When non-zero, the file's metadata will be updated +with the data found in attrs according to the values of attrs->flags and other relevant member attributes. Get or Set statbuf type data for a given LIBSSH2_SFTP_HANDLE instance. @@ -91,10 +91,10 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. -\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - -\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was -received on the socket, or an SFTP operation caused an errorcode to +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to be returned by the server. .SH AVAILABILITY This function has been around since forever, but most of the diff --git a/docs/libssh2_sftp_init.3 b/docs/libssh2_sftp_init.3 index a59d0300..d1ac4012 100644 --- a/docs/libssh2_sftp_init.3 +++ b/docs/libssh2_sftp_init.3 @@ -9,7 +9,7 @@ LIBSSH2_SFTP * libssh2_sftp_init(LIBSSH2_SESSION *session); .SH DESCRIPTION -\fIsession\fP - Session instance as returned by +\fIsession\fP - Session instance as returned by .BR libssh2_session_init_ex(3) Open a channel and initialize the SFTP subsystem. Although the SFTP subsystem @@ -26,10 +26,10 @@ A pointer to the newly allocated SFTP instance or NULL on failure. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. -\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - -\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was -received on the socket, or an SFTP operation caused an errorcode to be +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to be returned by the server. \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would diff --git a/docs/libssh2_sftp_last_error.3 b/docs/libssh2_sftp_last_error.3 index aadbd5d1..2aee4c62 100644 --- a/docs/libssh2_sftp_last_error.3 +++ b/docs/libssh2_sftp_last_error.3 @@ -5,11 +5,11 @@ libssh2_sftp_last_error - return the last SFTP-specific error code #include #include -unsigned long +unsigned long libssh2_sftp_last_error(LIBSSH2_SFTP *sftp); .SH DESCRIPTION -\fIsftp\fP - SFTP instance as returned by +\fIsftp\fP - SFTP instance as returned by .BR libssh2_sftp_init(3) Returns the last error code produced by the SFTP layer. Note that this only diff --git a/docs/libssh2_sftp_mkdir_ex.3 b/docs/libssh2_sftp_mkdir_ex.3 index 20df03c3..ad65dcef 100644 --- a/docs/libssh2_sftp_mkdir_ex.3 +++ b/docs/libssh2_sftp_mkdir_ex.3 @@ -5,16 +5,16 @@ libssh2_sftp_mkdir_ex - create a directory on the remote file system #include #include -int +int libssh2_sftp_mkdir_ex(LIBSSH2_SFTP *sftp, const char *path, unsigned int path_len, long mode); -int +int libssh2_sftp_mkdir(LIBSSH2_SFTP *sftp, const char *path, long mode); .SH DESCRIPTION -\fIsftp\fP - SFTP instance as returned by +\fIsftp\fP - SFTP instance as returned by .BR libssh2_sftp_init(3) -\fIpath\fP - full path of the new directory to create. Note that the new +\fIpath\fP - full path of the new directory to create. Note that the new directory's parents must all exist prior to making this call. \fIpath_len\fP - length of the full path of the new directory to create. @@ -31,10 +31,10 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. -\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - -\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was -received on the socket, or an SFTP operation caused an errorcode to be +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to be returned by the server. .SH SEE ALSO .BR libssh2_sftp_open_ex(3) diff --git a/docs/libssh2_sftp_open_ex.3 b/docs/libssh2_sftp_open_ex.3 index 32cc23fb..af341f14 100644 --- a/docs/libssh2_sftp_open_ex.3 +++ b/docs/libssh2_sftp_open_ex.3 @@ -13,9 +13,9 @@ libssh2_sftp_open_ex(LIBSSH2_SFTP *sftp, const char *filename, .SH DESCRIPTION \fIsftp\fP - SFTP instance as returned by \fIlibssh2_sftp_init(3)\fP -\fIfilename\fP - Remote file/directory resource to open +\fIfilename\fP - Remote file/directory resource to open -\fIfilename_len\fP - Length of filename +\fIfilename_len\fP - Length of filename \fIflags\fP - Any reasonable combination of the LIBSSH2_FXF_* constants: .RS @@ -52,14 +52,13 @@ failure. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. -\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - -\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was -received on the socket, or an SFTP operation caused an errorcode to be +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to be returned by the server. \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block. .SH SEE ALSO .BR libssh2_sftp_close_handle(3) - diff --git a/docs/libssh2_sftp_read.3 b/docs/libssh2_sftp_read.3 index 36bc9794..64201218 100644 --- a/docs/libssh2_sftp_read.3 +++ b/docs/libssh2_sftp_read.3 @@ -5,11 +5,11 @@ libssh2_sftp_read - read data from an SFTP handle #include #include -ssize_t +ssize_t libssh2_sftp_read(LIBSSH2_SFTP_HANDLE *handle, char *buffer, size_t buffer_maxlen); .SH DESCRIPTION -\fIhandle\fP is the SFTP File Handle as returned by +\fIhandle\fP is the SFTP File Handle as returned by .BR libssh2_sftp_open_ex(3) \fIbuffer\fP is a pointer to a pre-allocated buffer of at least @@ -17,15 +17,15 @@ libssh2_sftp_read(LIBSSH2_SFTP_HANDLE *handle, char *buffer, size_t buffer_maxle \fIbuffer_maxlen\fP bytes to read data into. Reads a block of data from an LIBSSH2_SFTP_HANDLE. This method is modelled -after the POSIX +after the POSIX .BR read(2) -function and uses the same calling semantics. +function and uses the same calling semantics. .BR libssh2_sftp_read(3) will attempt to read as much as possible however it may not fill all of buffer if the file pointer reaches the end or if further reads would cause the socket to block. .SH RETURN VALUE -Number of bytes actually populated into buffer, or negative on failure. +Number of bytes actually populated into buffer, or negative on failure. It returns LIBSSH2_ERROR_EAGAIN when it would otherwise block. While LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se. .SH ERRORS @@ -33,7 +33,7 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. -\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - \fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was received on the socket, or an SFTP operation caused an errorcode to be diff --git a/docs/libssh2_sftp_readdir_ex.3 b/docs/libssh2_sftp_readdir_ex.3 index a40e4df8..eb9dd2f7 100644 --- a/docs/libssh2_sftp_readdir_ex.3 +++ b/docs/libssh2_sftp_readdir_ex.3 @@ -6,7 +6,7 @@ libssh2_sftp_readdir_ex - read directory data from an SFTP handle #include #include -int +int libssh2_sftp_readdir_ex(LIBSSH2_SFTP_HANDLE *handle, char *buffer, size_t buffer_maxlen, char *longentry, size_t longentry_maxlen, @@ -15,14 +15,14 @@ libssh2_sftp_readdir_ex(LIBSSH2_SFTP_HANDLE *handle, Reads a block of data from a LIBSSH2_SFTP_HANDLE and returns file entry information for the next entry, if any. -\fIhandle\fP - is the SFTP File Handle as returned by +\fIhandle\fP - is the SFTP File Handle as returned by .BR libssh2_sftp_open_ex(3) \fIbuffer\fP - is a pointer to a pre-allocated buffer of at least \fIbuffer_maxlen\fP bytes to read data into. -\fIbuffer_maxlen\fP - is the length of buffer in bytes. If the length of the -filename is longer than the space provided by buffer_maxlen it will be +\fIbuffer_maxlen\fP - is the length of buffer in bytes. If the length of the +filename is longer than the space provided by buffer_maxlen it will be truncated to fit. \fIlongentry\fP - is a pointer to a pre-allocated buffer of at least @@ -35,7 +35,7 @@ a directory listing command is to simply display this data). the full directory entry is longer than the space provided by \fIlongentry_maxlen\fP it will be truncated to fit. -\fIattrs\fP - is a pointer to LIBSSH2_SFTP_ATTRIBUTES storage to populate +\fIattrs\fP - is a pointer to LIBSSH2_SFTP_ATTRIBUTES storage to populate statbuf style data into. .SH RETURN VALUE Number of bytes actually populated into buffer (not counting the terminating @@ -51,10 +51,10 @@ and it is not possible for the application to tell when it happens! \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. -\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - -\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was -received on the socket, or an SFTP operation caused an errorcode to be +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to be returned by the server. From 1.2.8, LIBSSH2_ERROR_BUFFER_TOO_SMALL is returned if any of the diff --git a/docs/libssh2_sftp_rename_ex.3 b/docs/libssh2_sftp_rename_ex.3 index 20a3b9db..1a13ffd3 100644 --- a/docs/libssh2_sftp_rename_ex.3 +++ b/docs/libssh2_sftp_rename_ex.3 @@ -5,35 +5,35 @@ libssh2_sftp_rename_ex - rename an SFTP file #include #include -int +int libssh2_sftp_rename_ex(LIBSSH2_SFTP *sftp, const char *source_filename, unsigned int source_filename_len, const char *dest_filename, unsigned int dest_filename_len, long flags); -int +int libssh2_sftp_rename_ex(LIBSSH2_SFTP *sftp, const char *source_filename, const char *dest_filename); .SH DESCRIPTION -\fIsftp\fP - SFTP instance as returned by +\fIsftp\fP - SFTP instance as returned by .BR libssh2_sftp_init(3) \fIsourcefile\fP - Path and name of the existing filesystem entry -\fIsourcefile_len\fP - Length of the path and name of the existing +\fIsourcefile_len\fP - Length of the path and name of the existing filesystem entry \fIdestfile\fP - Path and name of the target filesystem entry -\fIdestfile_len\fP - Length of the path and name of the target +\fIdestfile_len\fP - Length of the path and name of the target filesystem entry -\fIflags\fP - +\fIflags\fP - Bitmask flags made up of LIBSSH2_SFTP_RENAME_* constants. -Rename a filesystem object on the remote filesystem. The semantics of -this command typically include the ability to move a filesystem object -between folders and/or filesystem mounts. If the LIBSSH2_SFTP_RENAME_OVERWRITE -flag is not set and the destfile entry already exists, the operation -will fail. Use of the other two flags indicate a preference (but not a -requirement) for the remote end to perform an atomic rename operation +Rename a filesystem object on the remote filesystem. The semantics of +this command typically include the ability to move a filesystem object +between folders and/or filesystem mounts. If the LIBSSH2_SFTP_RENAME_OVERWRITE +flag is not set and the destfile entry already exists, the operation +will fail. Use of the other two flags indicate a preference (but not a +requirement) for the remote end to perform an atomic rename operation and/or using native system calls when possible. .SH RETURN VALUE @@ -46,10 +46,10 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. -\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - -\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was -received on the socket, or an SFTP operation caused an errorcode to +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to be returned by the server. .SH SEE ALSO diff --git a/docs/libssh2_sftp_rmdir_ex.3 b/docs/libssh2_sftp_rmdir_ex.3 index daa85cf0..117cf94c 100644 --- a/docs/libssh2_sftp_rmdir_ex.3 +++ b/docs/libssh2_sftp_rmdir_ex.3 @@ -11,7 +11,7 @@ int libssh2_sftp_rmdir_ex(LIBSSH2_SFTP *sftp, const char *path, .SH DESCRIPTION Remove a directory from the remote file system. -\fIsftp\fP - SFTP instance as returned by +\fIsftp\fP - SFTP instance as returned by .BR libssh2_sftp_init(3) \fIsourcefile\fP - Full path of the existing directory to remove. @@ -27,10 +27,10 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. -\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - -\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was -received on the socket, or an SFTP operation caused an errorcode to +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to be returned by the server. .SH SEE ALSO .BR libssh2_sftp_init(3) diff --git a/docs/libssh2_sftp_seek.3 b/docs/libssh2_sftp_seek.3 index ccf5e106..13d4e78f 100644 --- a/docs/libssh2_sftp_seek.3 +++ b/docs/libssh2_sftp_seek.3 @@ -10,15 +10,15 @@ void libssh2_sftp_seek(LIBSSH2_SFTP_HANDLE *handle, size_t offset); .SH DESCRIPTION Deprecated function. Use \fIlibssh2_sftp_seek64(3)\fP instead! -\fIhandle\fP - SFTP File Handle as returned by +\fIhandle\fP - SFTP File Handle as returned by .BR libssh2_sftp_open_ex(3) \fIoffset\fP - Number of bytes from the beginning of file to seek to. -Move the file handle's internal pointer to an arbitrary location. -Note that libssh2 implements file pointers as a localized concept to make -file access appear more POSIX like. No packets are exchanged with the server -during a seek operation. The localized file pointer is simply used as a +Move the file handle's internal pointer to an arbitrary location. +Note that libssh2 implements file pointers as a localized concept to make +file access appear more POSIX like. No packets are exchanged with the server +during a seek operation. The localized file pointer is simply used as a convenience offset during read/write operations. .SH SEE ALSO .BR libssh2_sftp_open_ex(3), diff --git a/docs/libssh2_sftp_seek64.3 b/docs/libssh2_sftp_seek64.3 index 57c9a485..847a5451 100644 --- a/docs/libssh2_sftp_seek64.3 +++ b/docs/libssh2_sftp_seek64.3 @@ -9,7 +9,7 @@ libssh2_sftp_seek64 - set the read/write position within a file void libssh2_sftp_seek64(LIBSSH2_SFTP_HANDLE *handle, libssh2_uint64_t offset); .SH DESCRIPTION -\fIhandle\fP - SFTP File Handle as returned by +\fIhandle\fP - SFTP File Handle as returned by .BR libssh2_sftp_open_ex(3) \fIoffset\fP - Number of bytes from the beginning of file to seek to. diff --git a/docs/libssh2_sftp_shutdown.3 b/docs/libssh2_sftp_shutdown.3 index 42cc1c49..e1e8a96f 100644 --- a/docs/libssh2_sftp_shutdown.3 +++ b/docs/libssh2_sftp_shutdown.3 @@ -5,14 +5,14 @@ libssh2_sftp_shutdown - shut down an SFTP session #include #include -int +int libssh2_sftp_shutdown(LIBSSH2_SFTP *sftp); .SH DESCRIPTION -\fIsftp\fP - SFTP instance as returned by +\fIsftp\fP - SFTP instance as returned by .BR libssh2_sftp_init(3) -Destroys a previously initialized SFTP session and frees all resources +Destroys a previously initialized SFTP session and frees all resources associated with it. .SH RETURN VALUE diff --git a/docs/libssh2_sftp_stat_ex.3 b/docs/libssh2_sftp_stat_ex.3 index 2fd9507f..4e6f6810 100644 --- a/docs/libssh2_sftp_stat_ex.3 +++ b/docs/libssh2_sftp_stat_ex.3 @@ -10,15 +10,15 @@ int libssh2_sftp_stat_ex(LIBSSH2_SFTP *sftp, const char *path, unsigned int path_len, int stat_type, LIBSSH2_SFTP_ATTRIBUTES *attrs); .SH DESCRIPTION -\fIsftp\fP - SFTP instance as returned by +\fIsftp\fP - SFTP instance as returned by .BR libssh2_sftp_init(3) \fIpath\fP - Remote filesystem object to stat/lstat/setstat. -\fIpath_len\fP - Length of the name of the remote filesystem object +\fIpath_len\fP - Length of the name of the remote filesystem object to stat/lstat/setstat. -\fIstat_type\fP - One of the three constants specifying the type of +\fIstat_type\fP - One of the three constants specifying the type of stat operation to perform: .br @@ -34,9 +34,9 @@ metadata from or into depending on the value of stat_type. Get or Set statbuf type data on a remote filesystem object. When getting statbuf data, .BR libssh2_sftp_stat(3) -will follow all symlinks, while +will follow all symlinks, while .BR libssh2_sftp_lstat(3) -will return data about the object encountered, even if that object +will return data about the object encountered, even if that object happens to be a symlink. The LIBSSH2_SFTP_ATTRIBUTES struct looks like this: @@ -65,10 +65,10 @@ number, it isn't really a failure per se. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. -\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - -\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was -received on the socket, or an SFTP operation caused an errorcode to +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to be returned by the server. .SH SEE ALSO .BR libssh2_sftp_init(3) diff --git a/docs/libssh2_sftp_statvfs.3 b/docs/libssh2_sftp_statvfs.3 index 6327030a..1b5feb1d 100644 --- a/docs/libssh2_sftp_statvfs.3 +++ b/docs/libssh2_sftp_statvfs.3 @@ -68,7 +68,7 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. -\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - \fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was received on the socket, or an SFTP operation caused an errorcode to be returned diff --git a/docs/libssh2_sftp_symlink_ex.3 b/docs/libssh2_sftp_symlink_ex.3 index fc0bc936..6aacaa55 100644 --- a/docs/libssh2_sftp_symlink_ex.3 +++ b/docs/libssh2_sftp_symlink_ex.3 @@ -6,19 +6,19 @@ libssh2_sftp_symlink_ex - read or set a symbolic link #include #include -int +int libssh2_sftp_symlink_ex(LIBSSH2_SFTP *sftp, const char *path, unsigned int path_len, char *target, unsigned int target_len, int link_type); .SH DESCRIPTION Create a symlink or read out symlink information from the remote side. -\fIsftp\fP - SFTP instance as returned by +\fIsftp\fP - SFTP instance as returned by .BR libssh2_sftp_init(3) \fIpath\fP - Remote filesystem object to create a symlink from or resolve. -\fIpath_len\fP - Length of the name of the remote filesystem object to +\fIpath_len\fP - Length of the name of the remote filesystem object to create a symlink from or resolve. \fItarget\fP - a pointer to a buffer. The buffer has different uses depending @@ -34,7 +34,7 @@ into. \fItarget_len\fP - Length of the name of the remote filesystem target object. -\fIlink_type\fP - One of the three previously mentioned constants which +\fIlink_type\fP - One of the three previously mentioned constants which determines the resulting behavior of this function. These are convenience macros: @@ -69,10 +69,10 @@ for the application to tell when it happens! \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. -\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - -\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was -received on the socket, or an SFTP operation caused an errorcode to +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to be returned by the server. .SH SEE ALSO diff --git a/docs/libssh2_sftp_tell.3 b/docs/libssh2_sftp_tell.3 index 2ff1fbad..574a8835 100644 --- a/docs/libssh2_sftp_tell.3 +++ b/docs/libssh2_sftp_tell.3 @@ -5,7 +5,7 @@ libssh2_sftp_tell - get the current read/write position indicator for a file #include #include -size_t +size_t libssh2_sftp_tell(LIBSSH2_SFTP_HANDLE *handle); .SH DESCRIPTION diff --git a/docs/libssh2_sftp_unlink_ex.3 b/docs/libssh2_sftp_unlink_ex.3 index 6672a8c3..9d05006a 100644 --- a/docs/libssh2_sftp_unlink_ex.3 +++ b/docs/libssh2_sftp_unlink_ex.3 @@ -5,19 +5,19 @@ libssh2_sftp_unlink_ex - unlink an SFTP file #include #include -int +int libssh2_sftp_unlink_ex(LIBSSH2_SFTP *sftp, const char *filename, unsigned int filename_len); -int +int libssh2_sftp_unlink(LIBSSH2_SFTP *sftp, const char *filename); .SH DESCRIPTION -\fIsftp\fP - SFTP instance as returned by +\fIsftp\fP - SFTP instance as returned by .BR libssh2_sftp_init(3) \fIfilename\fP - Path and name of the existing filesystem entry -\fIfilename_len\fP - Length of the path and name of the existing +\fIfilename_len\fP - Length of the path and name of the existing filesystem entry Unlink (delete) a file from the remote filesystem. @@ -32,10 +32,10 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. -\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - -\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was -received on the socket, or an SFTP operation caused an errorcode to +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to be returned by the server. .SH SEE ALSO diff --git a/docs/libssh2_sftp_write.3 b/docs/libssh2_sftp_write.3 index 8d819129..eca2cbc7 100644 --- a/docs/libssh2_sftp_write.3 +++ b/docs/libssh2_sftp_write.3 @@ -62,10 +62,10 @@ end. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. -\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - -\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was -received on the socket, or an SFTP operation caused an errorcode to +\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was +received on the socket, or an SFTP operation caused an errorcode to be returned by the server. .SH SEE ALSO .BR libssh2_sftp_open_ex(3) diff --git a/docs/libssh2_sign_sk.3 b/docs/libssh2_sign_sk.3 index 7aa503d6..79e52963 100644 --- a/docs/libssh2_sign_sk.3 +++ b/docs/libssh2_sign_sk.3 @@ -22,10 +22,10 @@ typedef struct _LIBSSH2_PRIVKEY_SK { } LIBSSH2_PRIVKEY_SK; .SH DESCRIPTION -\fIsession\fP - Session instance as returned by +\fIsession\fP - Session instance as returned by .BR libssh2_session_init_ex(3) -\fIsig\fP - A pointer to a buffer in which to place the signature. The caller +\fIsig\fP - A pointer to a buffer in which to place the signature. The caller is responsible for freeing the signature with LIBSSH2_FREE. \fIsig_len\fP - A pointer to the length of the sig parameter. @@ -34,48 +34,48 @@ is responsible for freeing the signature with LIBSSH2_FREE. \fIdata_len\fP - The length of the data parameter. -\fIabstract\fP - A pointer to a pointer to a LIBSSH2_PRIVKEY_SK. See +\fIabstract\fP - A pointer to a pointer to a LIBSSH2_PRIVKEY_SK. See description below. -Create a signature from a FIDO2 authenticator, using either the -sk-ssh-ed25519@openssh.com or sk-ecdsa-sha2-nistp256@openssh.com key +Create a signature from a FIDO2 authenticator, using either the +sk-ssh-ed25519@openssh.com or sk-ecdsa-sha2-nistp256@openssh.com key exchange algorithms. -The abstract parameter is a pointer to a pointer due to the internal workings -of libssh2. The LIBSSH2_PRIVKEY_SK must be completely filled out, and the +The abstract parameter is a pointer to a pointer due to the internal workings +of libssh2. The LIBSSH2_PRIVKEY_SK must be completely filled out, and the caller is responsible for all memory management of its fields. -\fIalgorithm\fP - The signing algorithm to use. Possible values are +\fIalgorithm\fP - The signing algorithm to use. Possible values are LIBSSH2_HOSTKEY_TYPE_ED25519 and LIBSSH2_HOSTKEY_TYPE_ECDSA_256. -\fIflags\fP - A bitmask specifying options for the authenticator. When +\fIflags\fP - A bitmask specifying options for the authenticator. When LIBSSH2_SK_PRESENCE_REQUIRED is set, the authenticator requires a touch. When -LIBSSH2_SK_VERIFICATION_REQUIRED is set, the authenticator requires a PIN. -Many servers and authenticators do not work properly when +LIBSSH2_SK_VERIFICATION_REQUIRED is set, the authenticator requires a PIN. +Many servers and authenticators do not work properly when LIBSSH2_SK_PRESENCE_REQUIRED is not set. -\fIapplication\fP - A user-defined string to use as the RP name for the +\fIapplication\fP - A user-defined string to use as the RP name for the authenticator. Usually "ssh:". \fIkey_handle\fP - The key handle to use for the authenticator's allow list. \fIhandle_len\fP - The length of the key_handle parameter. -\fIabstract\fP - User-defined data. When a PIN is required, use this to pass in +\fIabstract\fP - User-defined data. When a PIN is required, use this to pass in the PIN, or a function pointer to retrieve the PIN. \fIkey_handle\fP The decoded key handle from the private key file. \fIhandle_len\fP The length of the key_handle parameter. -\fIsign_callback\fP - Responsible for communicating with the hardware +\fIsign_callback\fP - Responsible for communicating with the hardware authenticator to generate a signature. On success, the signature information -must be placed in the `\fIsig_info\fP sig_info parameter and the callback must +must be placed in the `\fIsig_info\fP sig_info parameter and the callback must return 0. On failure, it should return a negative number. See .BR libssh2_userauth_publickey_sk(3) for more information. -\fIorig_abstract\fP - User-defined data. When a PIN is required, use this to +\fIorig_abstract\fP - User-defined data. When a PIN is required, use this to pass in the PIN, or a function pointer to retrieve the PIN. .SH RETURN VALUE diff --git a/docs/libssh2_userauth_authenticated.3 b/docs/libssh2_userauth_authenticated.3 index 786e0f0e..30195629 100644 --- a/docs/libssh2_userauth_authenticated.3 +++ b/docs/libssh2_userauth_authenticated.3 @@ -4,11 +4,11 @@ libssh2_userauth_authenticated - return authentication status .SH SYNOPSIS #include -int +int libssh2_userauth_authenticated(LIBSSH2_SESSION *session); .SH DESCRIPTION -\fIsession\fP - Session instance as returned by +\fIsession\fP - Session instance as returned by .BR libssh2_session_init_ex(3) Indicates whether or not the named session has been successfully authenticated. diff --git a/docs/libssh2_userauth_list.3 b/docs/libssh2_userauth_list.3 index de349f10..c8c2d352 100644 --- a/docs/libssh2_userauth_list.3 +++ b/docs/libssh2_userauth_list.3 @@ -9,7 +9,7 @@ char * libssh2_userauth_list(LIBSSH2_SESSION *session, const char *username, unsigned int username_len); .SH DESCRIPTION -\fIsession\fP - Session instance as returned by +\fIsession\fP - Session instance as returned by .BR libssh2_session_init_ex(3) \fIusername\fP - Username which will be used while authenticating. Note that diff --git a/docs/libssh2_userauth_password_ex.3 b/docs/libssh2_userauth_password_ex.3 index 03b90a11..d1b6c86f 100644 --- a/docs/libssh2_userauth_password_ex.3 +++ b/docs/libssh2_userauth_password_ex.3 @@ -16,7 +16,7 @@ int libssh2_userauth_password_ex(LIBSSH2_SESSION *session, strlen(username), \\ (password), strlen(password), NULL) .SH DESCRIPTION -\fIsession\fP - Session instance as returned by +\fIsession\fP - Session instance as returned by .BR libssh2_session_init_ex(3) \fIusername\fP - Name of user to attempt plain password authentication for. @@ -27,14 +27,14 @@ int libssh2_userauth_password_ex(LIBSSH2_SESSION *session, \fIpassword_len\fP - Length of password parameter. -\fIpasswd_change_cb\fP - If the host accepts authentication but -requests that the password be changed, this callback will be issued. -If no callback is defined, but server required password change, +\fIpasswd_change_cb\fP - If the host accepts authentication but +requests that the password be changed, this callback will be issued. +If no callback is defined, but server required password change, authentication will fail. -Attempt basic password authentication. Note that many SSH servers -which appear to support ordinary password authentication actually have -it disabled and use Keyboard Interactive authentication (routed via +Attempt basic password authentication. Note that many SSH servers +which appear to support ordinary password authentication actually have +it disabled and use Keyboard Interactive authentication (routed via PAM or another authentication backed) instead. .SH RETURN VALUE @@ -49,7 +49,7 @@ Some of the errors this function may return include: \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. -\fILIBSSH2_ERROR_PASSWORD_EXPIRED\fP - +\fILIBSSH2_ERROR_PASSWORD_EXPIRED\fP - \fILIBSSH2_ERROR_AUTHENTICATION_FAILED\fP - failed, invalid username/password or public/private key. diff --git a/docs/libssh2_userauth_publickey_fromfile_ex.3 b/docs/libssh2_userauth_publickey_fromfile_ex.3 index 0d77c9a3..f5ffc367 100644 --- a/docs/libssh2_userauth_publickey_fromfile_ex.3 +++ b/docs/libssh2_userauth_publickey_fromfile_ex.3 @@ -40,7 +40,7 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. -\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - \fILIBSSH2_ERROR_PUBLICKEY_UNVERIFIED\fP - The username/public key combination was invalid. diff --git a/docs/libssh2_userauth_publickey_frommemory.3 b/docs/libssh2_userauth_publickey_frommemory.3 index 685bd591..bd58fde5 100644 --- a/docs/libssh2_userauth_publickey_frommemory.3 +++ b/docs/libssh2_userauth_publickey_frommemory.3 @@ -43,7 +43,7 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. -\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - +\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP - \fILIBSSH2_ERROR_PUBLICKEY_UNVERIFIED\fP - The username/public key combination was invalid. diff --git a/docs/libssh2_userauth_publickey_sk.3 b/docs/libssh2_userauth_publickey_sk.3 index 4ed54c90..f24650f6 100644 --- a/docs/libssh2_userauth_publickey_sk.3 +++ b/docs/libssh2_userauth_publickey_sk.3 @@ -28,15 +28,15 @@ typedef struct _LIBSSH2_SK_SIG_INFO { size_t sig_s_len; } LIBSSH2_SK_SIG_INFO; -int name(LIBSSH2_SESSION *session, LIBSSH2_SK_SIG_INFO *sig_info, +int name(LIBSSH2_SESSION *session, LIBSSH2_SK_SIG_INFO *sig_info, const unsigned char *data, size_t data_len, int algorithm, uint8_t flags, const char *application, - const unsigned char *key_handle, size_t handle_len, + const unsigned char *key_handle, size_t handle_len, void **abstract); .fi .SH DESCRIPTION -\fIsession\fP - Session instance as returned by +\fIsession\fP - Session instance as returned by .BR libssh2_session_init_ex(3) \fIusername\fP - Name of user to attempt authentication for. @@ -53,49 +53,49 @@ int name(LIBSSH2_SESSION *session, LIBSSH2_SK_SIG_INFO *sig_info, \fIabstract\fP - User-provided data to pass to callback. -Attempt FIDO2 authentication. using either the sk-ssh-ed25519@openssh.com or +Attempt FIDO2 authentication. using either the sk-ssh-ed25519@openssh.com or sk-ecdsa-sha2-nistp256@openssh.com key exchange algorithms. This function is only supported when libssh2 is backed by OpenSSL. .SH CALLBACK DESCRIPTION -\fIsession\fP - Session instance as returned by +\fIsession\fP - Session instance as returned by .BR libssh2_session_init_ex(3) -\fIsig_info\fP - Filled in by the callback with the signature and accompanying +\fIsig_info\fP - Filled in by the callback with the signature and accompanying information from the authenticator. \fIdata\fP - The data to sign. \fIdata_len\fP - The length of the data parameter. -\fIalgorithm\fP - The signing algorithm to use. Possible values are +\fIalgorithm\fP - The signing algorithm to use. Possible values are LIBSSH2_HOSTKEY_TYPE_ED25519 and LIBSSH2_HOSTKEY_TYPE_ECDSA_256. -\fIflags\fP - A bitmask specifying options for the authenticator. When +\fIflags\fP - A bitmask specifying options for the authenticator. When LIBSSH2_SK_PRESENCE_REQUIRED is set, the authenticator requires a touch. When -LIBSSH2_SK_VERIFICATION_REQUIRED is set, the authenticator requires a PIN. -Many servers and authenticators do not work properly when +LIBSSH2_SK_VERIFICATION_REQUIRED is set, the authenticator requires a PIN. +Many servers and authenticators do not work properly when LIBSSH2_SK_PRESENCE_REQUIRED is not set. -\fIapplication\fP - A user-defined string to use as the RP name for the +\fIapplication\fP - A user-defined string to use as the RP name for the authenticator. Usually "ssh:". \fIkey_handle\fP - The key handle to use for the authenticator's allow list. \fIhandle_len\fP - The length of the key_handle parameter. -\fIabstract\fP - User-defined data. When a PIN is required, use this to pass in +\fIabstract\fP - User-defined data. When a PIN is required, use this to pass in the PIN, or a function pointer to retrieve the PIN. -The \fIsign_callback\fP is responsible for communicating with the hardware +The \fIsign_callback\fP is responsible for communicating with the hardware authenticator to generate a signature. On success, the signature information -must be placed in the `\fIsig_info\fP sig_info parameter and the callback must +must be placed in the `\fIsig_info\fP sig_info parameter and the callback must return 0. On failure, it should return a negative number. The fields of the LIBSSH2_SK_SIG_INFO are as follows. -\fIflags\fP - A bitmask specifying options for the authenticator. This should +\fIflags\fP - A bitmask specifying options for the authenticator. This should be read from the authenticator and not merely copied from the flags parameter to the callback. @@ -103,15 +103,15 @@ to the callback. \fIsig_r\fP - For Ed25519 signatures, this contains the entire signature, as returned directly from the authenticator. For ECDSA signatures, this contains -the r component of the signature in a big-endian binary representation. For +the r component of the signature in a big-endian binary representation. For both algorithms, use LIBSSH2_ALLOC to allocate memory. It will be freed by the caller. \fIsig_r_len\fP - The length of the sig_r parameter. -\fIsig_s\fP - For ECDSA signatures, this contains the s component of the -signature in a big-endian binary representation. Use LIBSSH2_ALLOC to allocate -memory. It will be freed by the caller. For Ed25519 signatures, set this to +\fIsig_s\fP - For ECDSA signatures, this contains the s component of the +signature in a big-endian binary representation. Use LIBSSH2_ALLOC to allocate +memory. It will be freed by the caller. For Ed25519 signatures, set this to NULL. \fIsig_s_len\fP - The length of the sig_s parameter. diff --git a/docs/template.3 b/docs/template.3 index d5b4473c..c3a22962 100644 --- a/docs/template.3 +++ b/docs/template.3 @@ -4,7 +4,7 @@ libssh2_template - short function description .SH SYNOPSIS #include -void +void libssh2_template(void); .SH DESCRIPTION diff --git a/example/Makefile.am b/example/Makefile.am index 2f91eb2b..2bd08c7c 100644 --- a/example/Makefile.am +++ b/example/Makefile.am @@ -2,12 +2,31 @@ AUTOMAKE_OPTIONS = foreign nostdinc EXTRA_DIST = libssh2_config_cmake.h.in CMakeLists.txt -# samples -noinst_PROGRAMS = direct_tcpip ssh2 scp scp_nonblock scp_write \ - scp_write_nonblock sftp sftp_nonblock sftp_write sftp_write_nonblock \ - sftp_mkdir sftp_mkdir_nonblock sftp_RW_nonblock sftp_write_sliding \ - sftpdir sftpdir_nonblock ssh2_exec ssh2_agent ssh2_agent_forwarding \ - ssh2_echo sftp_append subsystem_netconf tcpip-forward +# examples +noinst_PROGRAMS = \ + direct_tcpip \ + scp \ + scp_nonblock \ + scp_write \ + scp_write_nonblock \ + sftp \ + sftp_RW_nonblock \ + sftp_append \ + sftp_mkdir \ + sftp_mkdir_nonblock \ + sftp_nonblock \ + sftp_write \ + sftp_write_nonblock \ + sftp_write_sliding \ + sftpdir \ + sftpdir_nonblock \ + ssh2 \ + ssh2_agent \ + ssh2_agent_forwarding \ + ssh2_echo \ + ssh2_exec \ + subsystem_netconf \ + tcpip-forward if HAVE_SYS_UN_H noinst_PROGRAMS += x11 diff --git a/git2news.pl b/git2news.pl index 7da4709d..5544663c 100755 --- a/git2news.pl +++ b/git2news.pl @@ -14,7 +14,7 @@ sub nicedate { return $date; } -print +print ' Changelog for the libssh2 project. Generated with git2news.pl '; diff --git a/libssh2-style.el b/libssh2-style.el index 20a24e8a..7b622b45 100644 --- a/libssh2-style.el +++ b/libssh2-style.el @@ -10,13 +10,13 @@ (c-comment-only-line-offset . 0) (c-hanging-braces-alist . ((substatement-open before after))) (c-offsets-alist . ((topmost-intro . 0) - (topmost-intro-cont . 0) - (substatement . +) - (substatement-open . 0) - (statement-case-intro . +) - (statement-case-open . 0) - (case-label . 0) - )) + (topmost-intro-cont . 0) + (substatement . +) + (substatement-open . 0) + (statement-case-intro . +) + (statement-case-open . 0) + (case-label . 0) + )) ) "Libssh2 C Programming Style") @@ -33,10 +33,10 @@ ;; add libssh2 style and set it for the current buffer (c-add-style "libssh2" libssh2-c-style t) (setq tab-width 8 - indent-tabs-mode nil ; Use spaces, not tabs. - comment-column 40 - c-font-lock-extra-types (append '("libssh2_int64_t" "LIBSSH2_USERAUTH_KBDINT_PROMPT" "LIBSSH2_SESSION" "LIBSSH2_CHANNEL" "ssize_t" "size_t" "uint32_t" "LIBSSH2_LISTENER" "LIBSSH2_POLLFD")) - ) + indent-tabs-mode nil ; Use spaces, not tabs. + comment-column 40 + c-font-lock-extra-types (append '("libssh2_int64_t" "LIBSSH2_USERAUTH_KBDINT_PROMPT" "LIBSSH2_SESSION" "LIBSSH2_CHANNEL" "ssize_t" "size_t" "uint32_t" "LIBSSH2_LISTENER" "LIBSSH2_POLLFD")) + ) ;; keybindings for C, C++, and Objective-C. We can put these in ;; c-mode-base-map because of inheritance ... (define-key c-mode-base-map "\M-q" 'c-fill-paragraph) diff --git a/m4/autobuild.m4 b/m4/autobuild.m4 index 2f94844e..78b21677 100644 --- a/m4/autobuild.m4 +++ b/m4/autobuild.m4 @@ -14,31 +14,31 @@ # Usage: AB_INIT([MODE]). AC_DEFUN([AB_INIT], [ - AC_REQUIRE([AC_CANONICAL_BUILD]) - AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_CANONICAL_BUILD]) + AC_REQUIRE([AC_CANONICAL_HOST]) - if test -z "$AB_PACKAGE"; then - AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE} - fi - AC_MSG_NOTICE([autobuild project... $AB_PACKAGE]) + if test -z "$AB_PACKAGE"; then + AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE} + fi + AC_MSG_NOTICE([autobuild project... $AB_PACKAGE]) - if test -z "$AB_VERSION"; then - AB_VERSION=${PACKAGE_VERSION:-$VERSION} - fi - AC_MSG_NOTICE([autobuild revision... $AB_VERSION]) + if test -z "$AB_VERSION"; then + AB_VERSION=${PACKAGE_VERSION:-$VERSION} + fi + AC_MSG_NOTICE([autobuild revision... $AB_VERSION]) - hostname=`hostname` - if test "$hostname"; then - AC_MSG_NOTICE([autobuild hostname... $hostname]) - fi + hostname=`hostname` + if test "$hostname"; then + AC_MSG_NOTICE([autobuild hostname... $hostname]) + fi - ifelse([$1],[],,[AC_MSG_NOTICE([autobuild mode... $1])]) + ifelse([$1],[],,[AC_MSG_NOTICE([autobuild mode... $1])]) - date=`date +%Y%m%d-%H%M%S` - if test "$?" != 0; then - date=`date` - fi - if test "$date"; then - AC_MSG_NOTICE([autobuild timestamp... $date]) - fi + date=`date +%Y%m%d-%H%M%S` + if test "$?" != 0; then + date=`date` + fi + if test "$date"; then + AC_MSG_NOTICE([autobuild timestamp... $date]) + fi ]) diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4 index 96c4e2c3..db76f6bc 100644 --- a/m4/lib-ld.m4 +++ b/m4/lib-ld.m4 @@ -59,7 +59,7 @@ if test "$GCC" = yes; then # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; @@ -89,9 +89,9 @@ AC_CACHE_VAL(acl_cv_path_LD, # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) - test "$with_gnu_ld" != no && break ;; + test "$with_gnu_ld" != no && break ;; *) - test "$with_gnu_ld" != yes && break ;; + test "$with_gnu_ld" != yes && break ;; esac fi done diff --git a/maketgz b/maketgz index a53f20d8..ed03db73 100755 --- a/maketgz +++ b/maketgz @@ -10,8 +10,8 @@ if [ -z "$version" ]; then fi if [ "xonly" = "x$2" ]; then - echo "Setup version number only!" - only=1 + echo "Setup version number only!" + only=1 fi libversion="$version" @@ -25,25 +25,26 @@ numeric=`perl -e 'printf("%02x%02x%02x\n", '"$major, $minor, $patch);"` HEADER=include/libssh2.h if test -z "$only"; then - ext=".dist" - # when not setting up version numbers locally - for a in $HEADER; do - cp $a "$a$ext" - done - HEADER="$HEADER$ext" + ext=".dist" + # when not setting up version numbers locally + for a in $HEADER; do + cp $a "$a$ext" + done + HEADER="$HEADER$ext" fi # requires a date command that knows -u for UTC time zone datestamp=`LC_TIME=C date -u` # Replace in-place version number in header file: -sed -i.bak -e 's/^#define LIBSSH2_VERSION .*/#define LIBSSH2_VERSION "'$libversion'"/g' \ - -e 's/^#define LIBSSH2_VERSION_NUM .*/#define LIBSSH2_VERSION_NUM 0x'$numeric'/g' \ - -e 's/^#define LIBSSH2_VERSION_MAJOR .*/#define LIBSSH2_VERSION_MAJOR '$major'/g' \ - -e 's/^#define LIBSSH2_VERSION_MINOR .*/#define LIBSSH2_VERSION_MINOR '$minor'/g' \ - -e 's/^#define LIBSSH2_VERSION_PATCH .*/#define LIBSSH2_VERSION_PATCH '$patch'/g' \ - -e "s/^#define LIBSSH2_TIMESTAMP .*/#define LIBSSH2_TIMESTAMP \"$datestamp\"/g" \ - $HEADER +sed -i.bak \ + -e 's/^#define LIBSSH2_VERSION .*/#define LIBSSH2_VERSION "'$libversion'"/g' \ + -e 's/^#define LIBSSH2_VERSION_NUM .*/#define LIBSSH2_VERSION_NUM 0x'$numeric'/g' \ + -e 's/^#define LIBSSH2_VERSION_MAJOR .*/#define LIBSSH2_VERSION_MAJOR '$major'/g' \ + -e 's/^#define LIBSSH2_VERSION_MINOR .*/#define LIBSSH2_VERSION_MINOR '$minor'/g' \ + -e 's/^#define LIBSSH2_VERSION_PATCH .*/#define LIBSSH2_VERSION_PATCH '$patch'/g' \ + -e "s/^#define LIBSSH2_TIMESTAMP .*/#define LIBSSH2_TIMESTAMP \"$datestamp\"/g" \ + $HEADER rm -f "$HEADER.bak" @@ -52,12 +53,11 @@ echo "libssh2 numerical $numeric" echo "datestamp $datestamp" if test -n "$only"; then - # done! - exit; + # done! + exit fi -findprog() -{ +findprog() { file="$1" for part in `echo $PATH| tr ':' ' '`; do path="$part/$file" diff --git a/nw/GNUmakefile b/nw/GNUmakefile index 291f5924..85191186 100644 --- a/nw/GNUmakefile +++ b/nw/GNUmakefile @@ -9,7 +9,7 @@ # Edit the path below to point to the base of your Novell NDK. ifndef NDKBASE -NDKBASE = c:/novell +NDKBASE = c:/novell endif # Edit the path below to point to the base of your Zlib sources. @@ -24,26 +24,26 @@ endif # Edit the path below to point to your Distribution folder. ifndef DISTDIR -DISTDIR = libssh2-$(LIBSSH2_VERSION_STR)-bin-nw +DISTDIR = libssh2-$(LIBSSH2_VERSION_STR)-bin-nw endif -DISTARC = $(DISTDIR).zip +DISTARC = $(DISTDIR).zip # Edit the path below to point to your Development folder. ifndef DEVLDIR -DEVLDIR = libssh2-$(LIBSSH2_VERSION_STR)-dev-nw +DEVLDIR = libssh2-$(LIBSSH2_VERSION_STR)-dev-nw endif -DEVLARC = $(DEVLDIR).zip +DEVLARC = $(DEVLDIR).zip # Edit the vars below to change NLM target settings. -TARGET = libssh2 -VERSION = $(LIBSSH2_VERSION) -CPRIGHT = Copyright (c) $(LIBSSH2_COPYRIGHT_STR) -WWWURL = https://www.libssh2.org/ -DESCR = libssh2 $(LIBSSH2_VERSION_STR) ($(LIBARCH)) - $(WWWURL) -MTSAFE = YES -STACK = 64000 -SCREEN = none -EXPORTS = @$(TARGET).imp +TARGET = libssh2 +VERSION = $(LIBSSH2_VERSION) +CPRIGHT = Copyright (c) $(LIBSSH2_COPYRIGHT_STR) +WWWURL = https://www.libssh2.org/ +DESCR = libssh2 $(LIBSSH2_VERSION_STR) ($(LIBARCH)) - $(WWWURL) +MTSAFE = YES +STACK = 64000 +SCREEN = none +EXPORTS = @$(TARGET).imp # Edit the var below to point to your lib architecture. ifndef LIBARCH @@ -52,66 +52,66 @@ endif # must be equal to DEBUG or NDEBUG ifndef DB - DB = NDEBUG - # DB = DEBUG + DB = NDEBUG +# DB = DEBUG endif # Optimization: -O or debugging: -g ifeq ($(DB),NDEBUG) - OPT = -O2 - OBJDIR = release + OPT = -O2 + OBJDIR = release else - OPT = -g - OPT += -DLIBSSH2DEBUG - OBJDIR = debug + OPT = -g + OPT += -DLIBSSH2DEBUG + OBJDIR = debug endif # The following lines defines your compiler. ifdef CWFolder - METROWERKS = $(CWFolder) + METROWERKS = $(CWFolder) endif ifdef METROWERKS - # MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support - MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support/Metrowerks Support - CC = mwccnlm +# MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support + MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support/Metrowerks Support + CC = mwccnlm else - CC = $(CROSSPREFIX)gcc + CC = $(CROSSPREFIX)gcc endif # Here you can find a native Win32 binary of the original awk: # http://www.gknw.net/development/prgtools/awk-20100523.zip -AWK = awk +AWK = awk # If you want to mark the target as MTSAFE you will need a tool for # generating the xdc data for the linker; here's a minimal tool: # http://www.gknw.net/development/prgtools/mkxdc.zip -MPKXDC = mkxdc -ZIP = zip -qzr9 +MPKXDC = mkxdc +ZIP = zip -qzr9 # Platform-dependent helper tool macros ifeq ($(findstring /sh,$(SHELL)),/sh) -DEL = rm -f $1 -RMDIR = rm -fr $1 -MKDIR = mkdir -p $1 -COPY = -cp -afv $1 $2 -#COPYR = -cp -afr $1/* $2 -COPYR = -rsync -aC $1/* $2 -TOUCH = touch $1 -CAT = cat -ECHONL = echo "" -DL = ' +DEL = rm -f $1 +RMDIR = rm -fr $1 +MKDIR = mkdir -p $1 +COPY = -cp -afv $1 $2 +#COPYR = -cp -afr $1/* $2 +COPYR = -rsync -aC $1/* $2 +TOUCH = touch $1 +CAT = cat +ECHONL = echo "" +DL = ' else ifeq "$(OS)" "Windows_NT" -DEL = -del 2>NUL /q /f $(subst /,\,$1) -RMDIR = -rd 2>NUL /q /s $(subst /,\,$1) +DEL = -del 2>NUL /q /f $(subst /,\,$1) +RMDIR = -rd 2>NUL /q /s $(subst /,\,$1) else -DEL = -del 2>NUL $(subst /,\,$1) -RMDIR = -deltree 2>NUL /y $(subst /,\,$1) -endif -MKDIR = -md 2>NUL $(subst /,\,$1) -COPY = -copy 2>NUL /y $(subst /,\,$1) $(subst /,\,$2) -COPYR = -xcopy 2>NUL /q /y /e $(subst /,\,$1) $(subst /,\,$2) -TOUCH = copy 2>&1>NUL /b $(subst /,\,$1) +,, -CAT = type -ECHONL = $(ComSpec) /c echo. +DEL = -del 2>NUL $(subst /,\,$1) +RMDIR = -deltree 2>NUL /y $(subst /,\,$1) +endif +MKDIR = -md 2>NUL $(subst /,\,$1) +COPY = -copy 2>NUL /y $(subst /,\,$1) $(subst /,\,$2) +COPYR = -xcopy 2>NUL /q /y /e $(subst /,\,$1) $(subst /,\,$2) +TOUCH = copy 2>&1>NUL /b $(subst /,\,$1) +,, +CAT = type +ECHONL = $(ComSpec) /c echo. endif # LIBARCH_U = $(shell $(AWK) 'BEGIN {print toupper(ARGV[1])}' $(LIBARCH)) @@ -121,52 +121,52 @@ LIBARCH_L = $(shell $(AWK) 'BEGIN {print tolower(ARGV[1])}' $(LIBARCH)) -include $(OBJDIR)/version.inc # Global flags for all compilers -CFLAGS += $(OPT) -D$(DB) -DNETWARE -nostdinc -#CFLAGS += -DHAVE_CONFIG_H +CFLAGS += $(OPT) -D$(DB) -DNETWARE -nostdinc +#CFLAGS += -DHAVE_CONFIG_H ifeq ($(CC),mwccnlm) -LD = mwldnlm -LDFLAGS = -nostdlib $(PRELUDE) $(OBJL) -o $@ -commandfile -AR = mwldnlm -ARFLAGS = -nostdlib -type library -o -LIBEXT = lib -CFLAGS += -msgstyle gcc -gccinc -inline on -opt nointrinsics -proc 586 -CFLAGS += -relax_pointers -#CFLAGS += -w on +LD = mwldnlm +LDFLAGS = -nostdlib $(PRELUDE) $(OBJL) -o $@ -commandfile +AR = mwldnlm +ARFLAGS = -nostdlib -type library -o +LIBEXT = lib +CFLAGS += -msgstyle gcc -gccinc -inline on -opt nointrinsics -proc 586 +CFLAGS += -relax_pointers +#CFLAGS += -w on ifeq ($(LIBARCH),LIBC) - PRELUDE = $(SDK_LIBC)/imports/libcpre.o - CFLAGS += -align 4 + PRELUDE = $(SDK_LIBC)/imports/libcpre.o + CFLAGS += -align 4 else - # PRELUDE = $(SDK_CLIB)/imports/clibpre.o - # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK - PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj" - # CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h" - CFLAGS += -align 1 +# PRELUDE = $(SDK_CLIB)/imports/clibpre.o + # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK + PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj" +# CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h" + CFLAGS += -align 1 endif else -LD = $(CROSSPREFIX)nlmconv -LDFLAGS = -UT -AR = $(CROSSPREFIX)ar -ARFLAGS = -cq -LIBEXT = a -RANLIB = $(CROSSPREFIX)ranlib -CFLAGS += -m32 -CFLAGS += -fno-builtin -fpcc-struct-return -CFLAGS += -fno-strict-aliasing -CFLAGS += -Wall # -pedantic -#CFLAGS += -Wno-pointer-sign +LD = $(CROSSPREFIX)nlmconv +LDFLAGS = -UT +AR = $(CROSSPREFIX)ar +ARFLAGS = -cq +LIBEXT = a +RANLIB = $(CROSSPREFIX)ranlib +CFLAGS += -m32 +CFLAGS += -fno-builtin -fpcc-struct-return +CFLAGS += -fno-strict-aliasing +CFLAGS += -Wall # -pedantic +#CFLAGS += -Wno-pointer-sign ifeq ($(LIBARCH),LIBC) - PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o + PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o else - # PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o - # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK - # http://www.gknw.net/development/mk_nlm/gcc_pre.zip - PRELUDE = $(NDK_ROOT)/pre/prelude.o - CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h +# PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o + # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK + # http://www.gknw.net/development/mk_nlm/gcc_pre.zip + PRELUDE = $(NDK_ROOT)/pre/prelude.o + CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h endif endif -LDLIBS = +LDLIBS = NDK_ROOT = $(NDKBASE)/ndk SDK_CLIB = $(NDK_ROOT)/nwsdk @@ -176,12 +176,12 @@ SNPRINTF = $(NDKBASE)/snprintf INCLUDES = -I. -I../include ifdef WITH_ZLIB - INCLUDES += -I$(ZLIB_PATH) + INCLUDES += -I$(ZLIB_PATH) ifdef LINK_STATIC - LDLIBS += $(ZLIB_PATH)/nw/$(LIBARCH)/libz.$(LIBEXT) + LDLIBS += $(ZLIB_PATH)/nw/$(LIBARCH)/libz.$(LIBEXT) else - MODULES += libz.nlm - IMPORTS += @$(ZLIB_PATH)/nw/$(LIBARCH)/libz.imp + MODULES += libz.nlm + IMPORTS += @$(ZLIB_PATH)/nw/$(LIBARCH)/libz.imp endif endif INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L) @@ -190,25 +190,25 @@ LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT) IMPORTS += GetProcessSwitchCount RunningProcess ifeq ($(LIBARCH),LIBC) - INCLUDES += -I$(SDK_LIBC)/include - # INCLUDES += -I$(SDK_LIBC)/include/nks - # INCLUDES += -I$(SDK_LIBC)/include/winsock - CFLAGS += -D_POSIX_SOURCE + INCLUDES += -I$(SDK_LIBC)/include +# INCLUDES += -I$(SDK_LIBC)/include/nks +# INCLUDES += -I$(SDK_LIBC)/include/winsock + CFLAGS += -D_POSIX_SOURCE else - INCLUDES += -I$(SDK_CLIB)/include/nlm - # INCLUDES += -I$(SDK_CLIB)/include/nlm/obsolete - # INCLUDES += -I$(SDK_CLIB)/include + INCLUDES += -I$(SDK_CLIB)/include/nlm +# INCLUDES += -I$(SDK_CLIB)/include/nlm/obsolete +# INCLUDES += -I$(SDK_CLIB)/include endif -CFLAGS += $(INCLUDES) +CFLAGS += $(INCLUDES) ifeq ($(MTSAFE),YES) - XDCOPT = -n + XDCOPT = -n endif ifeq ($(MTSAFE),NO) - XDCOPT = -u + XDCOPT = -u endif ifdef XDCOPT - XDCDATA = $(OBJDIR)/$(TARGET).xdc + XDCDATA = $(OBJDIR)/$(TARGET).xdc endif vpath %.c . ../src @@ -228,8 +228,8 @@ OBJECTS += snprintf.o vpath %.c $(SNPRINTF) endif -OBJS := $(addprefix $(OBJDIR)/,$(OBJECTS)) -OBJL = $(OBJS) $(OBJDIR)/nwlib.o $(LDLIBS) +OBJS := $(addprefix $(OBJDIR)/,$(OBJECTS)) +OBJL = $(OBJS) $(OBJDIR)/nwlib.o $(LDLIBS) all: lib nlm diff --git a/nw/keepscreen.c b/nw/keepscreen.c index c3471b3e..ae53dc5f 100644 --- a/nw/keepscreen.c +++ b/nw/keepscreen.c @@ -1,25 +1,23 @@ -/* Simple _NonAppStop() implementation which can be linked to your +/* Simple _NonAppStop() implementation which can be linked to your * NLM in order to keep the screen open when the NLM terminates * (the good old clib behaviour). * You dont have to call it, its done automatically from LibC. * - * 2004-Aug-11 by Guenter Knauf + * 2004-Aug-11 by Guenter Knauf * * URL: http://www.gknw.net/development/mk_nlm/ */ - + #include #include void _NonAppStop() { uint16_t row, col; - + GetScreenSize(&row, &col); gotorowcol(row-1, 0); /* pressanykey(); */ printf(" "); getcharacter(); } - - diff --git a/nw/nwlib.c b/nw/nwlib.c index 43018e59..fe8377b3 100644 --- a/nw/nwlib.c +++ b/nw/nwlib.c @@ -300,5 +300,3 @@ int main ( void ) #endif /* __NOVELL_LIBC__ */ #endif /* NETWARE */ - - diff --git a/nw/test/GNUmakefile b/nw/test/GNUmakefile index 5749a377..9bbd9c09 100644 --- a/nw/test/GNUmakefile +++ b/nw/test/GNUmakefile @@ -8,7 +8,7 @@ # Edit the path below to point to the base of your Novell NDK. ifndef NDKBASE -NDKBASE = c:/novell +NDKBASE = c:/novell endif # Edit the path below to point to the base of your Zlib sources. @@ -25,18 +25,18 @@ endif LINK_STATIC = 1 # Edit the vars below to change NLM target settings. -SAMPLES = ../../example +SAMPLES = ../../example TARGETS := $(filter-out x11.nlm,$(patsubst $(SAMPLES)/%.c,%.nlm,$(strip $(wildcard $(SAMPLES)/*.c)))) -VERSION = $(LIBSSH2_VERSION) +VERSION = $(LIBSSH2_VERSION) COPYR = Copyright (c) $(LIBSSH2_COPYRIGHT_STR) -WWWURL = http://www.libssh2.org/ -DESCR = libssh2 $(notdir $(@:.def=)) $(LIBSSH2_VERSION_STR) ($(LIBARCH)) - $(WWWURL) -MTSAFE = YES -STACK = 64000 -SCREEN = NONE -#SCREEN = libssh2 $(notdir $(@:.def=)) +WWWURL = http://www.libssh2.org/ +DESCR = libssh2 $(notdir $(@:.def=)) $(LIBSSH2_VERSION_STR) ($(LIBARCH)) - $(WWWURL) +MTSAFE = YES +STACK = 64000 +SCREEN = NONE +#SCREEN = libssh2 $(notdir $(@:.def=)) # Comment the line below if you dont want to load protected automatically. -#LDRING = 3 +#LDRING = 3 # Edit the var below to point to your lib architecture. ifndef LIBARCH @@ -45,65 +45,65 @@ endif # must be equal to DEBUG or NDEBUG ifndef DB - DB = NDEBUG - # DB = DEBUG + DB = NDEBUG +# DB = DEBUG endif # Optimization: -O or debugging: -g ifeq ($(DB),NDEBUG) - OPT = -O2 - OBJDIR = release + OPT = -O2 + OBJDIR = release else - OPT = -g - OPT += -DLIBSSH2DEBUG - OBJDIR = debug + OPT = -g + OPT += -DLIBSSH2DEBUG + OBJDIR = debug endif # The following lines defines your compiler. ifdef CWFolder - METROWERKS = $(CWFolder) + METROWERKS = $(CWFolder) endif ifdef METROWERKS - # MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support - MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support/Metrowerks Support - CC = mwccnlm +# MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support + MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support/Metrowerks Support + CC = mwccnlm else - CC = $(CROSSPREFIX)gcc + CC = $(CROSSPREFIX)gcc endif # Here you can find a native Win32 binary of the original awk: # http://www.gknw.net/development/prgtools/awk-20100523.zip -AWK = awk +AWK = awk # If you want to mark the target as MTSAFE you will need a tool for # generating the xdc data for the linker; here's a minimal tool: # http://www.gknw.net/development/prgtools/mkxdc.zip -MPKXDC = mkxdc +MPKXDC = mkxdc # Platform-dependent helper tool macros ifeq ($(findstring /sh,$(SHELL)),/sh) -DEL = rm -f $1 -RMDIR = rm -fr $1 -MKDIR = mkdir -p $1 -COPY = -cp -afv $1 $2 -#COPYR = -cp -afr $1/* $2 -COPYR = -rsync -aC $1/* $2 -TOUCH = touch $1 -CAT = cat -ECHONL = echo "" -DL = ' +DEL = rm -f $1 +RMDIR = rm -fr $1 +MKDIR = mkdir -p $1 +COPY = -cp -afv $1 $2 +#COPYR = -cp -afr $1/* $2 +COPYR = -rsync -aC $1/* $2 +TOUCH = touch $1 +CAT = cat +ECHONL = echo "" +DL = ' else ifeq "$(OS)" "Windows_NT" -DEL = -del 2>NUL /q /f $(subst /,\,$1) -RMDIR = -rd 2>NUL /q /s $(subst /,\,$1) +DEL = -del 2>NUL /q /f $(subst /,\,$1) +RMDIR = -rd 2>NUL /q /s $(subst /,\,$1) else -DEL = -del 2>NUL $(subst /,\,$1) -RMDIR = -deltree 2>NUL /y $(subst /,\,$1) -endif -MKDIR = -md 2>NUL $(subst /,\,$1) -COPY = -copy 2>NUL /y $(subst /,\,$1) $(subst /,\,$2) -COPYR = -xcopy 2>NUL /q /y /e $(subst /,\,$1) $(subst /,\,$2) -TOUCH = copy 2>&1>NUL /b $(subst /,\,$1) +,, -CAT = type -ECHONL = $(ComSpec) /c echo. +DEL = -del 2>NUL $(subst /,\,$1) +RMDIR = -deltree 2>NUL /y $(subst /,\,$1) +endif +MKDIR = -md 2>NUL $(subst /,\,$1) +COPY = -copy 2>NUL /y $(subst /,\,$1) $(subst /,\,$2) +COPYR = -xcopy 2>NUL /q /y /e $(subst /,\,$1) $(subst /,\,$2) +TOUCH = copy 2>&1>NUL /b $(subst /,\,$1) +,, +CAT = type +ECHONL = $(ComSpec) /c echo. endif # LIBARCH_U = $(shell $(AWK) 'BEGIN {print toupper(ARGV[1])}' $(LIBARCH)) @@ -113,45 +113,45 @@ LIBARCH_L = $(shell $(AWK) 'BEGIN {print tolower(ARGV[1])}' $(LIBARCH)) -include $(OBJDIR)/version.inc # Global flags for all compilers -CFLAGS += $(OPT) -D$(DB) -DNETWARE -nostdinc +CFLAGS += $(OPT) -D$(DB) -DNETWARE -nostdinc ifeq ($(CC),mwccnlm) -LD = mwldnlm -LDFLAGS = -nostdlib $(<:.def=.o) $(PRELUDE) $(LDLIBS) -o $@ -commandfile -AR = mwldnlm -ARFLAGS = -type library -w nocmdline $(OBJS) -o -LIBEXT = lib -CFLAGS += -msgstyle gcc -gccinc -inline off -opt nointrinsics -proc 586 -CFLAGS += -relax_pointers -#CFLAGS += -w on +LD = mwldnlm +LDFLAGS = -nostdlib $(<:.def=.o) $(PRELUDE) $(LDLIBS) -o $@ -commandfile +AR = mwldnlm +ARFLAGS = -type library -w nocmdline $(OBJS) -o +LIBEXT = lib +CFLAGS += -msgstyle gcc -gccinc -inline off -opt nointrinsics -proc 586 +CFLAGS += -relax_pointers +#CFLAGS += -w on ifeq ($(LIBARCH),LIBC) - PRELUDE = $(SDK_LIBC)/imports/libcpre.o - CFLAGS += -align 4 + PRELUDE = $(SDK_LIBC)/imports/libcpre.o + CFLAGS += -align 4 else - # PRELUDE = $(SDK_CLIB)/imports/clibpre.o - # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK - PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj" - # CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h" - CFLAGS += -align 1 +# PRELUDE = $(SDK_CLIB)/imports/clibpre.o + # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK + PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj" +# CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h" + CFLAGS += -align 1 endif else -LD = nlmconv -LDFLAGS = -UT -AR = ar -ARFLAGS = -cq -LIBEXT = a -CFLAGS += -m32 -CFLAGS += -fno-builtin -fpcc-struct-return -CFLAGS += -fno-strict-aliasing -CFLAGS += -Wall # -pedantic +LD = nlmconv +LDFLAGS = -UT +AR = ar +ARFLAGS = -cq +LIBEXT = a +CFLAGS += -m32 +CFLAGS += -fno-builtin -fpcc-struct-return +CFLAGS += -fno-strict-aliasing +CFLAGS += -Wall # -pedantic ifeq ($(LIBARCH),LIBC) - PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o + PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o else - # PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o - # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK - # http://www.gknw.net/development/mk_nlm/gcc_pre.zip - PRELUDE = $(NDK_ROOT)/pre/prelude.o - CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h +# PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o + # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK + # http://www.gknw.net/development/mk_nlm/gcc_pre.zip + PRELUDE = $(NDK_ROOT)/pre/prelude.o + CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h endif endif @@ -163,12 +163,12 @@ SNPRINTF = $(NDKBASE)/snprintf INCLUDES = -I.. -I../../include LDLIBS = - + ifdef LINK_STATIC - LDLIBS += ../libssh2.$(LIBEXT) + LDLIBS += ../libssh2.$(LIBEXT) else - IMPORTS += @../libssh2.imp - MODULES += libssh2.nlm + IMPORTS += @../libssh2.imp + MODULES += libssh2.nlm endif INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L) @@ -177,33 +177,33 @@ LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT) IMPORTS += GetProcessSwitchCount RunningProcess ifdef WITH_ZLIB - INCLUDES += -I$(ZLIB_PATH) + INCLUDES += -I$(ZLIB_PATH) ifdef LINK_STATIC - LDLIBS += $(ZLIB_PATH)/nw/$(LIBARCH)/libz.$(LIBEXT) + LDLIBS += $(ZLIB_PATH)/nw/$(LIBARCH)/libz.$(LIBEXT) else - MODULES += libz.nlm - IMPORTS += @$(ZLIB_PATH)/nw/$(LIBARCH)/libz.imp + MODULES += libz.nlm + IMPORTS += @$(ZLIB_PATH)/nw/$(LIBARCH)/libz.imp endif endif ifeq ($(LIBARCH),LIBC) - INCLUDES += -I$(SDK_LIBC)/include - # INCLUDES += -I$(SDK_LIBC)/include/nks - # INCLUDES += -I$(SDK_LIBC)/include/winsock - CFLAGS += -D_POSIX_SOURCE + INCLUDES += -I$(SDK_LIBC)/include +# INCLUDES += -I$(SDK_LIBC)/include/nks +# INCLUDES += -I$(SDK_LIBC)/include/winsock + CFLAGS += -D_POSIX_SOURCE else - INCLUDES += -I$(SDK_CLIB)/include/nlm - # INCLUDES += -I$(SDK_CLIB)/include/nlm/obsolete - # INCLUDES += -I$(SDK_CLIB)/include - # CFLAGS += -DNETDB_USE_INTERNET + INCLUDES += -I$(SDK_CLIB)/include/nlm +# INCLUDES += -I$(SDK_CLIB)/include/nlm/obsolete +# INCLUDES += -I$(SDK_CLIB)/include +# CFLAGS += -DNETDB_USE_INTERNET endif -CFLAGS += $(INCLUDES) +CFLAGS += $(INCLUDES) ifeq ($(MTSAFE),YES) - XDCOPT = -n + XDCOPT = -n endif ifeq ($(MTSAFE),NO) - XDCOPT = -u + XDCOPT = -u endif vpath %.c $(SAMPLES) @@ -211,7 +211,7 @@ vpath %.c $(SAMPLES) .PRECIOUS: $(OBJDIR)/%.o $(OBJDIR)/%.def $(OBJDIR)/%.xdc -all: prebuild $(TARGETS) +all: prebuild $(TARGETS) prebuild: $(OBJDIR) $(OBJDIR)/version.inc diff --git a/os400/ccsid.c b/os400/ccsid.c index ef02f1d3..fdad8a65 100644 --- a/os400/ccsid.c +++ b/os400/ccsid.c @@ -138,7 +138,7 @@ convert_ccsid(LIBSSH2_SESSION *session, libssh2_string_cache **cache, termsize = terminator_size(outccsid); if (termsize < 0) return NULL; - + /* Prepare conversion parameters. */ memset((void *) &incode, 0, sizeof incode); memset((void *) &outcode, 0, sizeof outcode); diff --git a/os400/libssh2_config.h b/os400/libssh2_config.h index 9e117419..5de01fdb 100644 --- a/os400/libssh2_config.h +++ b/os400/libssh2_config.h @@ -193,9 +193,9 @@ /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if you have the ANSI C header files. */ diff --git a/os400/macros.h b/os400/macros.h index 408b98d0..1e809e17 100644 --- a/os400/macros.h +++ b/os400/macros.h @@ -116,9 +116,9 @@ libssh2_scp_send(LIBSSH2_SESSION *session, LIBSSH2_API int libssh2_publickey_add(LIBSSH2_PUBLICKEY *pkey, const unsigned char *name, - const unsigned char *blob, unsigned long blob_len, + const unsigned char *blob, unsigned long blob_len, char overwrite, unsigned long num_attrs, - const libssh2_publickey_attribute attrs[]); + const libssh2_publickey_attribute attrs[]); LIBSSH2_API int libssh2_publickey_remove(LIBSSH2_PUBLICKEY *pkey, const unsigned char *name, const unsigned char *blob, unsigned long blob_len); diff --git a/src/Makefile.am b/src/Makefile.am index 46cb88cf..1352ab7b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -64,5 +64,5 @@ VERSION=-version-info 1:1:0 # libssh2_la_LDFLAGS = $(VERSION) -no-undefined \ - -export-symbols-regex '^libssh2_.*' \ - $(CRYPTO_LTLIBS) $(LTLIBZ) + -export-symbols-regex '^libssh2_.*' \ + $(CRYPTO_LTLIBS) $(LTLIBZ) diff --git a/tests/Makefile.am b/tests/Makefile.am index e321dfc8..b27fb279 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -39,9 +39,10 @@ INTEGRATION_TESTS = \ # Enable this once the tests are working #TESTS += $(INTEGRATION_TESTS) check_PROGRAMS += $(INTEGRATION_TESTS) -librunner_la_SOURCES = runner.c runner.h \ - session_fixture.c session_fixture.h \ - openssh_fixture.c openssh_fixture.h +librunner_la_SOURCES = \ + runner.c runner.h \ + session_fixture.c session_fixture.h \ + openssh_fixture.c openssh_fixture.h LDADD = librunner.la check_LTLIBRARIES = librunner.la @@ -55,62 +56,62 @@ LDADD += ../src/libssh2.la TESTS_ENVIRONMENT = SSHD=$(SSHD) EXEEXT=$(EXEEXT) TESTS_ENVIRONMENT += srcdir=$(top_srcdir)/tests builddir=$(top_builddir)/tests -EXTRA_DIST = \ - CMakeLists.txt \ - etc/host \ - etc/host.pub \ - etc/sshd_config \ - etc/user \ - etc/user.pub \ - key_dsa \ - key_dsa.pub \ - key_dsa_wrong \ - key_dsa_wrong.pub \ - key_ecdsa \ - key_ecdsa.pub \ - signed_key_ecdsa \ - signed_key_ecdsa.pub \ - signed_key_ecdsa-cert.pub \ - signed_key_rsa \ - signed_key_rsa-cert.pub \ - signed_key_rsa.pub \ - key_ed25519 \ - key_ed25519.pub \ - key_ed25519_encrypted \ - key_ed25519_encrypted.pub \ - key_rsa \ - key_rsa.pub \ - key_rsa_encrypted \ - key_rsa_encrypted.pub \ - key_rsa_openssh \ - key_rsa_openssh.pub \ - libssh2_config_cmake.h.in \ - mansyntax.sh \ - openssh_server/Dockerfile \ - openssh_server/authorized_keys \ - openssh_server/ca_rsa \ - openssh_server/ca_rsa.pub \ - openssh_server/ca_ecdsa \ - openssh_server/ca_ecdsa.pub \ - openssh_server/ssh_host_ecdsa_key \ - openssh_server/ssh_host_ed25519_key \ - openssh_server/ssh_host_rsa_key \ - simple.c \ - sshdwrap \ - ssh2.c \ - ssh2.sh \ - sshd_fixture.sh.in \ - test_read_3des-cbc \ - test_read_aes128-cbc \ - test_read_aes128-ctr \ - test_read_aes192-cbc \ - test_read_aes192-ctr \ - test_read_aes256-cbc \ - test_read_aes256-ctr \ - test_read_hmac-md5 \ - test_read_hmac-md5-96 \ - test_read_hmac-sha1 \ - test_read_hmac-sha1-96 \ - test_read_hmac-sha2-256 \ - test_read_hmac-sha2-512 \ - test_read_rijndael-cbc +EXTRA_DIST = \ + CMakeLists.txt \ + etc/host \ + etc/host.pub \ + etc/sshd_config \ + etc/user \ + etc/user.pub \ + key_dsa \ + key_dsa.pub \ + key_dsa_wrong \ + key_dsa_wrong.pub \ + key_ecdsa \ + key_ecdsa.pub \ + signed_key_ecdsa \ + signed_key_ecdsa.pub \ + signed_key_ecdsa-cert.pub \ + signed_key_rsa \ + signed_key_rsa-cert.pub \ + signed_key_rsa.pub \ + key_ed25519 \ + key_ed25519.pub \ + key_ed25519_encrypted \ + key_ed25519_encrypted.pub \ + key_rsa \ + key_rsa.pub \ + key_rsa_encrypted \ + key_rsa_encrypted.pub \ + key_rsa_openssh \ + key_rsa_openssh.pub \ + libssh2_config_cmake.h.in \ + mansyntax.sh \ + openssh_server/Dockerfile \ + openssh_server/authorized_keys \ + openssh_server/ca_rsa \ + openssh_server/ca_rsa.pub \ + openssh_server/ca_ecdsa \ + openssh_server/ca_ecdsa.pub \ + openssh_server/ssh_host_ecdsa_key \ + openssh_server/ssh_host_ed25519_key \ + openssh_server/ssh_host_rsa_key \ + simple.c \ + sshdwrap \ + ssh2.c \ + ssh2.sh \ + sshd_fixture.sh.in \ + test_read_3des-cbc \ + test_read_aes128-cbc \ + test_read_aes128-ctr \ + test_read_aes192-cbc \ + test_read_aes192-ctr \ + test_read_aes256-cbc \ + test_read_aes256-ctr \ + test_read_hmac-md5 \ + test_read_hmac-md5-96 \ + test_read_hmac-sha1 \ + test_read_hmac-sha1-96 \ + test_read_hmac-sha2-256 \ + test_read_hmac-sha2-512 \ + test_read_rijndael-cbc diff --git a/tests/ossfuzz/Makefile.am b/tests/ossfuzz/Makefile.am index 9b621be8..b58c84cf 100644 --- a/tests/ossfuzz/Makefile.am +++ b/tests/ossfuzz/Makefile.am @@ -18,10 +18,10 @@ noinst_LIBRARIES = if USE_OSSFUZZERS noinst_PROGRAMS += \ - ssh2_client_fuzzer + ssh2_client_fuzzer noinst_LIBRARIES += \ - libstandaloneengine.a + libstandaloneengine.a endif ssh2_client_fuzzer_SOURCES = ssh2_client_fuzzer.cc testinput.h diff --git a/vms/libssh2_config.h b/vms/libssh2_config.h index 8cbee62d..94c81e01 100644 --- a/vms/libssh2_config.h +++ b/vms/libssh2_config.h @@ -8,7 +8,7 @@ #define ssize_t SSIZE_T -typedef unsigned int uint32_t ; +typedef unsigned int uint32_t; typedef unsigned int socklen_t; /* missing in headers on VMS */ /* Have's */ @@ -30,7 +30,7 @@ typedef unsigned int socklen_t; /* missing in headers on VMS */ #define POSIX_C_SOURCE /* Enable the possibility of using tracing */ - + #define LIBSSH2DEBUG 1 /* For selection of proper block/unblock function in session.c */ @@ -39,23 +39,23 @@ typedef unsigned int socklen_t; /* missing in headers on VMS */ #include -/* In VMS TCP/IP Services and some BSD variants SO_STATE retrieves - * a bitmask revealing amongst others the blocking state of the +/* In VMS TCP/IP Services and some BSD variants SO_STATE retrieves + * a bitmask revealing amongst others the blocking state of the * socket. On VMS the bits are undocumented, but SS_NBIO - * works, I did not test the other bits. Below bitdefs are - * from Berkely source socketvar.h at + * works, I did not test the other bits. Below bitdefs are + * from Berkely source socketvar.h at * http://ftp.fibranet.cat/UnixArchive/PDP-11/Trees/2.11BSD/sys/h/socketvar.h * Socket state bits. - * #define SS_NOFDREF 0x001 no file table ref any more - * #define SS_ISCONNECTED 0x002 socket connected to a peer - * #define SS_ISCONNECTING 0x004 in process of connecting to peer - * #define SS_ISDISCONNECTING 0x008 in process of disconnecting - * #define SS_CANTSENDMORE 0x010 can't send more data to peer - * #define SS_CANTRCVMORE 0x020 can't receive more data from peer - * #define SS_RCVATMARK 0x040 at mark on input - * #define SS_PRIV 0x080 privileged for broadcast, raw... - * #define SS_NBIO 0x100 non-blocking ops - * #define SS_ASYNC 0x200 async i/o notify + * #define SS_NOFDREF 0x001 no file table ref any more + * #define SS_ISCONNECTED 0x002 socket connected to a peer + * #define SS_ISCONNECTING 0x004 in process of connecting to peer + * #define SS_ISDISCONNECTING 0x008 in process of disconnecting + * #define SS_CANTSENDMORE 0x010 can't send more data to peer + * #define SS_CANTRCVMORE 0x020 can't receive more data from peer + * #define SS_RCVATMARK 0x040 at mark on input + * #define SS_PRIV 0x080 privileged for broadcast, raw... + * #define SS_NBIO 0x100 non-blocking ops + * #define SS_ASYNC 0x200 async i/o notify * */ @@ -65,10 +65,10 @@ typedef unsigned int socklen_t; /* missing in headers on VMS */ * When running on Multinet, SO_STATE renders a protocol * not started error. Functionally this has no impact, * apart from libssh2 not being able to restore the socket - * to the proper blocking/non-blocking state. + * to the proper blocking/non-blocking state. */ -#define SS_NBIO 0x100 +#define SS_NBIO 0x100 #endif @@ -82,4 +82,4 @@ typedef unsigned int socklen_t; /* missing in headers on VMS */ #define LIBSSH2_HAVE_ZLIB #endif /* __VMS */ -#endif /* LIBSSH2_CONFIG_H */ +#endif /* LIBSSH2_CONFIG_H */ diff --git a/vms/libssh2_make_example.dcl b/vms/libssh2_make_example.dcl index af4116dd..17e71962 100644 --- a/vms/libssh2_make_example.dcl +++ b/vms/libssh2_make_example.dcl @@ -8,9 +8,9 @@ $ if .not. init_status then goto YExit $! $ if what .eqs. "ALL" $ then -$ call MakeAll +$ call MakeAll $ else -$ call Make +$ call Make $endif $! $YExit: @@ -19,7 +19,7 @@ $! deassign exadir $! deassign objdir $ delete 'link_opts';* $ set default 'olddir' -$exit +$exit $MakeAll: subroutine $! @@ -45,14 +45,14 @@ $ set noon $! $ cc 'cc_include' 'cc_flags'/object=objdir:'what' exadir:'what' $ sev = $severity -$ if sev .and. 2 +$ if sev .and. 2 $ then -$ say "Error compiling ''what', not linked." +$ say "Error compiling ''what', not linked." $ else -$ if .not. (sev .and. 1) -$ then -$ say "Compile warnings in ''what'" -$ endif +$ if .not. (sev .and. 1) +$ then +$ say "Compile warnings in ''what'" +$ endif $ link/exe='what'.exe objdir:'what'.obj, 'link_opts'/opt $ endif $! @@ -60,15 +60,15 @@ $! $End: $ delete objdir:'what'.obj;* $exit -$endsubroutine +$endsubroutine -$Init: +$Init: $! $! $ init_status = 1 $ thisid = f$integer( %x'f$getjpi(0,"pid")') + "''f$cvtime(,,"second")'" -$ mdir = f$environment("procedure") +$ mdir = f$environment("procedure") $ mdir = mdir - f$parse(mdir,,,"name") - f$parse(mdir,,,"type") - f$parse(mdir,,,"version") $ set default 'mdir' $! @@ -78,7 +78,7 @@ $! $ objdirfile = objdir - "[." - "]" + ".dir" $ if f$search( objdirfile ) .eqs. "" $ then -$ create/directory 'objdir' +$ create/directory 'objdir' $ endif $! $ define objdir 'objdir' @@ -89,17 +89,17 @@ $ cc_flags = "/name=shortened/show=all/define=(_USE_STD_STAT=1)" $ link_opts = "objdir:libssh2_''thisid'.opt" $! $! -$ what = "''p1'" -$ if what .eqs. "" .or. f$edit(p1,"trim,collapse,upcase") .eqs. "ALL" -$ then -$ what = "ALL" +$ what = "''p1'" +$ if what .eqs. "" .or. f$edit(p1,"trim,collapse,upcase") .eqs. "ALL" +$ then +$ what = "ALL" $ else -$ what = f$parse(what,,,"name") -$ if f$search("exadir:''what'.c") .eqs. "" -$ then -$ write sys$output "Can't make ''what'" -$ init_status = 0 -$ endif +$ what = f$parse(what,,,"name") +$ if f$search("exadir:''what'.c") .eqs. "" +$ then +$ write sys$output "Can't make ''what'" +$ init_status = 0 +$ endif $ endif $! $ currentlib = f$search("libssh2*.exe") @@ -107,19 +107,19 @@ $! $ define libssh2 'currentlib' $! $ how = "''p2'" -$ if how .eqs. "" .or. f$edit(p2,"trim,collapse,upcase") .eqs. "STATIC" +$ if how .eqs. "" .or. f$edit(p2,"trim,collapse,upcase") .eqs. "STATIC" $ then -$ open/write lout 'link_opts' -$ write lout "libssh2.olb/lib" -$ write lout "sys$share:ssl$libcrypto_shr32.exe/share" -$ write lout "sys$share:ssl$libssl_shr32.exe/share" -$ write lout "gnv$libzshr/share" -$ close lout +$ open/write lout 'link_opts' +$ write lout "libssh2.olb/lib" +$ write lout "sys$share:ssl$libcrypto_shr32.exe/share" +$ write lout "sys$share:ssl$libssl_shr32.exe/share" +$ write lout "gnv$libzshr/share" +$ close lout $ else -$ how = "SHARED" -$ open/write lout 'link_opts' -$ write lout "libssh2/share" -$ close lout -$ endif +$ how = "SHARED" +$ open/write lout 'link_opts' +$ write lout "libssh2/share" +$ close lout +$ endif $! $return diff --git a/vms/libssh2_make_kit.dcl b/vms/libssh2_make_kit.dcl index 6a149588..738187e1 100644 --- a/vms/libssh2_make_kit.dcl +++ b/vms/libssh2_make_kit.dcl @@ -22,24 +22,24 @@ $! $ set default [-] $! $ defdir = f$environment( "default" ) -$ thisdev = f$parse(defdir,,,"device","no_conceal") +$ thisdev = f$parse(defdir,,,"device","no_conceal") $ thisdir = f$parse(defdir,,,"directory","no_conceal") - "][" - "][" - "][" - "][" $! -$ libssh2_kf = thisdev + thisdir +$ libssh2_kf = thisdev + thisdir $ libssh2_kf = libssh2_kf - "]" + ".]" $! $ set default 'mdir' $! $ define/translation_attributes=concealed libssh2_kf 'libssh2_kf' $! -$ product package libssh2 - - /base='arch' - +$ product package libssh2 - + /base='arch' - /producer=jcb - - /source=[] - ! where to find PDF and PTF - /destination=[] - ! where to put .PCSI file - /material=libssh2_kf:[000000...] - ! where to find product material + /source=[] - ! where to find PDF and PTF + /destination=[] - ! where to put .PCSI file + /material=libssh2_kf:[000000...] - ! where to find product material /version="''vms_majorv'.''minorv'-''patchv'''datename'" - - /format=sequential + /format=sequential $! $End: $! @@ -52,7 +52,7 @@ $! $ if f$trnlnm("libssh2_kf") .nes. "" then deassign libssh2_kf $ set default 'olddir' $! -$exit +$exit $! $!-------------------------------------------------------------------------------- $! @@ -61,20 +61,20 @@ $ set process/parse=extended $! $ say = "write sys$output" $! -$ mdir = f$environment("procedure") +$ mdir = f$environment("procedure") $ mdir = mdir - f$parse(mdir,,,"name") - f$parse(mdir,,,"type") - f$parse(mdir,,,"version") $! $ set default 'mdir' $! -$ pipe search [-.include]*.h libssh2_version_major/nohead | (read sys$input l ; l = f$element(2," ",f$edit(l,"trim,compress")) ; - +$ pipe search [-.include]*.h libssh2_version_major/nohead | (read sys$input l ; l = f$element(2," ",f$edit(l,"trim,compress")) ; - define/job majorv &l ) -$ pipe search [-.include]*.h libssh2_version_minor/nohead | (read sys$input l ; l = f$element(2," ",f$edit(l,"trim,compress")) ; - +$ pipe search [-.include]*.h libssh2_version_minor/nohead | (read sys$input l ; l = f$element(2," ",f$edit(l,"trim,compress")) ; - define/job minorv &l ) -$ pipe search [-.include]*.h libssh2_version_patch/nohead | (read sys$input l ; l = f$element(2," ",f$edit(l,"trim,compress")) ; - +$ pipe search [-.include]*.h libssh2_version_patch/nohead | (read sys$input l ; l = f$element(2," ",f$edit(l,"trim,compress")) ; - define/job patchv &l ) $! $ majorv = f$trnlnm("majorv") -$ minorv = f$integer(f$trnlnm("minorv")) +$ minorv = f$integer(f$trnlnm("minorv")) $ patchv = f$integer( f$trnlnm("patchv")) $! $ deassign/job majorv @@ -106,10 +106,10 @@ $ then $ daily = "FALSE" $ datename = "Final" $ else -$ datename = "D" + f$extract(seconddash+1,8,restdir) +$ datename = "D" + f$extract(seconddash+1,8,restdir) $ endif $! -$ if daily +$ if daily $ then $ productname = "JCB ''arch' LIBSSH2 V''vms_majorv'.''minorv'-''patchv'''datename'" $ else @@ -176,7 +176,7 @@ $ write pd " file ""[gnv.usr.share.doc.libssh2]libssh2-''versionname'.release $ write pd " file ""[gnv.usr.lib]gnv$libssh2_''versionname'.exe"" source ""[vms]libssh2_''versionname'.exe"";" $ write pd "end product ;" $ close pd -$exit +$exit $endsubroutine $! $!-------------------------------------------------------------------------------- @@ -219,4 +219,3 @@ $ write pt "[gnv.common_src]libssh2_''versionname'''datename'_src.bck" $close pt $exit $ endsubroutine - diff --git a/vms/libssh2_make_lib.dcl b/vms/libssh2_make_lib.dcl index 56d168f2..a763445e 100644 --- a/vms/libssh2_make_lib.dcl +++ b/vms/libssh2_make_lib.dcl @@ -21,16 +21,16 @@ $ deassign objdir $ delete library_objects.dir;* $! $ set default 'olddir' -$exit +$exit $! $!--------------------------------------------------------------------- $! -$Init: +$Init: $! $! $ init_status = 1 -$ thisid = f$integer( %x'f$getjpi(0,"pid")') -$ mdir = f$environment("procedure") +$ thisid = f$integer( %x'f$getjpi(0,"pid")') +$ mdir = f$environment("procedure") $ mdir = mdir - f$parse(mdir,,,"name") - f$parse(mdir,,,"type") - f$parse(mdir,,,"version") $ set default 'mdir' $! @@ -50,15 +50,15 @@ $ cc_include = "/include=([],[-.include],""/gnv$zlib_include"")" $ cc_define = "/DEFINE=(_USE_STD_STAT=1)" $ link_opts = "objdir:libssh2_''thisid'.opt" $! -$ pipe search [-.include]libssh2.h libssh2_version_major/nohead | (read sys$input l ; l = f$element(2," ",f$edit(l,"trim,compress")) ; - +$ pipe search [-.include]libssh2.h libssh2_version_major/nohead | (read sys$input l ; l = f$element(2," ",f$edit(l,"trim,compress")) ; - define/job majorv &l ) -$ pipe search [-.include]libssh2.h libssh2_version_minor/nohead | (read sys$input l ; l = f$element(2," ",f$edit(l,"trim,compress")) ; - +$ pipe search [-.include]libssh2.h libssh2_version_minor/nohead | (read sys$input l ; l = f$element(2," ",f$edit(l,"trim,compress")) ; - define/job minorv &l ) -$ pipe search [-.include]libssh2.h libssh2_version_patch/nohead | (read sys$input l ; l = f$element(2," ",f$edit(l,"trim,compress")) ; - +$ pipe search [-.include]libssh2.h libssh2_version_patch/nohead | (read sys$input l ; l = f$element(2," ",f$edit(l,"trim,compress")) ; - define/job patchv &l ) $! $ majorv = f$trnlnm("majorv") -$ minorv = f$integer(f$trnlnm("minorv")) +$ minorv = f$integer(f$trnlnm("minorv")) $ patchv = f$integer( f$trnlnm("patchv")) $! $ OLBONLY = "FALSE" @@ -81,7 +81,7 @@ $ set noon $ purge *.opt $ purge *.olb $ purge *.exe -$! +$! $exit 1 $endsubroutine $! @@ -103,7 +103,7 @@ $ write uitv "sys$share:ssl$libcrypto_shr32.exe/share" $ write uitv "sys$share:ssl$libssl_shr32.exe/share" $ write uitv "gnv$libzshr/share" $ close uitv -$! +$! $ link/shared/exe=libssh2_'majorv'_'minorv'_'patchv'.exe - libssh2.olb/lib, - link_libssh2_version_'majorv'_'minorv'_'patchv'.opt/opt, - @@ -118,12 +118,12 @@ $CompileAll: subroutine $! $ set noon $! -$ if f$search("objdir:*.obj;*") .nes "" -$ then +$ if f$search("objdir:*.obj;*") .nes "" +$ then $ delete objdir:*.obj;* $ endif -$ if f$search("[.cxx_repository]cxx$demangler_db.;") .nes "" -$ then +$ if f$search("[.cxx_repository]cxx$demangler_db.;") .nes "" +$ then $ delete [.cxx_repository]cxx$demangler_db.;* $ endif $! @@ -136,16 +136,16 @@ $ case = 0 $ if OLBONLY then case = 1 $CaseLoop: $! -$ if case .eq. 0 -$ then!camel case names +$ if case .eq. 0 +$ then!camel case names $ cc_flags = "/names=(shortened,as_is)''cc_define'" $ objlib = "libssh2_asis.olb" $ endif $! -$ if case .eq. 1 -$ then!uppercase names -$ if f$search("[.cxx_repository]cxx$demangler_db.;") .nes "" -$ then +$ if case .eq. 1 +$ then!uppercase names +$ if f$search("[.cxx_repository]cxx$demangler_db.;") .nes "" +$ then $ rename [.cxx_repository]cxx$demangler_db.; *.lowercase $ purge [.cxx_repository]cxx$demangler_db.lowercase $ endif @@ -172,8 +172,8 @@ $ delete objdir:*.obj;* $ if case .lt 2 then goto CaseLoop $! $ rename libssh2_up.olb libssh2.olb -$ if f$search("[.cxx_repository]cxx$demangler_db.;") .nes "" -$ then +$ if f$search("[.cxx_repository]cxx$demangler_db.;") .nes "" +$ then $ rename [.cxx_repository]cxx$demangler_db.; *.uppercase $ purge [.cxx_repository]cxx$demangler_db.uppercase $ endif @@ -182,10 +182,10 @@ $ if OLBONLY then exit 4 $! $! For each function that is too long, create a global symbol $! low$'shortened-uppercase-name' with as value lowercase shortened -$! name in it, so we can add the proper lower or mixed case -$! shortened name later when building the transfer vectors +$! name in it, so we can add the proper lower or mixed case +$! shortened name later when building the transfer vectors $! for the shared image. -$! This is to prevent two very long similar function names +$! This is to prevent two very long similar function names $! that are shortened getting mixed up when sorted alphabetically. $! $ inputfile = "[.cxx_repository]cxx$demangler_db.lowercase" @@ -211,7 +211,7 @@ $ symvalue = "" $! $ if shortname .eqs. f$edit(shortname,"upcase") $ then -$! this is an uppercase shortname, add it +$! this is an uppercase shortname, add it $ symname = "u$''longname'" $ symvalue = "''shortname'" $ low$'shortname' == l$'longname' @@ -246,7 +246,7 @@ $ library/insert 'objlib' objdir:'what'.obj $! $End: $exit -$endsubroutine +$endsubroutine $! $!--------------------------------------------------------------------- $! @@ -254,7 +254,7 @@ $BuildTransferVectors: subroutine $! $! Do a balanced read of the uppercase library names $! and the mixed case library names, and build the -$! transfer vectors with uppercase entry points +$! transfer vectors with uppercase entry points $! with an alternative in mixed case. $! For shortened names, use the low$* symbols $! to avoid being fooled by the sort. @@ -267,9 +267,9 @@ $! case blind sort of all modules in both the uppercase $! as the case sensitive object library. $! $ sort libu.'thisid' lib.'thisid'/spec=sys$input -/COLLATING_SEQUENCE=(SEQUENCE= ("A" - "Z","0"-"9","_"), FOLD) +/COLLATING_SEQUENCE=(SEQUENCE= ("A" - "Z","0"-"9","_"), FOLD) $ sort lib_asisu.'thisid' lib_asis.'thisid'/spec=sys$input -/COLLATING_SEQUENCE=(SEQUENCE= ("A" - "Z","0"-"9","_"), FOLD) +/COLLATING_SEQUENCE=(SEQUENCE= ("A" - "Z","0"-"9","_"), FOLD) $! $ open/read in lib.'thisid' $ open/read inasis lib_asis.'thisid' @@ -300,12 +300,12 @@ $ endif $! $ if uitregel .nes. "" .and. mode .eq. 1 $ then -$ write uit "''uitregel'=PROCEDURE, -" -$ write uit "''uitasis'/''uitregel'=PROCEDURE, -" +$ write uit "''uitregel'=PROCEDURE, -" +$ write uit "''uitasis'/''uitregel'=PROCEDURE, -" $! $ uitregel = "" $ uitasis = "" -$ endif +$ endif $! $ uitregel = regel $ if f$type( low$'uitregel' ) .nes. "" @@ -320,14 +320,14 @@ $ mode = 1 $! $ goto ReadLoop $EndreadLoop: -$! +$! $! To get the closing brace after the last procedure $! keyword. $! $ if uitregel .nes. "" -$ then -$ write uit "''uitregel'=PROCEDURE, -" -$ write uit "''uitasis'/''uitregel'=PROCEDURE)" +$ then +$ write uit "''uitregel'=PROCEDURE, -" +$ write uit "''uitasis'/''uitregel'=PROCEDURE)" $ endif $! $ write uit "CASE_SENSITIVE=NO" diff --git a/vms/man2help.c b/vms/man2help.c index 92e5f2b9..71f12584 100644 --- a/vms/man2help.c +++ b/vms/man2help.c @@ -14,12 +14,12 @@ typedef struct manl{ struct manl *next; char *filename; }man, *manPtr; - + typedef struct pf_fabnam{ struct FAB dfab; struct RAB drab; struct namldef dnam; - char expanded_filename[NAM$C_MAXRSS + 1]; + char expanded_filename[NAM$C_MAXRSS + 1]; } pfn, *pfnPtr; /*----------------------------------------------------------*/ @@ -37,13 +37,13 @@ if ( len ){ }else{ output[0] = 0; } -} +} /*----------------------------------------------------------*/ /* give part of ilename in partname. See code for proper value of i ( 0 = node, 1 = dev, 2 = dir,3 = name etc. -*/ +*/ int fnamepart( char *inputfile, char *part, int whatpart ) { @@ -59,8 +59,8 @@ pf->dnam = cc$rms_naml; pf->dfab.fab$l_naml = &pf->dnam; -pf->dfab.fab$l_fna = (char *) -1; -pf->dfab.fab$l_dna = (char *) -1; +pf->dfab.fab$l_fna = (char *) -1; +pf->dfab.fab$l_dna = (char *) -1; pf->dfab.fab$b_fns = 0; pf->dfab.fab$w_ifi = 0; @@ -85,7 +85,7 @@ fpcopy ( ipart[0], pf->dnam.naml$l_long_node , pf->dnam.naml$l_long_node_size); fpcopy ( ipart[1], pf->dnam.naml$l_long_dev , pf->dnam.naml$l_long_dev_size); fpcopy ( ipart[2], pf->dnam.naml$l_long_dir , pf->dnam.naml$l_long_dir_size); fpcopy ( ipart[3], pf->dnam.naml$l_long_name , pf->dnam.naml$l_long_name_size); -fpcopy ( ipart[4], pf->dnam.naml$l_long_type , pf->dnam.naml$l_long_type_size); +fpcopy ( ipart[4], pf->dnam.naml$l_long_type , pf->dnam.naml$l_long_type_size); fpcopy ( ipart[5], pf->dnam.naml$l_long_ver , pf->dnam.naml$l_long_ver_size); for( i = ipart[ whatpart ], p = part; *i; ++i, ++p){ @@ -93,7 +93,7 @@ for( i = ipart[ whatpart ], p = part; *i; ++i, ++p){ *p = toupper( *i ); }else{ *p = tolower( *i ); - } + } } *p = 0; @@ -111,16 +111,16 @@ char gevonden_file[NAM$C_MAXRSS + 1]; filespec.dsc$w_length = strlen(filename); filespec.dsc$b_dtype = DSC$K_DTYPE_T; -filespec.dsc$b_class = DSC$K_CLASS_S; +filespec.dsc$b_class = DSC$K_CLASS_S; filespec.dsc$a_pointer = filename; gevondend.dsc$w_length = NAM$C_MAXRSS; gevondend.dsc$b_dtype = DSC$K_DTYPE_T; -gevondend.dsc$b_class = DSC$K_CLASS_S; +gevondend.dsc$b_class = DSC$K_CLASS_S; gevondend.dsc$a_pointer = gevonden_file; status=lib$find_file(&filespec,&gevondend,findex,0,0,0,0); - + if ( (status & 1) == 1 ){ strcpy(gevonden,strtok(gevonden_file," ")); }else{ @@ -143,7 +143,7 @@ if ( !m ) return( NULL ); m->filename = strdup( filename ); if ( *manroot == NULL ){ - *manroot = m; + *manroot = m; }else{ for( f = *manroot; f->next ; f = f->next ); f->next = m; @@ -259,10 +259,10 @@ for ( mode = 0, bol = 1 ; *m; ++m ){ mode = 0; break; case 'B': - ++m; + ++m; *h = ' ';++h; mode = 0; - break; + break; case 'I': /* remove preceding eol */ if ( *(m+1) != 'P' ){ @@ -272,7 +272,7 @@ for ( mode = 0, bol = 1 ; *m; ++m ){ } /* skip .Ix */ - for(;*m != ' ' && *m != '\n' && *m != '\r'; ++m); + for(;*m != ' ' && *m != '\n' && *m != '\r'; ++m); /* copy line up to EOL */ @@ -281,7 +281,7 @@ for ( mode = 0, bol = 1 ; *m; ++m ){ /* if line ends in ., this is an EOL */ if ( *(h-1) == '.'){ - --h; + --h; --m; }else{ /* if line does not end in ., skip EOL in source */ @@ -293,7 +293,7 @@ for ( mode = 0, bol = 1 ; *m; ++m ){ case 'S': if ( *(m+1) == 'H' ){ *h = '\n';++h; - if ( strncmp( m+3 ,"NAME",4) == 0 || + if ( strncmp( m+3 ,"NAME",4) == 0 || strncmp( m+3 ,"SYNOPSIS",8) == 0 || strncmp( m+3 ,"DESCRIPTION",11) == 0 ){ while( *m != '\n' && *m != '\r')++m; @@ -306,7 +306,7 @@ for ( mode = 0, bol = 1 ; *m; ++m ){ *h = '0' + base_level + 1;++h; return_status |= 2; - *h = ' ';++h; + *h = ' ';++h; /* skip H (or whatever after S) and blank */ ++m;++m; @@ -318,11 +318,11 @@ for ( mode = 0, bol = 1 ; *m; ++m ){ if ( *m != '\"' ){ *h = tolower( *m ); - if (*h == ' ') *h = '_'; + if (*h == ' ') *h = '_'; }else{ --h; - } - } + } + } /* Add a linefeed or two */ @@ -330,7 +330,7 @@ for ( mode = 0, bol = 1 ; *m; ++m ){ *h = *m;++h; mode = 0; - } + } } break; case 'T': @@ -341,10 +341,10 @@ for ( mode = 0, bol = 1 ; *m; ++m ){ for ( m = m + 3; *m != ' ' && *m ; ++m, ++h ){ *h = *m; } - if ( add_parentheses ){ - *h = '(';++h; - *h = ')';++h; - } + if ( add_parentheses ){ + *h = '(';++h; + *h = ')';++h; + } while( *m != '\n' && *m != '\r' && *m )++m; mode = 0; } @@ -355,7 +355,7 @@ for ( mode = 0, bol = 1 ; *m; ++m ){ break; } break; - case 2: /* after \ skip two characters or print the backslash */ + case 2: /* after \ skip two characters or print the backslash */ switch(*m){ case '\\': *h = *m; @@ -367,7 +367,7 @@ for ( mode = 0, bol = 1 ; *m; ++m ){ mode = 0; break; } - break; + break; } /*end switch mode */ bol = 0; @@ -401,8 +401,8 @@ if ( (return_status&2) ){ len, filespec, strlen(uit), return_status ); */ -free( m ); -free( h ); +free( m ); +free( h ); return ( 1); } @@ -474,7 +474,7 @@ for ( i = 1; i < argc; ++i){ case 'a': append = 1; break; - case 'b': + case 'b': if ( (i+1) < argc ){ base_level = atoi( argv[ i + 1 ] ); basechange = 1; @@ -512,5 +512,3 @@ free( helpfile ); return( status ); } - - diff --git a/vms/readme.vms b/vms/readme.vms index 978da197..e38af163 100644 --- a/vms/readme.vms +++ b/vms/readme.vms @@ -1,13 +1,13 @@ *These are the porting notes to OpenVMS, as of 7 April 2010 -by Jose Baars. This file will be installed as +by Jose Baars. This file will be installed as libssh2*.release_notes by the product install kit. -LIBSSH2 +LIBSSH2 ------- -LIBSSH2 is a client-side library written in C that aims to -implement the SSH2 protocol. It is an open source project, +LIBSSH2 is a client-side library written in C that aims to +implement the SSH2 protocol. It is an open source project, to be found at https://libssh2.org. GNV @@ -19,44 +19,44 @@ of the GNV project, John Malmberg. Installing the PCSI kit ======================= -Prerequisites +Prerequisites ------------- -- VMS version 8.3 minimal. +- VMS version 8.3 minimal. See the remarks at prerequisites for building the kit -- TCP/IP stack, both TCP/IP services and Multinet should work. +- TCP/IP stack, both TCP/IP services and Multinet should work. See the remarks at prerequisites for building the kit -- HP OPENSSL V1.3 minimal. +- HP OPENSSL V1.3 minimal. See the remarks at prerequisites for building the kit -- JEM ZLIB V1.2-3E1 minimal. +- JEM ZLIB V1.2-3E1 minimal. See the remarks at prerequisites for building the kit - -The first three dependencies are tested at installation time, and + +The first three dependencies are tested at installation time, and installation will fail if any these products are not installed. The ZLIB dependency is not tested by the product installation -procedure, as libssh2 will probably be installed as part of +procedure, as libssh2 will probably be installed as part of multiple libraries including zlib. Install ------- -The kit will install gnv$libssh2.exe in a directory tree that might -already be available on your system if you have installed other gnv* -libraries or utilities. +The kit will install gnv$libssh2.exe in a directory tree that might +already be available on your system if you have installed other gnv* +libraries or utilities. The directory tree for gnv$libssh2.exe will be like this: [gnv] -- [usr] -- [include] -- [libssh2] include files for libssh2 [lib] gnv$libssh2_x_y_z.exe - [share] -- [doc] -- [libssh2] libssh2.hlb, - release notes (this file), - libssh2 release notes + [share] -- [doc] -- [libssh2] libssh2.hlb, + release notes (this file), + libssh2 release notes optional: - [example] libssh2_examples-x_y_z.bck + [example] libssh2_examples-x_y_z.bck [common_src] libssh2-x_y_z_src.bck -By default, it will install the shared image and include files to +By default, it will install the shared image and include files to SYS$COMMON:[GNV...]. You can override this destination by specifying the destination @@ -71,9 +71,9 @@ Please ignore the following warnings, as the kit is not signed : Optionally, you can install a backup saveset with some programming examples, or a backupo saveset with the complete libssh2 source tree. - -you will need to answer 'NO' to the question -'Do you want the default for all options'. + +you will need to answer 'NO' to the question +'Do you want the default for all options'. and 'YES' to either or both the following questions: @@ -99,34 +99,34 @@ Optionally, you can install the executbale like so: $ mc sysgen install dev:[dir..]gnv$libssh2_x_y_z.exe/open/share/header -Link your programs against gnv$libssh2, and when upgrading libssh2 +Link your programs against gnv$libssh2, and when upgrading libssh2 test thoroughly. If you want to be extra cautious define a system logical like this: $ define/system/executive gnv$libssh2_x_y_z dev:[dir..]gnv$libssh2_x_y_z.exe -Link programs against gnv$libssh2_x_y_z, and when upgrading libssh2 -link against new versions. +Link programs against gnv$libssh2_x_y_z, and when upgrading libssh2 +link against new versions. -It is probably more convenient in the last case to link against the object +It is probably more convenient in the last case to link against the object library provided in the source backup saveset. Both an uppercase and a -mixed case object library, called libssh2.olb and libssh2_asis.olb +mixed case object library, called libssh2.olb and libssh2_asis.olb are provided. Compiling and linking against libssh2 ------------------------------------- -The shared image library has a vector table with both uppercase and -mixed case entry points, allowing to link directly against the shared +The shared image library has a vector table with both uppercase and +mixed case entry points, allowing to link directly against the shared image wether you need the /NAMES=AS_IS or not. To link successfully, you MUST use /NAMES=shortened, as some function names in libssh2 are longer than the VMS maximum of 32 characters. If you chose to install the examples, you can unpack the backup -saveset by +saveset by backup/sel=*.c device:[gnv.usr.share.doc.libssh2.examples]libssh2_examples-x_y_z.bck - [] @@ -147,7 +147,7 @@ Building gnv$libssh2 You can build gnv$libssh2 yourself, which may have advantages, as the library is in full development, very regularly new features are added. -For production use, it is probably advisable to use a stable version, and +For production use, it is probably advisable to use a stable version, and link against that. To check out new features, statically linking against the object library is probably more practical, to avoid compatibility issues. @@ -161,21 +161,21 @@ You will need to have the following available: - An Alpha or Itanium VMS system. Due to dependencies on zlib, ssl and ODS-5, support on VAXen would be cumbersome at least. -- VMS version 8.3 minimal. This is a requirement of gnv$zlibshr.exe against +- VMS version 8.3 minimal. This is a requirement of gnv$zlibshr.exe against which shared image library libssh2 is linked. If you use another zlib to link against, you can make it work under lower versions of VMS. I have made it work on VMS 7.3-2 with not a lot of difficulty. Also, if you are not interested in compression, you can choose not - to link against zlib at all; in that case comment out the + to link against zlib at all; in that case comment out the #define LIBSSH2_HAVE_ZLIB in libssh2_config.h. - TCP/IP services or Multinet for OpenVMS. TCPWare has not been tested. -- The HP OpenSSL product. Of course, with tweaking, you can probably link +- The HP OpenSSL product. Of course, with tweaking, you can probably link it against the OpenSSL library, but that is not what I have used. - -- A C compiler. I don't know any other working C compilers than + +- A C compiler. I don't know any other working C compilers than the DEC/Compac/HP-C compiler on VMS. - An ODS-5 disk. With tweaking you'll get it to work on an ODS-2 @@ -199,7 +199,7 @@ Downloading libssh2 ------------------- At the website of libssh2, you can find stable and daily gzipped -tarballs. if you have a computer connected to internet you can +tarballs. if you have a computer connected to internet you can download a daily build yourself by a procedure that looks a lot like this ( fill out your own proxy user/password, set up right symbols to gunzip, vmstar and curl and set up the libssh2 build version): @@ -212,8 +212,8 @@ $ currentday = f$cvtime(,,"date") - "-" - "-" $! $ set def mydev:[mydir.libssh2] $! -$ if f$search("libssh2-''libssh2_version'-''currentday'.tar.gz") .nes. "" -$ then +$ if f$search("libssh2-''libssh2_version'-''currentday'.tar.gz") .nes. "" +$ then $ delete libssh2-'libssh2_version'-'currentday'.tar.gz;* $ endif $! @@ -221,15 +221,15 @@ $ curl 'proxy_line' "https://libssh2.org/snapshots/libssh2-''libssh2_version'-'' -o libssh2-'libssh2_version'-'currentday'.tar.gz $! $! -$ if f$search("libssh2-''libssh2_version'-''currentday'.tar.;") .nes. "" -$ then +$ if f$search("libssh2-''libssh2_version'-''currentday'.tar.;") .nes. "" +$ then $ delete libssh2-'libssh2_version'-'currentday'.tar.;* $ endif $! $ gunzip libssh2-'libssh2_version'-'currentday'.tar.gz $! $ tarfile = f$search("libssh2-''libssh2_version'-''currentday'.tar.;") -$ vmstar xf 'tarfile' +$ vmstar xf 'tarfile' Downloading a stable build will need you to get rid of the currentday. @@ -241,8 +241,8 @@ Getting the libssh2 sources from the source backup in the binary kit -------------------------------------------------------------------- During installation of the binary kit, you are given the option -of installing the sources. If chosen, a backup saveset with -the complete libssh2 directory is made available in +of installing the sources. If chosen, a backup saveset with +the complete libssh2 directory is made available in [gnv.common_src]. By restoring this backup saveset, you end up with the same @@ -262,7 +262,7 @@ command: @libssh2_make_lib.dcl This should produce libssh2_x_y_z.exe in this same vms directory. - + Building the examples @@ -274,16 +274,16 @@ produced when building the shared image, or against the shared image produced in the step before. You can compile only one of the examples by giving only the -name part of the filename of the example as p1 to the +name part of the filename of the example as p1 to the build procedure: -@libssh2_make_example.dcl +@libssh2_make_example.dcl or for instance -@libssh2_make_example.dcl sftp +@libssh2_make_example.dcl sftp -By default, libssh2_make_example.dcl links to the object libraries +By default, libssh2_make_example.dcl links to the object libraries produced by the libssh2_make_lib.dcl procedure. If you want to link against the shared image library made in the same procedure, invoke the procedure like so: @@ -291,7 +291,7 @@ the procedure like so: @libssh2_make_example.dcl sftp "SHARED" The procdure defines a process logical gnv$libssh2 pointing to the shared -image library in the directory, which obviously will not survive a logout. +image library in the directory, which obviously will not survive a logout. Building the help library @@ -312,8 +312,3 @@ When you have built the shared library and the help library, you can build a PCSI kit by issueing this command: @libssh2_make_kit.dcl - - - - -