1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-07-31 00:03:08 +03:00

tidy-up: replace tabs and other whitespace (#885)

There are a few non-whitespace changes, see them here:
https://github.com/libssh2/libssh2/pull/885/files?w=1
This commit is contained in:
Viktor Szakats
2023-03-27 18:28:27 +02:00
committed by GitHub
parent 0d08974633
commit 2f16d8105c
104 changed files with 1107 additions and 1110 deletions

2
.gitignore vendored
View File

@ -39,4 +39,4 @@ libssh2.pc
TAGS TAGS
*~ *~
.DS_Store .DS_Store
build build

View File

@ -11,45 +11,45 @@ endif
pkgconfigdir = $(libdir)/pkgconfig pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libssh2.pc pkgconfig_DATA = libssh2.pc
include_HEADERS = \ include_HEADERS = \
include/libssh2.h \ include/libssh2.h \
include/libssh2_publickey.h \ include/libssh2_publickey.h \
include/libssh2_sftp.h include/libssh2_sftp.h
NETWAREFILES = nw/keepscreen.c \ NETWAREFILES = nw/keepscreen.c \
nw/nwlib.c \ nw/nwlib.c \
nw/GNUmakefile \ nw/GNUmakefile \
nw/test/GNUmakefile nw/test/GNUmakefile
DSP = win32/libssh2.dsp DSP = win32/libssh2.dsp
VCPROJ = win32/libssh2.vcproj VCPROJ = win32/libssh2.vcproj
DISTCLEANFILES = $(DSP) DISTCLEANFILES = $(DSP)
VMSFILES = vms/libssh2_make_example.dcl vms/libssh2_make_help.dcl \ 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/libssh2_make_kit.dcl vms/libssh2_make_lib.dcl vms/man2help.c \
vms/readme.vms vms/libssh2_config.h vms/readme.vms vms/libssh2_config.h
WIN32FILES = win32/GNUmakefile \ WIN32FILES = win32/GNUmakefile \
win32/libssh2_config.h win32/config.mk win32/rules.mk \ win32/libssh2_config.h win32/config.mk win32/rules.mk \
win32/Makefile.Watcom win32/libssh2.dsw win32/tests.dsp $(DSP) \ win32/Makefile.Watcom win32/libssh2.dsw win32/tests.dsp $(DSP) \
win32/msvcproj.head win32/msvcproj.foot win32/libssh2.rc win32/msvcproj.head win32/msvcproj.foot win32/libssh2.rc
OS400FILES = os400/README400 os400/initscript.sh os400/make.sh \ OS400FILES = os400/README400 os400/initscript.sh os400/make.sh \
os400/make-src.sh os400/make-rpg.sh os400/make-include.sh \ os400/make-src.sh os400/make-rpg.sh os400/make-include.sh \
os400/os400sys.c os400/ccsid.c \ os400/os400sys.c os400/ccsid.c \
os400/libssh2_config.h os400/macros.h os400/libssh2_ccsid.h \ 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/include/alloca.h os400/include/sys/socket.h os400/include/stdio.h \
os400/libssh2rpg/libssh2.rpgle.in \ os400/libssh2rpg/libssh2.rpgle.in \
os400/libssh2rpg/libssh2_ccsid.rpgle.in \ os400/libssh2rpg/libssh2_ccsid.rpgle.in \
os400/libssh2rpg/libssh2_publickey.rpgle \ os400/libssh2rpg/libssh2_publickey.rpgle \
os400/libssh2rpg/libssh2_sftp.rpgle \ os400/libssh2rpg/libssh2_sftp.rpgle \
Makefile.os400qc3.inc Makefile.os400qc3.inc
EXTRA_DIST = $(WIN32FILES) $(NETWAREFILES) get_ver.awk \ EXTRA_DIST = $(WIN32FILES) $(NETWAREFILES) get_ver.awk \
maketgz NMakefile RELEASE-NOTES libssh2.pc.in $(VMSFILES) config.rpath \ maketgz NMakefile RELEASE-NOTES libssh2.pc.in $(VMSFILES) config.rpath \
CMakeLists.txt cmake git2news.pl libssh2-style.el README.md $(OS400FILES) \ CMakeLists.txt cmake git2news.pl libssh2-style.el README.md $(OS400FILES) \
buildconf buildconf
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
@ -110,10 +110,10 @@ $(DSP): win32/msvcproj.head win32/msvcproj.foot Makefile.am
win32_srcs='$(WIN32SOURCES)'; \ win32_srcs='$(WIN32SOURCES)'; \
sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \ sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
for file in $$sorted_srcs; do \ for file in $$sorted_srcs; do \
echo "# Begin Source File"; \ echo "# Begin Source File"; \
echo ""; \ echo ""; \
echo "SOURCE=..\\src\\"$$file; \ echo "SOURCE=..\\src\\"$$file; \
echo "# End Source File"; \ echo "# End Source File"; \
done; \ done; \
echo "# End Group"; \ echo "# End Group"; \
echo "# Begin Group \"Header Files\""; \ echo "# Begin Group \"Header Files\""; \
@ -122,15 +122,14 @@ $(DSP): win32/msvcproj.head win32/msvcproj.foot Makefile.am
win32_hdrs='$(WIN32HEADERS)'; \ win32_hdrs='$(WIN32HEADERS)'; \
sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \ sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
for file in $$sorted_hdrs; do \ for file in $$sorted_hdrs; do \
echo "# Begin Source File"; \ echo "# Begin Source File"; \
echo ""; \ echo ""; \
if [ "$$file" = "libssh2_config.h" ]; \ if [ "$$file" = "libssh2_config.h" ]; then \
then \ echo "SOURCE=.\\"$$file; \
echo "SOURCE=.\\"$$file; \ else \
else \ echo "SOURCE=..\\src\\"$$file; \
echo "SOURCE=..\\src\\"$$file; \ fi; \
fi; \ echo "# End Source File"; \
echo "# End Source File"; \
done; \ done; \
echo "# End Group"; \ echo "# End Group"; \
cat $(srcdir)/win32/msvcproj.foot) | \ cat $(srcdir)/win32/msvcproj.foot) | \
@ -142,18 +141,18 @@ $(VCPROJ): win32/vc8proj.head win32/vc8proj.foot Makefile.am
win32_srcs='$(WIN32SOURCES)'; \ win32_srcs='$(WIN32SOURCES)'; \
sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \ sorted_srcs=`for file in $$win32_srcs; do echo $$file; done | sort`; \
for file in $$sorted_srcs; do \ for file in $$sorted_srcs; do \
echo "<File RelativePath=\""..\src\$$file"\"></File>"; \ echo "<File RelativePath=\""..\src\$$file"\"></File>"; \
done; \ done; \
echo "</Filter><Filter Name=\"Header Files\">"; \ echo "</Filter><Filter Name=\"Header Files\">"; \
win32_hdrs='$(WIN32HEADERS)'; \ win32_hdrs='$(WIN32HEADERS)'; \
sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \ sorted_hdrs=`for file in $$win32_hdrs; do echo $$file; done | sort`; \
for file in $$sorted_hdrs; do \ for file in $$sorted_hdrs; do \
echo "<File RelativePath=\""..\src\$$file"\"></File>"; \ echo "<File RelativePath=\""..\src\$$file"\"></File>"; \
done; \ done; \
cat $(srcdir)/vc8proj.foot) | \ cat $(srcdir)/vc8proj.foot) | \
awk '{printf("%s\r\n", gensub("\r", "", "g"))}' > $@ ) awk '{printf("%s\r\n", gensub("\r", "", "g"))}' > $@ )
checksrc: checksrc:
perl src/checksrc.pl -i4 -m79 -ASIZEOFNOPAREN -ASNPRINTF -ACOPYRIGHT \ perl src/checksrc.pl -i4 -m79 -ASIZEOFNOPAREN -ASNPRINTF -ACOPYRIGHT \
-AFOPENMODE -Wsrc/libssh2_config.h src/*.[ch] include/*.h example/*.c \ -AFOPENMODE -Wsrc/libssh2_config.h src/*.[ch] include/*.h example/*.c \
tests/*.[ch] tests/*.[ch]

View File

@ -1,9 +1,9 @@
CSOURCES = channel.c comp.c crypt.c hostkey.c kex.c mac.c misc.c \ 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 \ packet.c publickey.c scp.c session.c sftp.c userauth.c transport.c \
userauth_kbd_packet.c \ userauth_kbd_packet.c \
version.c knownhost.c agent.c $(CRYPTO_CSOURCES) pem.c keepalive.c global.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 blowfish.c bcrypt_pbkdf.c agent_win.c os400qc3.c
HHEADERS = libssh2_priv.h $(CRYPTO_HHEADERS) transport.h channel.h comp.h \ 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 \ mac.h misc.h packet.h userauth.h session.h sftp.h crypto.h blf.h agent.h \
userauth_kbd_packet.h os400qc3.h userauth_kbd_packet.h os400qc3.h

View File

@ -15,7 +15,7 @@ SUBDIRS=src
all-sub: win32\objects.mk all-sub: win32\objects.mk
-for %D in ($(SUBDIRS)) do $(MAKE) /nologo /f %D/NMakefile BUILD=$(BUILD) SUBDIR=%D all-sub -for %D in ($(SUBDIRS)) do $(MAKE) /nologo /f %D/NMakefile BUILD=$(BUILD) SUBDIR=%D all-sub
clean: clean:
-rmdir 2>NUL /s/q $(TARGET) -rmdir 2>NUL /s/q $(TARGET)
-del 2>NUL win32\objects.mk -del 2>NUL win32\objects.mk

View File

@ -256,57 +256,57 @@ Some ./configure options deserve additional comments:
* --enable-crypt-none * --enable-crypt-none
The SSH2 Transport allows for unencrypted data The SSH2 Transport allows for unencrypted data
transmission using the "none" cipher. Because this is transmission using the "none" cipher. Because this is
such a huge security hole, it is typically disabled on such a huge security hole, it is typically disabled on
SSH2 implementations and is disabled in libssh2 by SSH2 implementations and is disabled in libssh2 by
default as well. default as well.
Enabling this option will allow for "none" as a Enabling this option will allow for "none" as a
negotiable method, however it still requires that the negotiable method, however it still requires that the
method be advertized by the remote end and that no method be advertized by the remote end and that no
more-preferable methods are available. more-preferable methods are available.
* --enable-mac-none * --enable-mac-none
The SSH2 Transport also allows implementations to The SSH2 Transport also allows implementations to
forego a message authentication code. While this is forego a message authentication code. While this is
less of a security risk than using a "none" cipher, it less of a security risk than using a "none" cipher, it
is still not recommended as disabling MAC hashes is still not recommended as disabling MAC hashes
removes a layer of security. removes a layer of security.
Enabling this option will allow for "none" as a Enabling this option will allow for "none" as a
negotiable method, however it still requires that the negotiable method, however it still requires that the
method be advertized by the remote end and that no method be advertized by the remote end and that no
more-preferable methods are available. more-preferable methods are available.
* --with-libgcrypt * --with-libgcrypt
* --without-libgcrypt * --without-libgcrypt
* --with-libgcrypt-prefix=DIR * --with-libgcrypt-prefix=DIR
libssh2 can use the Libgcrypt library libssh2 can use the Libgcrypt library
(https://www.gnupg.org/) for cryptographic operations. (https://www.gnupg.org/) for cryptographic operations.
One of the cryptographic libraries is required. One of the cryptographic libraries is required.
Configure will attempt to locate Libgcrypt Configure will attempt to locate Libgcrypt
automatically. automatically.
If your installation of Libgcrypt is in another If your installation of Libgcrypt is in another
location, specify it using --with-libgcrypt-prefix. location, specify it using --with-libgcrypt-prefix.
* --with-openssl * --with-openssl
* --without-openssl * --without-openssl
* --with-libssl-prefix=[DIR] * --with-libssl-prefix=[DIR]
libssh2 can use the OpenSSL library libssh2 can use the OpenSSL library
(https://www.openssl.org) for cryptographic operations. (https://www.openssl.org) for cryptographic operations.
One of the cryptographic libraries is required. One of the cryptographic libraries is required.
Configure will attempt to locate OpenSSL in the Configure will attempt to locate OpenSSL in the
default location. default location.
If your installation of OpenSSL is in another If your installation of OpenSSL is in another
location, specify it using --with-libssl-prefix. location, specify it using --with-libssl-prefix.
* --with-mbedtls * --with-mbedtls
* --without-mbedtls * --without-mbedtls
@ -326,15 +326,15 @@ Some ./configure options deserve additional comments:
* --without-libz * --without-libz
* --with-libz-prefix=[DIR] * --with-libz-prefix=[DIR]
If present, libssh2 will attempt to use the zlib If present, libssh2 will attempt to use the zlib
(http://www.zlib.org) for payload compression, however (http://www.zlib.org) for payload compression, however
zlib is not required. zlib is not required.
If your installation of Libz is in another location, If your installation of Libz is in another location,
specify it using --with-libz-prefix. specify it using --with-libz-prefix.
* --enable-debug * --enable-debug
Will make the build use more pedantic and strict compiler Will make the build use more pedantic and strict compiler
options as well as enable the libssh2_trace() function (for options as well as enable the libssh2_trace() function (for
showing debug traces). showing debug traces).

View File

@ -4,179 +4,179 @@ EXTRA_DIST = template.3 BINDINGS INSTALL_AUTOTOOLS INSTALL_CMAKE.md HACKING TODO
AUTHORS CMakeLists.txt HACKING-CRYPTO SECURITY.md AUTHORS CMakeLists.txt HACKING-CRYPTO SECURITY.md
dist_man_MANS = \ dist_man_MANS = \
libssh2_agent_connect.3 \ libssh2_agent_connect.3 \
libssh2_agent_disconnect.3 \ libssh2_agent_disconnect.3 \
libssh2_agent_free.3 \ libssh2_agent_free.3 \
libssh2_agent_get_identity.3 \ libssh2_agent_get_identity.3 \
libssh2_agent_get_identity_path.3 \ libssh2_agent_get_identity_path.3 \
libssh2_agent_init.3 \ libssh2_agent_init.3 \
libssh2_agent_list_identities.3 \ libssh2_agent_list_identities.3 \
libssh2_agent_set_identity_path.3 \ libssh2_agent_set_identity_path.3 \
libssh2_agent_userauth.3 \ libssh2_agent_userauth.3 \
libssh2_banner_set.3 \ libssh2_banner_set.3 \
libssh2_base64_decode.3 \ libssh2_base64_decode.3 \
libssh2_channel_close.3 \ libssh2_channel_close.3 \
libssh2_channel_direct_tcpip.3 \ libssh2_channel_direct_tcpip.3 \
libssh2_channel_direct_tcpip_ex.3 \ libssh2_channel_direct_tcpip_ex.3 \
libssh2_channel_eof.3 \ libssh2_channel_eof.3 \
libssh2_channel_exec.3 \ libssh2_channel_exec.3 \
libssh2_channel_flush.3 \ libssh2_channel_flush.3 \
libssh2_channel_flush_ex.3 \ libssh2_channel_flush_ex.3 \
libssh2_channel_flush_stderr.3 \ libssh2_channel_flush_stderr.3 \
libssh2_channel_forward_accept.3 \ libssh2_channel_forward_accept.3 \
libssh2_channel_forward_cancel.3 \ libssh2_channel_forward_cancel.3 \
libssh2_channel_forward_listen.3 \ libssh2_channel_forward_listen.3 \
libssh2_channel_forward_listen_ex.3 \ libssh2_channel_forward_listen_ex.3 \
libssh2_channel_free.3 \ libssh2_channel_free.3 \
libssh2_channel_get_exit_signal.3 \ libssh2_channel_get_exit_signal.3 \
libssh2_channel_get_exit_status.3 \ libssh2_channel_get_exit_status.3 \
libssh2_channel_handle_extended_data.3 \ libssh2_channel_handle_extended_data.3 \
libssh2_channel_handle_extended_data2.3 \ libssh2_channel_handle_extended_data2.3 \
libssh2_channel_ignore_extended_data.3 \ libssh2_channel_ignore_extended_data.3 \
libssh2_channel_open_ex.3 \ libssh2_channel_open_ex.3 \
libssh2_channel_open_session.3 \ libssh2_channel_open_session.3 \
libssh2_channel_process_startup.3 \ libssh2_channel_process_startup.3 \
libssh2_channel_read.3 \ libssh2_channel_read.3 \
libssh2_channel_read_ex.3 \ libssh2_channel_read_ex.3 \
libssh2_channel_read_stderr.3 \ libssh2_channel_read_stderr.3 \
libssh2_channel_receive_window_adjust.3 \ libssh2_channel_receive_window_adjust.3 \
libssh2_channel_receive_window_adjust2.3 \ libssh2_channel_receive_window_adjust2.3 \
libssh2_channel_request_auth_agent.3 \ libssh2_channel_request_auth_agent.3 \
libssh2_channel_request_pty.3 \ libssh2_channel_request_pty.3 \
libssh2_channel_request_pty_ex.3 \ libssh2_channel_request_pty_ex.3 \
libssh2_channel_request_pty_size.3 \ libssh2_channel_request_pty_size.3 \
libssh2_channel_request_pty_size_ex.3 \ libssh2_channel_request_pty_size_ex.3 \
libssh2_channel_send_eof.3 \ libssh2_channel_send_eof.3 \
libssh2_channel_set_blocking.3 \ libssh2_channel_set_blocking.3 \
libssh2_channel_setenv.3 \ libssh2_channel_setenv.3 \
libssh2_channel_setenv_ex.3 \ libssh2_channel_setenv_ex.3 \
libssh2_channel_shell.3 \ libssh2_channel_shell.3 \
libssh2_channel_subsystem.3 \ libssh2_channel_subsystem.3 \
libssh2_channel_wait_closed.3 \ libssh2_channel_wait_closed.3 \
libssh2_channel_wait_eof.3 \ libssh2_channel_wait_eof.3 \
libssh2_channel_window_read.3 \ libssh2_channel_window_read.3 \
libssh2_channel_window_read_ex.3 \ libssh2_channel_window_read_ex.3 \
libssh2_channel_window_write.3 \ libssh2_channel_window_write.3 \
libssh2_channel_window_write_ex.3 \ libssh2_channel_window_write_ex.3 \
libssh2_channel_write.3 \ libssh2_channel_write.3 \
libssh2_channel_write_ex.3 \ libssh2_channel_write_ex.3 \
libssh2_channel_write_stderr.3 \ libssh2_channel_write_stderr.3 \
libssh2_channel_x11_req.3 \ libssh2_channel_x11_req.3 \
libssh2_channel_x11_req_ex.3 \ libssh2_channel_x11_req_ex.3 \
libssh2_crypto_engine.3 \ libssh2_crypto_engine.3 \
libssh2_exit.3 \ libssh2_exit.3 \
libssh2_free.3 \ libssh2_free.3 \
libssh2_hostkey_hash.3 \ libssh2_hostkey_hash.3 \
libssh2_init.3 \ libssh2_init.3 \
libssh2_keepalive_config.3 \ libssh2_keepalive_config.3 \
libssh2_keepalive_send.3 \ libssh2_keepalive_send.3 \
libssh2_knownhost_add.3 \ libssh2_knownhost_add.3 \
libssh2_knownhost_addc.3 \ libssh2_knownhost_addc.3 \
libssh2_knownhost_check.3 \ libssh2_knownhost_check.3 \
libssh2_knownhost_checkp.3 \ libssh2_knownhost_checkp.3 \
libssh2_knownhost_del.3 \ libssh2_knownhost_del.3 \
libssh2_knownhost_free.3 \ libssh2_knownhost_free.3 \
libssh2_knownhost_get.3 \ libssh2_knownhost_get.3 \
libssh2_knownhost_init.3 \ libssh2_knownhost_init.3 \
libssh2_knownhost_readfile.3 \ libssh2_knownhost_readfile.3 \
libssh2_knownhost_readline.3 \ libssh2_knownhost_readline.3 \
libssh2_knownhost_writefile.3 \ libssh2_knownhost_writefile.3 \
libssh2_knownhost_writeline.3 \ libssh2_knownhost_writeline.3 \
libssh2_poll.3 \ libssh2_poll.3 \
libssh2_poll_channel_read.3 \ libssh2_poll_channel_read.3 \
libssh2_publickey_add.3 \ libssh2_publickey_add.3 \
libssh2_publickey_add_ex.3 \ libssh2_publickey_add_ex.3 \
libssh2_publickey_init.3 \ libssh2_publickey_init.3 \
libssh2_publickey_list_fetch.3 \ libssh2_publickey_list_fetch.3 \
libssh2_publickey_list_free.3 \ libssh2_publickey_list_free.3 \
libssh2_publickey_remove.3 \ libssh2_publickey_remove.3 \
libssh2_publickey_remove_ex.3 \ libssh2_publickey_remove_ex.3 \
libssh2_publickey_shutdown.3 \ libssh2_publickey_shutdown.3 \
libssh2_scp_recv.3 \ libssh2_scp_recv.3 \
libssh2_scp_recv2.3 \ libssh2_scp_recv2.3 \
libssh2_scp_send.3 \ libssh2_scp_send.3 \
libssh2_scp_send64.3 \ libssh2_scp_send64.3 \
libssh2_scp_send_ex.3 \ libssh2_scp_send_ex.3 \
libssh2_session_abstract.3 \ libssh2_session_abstract.3 \
libssh2_session_banner_get.3 \ libssh2_session_banner_get.3 \
libssh2_session_banner_set.3 \ libssh2_session_banner_set.3 \
libssh2_session_block_directions.3 \ libssh2_session_block_directions.3 \
libssh2_session_callback_set.3 \ libssh2_session_callback_set.3 \
libssh2_session_disconnect.3 \ libssh2_session_disconnect.3 \
libssh2_session_disconnect_ex.3 \ libssh2_session_disconnect_ex.3 \
libssh2_session_flag.3 \ libssh2_session_flag.3 \
libssh2_session_free.3 \ libssh2_session_free.3 \
libssh2_session_get_blocking.3 \ libssh2_session_get_blocking.3 \
libssh2_session_get_timeout.3 \ libssh2_session_get_timeout.3 \
libssh2_session_handshake.3 \ libssh2_session_handshake.3 \
libssh2_session_hostkey.3 \ libssh2_session_hostkey.3 \
libssh2_session_init.3 \ libssh2_session_init.3 \
libssh2_session_init_ex.3 \ libssh2_session_init_ex.3 \
libssh2_session_last_errno.3 \ libssh2_session_last_errno.3 \
libssh2_session_last_error.3 \ libssh2_session_last_error.3 \
libssh2_session_set_last_error.3 \ libssh2_session_set_last_error.3 \
libssh2_session_method_pref.3 \ libssh2_session_method_pref.3 \
libssh2_session_methods.3 \ libssh2_session_methods.3 \
libssh2_session_set_blocking.3 \ libssh2_session_set_blocking.3 \
libssh2_session_set_timeout.3 \ libssh2_session_set_timeout.3 \
libssh2_session_startup.3 \ libssh2_session_startup.3 \
libssh2_session_supported_algs.3 \ libssh2_session_supported_algs.3 \
libssh2_sftp_close.3 \ libssh2_sftp_close.3 \
libssh2_sftp_close_handle.3 \ libssh2_sftp_close_handle.3 \
libssh2_sftp_closedir.3 \ libssh2_sftp_closedir.3 \
libssh2_sftp_fsetstat.3 \ libssh2_sftp_fsetstat.3 \
libssh2_sftp_fstat.3 \ libssh2_sftp_fstat.3 \
libssh2_sftp_fstat_ex.3 \ libssh2_sftp_fstat_ex.3 \
libssh2_sftp_fstatvfs.3 \ libssh2_sftp_fstatvfs.3 \
libssh2_sftp_fsync.3 \ libssh2_sftp_fsync.3 \
libssh2_sftp_get_channel.3 \ libssh2_sftp_get_channel.3 \
libssh2_sftp_init.3 \ libssh2_sftp_init.3 \
libssh2_sftp_last_error.3 \ libssh2_sftp_last_error.3 \
libssh2_sftp_lstat.3 \ libssh2_sftp_lstat.3 \
libssh2_sftp_mkdir.3 \ libssh2_sftp_mkdir.3 \
libssh2_sftp_mkdir_ex.3 \ libssh2_sftp_mkdir_ex.3 \
libssh2_sftp_open.3 \ libssh2_sftp_open.3 \
libssh2_sftp_open_ex.3 \ libssh2_sftp_open_ex.3 \
libssh2_sftp_opendir.3 \ libssh2_sftp_opendir.3 \
libssh2_sftp_read.3 \ libssh2_sftp_read.3 \
libssh2_sftp_readdir.3 \ libssh2_sftp_readdir.3 \
libssh2_sftp_readdir_ex.3 \ libssh2_sftp_readdir_ex.3 \
libssh2_sftp_readlink.3 \ libssh2_sftp_readlink.3 \
libssh2_sftp_realpath.3 \ libssh2_sftp_realpath.3 \
libssh2_sftp_rename.3 \ libssh2_sftp_rename.3 \
libssh2_sftp_rename_ex.3 \ libssh2_sftp_rename_ex.3 \
libssh2_sftp_rewind.3 \ libssh2_sftp_rewind.3 \
libssh2_sftp_rmdir.3 \ libssh2_sftp_rmdir.3 \
libssh2_sftp_rmdir_ex.3 \ libssh2_sftp_rmdir_ex.3 \
libssh2_sftp_seek.3 \ libssh2_sftp_seek.3 \
libssh2_sftp_seek64.3 \ libssh2_sftp_seek64.3 \
libssh2_sftp_setstat.3 \ libssh2_sftp_setstat.3 \
libssh2_sftp_shutdown.3 \ libssh2_sftp_shutdown.3 \
libssh2_sftp_stat.3 \ libssh2_sftp_stat.3 \
libssh2_sftp_stat_ex.3 \ libssh2_sftp_stat_ex.3 \
libssh2_sftp_statvfs.3 \ libssh2_sftp_statvfs.3 \
libssh2_sftp_symlink.3 \ libssh2_sftp_symlink.3 \
libssh2_sftp_symlink_ex.3 \ libssh2_sftp_symlink_ex.3 \
libssh2_sftp_tell.3 \ libssh2_sftp_tell.3 \
libssh2_sftp_tell64.3 \ libssh2_sftp_tell64.3 \
libssh2_sftp_unlink.3 \ libssh2_sftp_unlink.3 \
libssh2_sftp_unlink_ex.3 \ libssh2_sftp_unlink_ex.3 \
libssh2_sftp_write.3 \ libssh2_sftp_write.3 \
libssh2_sign_sk.3 \ libssh2_sign_sk.3 \
libssh2_trace.3 \ libssh2_trace.3 \
libssh2_trace_sethandler.3 \ libssh2_trace_sethandler.3 \
libssh2_userauth_authenticated.3 \ libssh2_userauth_authenticated.3 \
libssh2_userauth_banner.3 \ libssh2_userauth_banner.3 \
libssh2_userauth_hostbased_fromfile.3 \ libssh2_userauth_hostbased_fromfile.3 \
libssh2_userauth_hostbased_fromfile_ex.3 \ libssh2_userauth_hostbased_fromfile_ex.3 \
libssh2_userauth_keyboard_interactive.3 \ libssh2_userauth_keyboard_interactive.3 \
libssh2_userauth_keyboard_interactive_ex.3 \ libssh2_userauth_keyboard_interactive_ex.3 \
libssh2_userauth_list.3 \ libssh2_userauth_list.3 \
libssh2_userauth_password.3 \ libssh2_userauth_password.3 \
libssh2_userauth_password_ex.3 \ libssh2_userauth_password_ex.3 \
libssh2_userauth_publickey.3 \ libssh2_userauth_publickey.3 \
libssh2_userauth_publickey_fromfile.3 \ libssh2_userauth_publickey_fromfile.3 \
libssh2_userauth_publickey_fromfile_ex.3 \ libssh2_userauth_publickey_fromfile_ex.3 \
libssh2_userauth_publickey_frommemory.3 \ libssh2_userauth_publickey_frommemory.3 \
libssh2_userauth_publickey_sk.3 \ libssh2_userauth_publickey_sk.3 \
libssh2_version.3 libssh2_version.3

View File

@ -20,4 +20,3 @@ Added in libssh2 1.2
.SH SEE ALSO .SH SEE ALSO
.BR libssh2_agent_init(3) .BR libssh2_agent_init(3)
.BR libssh2_agent_disconnect(3) .BR libssh2_agent_disconnect(3)

View File

@ -19,4 +19,3 @@ Added in libssh2 1.9
.SH SEE ALSO .SH SEE ALSO
.BR libssh2_agent_init(3) .BR libssh2_agent_init(3)
.BR libssh2_agent_set_identity_path(3) .BR libssh2_agent_set_identity_path(3)

View File

@ -21,4 +21,3 @@ Added in libssh2 1.2
.SH SEE ALSO .SH SEE ALSO
.BR libssh2_agent_connect(3) .BR libssh2_agent_connect(3)
.BR libssh2_agent_get_identity(3) .BR libssh2_agent_get_identity(3)

View File

@ -19,4 +19,3 @@ Added in libssh2 1.9
.SH SEE ALSO .SH SEE ALSO
.BR libssh2_agent_init(3) .BR libssh2_agent_init(3)
.BR libssh2_agent_get_identity_path(3) .BR libssh2_agent_get_identity_path(3)

View File

@ -11,12 +11,12 @@ int libssh2_agent_userauth(LIBSSH2_AGENT *agent,
const char *username, const char *username,
struct libssh2_agent_publickey *identity); struct libssh2_agent_publickey *identity);
.SH DESCRIPTION .SH DESCRIPTION
\fIagent\fP - ssh-agent handle as returned by \fIagent\fP - ssh-agent handle as returned by
.BR libssh2_agent_init(3) .BR libssh2_agent_init(3)
\fIusername\fP - Remote user name to authenticate as. \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) .BR libssh2_agent_get_identity(3)
Attempt public key authentication with the help of ssh-agent. Attempt public key authentication with the help of ssh-agent.

View File

@ -4,20 +4,20 @@ libssh2_banner_set - set the SSH protocol banner for the local client
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
int int
libssh2_banner_set(LIBSSH2_SESSION *session, const char *banner); libssh2_banner_set(LIBSSH2_SESSION *session, const char *banner);
.SH DESCRIPTION .SH DESCRIPTION
This function is \fBDEPRECATED\fP. Use \fIlibssh2_session_banner_set(3)\fP This function is \fBDEPRECATED\fP. Use \fIlibssh2_session_banner_set(3)\fP
instead! instead!
\fIsession\fP - Session instance as returned by \fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3) .BR libssh2_session_init_ex(3)
\fIbanner\fP - A pointer to a user defined banner \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 Set the banner that will be sent to the remote host when the SSH session is
started with started with
.BR libssh2_session_handshake(3) .BR libssh2_session_handshake(3)
This is optional; a banner corresponding to the protocol and libssh2 version will be sent by default. This is optional; a banner corresponding to the protocol and libssh2 version will be sent by default.
.SH RETURN VALUE .SH RETURN VALUE

View File

@ -4,17 +4,17 @@ libssh2_channel_close - close a channel
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
int int
libssh2_channel_close(LIBSSH2_CHANNEL *channel); libssh2_channel_close(LIBSSH2_CHANNEL *channel);
.SH DESCRIPTION .SH DESCRIPTION
\fIchannel\fP - active channel stream to set closed status on. \fIchannel\fP - active channel stream to set closed status on.
Close an active data channel. In practice this means sending an SSH_MSG_CLOSE 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 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 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 its own close message in response. To wait for the remote end to close its
connection as well, follow this command with connection as well, follow this command with
.BR libssh2_channel_wait_closed(3) .BR libssh2_channel_wait_closed(3)
.SH RETURN VALUE .SH RETURN VALUE

View File

@ -4,14 +4,14 @@ libssh2_channel_direct_tcpip_ex - Tunnel a TCP connection through an SSH session
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
LIBSSH2_CHANNEL * LIBSSH2_CHANNEL *
libssh2_channel_direct_tcpip_ex(LIBSSH2_SESSION *session, const char *host, int port, const char *shost, int sport); 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); libssh2_channel_direct_tcpip(LIBSSH2_SESSION *session, const char *host, int port);
.SH DESCRIPTION .SH DESCRIPTION
\fIsession\fP - Session instance as returned by \fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3) .BR libssh2_session_init_ex(3)
\fIhost\fP - Third party host to connect to using the SSH host as a proxy. \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. \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 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 a third party. Communication from the client to the SSH server remains
encrypted, communication from the server to the 3rd party host travels encrypted, communication from the server to the 3rd party host travels
in cleartext. in cleartext.
.SH RETURN VALUE .SH RETURN VALUE

View File

@ -4,7 +4,7 @@ libssh2_channel_eof - check a channel's EOF status
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
int int
libssh2_channel_eof(LIBSSH2_CHANNEL *channel); libssh2_channel_eof(LIBSSH2_CHANNEL *channel);
.SH DESCRIPTION .SH DESCRIPTION
\fIchannel\fP - active channel stream to set closed status on. \fIchannel\fP - active channel stream to set closed status on.

View File

@ -4,26 +4,26 @@ libssh2_channel_flush_ex - flush a channel
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
int int
libssh2_channel_flush_ex(LIBSSH2_CHANNEL *channel, int streamid); libssh2_channel_flush_ex(LIBSSH2_CHANNEL *channel, int streamid);
int int
libssh2_channel_flush(LIBSSH2_CHANNEL *channel); libssh2_channel_flush(LIBSSH2_CHANNEL *channel);
int int
libssh2_channel_flush_stderr(LIBSSH2_CHANNEL *channel); libssh2_channel_flush_stderr(LIBSSH2_CHANNEL *channel);
.SH DESCRIPTION .SH DESCRIPTION
\fIchannel\fP - Active channel stream to flush. \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. be flushed by passing on of the following Constants.
.br .br
\fBLIBSSH2_CHANNEL_FLUSH_EXTENDED_DATA\fP: Flush all extended data substreams \fBLIBSSH2_CHANNEL_FLUSH_EXTENDED_DATA\fP: Flush all extended data substreams
.br .br
\fBLIBSSH2_CHANNEL_FLUSH_ALL\fP: Flush all substreams \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. be flushed by number or using one of the provided macros.
.SH RETURN VALUE .SH RETURN VALUE

View File

@ -4,11 +4,11 @@ libssh2_channel_forward_cancel - cancel a forwarded TCP port
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
int int
libssh2_channel_forward_cancel(LIBSSH2_LISTENER *listener); libssh2_channel_forward_cancel(LIBSSH2_LISTENER *listener);
.SH DESCRIPTION .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) .BR libssh2_channel_forward_listen_ex(3)
Instruct the remote host to stop listening for new connections on a previously requested host/port. Instruct the remote host to stop listening for new connections on a previously requested host/port.

View File

@ -4,10 +4,10 @@ libssh2_channel_forward_listen_ex - listen to inbound connections
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
LIBSSH2_LISTENER * LIBSSH2_LISTENER *
libssh2_channel_forward_listen_ex(LIBSSH2_SESSION *session, char *host, int port, int *bound_port, int queue_maxsize); 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); libssh2_channel_forward_listen(LIBSSH2_SESSION *session, int port);
.SH DESCRIPTION .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 connections. New connections will be queued by the library until accepted by
\fIlibssh2_channel_forward_accept(3)\fP. \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 \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. 0.0.0.0 (default when NULL is passed) will bind to all available addresses.

View File

@ -4,16 +4,16 @@ libssh2_channel_free - free all resources associated with a channel
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
int int
libssh2_channel_free(LIBSSH2_CHANNEL *channel); libssh2_channel_free(LIBSSH2_CHANNEL *channel);
.SH DESCRIPTION .SH DESCRIPTION
\fIchannel\fP - Channel stream to free. \fIchannel\fP - Channel stream to free.
Release all resources associated with a channel stream. If the channel has Release all resources associated with a channel stream. If the channel has
not yet been closed with not yet been closed with
.BR libssh2_channel_close(3) .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. can safely free its own resources.
.SH RETURN VALUE .SH RETURN VALUE

View File

@ -4,7 +4,7 @@ libssh2_channel_get_exit_signal - get the remote exit signal
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
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); 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 .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 \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 (without leading "SIG"). Note that the string is stored in a newly allocated
buffer. If the remote program exited cleanly, the referenced string pointer 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 \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 \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 (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. \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 (if provided by remote server, if not it will be set to NULL). Note that the
string is stored in a newly allocated buffer. string is stored in a newly allocated buffer.

View File

@ -4,14 +4,14 @@ libssh2_channel_get_exit_status - get the remote exit code
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
int int
libssh2_channel_get_exit_status(LIBSSH2_CHANNEL* channel) libssh2_channel_get_exit_status(LIBSSH2_CHANNEL* channel)
.SH DESCRIPTION .SH DESCRIPTION
\fIchannel\fP - Closed channel stream to retrieve exit status from. \fIchannel\fP - Closed channel stream to retrieve exit status from.
Returns the exit code raised by the process running on the remote host at 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 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. available if the remote end has not yet set its status to closed.
.SH RETURN VALUE .SH RETURN VALUE

View File

@ -4,7 +4,7 @@ libssh2_channel_handle_extended_data - set extended data handling mode
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
void void
libssh2_channel_handle_extended_data(LIBSSH2_CHANNEL *channel, int ignore_mode); libssh2_channel_handle_extended_data(LIBSSH2_CHANNEL *channel, int ignore_mode);
.SH DESCRIPTION .SH DESCRIPTION
@ -15,7 +15,7 @@ This function is deprecated. Use the
\fIignore_mode\fP - One of the three LIBSSH2_CHANNEL_EXTENDED_DATA_* Constants. \fIignore_mode\fP - One of the three LIBSSH2_CHANNEL_EXTENDED_DATA_* Constants.
.br .br
\fBLIBSSH2_CHANNEL_EXTENDED_DATA_NORMAL\fP: Queue extended data for eventual \fBLIBSSH2_CHANNEL_EXTENDED_DATA_NORMAL\fP: Queue extended data for eventual
reading reading
.br .br
\fBLIBSSH2_CHANNEL_EXTENDED_DATA_MERGE\fP: Treat extended data and ordinary \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 \fIlibssh2_channel_read(3)\fP will pull from all substreams on a
first-in/first-out basis. first-in/first-out basis.
.br .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. arrives.
Change how a channel deals with extended data packets. By default all extended Change how a channel deals with extended data packets. By default all extended

View File

@ -4,7 +4,7 @@ libssh2_channel_handle_extended_data2 - set extended data handling mode
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
int int
libssh2_channel_handle_extended_data2(LIBSSH2_CHANNEL *channel, int ignore_mode); libssh2_channel_handle_extended_data2(LIBSSH2_CHANNEL *channel, int ignore_mode);
.SH DESCRIPTION .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. \fIignore_mode\fP - One of the three LIBSSH2_CHANNEL_EXTENDED_DATA_* Constants.
.br .br
\fBLIBSSH2_CHANNEL_EXTENDED_DATA_NORMAL\fP: Queue extended data for eventual \fBLIBSSH2_CHANNEL_EXTENDED_DATA_NORMAL\fP: Queue extended data for eventual
reading reading
.br .br
\fBLIBSSH2_CHANNEL_EXTENDED_DATA_MERGE\fP: Treat extended data and ordinary \fBLIBSSH2_CHANNEL_EXTENDED_DATA_MERGE\fP: Treat extended data and ordinary
data the same. Merge all substreams such that calls to data the same. Merge all substreams such that calls to
.BR libssh2_channel_read(3) .BR libssh2_channel_read(3)
will pull from all substreams on a first-in/first-out basis. will pull from all substreams on a first-in/first-out basis.
.br .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. arrives.
Change how a channel deals with extended data packets. By default all Change how a channel deals with extended data packets. By default all
extended data is queued until read by extended data is queued until read by
.BR libssh2_channel_read_ex(3) .BR libssh2_channel_read_ex(3)
.SH RETURN VALUE .SH RETURN VALUE

View File

@ -11,29 +11,29 @@ LIBSSH2_CHANNEL *
libssh2_channel_open_session(session); libssh2_channel_open_session(session);
.SH DESCRIPTION .SH DESCRIPTION
\fIsession\fP - Session instance as returned by \fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3) .BR libssh2_session_init_ex(3)
\fIchannel_type\fP - Channel type to open. Typically one of session, \fIchannel_type\fP - Channel type to open. Typically one of session,
direct-tcpip, or tcpip-forward. The SSH2 protocol allowed for additional direct-tcpip, or tcpip-forward. The SSH2 protocol allowed for additional
types including local, custom channel types. types including local, custom channel types.
\fIchannel_type_len\fP - Length of channel_type \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. 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. 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\fP - Additional data as required by the selected channel_type.
\fImessage_len\fP - Length of message parameter. \fImessage_len\fP - Length of message parameter.
Allocate a new channel for exchanging data with the server. This method is Allocate a new channel for exchanging data with the server. This method is
typically called through its macroized form: typically called through its macroized form:
.BR libssh2_channel_open_session(3) .BR libssh2_channel_open_session(3)
or via or via
.BR libssh2_channel_direct_tcpip(3) .BR libssh2_channel_direct_tcpip(3)
or or
.BR libssh2_channel_forward_listen(3) .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_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. \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block.

View File

@ -13,7 +13,7 @@ int libssh2_channel_process_startup(LIBSSH2_CHANNEL *channel,
.SH DESCRIPTION .SH DESCRIPTION
\fIchannel\fP - Active session channel instance. \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. defines shell, exec, and subsystem as standard process services.
\fIrequest_len\fP - Length of request parameter. \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. \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) .BR libssh2_channel_open_ex(3)
.SH RETURN VALUE .SH RETURN VALUE
Return 0 on success or negative on failure. It returns Return 0 on success or negative on failure. It returns
@ -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_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP - \fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP -
.SH SEE ALSO .SH SEE ALSO
.BR libssh2_channel_open_ex(3) .BR libssh2_channel_open_ex(3)

View File

@ -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 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. 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 \fIbuf\fP - pointer to storage buffer to read data into

View File

@ -4,14 +4,14 @@ libssh2_channel_request_pty_ex - short function description
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
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); 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); libssh2_channel_request_pty(LIBSSH2_CHANNEL *channel, char *term);
.SH DESCRIPTION .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) .BR libssh2_channel_open_ex(3)
\fIterm\fP - Terminal emulation (e.g. vt102, ansi, etc...) \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 \fIheight_px\fP - Height of pty in pixels
Request a PTY on an established channel. Note that this does not make sense 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 for all channel types and may be ignored by the server despite returning
success. success.
.SH RETURN VALUE .SH RETURN VALUE
Return 0 on success or negative on failure. It returns Return 0 on success or negative on failure. It returns
@ -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_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP - \fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP -
.SH SEE ALSO .SH SEE ALSO
.BR libssh2_channel_open_ex(3) .BR libssh2_channel_open_ex(3)

View File

@ -4,11 +4,11 @@ libssh2_channel_send_eof - send EOF to remote server
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
int int
libssh2_channel_send_eof(LIBSSH2_CHANNEL *channel); libssh2_channel_send_eof(LIBSSH2_CHANNEL *channel);
.SH DESCRIPTION .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. channel. Processes typically interpret this as a closed stdin descriptor.
.SH RETURN VALUE .SH RETURN VALUE

View File

@ -4,7 +4,7 @@ libssh2_channel_set_blocking - set or clear blocking mode on channel
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
void void
libssh2_channel_set_blocking(LIBSSH2_CHANNEL *channel, int blocking); libssh2_channel_set_blocking(LIBSSH2_CHANNEL *channel, int blocking);
.SH DESCRIPTION .SH DESCRIPTION
\fIchannel\fP - channel stream to set or clean blocking status on. \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 \fIblocking\fP - Set to a non-zero value to make the channel block, or zero to
make it non-blocking. 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) .BR libssh2_session_set_blocking(3)
and therefore will affect the session and all channels. and therefore will affect the session and all channels.
.SH RETURN VALUE .SH RETURN VALUE

View File

@ -11,10 +11,10 @@ int
libssh2_channel_setenv(LIBSSH2_CHANNEL *channel, char *varname, const char *value); libssh2_channel_setenv(LIBSSH2_CHANNEL *channel, char *varname, const char *value);
.SH DESCRIPTION .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) .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. channel instance.
\fIvarname_len\fP - Length of passed varname parameter. \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_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP - \fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP -
.SH SEE ALSO .SH SEE ALSO
.BR libssh2_channel_open_ex(3) .BR libssh2_channel_open_ex(3)

View File

@ -4,7 +4,7 @@ libssh2_channel_wait_closed - wait for the remote to close the channel
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
int int
libssh2_channel_wait_closed(LIBSSH2_CHANNEL *channel); libssh2_channel_wait_closed(LIBSSH2_CHANNEL *channel);
.SH DESCRIPTION .SH DESCRIPTION

View File

@ -4,7 +4,7 @@ libssh2_channel_wait_eof - wait for the remote to reply to an EOF request
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
int int
libssh2_channel_wait_eof(LIBSSH2_CHANNEL *channel); libssh2_channel_wait_eof(LIBSSH2_CHANNEL *channel);
.SH DESCRIPTION .SH DESCRIPTION

View File

@ -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 identified by the selected \fIstream_id\fP. The SSH2 protocol currently
defines a stream ID of 1 to be the stderr substream. 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 \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_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 \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 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. the original size, you sent a new buffer with a different size.
closed. closed.
.SH SEE ALSO .SH SEE ALSO

View File

@ -11,7 +11,7 @@ int
libssh2_channel_x11_req(LIBSSH2_CHANNEL *channel, int screen_number); libssh2_channel_x11_req(LIBSSH2_CHANNEL *channel, int screen_number);
.SH DESCRIPTION .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) .BR libssh2_channel_open_ex(3)
\fIsingle_connection\fP - non-zero to only forward a single connection. \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 \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) .BR libssh2_session_callback_set(3)
must first be called to set \fBLIBSSH2_CALLBACK_X11\fP. This callback will be must first be called to set \fBLIBSSH2_CALLBACK_X11\fP. This callback will be
invoked when the remote host accepts the X11 forwarding. 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_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP - \fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP -
.SH SEE ALSO .SH SEE ALSO
.BR libssh2_channel_open_ex(3) .BR libssh2_channel_open_ex(3)

View File

@ -8,14 +8,14 @@ const char *
libssh2_hostkey_hash(LIBSSH2_SESSION *session, int hash_type); libssh2_hostkey_hash(LIBSSH2_SESSION *session, int hash_type);
.SH DESCRIPTION .SH DESCRIPTION
\fIsession\fP - Session instance as returned by \fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3) .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. \fBLIBSSH2_HOSTKEY_HASH_SHA1\fP or \fBLIBSSH2_HOSTKEY_HASH_SHA256\fP.
Returns the computed digest of the remote system's hostkey. The length of 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, the returned string is hash_type specific (e.g. 16 bytes for MD5,
20 bytes for SHA1, 32 bytes for SHA256). 20 bytes for SHA1, 32 bytes for SHA256).
.SH RETURN VALUE .SH RETURN VALUE
Computed hostkey hash value, or NULL if the information is not available Computed hostkey hash value, or NULL if the information is not available

View File

@ -24,4 +24,3 @@ Nothing
Added in libssh2 1.2.5 Added in libssh2 1.2.5
.SH SEE ALSO .SH SEE ALSO
.BR libssh2_keepalive_send(3) .BR libssh2_keepalive_send(3)

View File

@ -26,4 +26,3 @@ Added in libssh2 1.2
.SH SEE ALSO .SH SEE ALSO
.BR libssh2_knownhost_readfile(3) .BR libssh2_knownhost_readfile(3)
.BR libssh2_knownhost_add(3) .BR libssh2_knownhost_add(3)

View File

@ -43,4 +43,3 @@ Added in libssh2 1.2
.BR libssh2_knownhost_get(3) .BR libssh2_knownhost_get(3)
.BR libssh2_knownhost_readline(3) .BR libssh2_knownhost_readline(3)
.BR libssh2_knownhost_writefile(3) .BR libssh2_knownhost_writefile(3)

View File

@ -5,7 +5,7 @@ libssh2_publickey_add - convenience macro for \fIlibssh2_publickey_add_ex(3)\fP
#include <libssh2.h> #include <libssh2.h>
int libssh2_publickey_add(LIBSSH2_PUBLICKEY *pkey, 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, const unsigned char *blob, unsigned long blob_len, char overwrite,
unsigned long num_attrs, const libssh2_publickey_attribute attrs[]); unsigned long num_attrs, const libssh2_publickey_attribute attrs[]);

View File

@ -5,8 +5,8 @@ libssh2_publickey_remove - convenience macro for \fIlibssh2_publickey_remove_ex(
#include <libssh2.h> #include <libssh2.h>
int libssh2_publickey_remove(LIBSSH2_PUBLICKEY *pkey, int libssh2_publickey_remove(LIBSSH2_PUBLICKEY *pkey,
const unsigned char *name, unsigned long name_len, const unsigned char *name, unsigned long name_len,
const unsigned char *blob, unsigned long blob_len); const unsigned char *blob, unsigned long blob_len);
.SH DESCRIPTION .SH DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the This is a macro defined in a public libssh2 header file that is using the

View File

@ -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 This function is \fBDEPRECATED\fP. Use \fIlibssh2_scp_recv2(3)\fP
instead! instead!
\fIsession\fP - Session instance as returned by \fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3) .BR libssh2_session_init_ex(3)
\fIpath\fP - Full path and filename of file to transfer. That is the remote \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 .SH ERRORS
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. \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 \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would
block. block.
.SH SEE ALSO .SH SEE ALSO
.BR libssh2_session_init_ex(3) .BR libssh2_session_init_ex(3)
.BR libssh2_channel_open_ex(3) .BR libssh2_channel_open_ex(3)

View File

@ -8,7 +8,7 @@ LIBSSH2_CHANNEL *
libssh2_scp_recv2(LIBSSH2_SESSION *session, const char *path, struct_stat *sb); libssh2_scp_recv2(LIBSSH2_SESSION *session, const char *path, struct_stat *sb);
.SH DESCRIPTION .SH DESCRIPTION
\fIsession\fP - Session instance as returned by \fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3) .BR libssh2_session_init_ex(3)
\fIpath\fP - Full path and filename of file to transfer. That is the remote \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 .SH ERRORS
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. \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 \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would
block. block.
.SH SEE ALSO .SH SEE ALSO
.BR libssh2_session_init_ex(3) .BR libssh2_session_init_ex(3)
.BR libssh2_channel_open_ex(3) .BR libssh2_channel_open_ex(3)

View File

@ -9,7 +9,7 @@ LIBSSH2_CHANNEL *
libssh2_scp_send64(LIBSSH2_SESSION *session, const char *path, int mode, libssh2_scp_send64(LIBSSH2_SESSION *session, const char *path, int mode,
libssh2_uint64_t size, time_t mtime, time_t atime); libssh2_uint64_t size, time_t mtime, time_t atime);
.SH DESCRIPTION .SH DESCRIPTION
\fIsession\fP - Session instance as returned by \fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3) .BR libssh2_session_init_ex(3)
\fIpath\fP - Full path and filename of file to transfer to. That is the remote \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 \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). mtime to zero to instruct remote host to use current time).
Send a file to the remote host via SCP. 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_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 \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would
block. block.

View File

@ -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 This function has been deemed deprecated since libssh2 1.2.6. See
\fIlibssh2_scp_send64(3)\fP. \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) .BR libssh2_session_init_ex(3)
\fIpath\fP - Full path and filename of file to transfer to. That is the remote \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 \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) ahead of time precisely)
\fImtime\fP - mtime to assign to file being created \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). mtime to zero to instruct remote host to use current time).
Send a file to the remote host via SCP. 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_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 \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would
block. block.

View File

@ -8,7 +8,7 @@ void **
libssh2_session_abstract(LIBSSH2_SESSION *session); libssh2_session_abstract(LIBSSH2_SESSION *session);
.SH DESCRIPTION .SH DESCRIPTION
\fIsession\fP - Session instance as returned by \fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3) .BR libssh2_session_init_ex(3)
Return a pointer to where the abstract pointer provided to Return a pointer to where the abstract pointer provided to

View File

@ -4,11 +4,11 @@ libssh2_session_banner_set - set the SSH protocol banner for the local client
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
int int
libssh2_session_banner_set(LIBSSH2_SESSION *session, const char *banner); libssh2_session_banner_set(LIBSSH2_SESSION *session, const char *banner);
.SH DESCRIPTION .SH DESCRIPTION
\fIsession\fP - Session instance as returned by \fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3) .BR libssh2_session_init_ex(3)
\fIbanner\fP - A pointer to a zero-terminated string holding the user defined \fIbanner\fP - A pointer to a zero-terminated string holding the user defined

View File

@ -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 object. Callbacks are triggered by the receipt of special packets at the
Transport layer. To disable a callback, set it to NULL. 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) .BR libssh2_session_init_ex(3)
\fIcbtype\fP - Callback type. One of the types listed in Callback Types. \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. this function must match the associated callback declaration macro.
.SH CALLBACK TYPES .SH CALLBACK TYPES
.IP LIBSSH2_CALLBACK_IGNORE .IP LIBSSH2_CALLBACK_IGNORE

View File

@ -4,14 +4,14 @@ libssh2_session_disconnect_ex - terminate transport layer
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
int int
libssh2_session_disconnect_ex(LIBSSH2_SESSION *session, int reason, const char *description, const char *lang); 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); libssh2_session_disconnect(LIBSSH2_SESSION *session, const char *description);
.SH DESCRIPTION .SH DESCRIPTION
\fIsession\fP - Session instance as returned by \fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3) .BR libssh2_session_init_ex(3)
\fIreason\fP - One of the Disconnect Reason constants. \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. \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. 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) .BR libssh2_session_disconnect(3)
is provided. It calls is provided. It calls
.BR libssh2_session_disconnect_ex(3) .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. and \fIlang\fP set to an empty string.
.SH RETURN VALUE .SH RETURN VALUE

View File

@ -4,7 +4,7 @@ libssh2_session_free - frees resources associated with a session instance
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
int int
libssh2_session_free(LIBSSH2_SESSION *session); libssh2_session_free(LIBSSH2_SESSION *session);
.SH DESCRIPTION .SH DESCRIPTION
Frees all resources associated with a session instance. Typically called after Frees all resources associated with a session instance. Typically called after

View File

@ -4,27 +4,27 @@ libssh2_session_init_ex - initializes an SSH session object
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
LIBSSH2_SESSION * LIBSSH2_SESSION *
libssh2_session_init_ex(LIBSSH2_ALLOC_FUNC((*myalloc)), LIBSSH2_FREE_FUNC((*myfree)), LIBSSH2_REALLOC_FUNC((*myrealloc)), void *abstract); libssh2_session_init_ex(LIBSSH2_ALLOC_FUNC((*myalloc)), LIBSSH2_FREE_FUNC((*myfree)), LIBSSH2_REALLOC_FUNC((*myrealloc)), void *abstract);
LIBSSH2_SESSION * LIBSSH2_SESSION *
libssh2_session_init(void); libssh2_session_init(void);
.SH DESCRIPTION .SH DESCRIPTION
\fImyalloc\fP - Custom allocator function. Refer to the section on Callbacks \fImyalloc\fP - Custom allocator function. Refer to the section on Callbacks
for implementing an allocator callback. Pass a value of NULL to use the for implementing an allocator callback. Pass a value of NULL to use the
default system allocator. default system allocator.
\fImyfree\fP - Custom de-allocator function. Refer to the section on Callbacks \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 for implementing a deallocator callback. Pass a value of NULL to use the
default system deallocator. default system deallocator.
\fImyrealloc\fP - Custom re-allocator function. Refer to the section on \fImyrealloc\fP - Custom re-allocator function. Refer to the section on
Callbacks for implementing a reallocator callback. Pass a value of NULL to Callbacks for implementing a reallocator callback. Pass a value of NULL to
use the default system reallocator. use the default system reallocator.
\fIabstract\fP - Arbitrary pointer to application specific callback data. \fIabstract\fP - Arbitrary pointer to application specific callback data.
This value will be passed to any callback function associated with the named This value will be passed to any callback function associated with the named
session instance. session instance.
Initializes an SSH session object. By default system memory allocators Initializes an SSH session object. By default system memory allocators

View File

@ -8,7 +8,7 @@ int
libssh2_session_last_errno(LIBSSH2_SESSION *session); libssh2_session_last_errno(LIBSSH2_SESSION *session);
.SH DESCRIPTION .SH DESCRIPTION
\fIsession\fP - Session instance as returned by \fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3) .BR libssh2_session_init_ex(3)
Determine the most recent error condition. Determine the most recent error condition.

View File

@ -8,18 +8,18 @@ int
libssh2_session_last_error(LIBSSH2_SESSION *session, char **errmsg, int *errmsg_len, int want_buf); libssh2_session_last_error(LIBSSH2_SESSION *session, char **errmsg, int *errmsg_len, int want_buf);
.SH DESCRIPTION .SH DESCRIPTION
\fIsession\fP - Session instance as returned by \fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3) .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. readable form of the most recent error message.
\fIerrmsg_len\fP - If not NULL, is populated by reference with the length \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 of errmsg. (The string is NUL-terminated, so the length is only useful as
an optimization, to avoid calling strlen.) an optimization, to avoid calling strlen.)
\fIwant_buf\fP - If set to a non-zero value, "ownership" of the errmsg \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 buffer will be given to the calling scope. If necessary, the errmsg buffer
will be duplicated. will be duplicated.
Determine the most recent error condition and its cause. Determine the most recent error condition and its cause.

View File

@ -4,21 +4,21 @@ libssh2_session_method_pref - set preferred key exchange method
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
int int
libssh2_session_method_pref(LIBSSH2_SESSION *session, int method_type, const char *prefs); libssh2_session_method_pref(LIBSSH2_SESSION *session, int method_type, const char *prefs);
.SH DESCRIPTION .SH DESCRIPTION
\fIsession\fP - Session instance as returned by \fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3) .BR libssh2_session_init_ex(3)
\fImethod_type\fP - One of the Method Type constants. \fImethod_type\fP - One of the Method Type constants.
\fIprefs\fP - Coma delimited list of preferred methods to use with \fIprefs\fP - Coma delimited list of preferred methods to use with
the most preferred listed first and the least preferred listed last. 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 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. 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 preferences must be set prior to calling
.BR libssh2_session_handshake(3) .BR libssh2_session_handshake(3)
as they are used during the protocol initiation phase. as they are used during the protocol initiation phase.

View File

@ -4,11 +4,11 @@ libssh2_session_set_blocking - set or clear blocking mode on session
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
void void
libssh2_session_set_blocking(LIBSSH2_SESSION *session, int blocking); libssh2_session_set_blocking(LIBSSH2_SESSION *session, int blocking);
.SH DESCRIPTION .SH DESCRIPTION
\fIsession\fP - session instance as returned by \fIsession\fP - session instance as returned by
.BR libssh2_session_init_ex(3) .BR libssh2_session_init_ex(3)
\fIblocking\fP - Set to a non-zero value to make the channel block, or zero to \fIblocking\fP - Set to a non-zero value to make the channel block, or zero to

View File

@ -4,17 +4,17 @@ libssh2_session_startup - begin transport layer
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
int int
libssh2_session_startup(LIBSSH2_SESSION *session, int socket); libssh2_session_startup(LIBSSH2_SESSION *session, int socket);
.SH DESCRIPTION .SH DESCRIPTION
Starting in libssh2 version 1.2.8 this function is considered deprecated. Use Starting in libssh2 version 1.2.8 this function is considered deprecated. Use
\fIlibssh2_session_handshake(3)\fP instead. \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) .BR libssh2_session_init_ex(3)
\fIsocket\fP - Connected socket descriptor. Typically a TCP connection \fIsocket\fP - Connected socket descriptor. Typically a TCP connection
though the protocol allows for any reliable transport and the library will though the protocol allows for any reliable transport and the library will
attempt to use any berkeley socket. attempt to use any berkeley socket.
Begin transport layer protocol negotiation with the connected host. 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_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. host failed.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_SOCKET_DISCONNECT\fP - The socket was disconnected. \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. the socket.
\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block. \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block.

View File

@ -5,13 +5,13 @@ libssh2_sftp_close_handle - close filehandle
#include <libssh2.h> #include <libssh2.h>
#include <libssh2_sftp.h> #include <libssh2_sftp.h>
int int
libssh2_sftp_close_handle(LIBSSH2_SFTP_HANDLE *handle); libssh2_sftp_close_handle(LIBSSH2_SFTP_HANDLE *handle);
int int
libssh2_sftp_close(LIBSSH2_SFTP_HANDLE *handle); libssh2_sftp_close(LIBSSH2_SFTP_HANDLE *handle);
int int
libssh2_sftp_closedir(LIBSSH2_SFTP_HANDLE *handle); libssh2_sftp_closedir(LIBSSH2_SFTP_HANDLE *handle);
.SH DESCRIPTION .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_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 \fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to received on the socket, or an SFTP operation caused an errorcode to
be returned by the server. be returned by the server.
.SH SEE ALSO .SH SEE ALSO

View File

@ -6,7 +6,7 @@ libssh2_sftp_fstat_ex - get or set attributes on an SFTP file handle
#include <libssh2.h> #include <libssh2.h>
#include <libssh2_sftp.h> #include <libssh2_sftp.h>
int int
libssh2_sftp_fstat_ex(LIBSSH2_SFTP_HANDLE *handle, libssh2_sftp_fstat_ex(LIBSSH2_SFTP_HANDLE *handle,
LIBSSH2_SFTP_ATTRIBUTES *attrs, int setstat) 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) libssh2_sftp_fstat_ex((handle), (attrs), 1)
.fi .fi
.SH DESCRIPTION .SH DESCRIPTION
\fIhandle\fP - SFTP File Handle as returned by \fIhandle\fP - SFTP File Handle as returned by
.BR libssh2_sftp_open_ex(3) .BR libssh2_sftp_open_ex(3)
\fIattrs\fP - Pointer to an LIBSSH2_SFTP_ATTRIBUTES structure to set file \fIattrs\fP - Pointer to an LIBSSH2_SFTP_ATTRIBUTES structure to set file
metadata from or into depending on the value of setstat. metadata from or into depending on the value of setstat.
\fIsetstat\fP - When non-zero, the file's metadata will be updated \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 with the data found in attrs according to the values of attrs->flags
and other relevant member attributes. and other relevant member attributes.
Get or Set statbuf type data for a given LIBSSH2_SFTP_HANDLE instance. 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_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 \fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to received on the socket, or an SFTP operation caused an errorcode to
be returned by the server. be returned by the server.
.SH AVAILABILITY .SH AVAILABILITY
This function has been around since forever, but most of the This function has been around since forever, but most of the

View File

@ -9,7 +9,7 @@ LIBSSH2_SFTP *
libssh2_sftp_init(LIBSSH2_SESSION *session); libssh2_sftp_init(LIBSSH2_SESSION *session);
.SH DESCRIPTION .SH DESCRIPTION
\fIsession\fP - Session instance as returned by \fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3) .BR libssh2_session_init_ex(3)
Open a channel and initialize the SFTP subsystem. Although the SFTP subsystem 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_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 \fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to be received on the socket, or an SFTP operation caused an errorcode to be
returned by the server. returned by the server.
\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would

View File

@ -5,11 +5,11 @@ libssh2_sftp_last_error - return the last SFTP-specific error code
#include <libssh2.h> #include <libssh2.h>
#include <libssh2_sftp.h> #include <libssh2_sftp.h>
unsigned long unsigned long
libssh2_sftp_last_error(LIBSSH2_SFTP *sftp); libssh2_sftp_last_error(LIBSSH2_SFTP *sftp);
.SH DESCRIPTION .SH DESCRIPTION
\fIsftp\fP - SFTP instance as returned by \fIsftp\fP - SFTP instance as returned by
.BR libssh2_sftp_init(3) .BR libssh2_sftp_init(3)
Returns the last error code produced by the SFTP layer. Note that this only Returns the last error code produced by the SFTP layer. Note that this only

View File

@ -5,16 +5,16 @@ libssh2_sftp_mkdir_ex - create a directory on the remote file system
#include <libssh2.h> #include <libssh2.h>
#include <libssh2_sftp.h> #include <libssh2_sftp.h>
int int
libssh2_sftp_mkdir_ex(LIBSSH2_SFTP *sftp, const char *path, unsigned int path_len, long mode); 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); libssh2_sftp_mkdir(LIBSSH2_SFTP *sftp, const char *path, long mode);
.SH DESCRIPTION .SH DESCRIPTION
\fIsftp\fP - SFTP instance as returned by \fIsftp\fP - SFTP instance as returned by
.BR libssh2_sftp_init(3) .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. 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. \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_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 \fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to be received on the socket, or an SFTP operation caused an errorcode to be
returned by the server. returned by the server.
.SH SEE ALSO .SH SEE ALSO
.BR libssh2_sftp_open_ex(3) .BR libssh2_sftp_open_ex(3)

View File

@ -13,9 +13,9 @@ libssh2_sftp_open_ex(LIBSSH2_SFTP *sftp, const char *filename,
.SH DESCRIPTION .SH DESCRIPTION
\fIsftp\fP - SFTP instance as returned by \fIlibssh2_sftp_init(3)\fP \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: \fIflags\fP - Any reasonable combination of the LIBSSH2_FXF_* constants:
.RS .RS
@ -52,14 +52,13 @@ failure.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. \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 \fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to be received on the socket, or an SFTP operation caused an errorcode to be
returned by the server. returned by the server.
\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would
block. block.
.SH SEE ALSO .SH SEE ALSO
.BR libssh2_sftp_close_handle(3) .BR libssh2_sftp_close_handle(3)

View File

@ -5,11 +5,11 @@ libssh2_sftp_read - read data from an SFTP handle
#include <libssh2.h> #include <libssh2.h>
#include <libssh2_sftp.h> #include <libssh2_sftp.h>
ssize_t ssize_t
libssh2_sftp_read(LIBSSH2_SFTP_HANDLE *handle, char *buffer, size_t buffer_maxlen); libssh2_sftp_read(LIBSSH2_SFTP_HANDLE *handle, char *buffer, size_t buffer_maxlen);
.SH DESCRIPTION .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) .BR libssh2_sftp_open_ex(3)
\fIbuffer\fP is a pointer to a pre-allocated buffer of at least \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. \fIbuffer_maxlen\fP bytes to read data into.
Reads a block of data from an LIBSSH2_SFTP_HANDLE. This method is modelled Reads a block of data from an LIBSSH2_SFTP_HANDLE. This method is modelled
after the POSIX after the POSIX
.BR read(2) .BR read(2)
function and uses the same calling semantics. function and uses the same calling semantics.
.BR libssh2_sftp_read(3) .BR libssh2_sftp_read(3)
will attempt to read as much as possible however it may not fill all of buffer 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 if the file pointer reaches the end or if further reads would cause the socket
to block. to block.
.SH RETURN VALUE .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 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. LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
.SH ERRORS .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_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 \fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to be received on the socket, or an SFTP operation caused an errorcode to be

View File

@ -6,7 +6,7 @@ libssh2_sftp_readdir_ex - read directory data from an SFTP handle
#include <libssh2.h> #include <libssh2.h>
#include <libssh2_sftp.h> #include <libssh2_sftp.h>
int int
libssh2_sftp_readdir_ex(LIBSSH2_SFTP_HANDLE *handle, libssh2_sftp_readdir_ex(LIBSSH2_SFTP_HANDLE *handle,
char *buffer, size_t buffer_maxlen, char *buffer, size_t buffer_maxlen,
char *longentry, size_t longentry_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 Reads a block of data from a LIBSSH2_SFTP_HANDLE and returns file entry
information for the next entry, if any. 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) .BR libssh2_sftp_open_ex(3)
\fIbuffer\fP - is a pointer to a pre-allocated buffer of at least \fIbuffer\fP - is a pointer to a pre-allocated buffer of at least
\fIbuffer_maxlen\fP bytes to read data into. \fIbuffer_maxlen\fP bytes to read data into.
\fIbuffer_maxlen\fP - is the length of buffer in bytes. If the length of the \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 filename is longer than the space provided by buffer_maxlen it will be
truncated to fit. truncated to fit.
\fIlongentry\fP - is a pointer to a pre-allocated buffer of at least \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 the full directory entry is longer than the space provided by
\fIlongentry_maxlen\fP it will be truncated to fit. \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. statbuf style data into.
.SH RETURN VALUE .SH RETURN VALUE
Number of bytes actually populated into buffer (not counting the terminating 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_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 \fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to be received on the socket, or an SFTP operation caused an errorcode to be
returned by the server. returned by the server.
From 1.2.8, LIBSSH2_ERROR_BUFFER_TOO_SMALL is returned if any of the From 1.2.8, LIBSSH2_ERROR_BUFFER_TOO_SMALL is returned if any of the

View File

@ -5,35 +5,35 @@ libssh2_sftp_rename_ex - rename an SFTP file
#include <libssh2.h> #include <libssh2.h>
#include <libssh2_sftp.h> #include <libssh2_sftp.h>
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); 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); libssh2_sftp_rename_ex(LIBSSH2_SFTP *sftp, const char *source_filename, const char *dest_filename);
.SH DESCRIPTION .SH DESCRIPTION
\fIsftp\fP - SFTP instance as returned by \fIsftp\fP - SFTP instance as returned by
.BR libssh2_sftp_init(3) .BR libssh2_sftp_init(3)
\fIsourcefile\fP - Path and name of the existing filesystem entry \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 filesystem entry
\fIdestfile\fP - Path and name of the target 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 filesystem entry
\fIflags\fP - \fIflags\fP -
Bitmask flags made up of LIBSSH2_SFTP_RENAME_* constants. Bitmask flags made up of LIBSSH2_SFTP_RENAME_* constants.
Rename a filesystem object on the remote filesystem. The semantics of Rename a filesystem object on the remote filesystem. The semantics of
this command typically include the ability to move a filesystem object this command typically include the ability to move a filesystem object
between folders and/or filesystem mounts. If the LIBSSH2_SFTP_RENAME_OVERWRITE between folders and/or filesystem mounts. If the LIBSSH2_SFTP_RENAME_OVERWRITE
flag is not set and the destfile entry already exists, the operation 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 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 requirement) for the remote end to perform an atomic rename operation
and/or using native system calls when possible. and/or using native system calls when possible.
.SH RETURN VALUE .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_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 \fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to received on the socket, or an SFTP operation caused an errorcode to
be returned by the server. be returned by the server.
.SH SEE ALSO .SH SEE ALSO

View File

@ -11,7 +11,7 @@ int libssh2_sftp_rmdir_ex(LIBSSH2_SFTP *sftp, const char *path,
.SH DESCRIPTION .SH DESCRIPTION
Remove a directory from the remote file system. 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) .BR libssh2_sftp_init(3)
\fIsourcefile\fP - Full path of the existing directory to remove. \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_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 \fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to received on the socket, or an SFTP operation caused an errorcode to
be returned by the server. be returned by the server.
.SH SEE ALSO .SH SEE ALSO
.BR libssh2_sftp_init(3) .BR libssh2_sftp_init(3)

View File

@ -10,15 +10,15 @@ void libssh2_sftp_seek(LIBSSH2_SFTP_HANDLE *handle, size_t offset);
.SH DESCRIPTION .SH DESCRIPTION
Deprecated function. Use \fIlibssh2_sftp_seek64(3)\fP instead! 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) .BR libssh2_sftp_open_ex(3)
\fIoffset\fP - Number of bytes from the beginning of file to seek to. \fIoffset\fP - Number of bytes from the beginning of file to seek to.
Move the file handle's internal pointer to an arbitrary location. Move the file handle's internal pointer to an arbitrary location.
Note that libssh2 implements file pointers as a localized concept to make 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 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 during a seek operation. The localized file pointer is simply used as a
convenience offset during read/write operations. convenience offset during read/write operations.
.SH SEE ALSO .SH SEE ALSO
.BR libssh2_sftp_open_ex(3), .BR libssh2_sftp_open_ex(3),

View File

@ -9,7 +9,7 @@ libssh2_sftp_seek64 - set the read/write position within a file
void libssh2_sftp_seek64(LIBSSH2_SFTP_HANDLE *handle, void libssh2_sftp_seek64(LIBSSH2_SFTP_HANDLE *handle,
libssh2_uint64_t offset); libssh2_uint64_t offset);
.SH DESCRIPTION .SH DESCRIPTION
\fIhandle\fP - SFTP File Handle as returned by \fIhandle\fP - SFTP File Handle as returned by
.BR libssh2_sftp_open_ex(3) .BR libssh2_sftp_open_ex(3)
\fIoffset\fP - Number of bytes from the beginning of file to seek to. \fIoffset\fP - Number of bytes from the beginning of file to seek to.

View File

@ -5,14 +5,14 @@ libssh2_sftp_shutdown - shut down an SFTP session
#include <libssh2.h> #include <libssh2.h>
#include <libssh2_sftp.h> #include <libssh2_sftp.h>
int int
libssh2_sftp_shutdown(LIBSSH2_SFTP *sftp); libssh2_sftp_shutdown(LIBSSH2_SFTP *sftp);
.SH DESCRIPTION .SH DESCRIPTION
\fIsftp\fP - SFTP instance as returned by \fIsftp\fP - SFTP instance as returned by
.BR libssh2_sftp_init(3) .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. associated with it.
.SH RETURN VALUE .SH RETURN VALUE

View File

@ -10,15 +10,15 @@ int libssh2_sftp_stat_ex(LIBSSH2_SFTP *sftp, const char *path,
unsigned int path_len, int stat_type, unsigned int path_len, int stat_type,
LIBSSH2_SFTP_ATTRIBUTES *attrs); LIBSSH2_SFTP_ATTRIBUTES *attrs);
.SH DESCRIPTION .SH DESCRIPTION
\fIsftp\fP - SFTP instance as returned by \fIsftp\fP - SFTP instance as returned by
.BR libssh2_sftp_init(3) .BR libssh2_sftp_init(3)
\fIpath\fP - Remote filesystem object to stat/lstat/setstat. \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. 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: stat operation to perform:
.br .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 Get or Set statbuf type data on a remote filesystem object. When getting
statbuf data, statbuf data,
.BR libssh2_sftp_stat(3) .BR libssh2_sftp_stat(3)
will follow all symlinks, while will follow all symlinks, while
.BR libssh2_sftp_lstat(3) .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. happens to be a symlink.
The LIBSSH2_SFTP_ATTRIBUTES struct looks like this: 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_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 \fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to received on the socket, or an SFTP operation caused an errorcode to
be returned by the server. be returned by the server.
.SH SEE ALSO .SH SEE ALSO
.BR libssh2_sftp_init(3) .BR libssh2_sftp_init(3)

View File

@ -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_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 \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 received on the socket, or an SFTP operation caused an errorcode to be returned

View File

@ -6,19 +6,19 @@ libssh2_sftp_symlink_ex - read or set a symbolic link
#include <libssh2.h> #include <libssh2.h>
#include <libssh2_sftp.h> #include <libssh2_sftp.h>
int int
libssh2_sftp_symlink_ex(LIBSSH2_SFTP *sftp, const char *path, libssh2_sftp_symlink_ex(LIBSSH2_SFTP *sftp, const char *path,
unsigned int path_len, char *target, unsigned int path_len, char *target,
unsigned int target_len, int link_type); unsigned int target_len, int link_type);
.SH DESCRIPTION .SH DESCRIPTION
Create a symlink or read out symlink information from the remote side. 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) .BR libssh2_sftp_init(3)
\fIpath\fP - Remote filesystem object to create a symlink from or resolve. \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. create a symlink from or resolve.
\fItarget\fP - a pointer to a buffer. The buffer has different uses depending \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. \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. determines the resulting behavior of this function.
These are convenience macros: 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_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 \fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to received on the socket, or an SFTP operation caused an errorcode to
be returned by the server. be returned by the server.
.SH SEE ALSO .SH SEE ALSO

View File

@ -5,7 +5,7 @@ libssh2_sftp_tell - get the current read/write position indicator for a file
#include <libssh2.h> #include <libssh2.h>
#include <libssh2_sftp.h> #include <libssh2_sftp.h>
size_t size_t
libssh2_sftp_tell(LIBSSH2_SFTP_HANDLE *handle); libssh2_sftp_tell(LIBSSH2_SFTP_HANDLE *handle);
.SH DESCRIPTION .SH DESCRIPTION

View File

@ -5,19 +5,19 @@ libssh2_sftp_unlink_ex - unlink an SFTP file
#include <libssh2.h> #include <libssh2.h>
#include <libssh2_sftp.h> #include <libssh2_sftp.h>
int int
libssh2_sftp_unlink_ex(LIBSSH2_SFTP *sftp, const char *filename, unsigned int filename_len); 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); libssh2_sftp_unlink(LIBSSH2_SFTP *sftp, const char *filename);
.SH DESCRIPTION .SH DESCRIPTION
\fIsftp\fP - SFTP instance as returned by \fIsftp\fP - SFTP instance as returned by
.BR libssh2_sftp_init(3) .BR libssh2_sftp_init(3)
\fIfilename\fP - Path and name of the existing filesystem entry \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 filesystem entry
Unlink (delete) a file from the remote filesystem. 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_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 \fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to received on the socket, or an SFTP operation caused an errorcode to
be returned by the server. be returned by the server.
.SH SEE ALSO .SH SEE ALSO

View File

@ -62,10 +62,10 @@ end.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. \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 \fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to received on the socket, or an SFTP operation caused an errorcode to
be returned by the server. be returned by the server.
.SH SEE ALSO .SH SEE ALSO
.BR libssh2_sftp_open_ex(3) .BR libssh2_sftp_open_ex(3)

View File

@ -22,10 +22,10 @@ typedef struct _LIBSSH2_PRIVKEY_SK {
} LIBSSH2_PRIVKEY_SK; } LIBSSH2_PRIVKEY_SK;
.SH DESCRIPTION .SH DESCRIPTION
\fIsession\fP - Session instance as returned by \fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3) .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. is responsible for freeing the signature with LIBSSH2_FREE.
\fIsig_len\fP - A pointer to the length of the sig parameter. \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. \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. description below.
Create a signature from a FIDO2 authenticator, using either the Create a signature from a FIDO2 authenticator, using either the
sk-ssh-ed25519@openssh.com or sk-ecdsa-sha2-nistp256@openssh.com key sk-ssh-ed25519@openssh.com or sk-ecdsa-sha2-nistp256@openssh.com key
exchange algorithms. exchange algorithms.
The abstract parameter is a pointer to a pointer due to the internal workings 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 of libssh2. The LIBSSH2_PRIVKEY_SK must be completely filled out, and the
caller is responsible for all memory management of its fields. 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. 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_PRESENCE_REQUIRED is set, the authenticator requires a touch. When
LIBSSH2_SK_VERIFICATION_REQUIRED is set, the authenticator requires a PIN. LIBSSH2_SK_VERIFICATION_REQUIRED is set, the authenticator requires a PIN.
Many servers and authenticators do not work properly when Many servers and authenticators do not work properly when
LIBSSH2_SK_PRESENCE_REQUIRED is not set. 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:". authenticator. Usually "ssh:".
\fIkey_handle\fP - The key handle to use for the authenticator's allow list. \fIkey_handle\fP - The key handle to use for the authenticator's allow list.
\fIhandle_len\fP - The length of the key_handle parameter. \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 PIN, or a function pointer to retrieve the PIN.
\fIkey_handle\fP The decoded key handle from the private key file. \fIkey_handle\fP The decoded key handle from the private key file.
\fIhandle_len\fP The length of the key_handle parameter. \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 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 return 0. On failure, it should return a negative number. See
.BR libssh2_userauth_publickey_sk(3) .BR libssh2_userauth_publickey_sk(3)
for more information. 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. pass in the PIN, or a function pointer to retrieve the PIN.
.SH RETURN VALUE .SH RETURN VALUE

View File

@ -4,11 +4,11 @@ libssh2_userauth_authenticated - return authentication status
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
int int
libssh2_userauth_authenticated(LIBSSH2_SESSION *session); libssh2_userauth_authenticated(LIBSSH2_SESSION *session);
.SH DESCRIPTION .SH DESCRIPTION
\fIsession\fP - Session instance as returned by \fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3) .BR libssh2_session_init_ex(3)
Indicates whether or not the named session has been successfully authenticated. Indicates whether or not the named session has been successfully authenticated.

View File

@ -9,7 +9,7 @@ char *
libssh2_userauth_list(LIBSSH2_SESSION *session, const char *username, libssh2_userauth_list(LIBSSH2_SESSION *session, const char *username,
unsigned int username_len); unsigned int username_len);
.SH DESCRIPTION .SH DESCRIPTION
\fIsession\fP - Session instance as returned by \fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3) .BR libssh2_session_init_ex(3)
\fIusername\fP - Username which will be used while authenticating. Note that \fIusername\fP - Username which will be used while authenticating. Note that

View File

@ -16,7 +16,7 @@ int libssh2_userauth_password_ex(LIBSSH2_SESSION *session,
strlen(username), \\ strlen(username), \\
(password), strlen(password), NULL) (password), strlen(password), NULL)
.SH DESCRIPTION .SH DESCRIPTION
\fIsession\fP - Session instance as returned by \fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3) .BR libssh2_session_init_ex(3)
\fIusername\fP - Name of user to attempt plain password authentication for. \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. \fIpassword_len\fP - Length of password parameter.
\fIpasswd_change_cb\fP - If the host accepts authentication but \fIpasswd_change_cb\fP - If the host accepts authentication but
requests that the password be changed, this callback will be issued. requests that the password be changed, this callback will be issued.
If no callback is defined, but server required password change, If no callback is defined, but server required password change,
authentication will fail. authentication will fail.
Attempt basic password authentication. Note that many SSH servers Attempt basic password authentication. Note that many SSH servers
which appear to support ordinary password authentication actually have which appear to support ordinary password authentication actually have
it disabled and use Keyboard Interactive authentication (routed via it disabled and use Keyboard Interactive authentication (routed via
PAM or another authentication backed) instead. PAM or another authentication backed) instead.
.SH RETURN VALUE .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_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 \fILIBSSH2_ERROR_AUTHENTICATION_FAILED\fP - failed, invalid username/password
or public/private key. or public/private key.

View File

@ -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_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 \fILIBSSH2_ERROR_PUBLICKEY_UNVERIFIED\fP - The username/public key
combination was invalid. combination was invalid.

View File

@ -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_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 \fILIBSSH2_ERROR_PUBLICKEY_UNVERIFIED\fP - The username/public key
combination was invalid. combination was invalid.

View File

@ -28,15 +28,15 @@ typedef struct _LIBSSH2_SK_SIG_INFO {
size_t sig_s_len; size_t sig_s_len;
} LIBSSH2_SK_SIG_INFO; } 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, const unsigned char *data, size_t data_len, int algorithm,
uint8_t flags, const char *application, 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); void **abstract);
.fi .fi
.SH DESCRIPTION .SH DESCRIPTION
\fIsession\fP - Session instance as returned by \fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3) .BR libssh2_session_init_ex(3)
\fIusername\fP - Name of user to attempt authentication for. \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. \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. sk-ecdsa-sha2-nistp256@openssh.com key exchange algorithms.
This function is only supported when libssh2 is backed by OpenSSL. This function is only supported when libssh2 is backed by OpenSSL.
.SH CALLBACK DESCRIPTION .SH CALLBACK DESCRIPTION
\fIsession\fP - Session instance as returned by \fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3) .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. information from the authenticator.
\fIdata\fP - The data to sign. \fIdata\fP - The data to sign.
\fIdata_len\fP - The length of the data parameter. \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. 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_PRESENCE_REQUIRED is set, the authenticator requires a touch. When
LIBSSH2_SK_VERIFICATION_REQUIRED is set, the authenticator requires a PIN. LIBSSH2_SK_VERIFICATION_REQUIRED is set, the authenticator requires a PIN.
Many servers and authenticators do not work properly when Many servers and authenticators do not work properly when
LIBSSH2_SK_PRESENCE_REQUIRED is not set. 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:". authenticator. Usually "ssh:".
\fIkey_handle\fP - The key handle to use for the authenticator's allow list. \fIkey_handle\fP - The key handle to use for the authenticator's allow list.
\fIhandle_len\fP - The length of the key_handle parameter. \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 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 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. return 0. On failure, it should return a negative number.
The fields of the LIBSSH2_SK_SIG_INFO are as follows. 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 be read from the authenticator and not merely copied from the flags parameter
to the callback. to the callback.
@ -103,15 +103,15 @@ to the callback.
\fIsig_r\fP - For Ed25519 signatures, this contains the entire signature, as \fIsig_r\fP - For Ed25519 signatures, this contains the entire signature, as
returned directly from the authenticator. For ECDSA signatures, this contains 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 both algorithms, use LIBSSH2_ALLOC to allocate memory. It will be freed by the
caller. caller.
\fIsig_r_len\fP - The length of the sig_r parameter. \fIsig_r_len\fP - The length of the sig_r parameter.
\fIsig_s\fP - For ECDSA signatures, this contains the s component of the \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 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 memory. It will be freed by the caller. For Ed25519 signatures, set this to
NULL. NULL.
\fIsig_s_len\fP - The length of the sig_s parameter. \fIsig_s_len\fP - The length of the sig_s parameter.

View File

@ -4,7 +4,7 @@ libssh2_template - short function description
.SH SYNOPSIS .SH SYNOPSIS
#include <libssh2.h> #include <libssh2.h>
void void
libssh2_template(void); libssh2_template(void);
.SH DESCRIPTION .SH DESCRIPTION

View File

@ -2,12 +2,31 @@ AUTOMAKE_OPTIONS = foreign nostdinc
EXTRA_DIST = libssh2_config_cmake.h.in CMakeLists.txt EXTRA_DIST = libssh2_config_cmake.h.in CMakeLists.txt
# samples # examples
noinst_PROGRAMS = direct_tcpip ssh2 scp scp_nonblock scp_write \ noinst_PROGRAMS = \
scp_write_nonblock sftp sftp_nonblock sftp_write sftp_write_nonblock \ direct_tcpip \
sftp_mkdir sftp_mkdir_nonblock sftp_RW_nonblock sftp_write_sliding \ scp \
sftpdir sftpdir_nonblock ssh2_exec ssh2_agent ssh2_agent_forwarding \ scp_nonblock \
ssh2_echo sftp_append subsystem_netconf tcpip-forward 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 if HAVE_SYS_UN_H
noinst_PROGRAMS += x11 noinst_PROGRAMS += x11

View File

@ -14,7 +14,7 @@ sub nicedate {
return $date; return $date;
} }
print print
' Changelog for the libssh2 project. Generated with git2news.pl ' Changelog for the libssh2 project. Generated with git2news.pl
'; ';

View File

@ -10,13 +10,13 @@
(c-comment-only-line-offset . 0) (c-comment-only-line-offset . 0)
(c-hanging-braces-alist . ((substatement-open before after))) (c-hanging-braces-alist . ((substatement-open before after)))
(c-offsets-alist . ((topmost-intro . 0) (c-offsets-alist . ((topmost-intro . 0)
(topmost-intro-cont . 0) (topmost-intro-cont . 0)
(substatement . +) (substatement . +)
(substatement-open . 0) (substatement-open . 0)
(statement-case-intro . +) (statement-case-intro . +)
(statement-case-open . 0) (statement-case-open . 0)
(case-label . 0) (case-label . 0)
)) ))
) )
"Libssh2 C Programming Style") "Libssh2 C Programming Style")
@ -33,10 +33,10 @@
;; add libssh2 style and set it for the current buffer ;; add libssh2 style and set it for the current buffer
(c-add-style "libssh2" libssh2-c-style t) (c-add-style "libssh2" libssh2-c-style t)
(setq tab-width 8 (setq tab-width 8
indent-tabs-mode nil ; Use spaces, not tabs. indent-tabs-mode nil ; Use spaces, not tabs.
comment-column 40 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")) 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 ;; keybindings for C, C++, and Objective-C. We can put these in
;; c-mode-base-map because of inheritance ... ;; c-mode-base-map because of inheritance ...
(define-key c-mode-base-map "\M-q" 'c-fill-paragraph) (define-key c-mode-base-map "\M-q" 'c-fill-paragraph)

View File

@ -14,31 +14,31 @@
# Usage: AB_INIT([MODE]). # Usage: AB_INIT([MODE]).
AC_DEFUN([AB_INIT], AC_DEFUN([AB_INIT],
[ [
AC_REQUIRE([AC_CANONICAL_BUILD]) AC_REQUIRE([AC_CANONICAL_BUILD])
AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_CANONICAL_HOST])
if test -z "$AB_PACKAGE"; then if test -z "$AB_PACKAGE"; then
AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE} AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE}
fi fi
AC_MSG_NOTICE([autobuild project... $AB_PACKAGE]) AC_MSG_NOTICE([autobuild project... $AB_PACKAGE])
if test -z "$AB_VERSION"; then if test -z "$AB_VERSION"; then
AB_VERSION=${PACKAGE_VERSION:-$VERSION} AB_VERSION=${PACKAGE_VERSION:-$VERSION}
fi fi
AC_MSG_NOTICE([autobuild revision... $AB_VERSION]) AC_MSG_NOTICE([autobuild revision... $AB_VERSION])
hostname=`hostname` hostname=`hostname`
if test "$hostname"; then if test "$hostname"; then
AC_MSG_NOTICE([autobuild hostname... $hostname]) AC_MSG_NOTICE([autobuild hostname... $hostname])
fi 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` date=`date +%Y%m%d-%H%M%S`
if test "$?" != 0; then if test "$?" != 0; then
date=`date` date=`date`
fi fi
if test "$date"; then if test "$date"; then
AC_MSG_NOTICE([autobuild timestamp... $date]) AC_MSG_NOTICE([autobuild timestamp... $date])
fi fi
]) ])

View File

@ -59,7 +59,7 @@ if test "$GCC" = yes; then
# Canonicalize the path of ld # Canonicalize the path of ld
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 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 done
test -z "$LD" && LD="$ac_prog" 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. # Break only if it was the GNU/non-GNU ld that we prefer.
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
*GNU* | *'with BFD'*) *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 esac
fi fi
done done

38
maketgz
View File

@ -10,8 +10,8 @@ if [ -z "$version" ]; then
fi fi
if [ "xonly" = "x$2" ]; then if [ "xonly" = "x$2" ]; then
echo "Setup version number only!" echo "Setup version number only!"
only=1 only=1
fi fi
libversion="$version" libversion="$version"
@ -25,25 +25,26 @@ numeric=`perl -e 'printf("%02x%02x%02x\n", '"$major, $minor, $patch);"`
HEADER=include/libssh2.h HEADER=include/libssh2.h
if test -z "$only"; then if test -z "$only"; then
ext=".dist" ext=".dist"
# when not setting up version numbers locally # when not setting up version numbers locally
for a in $HEADER; do for a in $HEADER; do
cp $a "$a$ext" cp $a "$a$ext"
done done
HEADER="$HEADER$ext" HEADER="$HEADER$ext"
fi fi
# requires a date command that knows -u for UTC time zone # requires a date command that knows -u for UTC time zone
datestamp=`LC_TIME=C date -u` datestamp=`LC_TIME=C date -u`
# Replace in-place version number in header file: # Replace in-place version number in header file:
sed -i.bak -e 's/^#define LIBSSH2_VERSION .*/#define LIBSSH2_VERSION "'$libversion'"/g' \ sed -i.bak \
-e 's/^#define LIBSSH2_VERSION_NUM .*/#define LIBSSH2_VERSION_NUM 0x'$numeric'/g' \ -e 's/^#define LIBSSH2_VERSION .*/#define LIBSSH2_VERSION "'$libversion'"/g' \
-e 's/^#define LIBSSH2_VERSION_MAJOR .*/#define LIBSSH2_VERSION_MAJOR '$major'/g' \ -e 's/^#define LIBSSH2_VERSION_NUM .*/#define LIBSSH2_VERSION_NUM 0x'$numeric'/g' \
-e 's/^#define LIBSSH2_VERSION_MINOR .*/#define LIBSSH2_VERSION_MINOR '$minor'/g' \ -e 's/^#define LIBSSH2_VERSION_MAJOR .*/#define LIBSSH2_VERSION_MAJOR '$major'/g' \
-e 's/^#define LIBSSH2_VERSION_PATCH .*/#define LIBSSH2_VERSION_PATCH '$patch'/g' \ -e 's/^#define LIBSSH2_VERSION_MINOR .*/#define LIBSSH2_VERSION_MINOR '$minor'/g' \
-e "s/^#define LIBSSH2_TIMESTAMP .*/#define LIBSSH2_TIMESTAMP \"$datestamp\"/g" \ -e 's/^#define LIBSSH2_VERSION_PATCH .*/#define LIBSSH2_VERSION_PATCH '$patch'/g' \
$HEADER -e "s/^#define LIBSSH2_TIMESTAMP .*/#define LIBSSH2_TIMESTAMP \"$datestamp\"/g" \
$HEADER
rm -f "$HEADER.bak" rm -f "$HEADER.bak"
@ -52,12 +53,11 @@ echo "libssh2 numerical $numeric"
echo "datestamp $datestamp" echo "datestamp $datestamp"
if test -n "$only"; then if test -n "$only"; then
# done! # done!
exit; exit
fi fi
findprog() findprog() {
{
file="$1" file="$1"
for part in `echo $PATH| tr ':' ' '`; do for part in `echo $PATH| tr ':' ' '`; do
path="$part/$file" path="$part/$file"

View File

@ -9,7 +9,7 @@
# Edit the path below to point to the base of your Novell NDK. # Edit the path below to point to the base of your Novell NDK.
ifndef NDKBASE ifndef NDKBASE
NDKBASE = c:/novell NDKBASE = c:/novell
endif endif
# Edit the path below to point to the base of your Zlib sources. # 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. # Edit the path below to point to your Distribution folder.
ifndef DISTDIR ifndef DISTDIR
DISTDIR = libssh2-$(LIBSSH2_VERSION_STR)-bin-nw DISTDIR = libssh2-$(LIBSSH2_VERSION_STR)-bin-nw
endif endif
DISTARC = $(DISTDIR).zip DISTARC = $(DISTDIR).zip
# Edit the path below to point to your Development folder. # Edit the path below to point to your Development folder.
ifndef DEVLDIR ifndef DEVLDIR
DEVLDIR = libssh2-$(LIBSSH2_VERSION_STR)-dev-nw DEVLDIR = libssh2-$(LIBSSH2_VERSION_STR)-dev-nw
endif endif
DEVLARC = $(DEVLDIR).zip DEVLARC = $(DEVLDIR).zip
# Edit the vars below to change NLM target settings. # Edit the vars below to change NLM target settings.
TARGET = libssh2 TARGET = libssh2
VERSION = $(LIBSSH2_VERSION) VERSION = $(LIBSSH2_VERSION)
CPRIGHT = Copyright (c) $(LIBSSH2_COPYRIGHT_STR) CPRIGHT = Copyright (c) $(LIBSSH2_COPYRIGHT_STR)
WWWURL = https://www.libssh2.org/ WWWURL = https://www.libssh2.org/
DESCR = libssh2 $(LIBSSH2_VERSION_STR) ($(LIBARCH)) - $(WWWURL) DESCR = libssh2 $(LIBSSH2_VERSION_STR) ($(LIBARCH)) - $(WWWURL)
MTSAFE = YES MTSAFE = YES
STACK = 64000 STACK = 64000
SCREEN = none SCREEN = none
EXPORTS = @$(TARGET).imp EXPORTS = @$(TARGET).imp
# Edit the var below to point to your lib architecture. # Edit the var below to point to your lib architecture.
ifndef LIBARCH ifndef LIBARCH
@ -52,66 +52,66 @@ endif
# must be equal to DEBUG or NDEBUG # must be equal to DEBUG or NDEBUG
ifndef DB ifndef DB
DB = NDEBUG DB = NDEBUG
# DB = DEBUG # DB = DEBUG
endif endif
# Optimization: -O<n> or debugging: -g # Optimization: -O<n> or debugging: -g
ifeq ($(DB),NDEBUG) ifeq ($(DB),NDEBUG)
OPT = -O2 OPT = -O2
OBJDIR = release OBJDIR = release
else else
OPT = -g OPT = -g
OPT += -DLIBSSH2DEBUG OPT += -DLIBSSH2DEBUG
OBJDIR = debug OBJDIR = debug
endif endif
# The following lines defines your compiler. # The following lines defines your compiler.
ifdef CWFolder ifdef CWFolder
METROWERKS = $(CWFolder) METROWERKS = $(CWFolder)
endif endif
ifdef METROWERKS ifdef METROWERKS
# MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support # MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support
MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support/Metrowerks Support MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support/Metrowerks Support
CC = mwccnlm CC = mwccnlm
else else
CC = $(CROSSPREFIX)gcc CC = $(CROSSPREFIX)gcc
endif endif
# Here you can find a native Win32 binary of the original awk: # Here you can find a native Win32 binary of the original awk:
# http://www.gknw.net/development/prgtools/awk-20100523.zip # 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 # 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: # generating the xdc data for the linker; here's a minimal tool:
# http://www.gknw.net/development/prgtools/mkxdc.zip # http://www.gknw.net/development/prgtools/mkxdc.zip
MPKXDC = mkxdc MPKXDC = mkxdc
ZIP = zip -qzr9 ZIP = zip -qzr9
# Platform-dependent helper tool macros # Platform-dependent helper tool macros
ifeq ($(findstring /sh,$(SHELL)),/sh) ifeq ($(findstring /sh,$(SHELL)),/sh)
DEL = rm -f $1 DEL = rm -f $1
RMDIR = rm -fr $1 RMDIR = rm -fr $1
MKDIR = mkdir -p $1 MKDIR = mkdir -p $1
COPY = -cp -afv $1 $2 COPY = -cp -afv $1 $2
#COPYR = -cp -afr $1/* $2 #COPYR = -cp -afr $1/* $2
COPYR = -rsync -aC $1/* $2 COPYR = -rsync -aC $1/* $2
TOUCH = touch $1 TOUCH = touch $1
CAT = cat CAT = cat
ECHONL = echo "" ECHONL = echo ""
DL = ' DL = '
else else
ifeq "$(OS)" "Windows_NT" ifeq "$(OS)" "Windows_NT"
DEL = -del 2>NUL /q /f $(subst /,\,$1) DEL = -del 2>NUL /q /f $(subst /,\,$1)
RMDIR = -rd 2>NUL /q /s $(subst /,\,$1) RMDIR = -rd 2>NUL /q /s $(subst /,\,$1)
else else
DEL = -del 2>NUL $(subst /,\,$1) DEL = -del 2>NUL $(subst /,\,$1)
RMDIR = -deltree 2>NUL /y $(subst /,\,$1) RMDIR = -deltree 2>NUL /y $(subst /,\,$1)
endif endif
MKDIR = -md 2>NUL $(subst /,\,$1) MKDIR = -md 2>NUL $(subst /,\,$1)
COPY = -copy 2>NUL /y $(subst /,\,$1) $(subst /,\,$2) COPY = -copy 2>NUL /y $(subst /,\,$1) $(subst /,\,$2)
COPYR = -xcopy 2>NUL /q /y /e $(subst /,\,$1) $(subst /,\,$2) COPYR = -xcopy 2>NUL /q /y /e $(subst /,\,$1) $(subst /,\,$2)
TOUCH = copy 2>&1>NUL /b $(subst /,\,$1) +,, TOUCH = copy 2>&1>NUL /b $(subst /,\,$1) +,,
CAT = type CAT = type
ECHONL = $(ComSpec) /c echo. ECHONL = $(ComSpec) /c echo.
endif endif
# LIBARCH_U = $(shell $(AWK) 'BEGIN {print toupper(ARGV[1])}' $(LIBARCH)) # 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 -include $(OBJDIR)/version.inc
# Global flags for all compilers # Global flags for all compilers
CFLAGS += $(OPT) -D$(DB) -DNETWARE -nostdinc CFLAGS += $(OPT) -D$(DB) -DNETWARE -nostdinc
#CFLAGS += -DHAVE_CONFIG_H #CFLAGS += -DHAVE_CONFIG_H
ifeq ($(CC),mwccnlm) ifeq ($(CC),mwccnlm)
LD = mwldnlm LD = mwldnlm
LDFLAGS = -nostdlib $(PRELUDE) $(OBJL) -o $@ -commandfile LDFLAGS = -nostdlib $(PRELUDE) $(OBJL) -o $@ -commandfile
AR = mwldnlm AR = mwldnlm
ARFLAGS = -nostdlib -type library -o ARFLAGS = -nostdlib -type library -o
LIBEXT = lib LIBEXT = lib
CFLAGS += -msgstyle gcc -gccinc -inline on -opt nointrinsics -proc 586 CFLAGS += -msgstyle gcc -gccinc -inline on -opt nointrinsics -proc 586
CFLAGS += -relax_pointers CFLAGS += -relax_pointers
#CFLAGS += -w on #CFLAGS += -w on
ifeq ($(LIBARCH),LIBC) ifeq ($(LIBARCH),LIBC)
PRELUDE = $(SDK_LIBC)/imports/libcpre.o PRELUDE = $(SDK_LIBC)/imports/libcpre.o
CFLAGS += -align 4 CFLAGS += -align 4
else else
# PRELUDE = $(SDK_CLIB)/imports/clibpre.o # PRELUDE = $(SDK_CLIB)/imports/clibpre.o
# to avoid the __init_* / __deinit_* whoes dont use prelude from NDK # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj" PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj"
# CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h" # CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h"
CFLAGS += -align 1 CFLAGS += -align 1
endif endif
else else
LD = $(CROSSPREFIX)nlmconv LD = $(CROSSPREFIX)nlmconv
LDFLAGS = -UT LDFLAGS = -UT
AR = $(CROSSPREFIX)ar AR = $(CROSSPREFIX)ar
ARFLAGS = -cq ARFLAGS = -cq
LIBEXT = a LIBEXT = a
RANLIB = $(CROSSPREFIX)ranlib RANLIB = $(CROSSPREFIX)ranlib
CFLAGS += -m32 CFLAGS += -m32
CFLAGS += -fno-builtin -fpcc-struct-return CFLAGS += -fno-builtin -fpcc-struct-return
CFLAGS += -fno-strict-aliasing CFLAGS += -fno-strict-aliasing
CFLAGS += -Wall # -pedantic CFLAGS += -Wall # -pedantic
#CFLAGS += -Wno-pointer-sign #CFLAGS += -Wno-pointer-sign
ifeq ($(LIBARCH),LIBC) ifeq ($(LIBARCH),LIBC)
PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
else else
# PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o # PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
# to avoid the __init_* / __deinit_* whoes dont use prelude from NDK # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
# http://www.gknw.net/development/mk_nlm/gcc_pre.zip # http://www.gknw.net/development/mk_nlm/gcc_pre.zip
PRELUDE = $(NDK_ROOT)/pre/prelude.o PRELUDE = $(NDK_ROOT)/pre/prelude.o
CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
endif endif
endif endif
LDLIBS = LDLIBS =
NDK_ROOT = $(NDKBASE)/ndk NDK_ROOT = $(NDKBASE)/ndk
SDK_CLIB = $(NDK_ROOT)/nwsdk SDK_CLIB = $(NDK_ROOT)/nwsdk
@ -176,12 +176,12 @@ SNPRINTF = $(NDKBASE)/snprintf
INCLUDES = -I. -I../include INCLUDES = -I. -I../include
ifdef WITH_ZLIB ifdef WITH_ZLIB
INCLUDES += -I$(ZLIB_PATH) INCLUDES += -I$(ZLIB_PATH)
ifdef LINK_STATIC ifdef LINK_STATIC
LDLIBS += $(ZLIB_PATH)/nw/$(LIBARCH)/libz.$(LIBEXT) LDLIBS += $(ZLIB_PATH)/nw/$(LIBARCH)/libz.$(LIBEXT)
else else
MODULES += libz.nlm MODULES += libz.nlm
IMPORTS += @$(ZLIB_PATH)/nw/$(LIBARCH)/libz.imp IMPORTS += @$(ZLIB_PATH)/nw/$(LIBARCH)/libz.imp
endif endif
endif endif
INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L) INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L)
@ -190,25 +190,25 @@ LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT)
IMPORTS += GetProcessSwitchCount RunningProcess IMPORTS += GetProcessSwitchCount RunningProcess
ifeq ($(LIBARCH),LIBC) ifeq ($(LIBARCH),LIBC)
INCLUDES += -I$(SDK_LIBC)/include INCLUDES += -I$(SDK_LIBC)/include
# INCLUDES += -I$(SDK_LIBC)/include/nks # INCLUDES += -I$(SDK_LIBC)/include/nks
# INCLUDES += -I$(SDK_LIBC)/include/winsock # INCLUDES += -I$(SDK_LIBC)/include/winsock
CFLAGS += -D_POSIX_SOURCE CFLAGS += -D_POSIX_SOURCE
else else
INCLUDES += -I$(SDK_CLIB)/include/nlm INCLUDES += -I$(SDK_CLIB)/include/nlm
# INCLUDES += -I$(SDK_CLIB)/include/nlm/obsolete # INCLUDES += -I$(SDK_CLIB)/include/nlm/obsolete
# INCLUDES += -I$(SDK_CLIB)/include # INCLUDES += -I$(SDK_CLIB)/include
endif endif
CFLAGS += $(INCLUDES) CFLAGS += $(INCLUDES)
ifeq ($(MTSAFE),YES) ifeq ($(MTSAFE),YES)
XDCOPT = -n XDCOPT = -n
endif endif
ifeq ($(MTSAFE),NO) ifeq ($(MTSAFE),NO)
XDCOPT = -u XDCOPT = -u
endif endif
ifdef XDCOPT ifdef XDCOPT
XDCDATA = $(OBJDIR)/$(TARGET).xdc XDCDATA = $(OBJDIR)/$(TARGET).xdc
endif endif
vpath %.c . ../src vpath %.c . ../src
@ -228,8 +228,8 @@ OBJECTS += snprintf.o
vpath %.c $(SNPRINTF) vpath %.c $(SNPRINTF)
endif endif
OBJS := $(addprefix $(OBJDIR)/,$(OBJECTS)) OBJS := $(addprefix $(OBJDIR)/,$(OBJECTS))
OBJL = $(OBJS) $(OBJDIR)/nwlib.o $(LDLIBS) OBJL = $(OBJS) $(OBJDIR)/nwlib.o $(LDLIBS)
all: lib nlm all: lib nlm

View File

@ -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 * NLM in order to keep the screen open when the NLM terminates
* (the good old clib behaviour). * (the good old clib behaviour).
* You dont have to call it, its done automatically from LibC. * 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/ * URL: http://www.gknw.net/development/mk_nlm/
*/ */
#include <stdio.h> #include <stdio.h>
#include <screen.h> #include <screen.h>
void _NonAppStop() void _NonAppStop()
{ {
uint16_t row, col; uint16_t row, col;
GetScreenSize(&row, &col); GetScreenSize(&row, &col);
gotorowcol(row-1, 0); gotorowcol(row-1, 0);
/* pressanykey(); */ /* pressanykey(); */
printf("<Press any key to close screen> "); printf("<Press any key to close screen> ");
getcharacter(); getcharacter();
} }

View File

@ -300,5 +300,3 @@ int main ( void )
#endif /* __NOVELL_LIBC__ */ #endif /* __NOVELL_LIBC__ */
#endif /* NETWARE */ #endif /* NETWARE */

View File

@ -8,7 +8,7 @@
# Edit the path below to point to the base of your Novell NDK. # Edit the path below to point to the base of your Novell NDK.
ifndef NDKBASE ifndef NDKBASE
NDKBASE = c:/novell NDKBASE = c:/novell
endif endif
# Edit the path below to point to the base of your Zlib sources. # Edit the path below to point to the base of your Zlib sources.
@ -25,18 +25,18 @@ endif
LINK_STATIC = 1 LINK_STATIC = 1
# Edit the vars below to change NLM target settings. # 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)))) 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) COPYR = Copyright (c) $(LIBSSH2_COPYRIGHT_STR)
WWWURL = http://www.libssh2.org/ WWWURL = http://www.libssh2.org/
DESCR = libssh2 $(notdir $(@:.def=)) $(LIBSSH2_VERSION_STR) ($(LIBARCH)) - $(WWWURL) DESCR = libssh2 $(notdir $(@:.def=)) $(LIBSSH2_VERSION_STR) ($(LIBARCH)) - $(WWWURL)
MTSAFE = YES MTSAFE = YES
STACK = 64000 STACK = 64000
SCREEN = NONE SCREEN = NONE
#SCREEN = libssh2 $(notdir $(@:.def=)) #SCREEN = libssh2 $(notdir $(@:.def=))
# Comment the line below if you dont want to load protected automatically. # 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. # Edit the var below to point to your lib architecture.
ifndef LIBARCH ifndef LIBARCH
@ -45,65 +45,65 @@ endif
# must be equal to DEBUG or NDEBUG # must be equal to DEBUG or NDEBUG
ifndef DB ifndef DB
DB = NDEBUG DB = NDEBUG
# DB = DEBUG # DB = DEBUG
endif endif
# Optimization: -O<n> or debugging: -g # Optimization: -O<n> or debugging: -g
ifeq ($(DB),NDEBUG) ifeq ($(DB),NDEBUG)
OPT = -O2 OPT = -O2
OBJDIR = release OBJDIR = release
else else
OPT = -g OPT = -g
OPT += -DLIBSSH2DEBUG OPT += -DLIBSSH2DEBUG
OBJDIR = debug OBJDIR = debug
endif endif
# The following lines defines your compiler. # The following lines defines your compiler.
ifdef CWFolder ifdef CWFolder
METROWERKS = $(CWFolder) METROWERKS = $(CWFolder)
endif endif
ifdef METROWERKS ifdef METROWERKS
# MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support # MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support
MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support/Metrowerks Support MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support/Metrowerks Support
CC = mwccnlm CC = mwccnlm
else else
CC = $(CROSSPREFIX)gcc CC = $(CROSSPREFIX)gcc
endif endif
# Here you can find a native Win32 binary of the original awk: # Here you can find a native Win32 binary of the original awk:
# http://www.gknw.net/development/prgtools/awk-20100523.zip # 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 # 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: # generating the xdc data for the linker; here's a minimal tool:
# http://www.gknw.net/development/prgtools/mkxdc.zip # http://www.gknw.net/development/prgtools/mkxdc.zip
MPKXDC = mkxdc MPKXDC = mkxdc
# Platform-dependent helper tool macros # Platform-dependent helper tool macros
ifeq ($(findstring /sh,$(SHELL)),/sh) ifeq ($(findstring /sh,$(SHELL)),/sh)
DEL = rm -f $1 DEL = rm -f $1
RMDIR = rm -fr $1 RMDIR = rm -fr $1
MKDIR = mkdir -p $1 MKDIR = mkdir -p $1
COPY = -cp -afv $1 $2 COPY = -cp -afv $1 $2
#COPYR = -cp -afr $1/* $2 #COPYR = -cp -afr $1/* $2
COPYR = -rsync -aC $1/* $2 COPYR = -rsync -aC $1/* $2
TOUCH = touch $1 TOUCH = touch $1
CAT = cat CAT = cat
ECHONL = echo "" ECHONL = echo ""
DL = ' DL = '
else else
ifeq "$(OS)" "Windows_NT" ifeq "$(OS)" "Windows_NT"
DEL = -del 2>NUL /q /f $(subst /,\,$1) DEL = -del 2>NUL /q /f $(subst /,\,$1)
RMDIR = -rd 2>NUL /q /s $(subst /,\,$1) RMDIR = -rd 2>NUL /q /s $(subst /,\,$1)
else else
DEL = -del 2>NUL $(subst /,\,$1) DEL = -del 2>NUL $(subst /,\,$1)
RMDIR = -deltree 2>NUL /y $(subst /,\,$1) RMDIR = -deltree 2>NUL /y $(subst /,\,$1)
endif endif
MKDIR = -md 2>NUL $(subst /,\,$1) MKDIR = -md 2>NUL $(subst /,\,$1)
COPY = -copy 2>NUL /y $(subst /,\,$1) $(subst /,\,$2) COPY = -copy 2>NUL /y $(subst /,\,$1) $(subst /,\,$2)
COPYR = -xcopy 2>NUL /q /y /e $(subst /,\,$1) $(subst /,\,$2) COPYR = -xcopy 2>NUL /q /y /e $(subst /,\,$1) $(subst /,\,$2)
TOUCH = copy 2>&1>NUL /b $(subst /,\,$1) +,, TOUCH = copy 2>&1>NUL /b $(subst /,\,$1) +,,
CAT = type CAT = type
ECHONL = $(ComSpec) /c echo. ECHONL = $(ComSpec) /c echo.
endif endif
# LIBARCH_U = $(shell $(AWK) 'BEGIN {print toupper(ARGV[1])}' $(LIBARCH)) # 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 -include $(OBJDIR)/version.inc
# Global flags for all compilers # Global flags for all compilers
CFLAGS += $(OPT) -D$(DB) -DNETWARE -nostdinc CFLAGS += $(OPT) -D$(DB) -DNETWARE -nostdinc
ifeq ($(CC),mwccnlm) ifeq ($(CC),mwccnlm)
LD = mwldnlm LD = mwldnlm
LDFLAGS = -nostdlib $(<:.def=.o) $(PRELUDE) $(LDLIBS) -o $@ -commandfile LDFLAGS = -nostdlib $(<:.def=.o) $(PRELUDE) $(LDLIBS) -o $@ -commandfile
AR = mwldnlm AR = mwldnlm
ARFLAGS = -type library -w nocmdline $(OBJS) -o ARFLAGS = -type library -w nocmdline $(OBJS) -o
LIBEXT = lib LIBEXT = lib
CFLAGS += -msgstyle gcc -gccinc -inline off -opt nointrinsics -proc 586 CFLAGS += -msgstyle gcc -gccinc -inline off -opt nointrinsics -proc 586
CFLAGS += -relax_pointers CFLAGS += -relax_pointers
#CFLAGS += -w on #CFLAGS += -w on
ifeq ($(LIBARCH),LIBC) ifeq ($(LIBARCH),LIBC)
PRELUDE = $(SDK_LIBC)/imports/libcpre.o PRELUDE = $(SDK_LIBC)/imports/libcpre.o
CFLAGS += -align 4 CFLAGS += -align 4
else else
# PRELUDE = $(SDK_CLIB)/imports/clibpre.o # PRELUDE = $(SDK_CLIB)/imports/clibpre.o
# to avoid the __init_* / __deinit_* whoes dont use prelude from NDK # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj" PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj"
# CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h" # CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h"
CFLAGS += -align 1 CFLAGS += -align 1
endif endif
else else
LD = nlmconv LD = nlmconv
LDFLAGS = -UT LDFLAGS = -UT
AR = ar AR = ar
ARFLAGS = -cq ARFLAGS = -cq
LIBEXT = a LIBEXT = a
CFLAGS += -m32 CFLAGS += -m32
CFLAGS += -fno-builtin -fpcc-struct-return CFLAGS += -fno-builtin -fpcc-struct-return
CFLAGS += -fno-strict-aliasing CFLAGS += -fno-strict-aliasing
CFLAGS += -Wall # -pedantic CFLAGS += -Wall # -pedantic
ifeq ($(LIBARCH),LIBC) ifeq ($(LIBARCH),LIBC)
PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
else else
# PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o # PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
# to avoid the __init_* / __deinit_* whoes dont use prelude from NDK # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
# http://www.gknw.net/development/mk_nlm/gcc_pre.zip # http://www.gknw.net/development/mk_nlm/gcc_pre.zip
PRELUDE = $(NDK_ROOT)/pre/prelude.o PRELUDE = $(NDK_ROOT)/pre/prelude.o
CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
endif endif
endif endif
@ -163,12 +163,12 @@ SNPRINTF = $(NDKBASE)/snprintf
INCLUDES = -I.. -I../../include INCLUDES = -I.. -I../../include
LDLIBS = LDLIBS =
ifdef LINK_STATIC ifdef LINK_STATIC
LDLIBS += ../libssh2.$(LIBEXT) LDLIBS += ../libssh2.$(LIBEXT)
else else
IMPORTS += @../libssh2.imp IMPORTS += @../libssh2.imp
MODULES += libssh2.nlm MODULES += libssh2.nlm
endif endif
INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L) INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L)
@ -177,33 +177,33 @@ LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT)
IMPORTS += GetProcessSwitchCount RunningProcess IMPORTS += GetProcessSwitchCount RunningProcess
ifdef WITH_ZLIB ifdef WITH_ZLIB
INCLUDES += -I$(ZLIB_PATH) INCLUDES += -I$(ZLIB_PATH)
ifdef LINK_STATIC ifdef LINK_STATIC
LDLIBS += $(ZLIB_PATH)/nw/$(LIBARCH)/libz.$(LIBEXT) LDLIBS += $(ZLIB_PATH)/nw/$(LIBARCH)/libz.$(LIBEXT)
else else
MODULES += libz.nlm MODULES += libz.nlm
IMPORTS += @$(ZLIB_PATH)/nw/$(LIBARCH)/libz.imp IMPORTS += @$(ZLIB_PATH)/nw/$(LIBARCH)/libz.imp
endif endif
endif endif
ifeq ($(LIBARCH),LIBC) ifeq ($(LIBARCH),LIBC)
INCLUDES += -I$(SDK_LIBC)/include INCLUDES += -I$(SDK_LIBC)/include
# INCLUDES += -I$(SDK_LIBC)/include/nks # INCLUDES += -I$(SDK_LIBC)/include/nks
# INCLUDES += -I$(SDK_LIBC)/include/winsock # INCLUDES += -I$(SDK_LIBC)/include/winsock
CFLAGS += -D_POSIX_SOURCE CFLAGS += -D_POSIX_SOURCE
else else
INCLUDES += -I$(SDK_CLIB)/include/nlm INCLUDES += -I$(SDK_CLIB)/include/nlm
# INCLUDES += -I$(SDK_CLIB)/include/nlm/obsolete # INCLUDES += -I$(SDK_CLIB)/include/nlm/obsolete
# INCLUDES += -I$(SDK_CLIB)/include # INCLUDES += -I$(SDK_CLIB)/include
# CFLAGS += -DNETDB_USE_INTERNET # CFLAGS += -DNETDB_USE_INTERNET
endif endif
CFLAGS += $(INCLUDES) CFLAGS += $(INCLUDES)
ifeq ($(MTSAFE),YES) ifeq ($(MTSAFE),YES)
XDCOPT = -n XDCOPT = -n
endif endif
ifeq ($(MTSAFE),NO) ifeq ($(MTSAFE),NO)
XDCOPT = -u XDCOPT = -u
endif endif
vpath %.c $(SAMPLES) vpath %.c $(SAMPLES)
@ -211,7 +211,7 @@ vpath %.c $(SAMPLES)
.PRECIOUS: $(OBJDIR)/%.o $(OBJDIR)/%.def $(OBJDIR)/%.xdc .PRECIOUS: $(OBJDIR)/%.o $(OBJDIR)/%.def $(OBJDIR)/%.xdc
all: prebuild $(TARGETS) all: prebuild $(TARGETS)
prebuild: $(OBJDIR) $(OBJDIR)/version.inc prebuild: $(OBJDIR) $(OBJDIR)/version.inc

View File

@ -138,7 +138,7 @@ convert_ccsid(LIBSSH2_SESSION *session, libssh2_string_cache **cache,
termsize = terminator_size(outccsid); termsize = terminator_size(outccsid);
if (termsize < 0) if (termsize < 0)
return NULL; return NULL;
/* Prepare conversion parameters. */ /* Prepare conversion parameters. */
memset((void *) &incode, 0, sizeof incode); memset((void *) &incode, 0, sizeof incode);
memset((void *) &outcode, 0, sizeof outcode); memset((void *) &outcode, 0, sizeof outcode);

View File

@ -193,9 +193,9 @@
/* If using the C implementation of alloca, define if you know the /* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be direction of stack growth for your system; otherwise it will be
automatically deduced at runtime. automatically deduced at runtime.
STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */ STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION #undef STACK_DIRECTION
/* Define to 1 if you have the ANSI C header files. */ /* Define to 1 if you have the ANSI C header files. */

View File

@ -116,9 +116,9 @@ libssh2_scp_send(LIBSSH2_SESSION *session,
LIBSSH2_API int LIBSSH2_API int
libssh2_publickey_add(LIBSSH2_PUBLICKEY *pkey, const unsigned char *name, 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, char overwrite, unsigned long num_attrs,
const libssh2_publickey_attribute attrs[]); const libssh2_publickey_attribute attrs[]);
LIBSSH2_API int LIBSSH2_API int
libssh2_publickey_remove(LIBSSH2_PUBLICKEY *pkey, const unsigned char *name, libssh2_publickey_remove(LIBSSH2_PUBLICKEY *pkey, const unsigned char *name,
const unsigned char *blob, unsigned long blob_len); const unsigned char *blob, unsigned long blob_len);

View File

@ -64,5 +64,5 @@ VERSION=-version-info 1:1:0
# #
libssh2_la_LDFLAGS = $(VERSION) -no-undefined \ libssh2_la_LDFLAGS = $(VERSION) -no-undefined \
-export-symbols-regex '^libssh2_.*' \ -export-symbols-regex '^libssh2_.*' \
$(CRYPTO_LTLIBS) $(LTLIBZ) $(CRYPTO_LTLIBS) $(LTLIBZ)

View File

@ -39,9 +39,10 @@ INTEGRATION_TESTS = \
# Enable this once the tests are working # Enable this once the tests are working
#TESTS += $(INTEGRATION_TESTS) #TESTS += $(INTEGRATION_TESTS)
check_PROGRAMS += $(INTEGRATION_TESTS) check_PROGRAMS += $(INTEGRATION_TESTS)
librunner_la_SOURCES = runner.c runner.h \ librunner_la_SOURCES = \
session_fixture.c session_fixture.h \ runner.c runner.h \
openssh_fixture.c openssh_fixture.h session_fixture.c session_fixture.h \
openssh_fixture.c openssh_fixture.h
LDADD = librunner.la LDADD = librunner.la
check_LTLIBRARIES = librunner.la check_LTLIBRARIES = librunner.la
@ -55,62 +56,62 @@ LDADD += ../src/libssh2.la
TESTS_ENVIRONMENT = SSHD=$(SSHD) EXEEXT=$(EXEEXT) TESTS_ENVIRONMENT = SSHD=$(SSHD) EXEEXT=$(EXEEXT)
TESTS_ENVIRONMENT += srcdir=$(top_srcdir)/tests builddir=$(top_builddir)/tests TESTS_ENVIRONMENT += srcdir=$(top_srcdir)/tests builddir=$(top_builddir)/tests
EXTRA_DIST = \ EXTRA_DIST = \
CMakeLists.txt \ CMakeLists.txt \
etc/host \ etc/host \
etc/host.pub \ etc/host.pub \
etc/sshd_config \ etc/sshd_config \
etc/user \ etc/user \
etc/user.pub \ etc/user.pub \
key_dsa \ key_dsa \
key_dsa.pub \ key_dsa.pub \
key_dsa_wrong \ key_dsa_wrong \
key_dsa_wrong.pub \ key_dsa_wrong.pub \
key_ecdsa \ key_ecdsa \
key_ecdsa.pub \ key_ecdsa.pub \
signed_key_ecdsa \ signed_key_ecdsa \
signed_key_ecdsa.pub \ signed_key_ecdsa.pub \
signed_key_ecdsa-cert.pub \ signed_key_ecdsa-cert.pub \
signed_key_rsa \ signed_key_rsa \
signed_key_rsa-cert.pub \ signed_key_rsa-cert.pub \
signed_key_rsa.pub \ signed_key_rsa.pub \
key_ed25519 \ key_ed25519 \
key_ed25519.pub \ key_ed25519.pub \
key_ed25519_encrypted \ key_ed25519_encrypted \
key_ed25519_encrypted.pub \ key_ed25519_encrypted.pub \
key_rsa \ key_rsa \
key_rsa.pub \ key_rsa.pub \
key_rsa_encrypted \ key_rsa_encrypted \
key_rsa_encrypted.pub \ key_rsa_encrypted.pub \
key_rsa_openssh \ key_rsa_openssh \
key_rsa_openssh.pub \ key_rsa_openssh.pub \
libssh2_config_cmake.h.in \ libssh2_config_cmake.h.in \
mansyntax.sh \ mansyntax.sh \
openssh_server/Dockerfile \ openssh_server/Dockerfile \
openssh_server/authorized_keys \ openssh_server/authorized_keys \
openssh_server/ca_rsa \ openssh_server/ca_rsa \
openssh_server/ca_rsa.pub \ openssh_server/ca_rsa.pub \
openssh_server/ca_ecdsa \ openssh_server/ca_ecdsa \
openssh_server/ca_ecdsa.pub \ openssh_server/ca_ecdsa.pub \
openssh_server/ssh_host_ecdsa_key \ openssh_server/ssh_host_ecdsa_key \
openssh_server/ssh_host_ed25519_key \ openssh_server/ssh_host_ed25519_key \
openssh_server/ssh_host_rsa_key \ openssh_server/ssh_host_rsa_key \
simple.c \ simple.c \
sshdwrap \ sshdwrap \
ssh2.c \ ssh2.c \
ssh2.sh \ ssh2.sh \
sshd_fixture.sh.in \ sshd_fixture.sh.in \
test_read_3des-cbc \ test_read_3des-cbc \
test_read_aes128-cbc \ test_read_aes128-cbc \
test_read_aes128-ctr \ test_read_aes128-ctr \
test_read_aes192-cbc \ test_read_aes192-cbc \
test_read_aes192-ctr \ test_read_aes192-ctr \
test_read_aes256-cbc \ test_read_aes256-cbc \
test_read_aes256-ctr \ test_read_aes256-ctr \
test_read_hmac-md5 \ test_read_hmac-md5 \
test_read_hmac-md5-96 \ test_read_hmac-md5-96 \
test_read_hmac-sha1 \ test_read_hmac-sha1 \
test_read_hmac-sha1-96 \ test_read_hmac-sha1-96 \
test_read_hmac-sha2-256 \ test_read_hmac-sha2-256 \
test_read_hmac-sha2-512 \ test_read_hmac-sha2-512 \
test_read_rijndael-cbc test_read_rijndael-cbc

View File

@ -18,10 +18,10 @@ noinst_LIBRARIES =
if USE_OSSFUZZERS if USE_OSSFUZZERS
noinst_PROGRAMS += \ noinst_PROGRAMS += \
ssh2_client_fuzzer ssh2_client_fuzzer
noinst_LIBRARIES += \ noinst_LIBRARIES += \
libstandaloneengine.a libstandaloneengine.a
endif endif
ssh2_client_fuzzer_SOURCES = ssh2_client_fuzzer.cc testinput.h ssh2_client_fuzzer_SOURCES = ssh2_client_fuzzer.cc testinput.h

View File

@ -8,7 +8,7 @@
#define ssize_t SSIZE_T #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 */ typedef unsigned int socklen_t; /* missing in headers on VMS */
/* Have's */ /* Have's */
@ -30,7 +30,7 @@ typedef unsigned int socklen_t; /* missing in headers on VMS */
#define POSIX_C_SOURCE #define POSIX_C_SOURCE
/* Enable the possibility of using tracing */ /* Enable the possibility of using tracing */
#define LIBSSH2DEBUG 1 #define LIBSSH2DEBUG 1
/* For selection of proper block/unblock function in session.c */ /* 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 <stropts.h> #include <stropts.h>
/* In VMS TCP/IP Services and some BSD variants SO_STATE retrieves /* In VMS TCP/IP Services and some BSD variants SO_STATE retrieves
* a bitmask revealing amongst others the blocking state of the * a bitmask revealing amongst others the blocking state of the
* socket. On VMS the bits are undocumented, but SS_NBIO * socket. On VMS the bits are undocumented, but SS_NBIO
* works, I did not test the other bits. Below bitdefs are * works, I did not test the other bits. Below bitdefs are
* from Berkely source socketvar.h at * from Berkely source socketvar.h at
* http://ftp.fibranet.cat/UnixArchive/PDP-11/Trees/2.11BSD/sys/h/socketvar.h * http://ftp.fibranet.cat/UnixArchive/PDP-11/Trees/2.11BSD/sys/h/socketvar.h
* Socket state bits. * Socket state bits.
* #define SS_NOFDREF 0x001 no file table ref any more * #define SS_NOFDREF 0x001 no file table ref any more
* #define SS_ISCONNECTED 0x002 socket connected to a peer * #define SS_ISCONNECTED 0x002 socket connected to a peer
* #define SS_ISCONNECTING 0x004 in process of connecting to peer * #define SS_ISCONNECTING 0x004 in process of connecting to peer
* #define SS_ISDISCONNECTING 0x008 in process of disconnecting * #define SS_ISDISCONNECTING 0x008 in process of disconnecting
* #define SS_CANTSENDMORE 0x010 can't send more data to peer * #define SS_CANTSENDMORE 0x010 can't send more data to peer
* #define SS_CANTRCVMORE 0x020 can't receive more data from peer * #define SS_CANTRCVMORE 0x020 can't receive more data from peer
* #define SS_RCVATMARK 0x040 at mark on input * #define SS_RCVATMARK 0x040 at mark on input
* #define SS_PRIV 0x080 privileged for broadcast, raw... * #define SS_PRIV 0x080 privileged for broadcast, raw...
* #define SS_NBIO 0x100 non-blocking ops * #define SS_NBIO 0x100 non-blocking ops
* #define SS_ASYNC 0x200 async i/o notify * #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 * When running on Multinet, SO_STATE renders a protocol
* not started error. Functionally this has no impact, * not started error. Functionally this has no impact,
* apart from libssh2 not being able to restore the socket * 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 #endif
@ -82,4 +82,4 @@ typedef unsigned int socklen_t; /* missing in headers on VMS */
#define LIBSSH2_HAVE_ZLIB #define LIBSSH2_HAVE_ZLIB
#endif /* __VMS */ #endif /* __VMS */
#endif /* LIBSSH2_CONFIG_H */ #endif /* LIBSSH2_CONFIG_H */

View File

@ -8,9 +8,9 @@ $ if .not. init_status then goto YExit
$! $!
$ if what .eqs. "ALL" $ if what .eqs. "ALL"
$ then $ then
$ call MakeAll $ call MakeAll
$ else $ else
$ call Make $ call Make
$endif $endif
$! $!
$YExit: $YExit:
@ -19,7 +19,7 @@ $! deassign exadir
$! deassign objdir $! deassign objdir
$ delete 'link_opts';* $ delete 'link_opts';*
$ set default 'olddir' $ set default 'olddir'
$exit $exit
$MakeAll: subroutine $MakeAll: subroutine
$! $!
@ -45,14 +45,14 @@ $ set noon
$! $!
$ cc 'cc_include' 'cc_flags'/object=objdir:'what' exadir:'what' $ cc 'cc_include' 'cc_flags'/object=objdir:'what' exadir:'what'
$ sev = $severity $ sev = $severity
$ if sev .and. 2 $ if sev .and. 2
$ then $ then
$ say "Error compiling ''what', not linked." $ say "Error compiling ''what', not linked."
$ else $ else
$ if .not. (sev .and. 1) $ if .not. (sev .and. 1)
$ then $ then
$ say "Compile warnings in ''what'" $ say "Compile warnings in ''what'"
$ endif $ endif
$ link/exe='what'.exe objdir:'what'.obj, 'link_opts'/opt $ link/exe='what'.exe objdir:'what'.obj, 'link_opts'/opt
$ endif $ endif
$! $!
@ -60,15 +60,15 @@ $!
$End: $End:
$ delete objdir:'what'.obj;* $ delete objdir:'what'.obj;*
$exit $exit
$endsubroutine $endsubroutine
$Init: $Init:
$! $!
$! $!
$ init_status = 1 $ init_status = 1
$ thisid = f$integer( %x'f$getjpi(0,"pid")') + "''f$cvtime(,,"second")'" $ 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") $ mdir = mdir - f$parse(mdir,,,"name") - f$parse(mdir,,,"type") - f$parse(mdir,,,"version")
$ set default 'mdir' $ set default 'mdir'
$! $!
@ -78,7 +78,7 @@ $!
$ objdirfile = objdir - "[." - "]" + ".dir" $ objdirfile = objdir - "[." - "]" + ".dir"
$ if f$search( objdirfile ) .eqs. "" $ if f$search( objdirfile ) .eqs. ""
$ then $ then
$ create/directory 'objdir' $ create/directory 'objdir'
$ endif $ endif
$! $!
$ define objdir 'objdir' $ define objdir 'objdir'
@ -89,17 +89,17 @@ $ cc_flags = "/name=shortened/show=all/define=(_USE_STD_STAT=1)"
$ link_opts = "objdir:libssh2_''thisid'.opt" $ link_opts = "objdir:libssh2_''thisid'.opt"
$! $!
$! $!
$ what = "''p1'" $ what = "''p1'"
$ if what .eqs. "" .or. f$edit(p1,"trim,collapse,upcase") .eqs. "ALL" $ if what .eqs. "" .or. f$edit(p1,"trim,collapse,upcase") .eqs. "ALL"
$ then $ then
$ what = "ALL" $ what = "ALL"
$ else $ else
$ what = f$parse(what,,,"name") $ what = f$parse(what,,,"name")
$ if f$search("exadir:''what'.c") .eqs. "" $ if f$search("exadir:''what'.c") .eqs. ""
$ then $ then
$ write sys$output "Can't make ''what'" $ write sys$output "Can't make ''what'"
$ init_status = 0 $ init_status = 0
$ endif $ endif
$ endif $ endif
$! $!
$ currentlib = f$search("libssh2*.exe") $ currentlib = f$search("libssh2*.exe")
@ -107,19 +107,19 @@ $!
$ define libssh2 'currentlib' $ define libssh2 'currentlib'
$! $!
$ how = "''p2'" $ 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 $ then
$ open/write lout 'link_opts' $ open/write lout 'link_opts'
$ write lout "libssh2.olb/lib" $ write lout "libssh2.olb/lib"
$ write lout "sys$share:ssl$libcrypto_shr32.exe/share" $ write lout "sys$share:ssl$libcrypto_shr32.exe/share"
$ write lout "sys$share:ssl$libssl_shr32.exe/share" $ write lout "sys$share:ssl$libssl_shr32.exe/share"
$ write lout "gnv$libzshr/share" $ write lout "gnv$libzshr/share"
$ close lout $ close lout
$ else $ else
$ how = "SHARED" $ how = "SHARED"
$ open/write lout 'link_opts' $ open/write lout 'link_opts'
$ write lout "libssh2/share" $ write lout "libssh2/share"
$ close lout $ close lout
$ endif $ endif
$! $!
$return $return

Some files were not shown because too many files have changed in this diff Show More