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
*~
.DS_Store
build
build

View File

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

View File

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

View File

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

View File

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,17 +4,17 @@ libssh2_channel_close - close a channel
.SH SYNOPSIS
#include <libssh2.h>
int
int
libssh2_channel_close(LIBSSH2_CHANNEL *channel);
.SH DESCRIPTION
\fIchannel\fP - active channel stream to set closed status on.
Close an active data channel. In practice this means sending an SSH_MSG_CLOSE
packet to the remote host which serves as instruction that no further data
will be sent to it. The remote host may still send data back until it sends
its own close message in response. To wait for the remote end to close its
connection as well, follow this command with
Close an active data channel. In practice this means sending an SSH_MSG_CLOSE
packet to the remote host which serves as instruction that no further data
will be sent to it. The remote host may still send data back until it sends
its own close message in response. To wait for the remote end to close its
connection as well, follow this command with
.BR libssh2_channel_wait_closed(3)
.SH RETURN VALUE

View File

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

View File

@ -4,7 +4,7 @@ libssh2_channel_eof - check a channel's EOF status
.SH SYNOPSIS
#include <libssh2.h>
int
int
libssh2_channel_eof(LIBSSH2_CHANNEL *channel);
.SH DESCRIPTION
\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
#include <libssh2.h>
int
int
libssh2_channel_flush_ex(LIBSSH2_CHANNEL *channel, int streamid);
int
int
libssh2_channel_flush(LIBSSH2_CHANNEL *channel);
int
int
libssh2_channel_flush_stderr(LIBSSH2_CHANNEL *channel);
.SH DESCRIPTION
\fIchannel\fP - Active channel stream to flush.
\fIstreamid\fP - Specific substream number to flush. Groups of substreams may
\fIstreamid\fP - Specific substream number to flush. Groups of substreams may
be flushed by passing on of the following Constants.
.br
\fBLIBSSH2_CHANNEL_FLUSH_EXTENDED_DATA\fP: Flush all extended data substreams
.br
\fBLIBSSH2_CHANNEL_FLUSH_ALL\fP: Flush all substreams
Flush the read buffer for a given channel instance. Individual substreams may
Flush the read buffer for a given channel instance. Individual substreams may
be flushed by number or using one of the provided macros.
.SH RETURN VALUE

View File

@ -4,11 +4,11 @@ libssh2_channel_forward_cancel - cancel a forwarded TCP port
.SH SYNOPSIS
#include <libssh2.h>
int
int
libssh2_channel_forward_cancel(LIBSSH2_LISTENER *listener);
.SH DESCRIPTION
\fIlistener\fP - Forwarding listener instance as returned by
\fIlistener\fP - Forwarding listener instance as returned by
.BR libssh2_channel_forward_listen_ex(3)
Instruct the remote host to stop listening for new connections on a previously requested host/port.

View File

@ -4,10 +4,10 @@ libssh2_channel_forward_listen_ex - listen to inbound connections
.SH SYNOPSIS
#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_LISTENER *
LIBSSH2_LISTENER *
libssh2_channel_forward_listen(LIBSSH2_SESSION *session, int port);
.SH DESCRIPTION
@ -15,7 +15,7 @@ Instruct the remote SSH server to begin listening for inbound TCP/IP
connections. New connections will be queued by the library until accepted by
\fIlibssh2_channel_forward_accept(3)\fP.
\fIsession\fP - instance as returned by libssh2_session_init().
\fIsession\fP - instance as returned by libssh2_session_init().
\fIhost\fP - specific address to bind to on the remote host. Binding to
0.0.0.0 (default when NULL is passed) will bind to all available addresses.

View File

@ -4,16 +4,16 @@ libssh2_channel_free - free all resources associated with a channel
.SH SYNOPSIS
#include <libssh2.h>
int
int
libssh2_channel_free(LIBSSH2_CHANNEL *channel);
.SH DESCRIPTION
\fIchannel\fP - Channel stream to free.
Release all resources associated with a channel stream. If the channel has
not yet been closed with
Release all resources associated with a channel stream. If the channel has
not yet been closed with
.BR libssh2_channel_close(3)
, it will be called automatically so that the remote end may know that it
, it will be called automatically so that the remote end may know that it
can safely free its own resources.
.SH RETURN VALUE

View File

@ -4,7 +4,7 @@ libssh2_channel_get_exit_signal - get the remote exit signal
.SH SYNOPSIS
#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);
.SH DESCRIPTION
@ -13,10 +13,10 @@ libssh2_channel_get_exit_signal(LIBSSH2_CHANNEL *channel, char **exitsignal, siz
\fIexitsignal\fP - If not NULL, is populated by reference with the exit signal
(without leading "SIG"). Note that the string is stored in a newly allocated
buffer. If the remote program exited cleanly, the referenced string pointer
will be set to NULL.
will be set to NULL.
\fIexitsignal_len\fP - If not NULL, is populated by reference with the length
of exitsignal.
of exitsignal.
\fIerrmsg\fP - If not NULL, is populated by reference with the error message
(if provided by remote server, if not it will be set to NULL). Note that the
@ -24,7 +24,7 @@ string is stored in a newly allocated buffer.
\fIerrmsg_len\fP - If not NULL, is populated by reference with the length of errmsg.
\fIlangtag\fP - If not NULL, is populated by reference with the language tag
\fIlangtag\fP - If not NULL, is populated by reference with the language tag
(if provided by remote server, if not it will be set to NULL). Note that the
string is stored in a newly allocated buffer.

View File

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

View File

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

View File

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

View File

@ -11,29 +11,29 @@ LIBSSH2_CHANNEL *
libssh2_channel_open_session(session);
.SH DESCRIPTION
\fIsession\fP - Session instance as returned by
\fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3)
\fIchannel_type\fP - Channel type to open. Typically one of session,
direct-tcpip, or tcpip-forward. The SSH2 protocol allowed for additional
\fIchannel_type\fP - Channel type to open. Typically one of session,
direct-tcpip, or tcpip-forward. The SSH2 protocol allowed for additional
types including local, custom channel types.
\fIchannel_type_len\fP - Length of channel_type
\fIwindow_size\fP - Maximum amount of unacknowledged data remote host is
\fIwindow_size\fP - Maximum amount of unacknowledged data remote host is
allowed to send before receiving an SSH_MSG_CHANNEL_WINDOW_ADJUST packet.
\fIpacket_size\fP - Maximum number of bytes remote host is allowed to send
\fIpacket_size\fP - Maximum number of bytes remote host is allowed to send
in a single SSH_MSG_CHANNEL_DATA or SSG_MSG_CHANNEL_EXTENDED_DATA packet.
\fImessage\fP - Additional data as required by the selected channel_type.
\fImessage_len\fP - Length of message parameter.
Allocate a new channel for exchanging data with the server. This method is
typically called through its macroized form:
Allocate a new channel for exchanging data with the server. This method is
typically called through its macroized form:
.BR libssh2_channel_open_session(3)
or via
or via
.BR libssh2_channel_direct_tcpip(3)
or
.BR libssh2_channel_forward_listen(3)
@ -46,7 +46,7 @@ Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_CHANNEL_FAILURE\fP -
\fILIBSSH2_ERROR_CHANNEL_FAILURE\fP -
\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block.

View File

@ -13,7 +13,7 @@ int libssh2_channel_process_startup(LIBSSH2_CHANNEL *channel,
.SH DESCRIPTION
\fIchannel\fP - Active session channel instance.
\fIrequest\fP - Type of process to startup. The SSH2 protocol currently
\fIrequest\fP - Type of process to startup. The SSH2 protocol currently
defines shell, exec, and subsystem as standard process services.
\fIrequest_len\fP - Length of request parameter.
@ -22,7 +22,7 @@ defines shell, exec, and subsystem as standard process services.
\fImessage_len\fP - Length of message parameter.
Initiate a request on a session type channel such as returned by
Initiate a request on a session type channel such as returned by
.BR libssh2_channel_open_ex(3)
.SH RETURN VALUE
Return 0 on success or negative on failure. It returns
@ -33,6 +33,6 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP -
\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP -
.SH SEE ALSO
.BR libssh2_channel_open_ex(3)

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
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

View File

@ -4,14 +4,14 @@ libssh2_channel_request_pty_ex - short function description
.SH SYNOPSIS
#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);
int
int
libssh2_channel_request_pty(LIBSSH2_CHANNEL *channel, char *term);
.SH DESCRIPTION
\fIchannel\fP - Previously opened channel instance such as returned by
\fIchannel\fP - Previously opened channel instance such as returned by
.BR libssh2_channel_open_ex(3)
\fIterm\fP - Terminal emulation (e.g. vt102, ansi, etc...)
@ -30,8 +30,8 @@ libssh2_channel_request_pty(LIBSSH2_CHANNEL *channel, char *term);
\fIheight_px\fP - Height of pty in pixels
Request a PTY on an established channel. Note that this does not make sense
for all channel types and may be ignored by the server despite returning
Request a PTY on an established channel. Note that this does not make sense
for all channel types and may be ignored by the server despite returning
success.
.SH RETURN VALUE
Return 0 on success or negative on failure. It returns
@ -42,6 +42,6 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP -
\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP -
.SH SEE ALSO
.BR libssh2_channel_open_ex(3)

View File

@ -4,11 +4,11 @@ libssh2_channel_send_eof - send EOF to remote server
.SH SYNOPSIS
#include <libssh2.h>
int
int
libssh2_channel_send_eof(LIBSSH2_CHANNEL *channel);
.SH DESCRIPTION
Tell the remote host that no further data will be sent on the specified
Tell the remote host that no further data will be sent on the specified
channel. Processes typically interpret this as a closed stdin descriptor.
.SH RETURN VALUE

View File

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

View File

@ -11,10 +11,10 @@ int
libssh2_channel_setenv(LIBSSH2_CHANNEL *channel, char *varname, const char *value);
.SH DESCRIPTION
\fIchannel\fP - Previously opened channel instance such as returned by
\fIchannel\fP - Previously opened channel instance such as returned by
.BR libssh2_channel_open_ex(3)
\fIvarname\fP - Name of environment variable to set on the remote
\fIvarname\fP - Name of environment variable to set on the remote
channel instance.
\fIvarname_len\fP - Length of passed varname parameter.
@ -36,6 +36,6 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP -
\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP -
.SH SEE ALSO
.BR libssh2_channel_open_ex(3)

View File

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

View File

@ -4,7 +4,7 @@ libssh2_channel_wait_eof - wait for the remote to reply to an EOF request
.SH SYNOPSIS
#include <libssh2.h>
int
int
libssh2_channel_wait_eof(LIBSSH2_CHANNEL *channel);
.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
defines a stream ID of 1 to be the stderr substream.
\fIchannel\fP - active channel stream to write to.
\fIchannel\fP - active channel stream to write to.
\fIstream_id\fP - substream ID number (e.g. 0 or SSH_EXTENDED_DATA_STDERR)
\fIstream_id\fP - substream ID number (e.g. 0 or SSH_EXTENDED_DATA_STDERR)
\fIbuf\fP - pointer to buffer to write
@ -43,8 +43,8 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
\fILIBSSH2_ERROR_CHANNEL_EOF_SENT\fP - The channel has been requested to be
\fILIBSSH2_ERROR_BAD_USE\fP - This can be returned if you ignored a previous
return for LIBSSH2_ERROR_EAGAIN and rather than sending the original buffer with
the original size, you sent a new buffer with a different size.
return for LIBSSH2_ERROR_EAGAIN and rather than sending the original buffer with
the original size, you sent a new buffer with a different size.
closed.
.SH SEE ALSO

View File

@ -11,7 +11,7 @@ int
libssh2_channel_x11_req(LIBSSH2_CHANNEL *channel, int screen_number);
.SH DESCRIPTION
\fIchannel\fP - Previously opened channel instance such as returned by
\fIchannel\fP - Previously opened channel instance such as returned by
.BR libssh2_channel_open_ex(3)
\fIsingle_connection\fP - non-zero to only forward a single connection.
@ -22,7 +22,7 @@ libssh2_channel_x11_req(LIBSSH2_CHANNEL *channel, int screen_number);
\fIscreen_number\fP - the XLL screen to forward
Request an X11 forwarding on \fIchannel\fP. To use X11 forwarding,
Request an X11 forwarding on \fIchannel\fP. To use X11 forwarding,
.BR libssh2_session_callback_set(3)
must first be called to set \fBLIBSSH2_CALLBACK_X11\fP. This callback will be
invoked when the remote host accepts the X11 forwarding.
@ -37,7 +37,7 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP -
\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP -
.SH SEE ALSO
.BR libssh2_channel_open_ex(3)

View File

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

View File

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

View File

@ -26,4 +26,3 @@ Added in libssh2 1.2
.SH SEE ALSO
.BR libssh2_knownhost_readfile(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_readline(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>
int libssh2_publickey_add(LIBSSH2_PUBLICKEY *pkey,
const unsigned char *name,
const unsigned char *name,
const unsigned char *blob, unsigned long blob_len, char overwrite,
unsigned long num_attrs, const libssh2_publickey_attribute attrs[]);

View File

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

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
instead!
\fIsession\fP - Session instance as returned by
\fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3)
\fIpath\fP - Full path and filename of file to transfer. That is the remote
@ -25,11 +25,10 @@ Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors.
.SH ERRORS
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
\fILIBSSH2_ERROR_SCP_PROTOCOL\fP -
\fILIBSSH2_ERROR_SCP_PROTOCOL\fP -
\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would
block.
.SH SEE ALSO
.BR libssh2_session_init_ex(3)
.BR libssh2_channel_open_ex(3)

View File

@ -8,7 +8,7 @@ LIBSSH2_CHANNEL *
libssh2_scp_recv2(LIBSSH2_SESSION *session, const char *path, struct_stat *sb);
.SH DESCRIPTION
\fIsession\fP - Session instance as returned by
\fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3)
\fIpath\fP - Full path and filename of file to transfer. That is the remote
@ -22,11 +22,10 @@ Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors.
.SH ERRORS
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
\fILIBSSH2_ERROR_SCP_PROTOCOL\fP -
\fILIBSSH2_ERROR_SCP_PROTOCOL\fP -
\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would
block.
.SH SEE ALSO
.BR libssh2_session_init_ex(3)
.BR libssh2_channel_open_ex(3)

View File

@ -9,7 +9,7 @@ LIBSSH2_CHANNEL *
libssh2_scp_send64(LIBSSH2_SESSION *session, const char *path, int mode,
libssh2_uint64_t size, time_t mtime, time_t atime);
.SH DESCRIPTION
\fIsession\fP - Session instance as returned by
\fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3)
\fIpath\fP - Full path and filename of file to transfer to. That is the remote
@ -24,7 +24,7 @@ compilers.
\fImtime\fP - mtime to assign to file being created
\fIatime\fP - atime to assign to file being created (Set this and
\fIatime\fP - atime to assign to file being created (Set this and
mtime to zero to instruct remote host to use current time).
Send a file to the remote host via SCP.
@ -36,7 +36,7 @@ Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_SCP_PROTOCOL\fP -
\fILIBSSH2_ERROR_SCP_PROTOCOL\fP -
\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would
block.

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
\fIlibssh2_scp_send64(3)\fP.
\fIsession\fP - Session instance as returned by
\fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3)
\fIpath\fP - Full path and filename of file to transfer to. That is the remote
@ -20,12 +20,12 @@ file name.
\fImode\fP - File access mode to create file with
\fIsize\fP - Size of file being transmitted (Must be known
\fIsize\fP - Size of file being transmitted (Must be known
ahead of time precisely)
\fImtime\fP - mtime to assign to file being created
\fIatime\fP - atime to assign to file being created (Set this and
\fIatime\fP - atime to assign to file being created (Set this and
mtime to zero to instruct remote host to use current time).
Send a file to the remote host via SCP.
@ -37,7 +37,7 @@ Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_SCP_PROTOCOL\fP -
\fILIBSSH2_ERROR_SCP_PROTOCOL\fP -
\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would
block.

View File

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

View File

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

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
Transport layer. To disable a callback, set it to NULL.
\fIsession\fP - Session instance as returned by
\fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3)
\fIcbtype\fP - Callback type. One of the types listed in Callback Types.
\fIcallback\fP - Pointer to custom callback function. The prototype for
\fIcallback\fP - Pointer to custom callback function. The prototype for
this function must match the associated callback declaration macro.
.SH CALLBACK TYPES
.IP LIBSSH2_CALLBACK_IGNORE

View File

@ -4,14 +4,14 @@ libssh2_session_disconnect_ex - terminate transport layer
.SH SYNOPSIS
#include <libssh2.h>
int
int
libssh2_session_disconnect_ex(LIBSSH2_SESSION *session, int reason, const char *description, const char *lang);
int
int
libssh2_session_disconnect(LIBSSH2_SESSION *session, const char *description);
.SH DESCRIPTION
\fIsession\fP - Session instance as returned by
\fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3)
\fIreason\fP - One of the Disconnect Reason constants.
@ -20,14 +20,14 @@ libssh2_session_disconnect(LIBSSH2_SESSION *session, const char *description);
\fIlang\fP - Localization string describing the language/encoding of the description provided.
Send a disconnect message to the remote host associated with \fIsession\fP,
Send a disconnect message to the remote host associated with \fIsession\fP,
along with a \fIreason\fP symbol and a verbose \fIdescription\fP.
As a convenience, the macro
As a convenience, the macro
.BR libssh2_session_disconnect(3)
is provided. It calls
.BR libssh2_session_disconnect_ex(3)
with \fIreason\fP set to SSH_DISCONNECT_BY_APPLICATION
with \fIreason\fP set to SSH_DISCONNECT_BY_APPLICATION
and \fIlang\fP set to an empty string.
.SH RETURN VALUE

View File

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

View File

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

View File

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

View File

@ -4,21 +4,21 @@ libssh2_session_method_pref - set preferred key exchange method
.SH SYNOPSIS
#include <libssh2.h>
int
int
libssh2_session_method_pref(LIBSSH2_SESSION *session, int method_type, const char *prefs);
.SH DESCRIPTION
\fIsession\fP - Session instance as returned by
\fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3)
\fImethod_type\fP - One of the Method Type constants.
\fIprefs\fP - Coma delimited list of preferred methods to use with
the most preferred listed first and the least preferred listed last.
If a method is listed which is not supported by libssh2 it will be
\fIprefs\fP - Coma delimited list of preferred methods to use with
the most preferred listed first and the least preferred listed last.
If a method is listed which is not supported by libssh2 it will be
ignored and not sent to the remote host during protocol negotiation.
Set preferred methods to be negotiated. These
Set preferred methods to be negotiated. These
preferences must be set prior to calling
.BR libssh2_session_handshake(3)
as they are used during the protocol initiation phase.

View File

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

View File

@ -4,17 +4,17 @@ libssh2_session_startup - begin transport layer
.SH SYNOPSIS
#include <libssh2.h>
int
int
libssh2_session_startup(LIBSSH2_SESSION *session, int socket);
.SH DESCRIPTION
Starting in libssh2 version 1.2.8 this function is considered deprecated. Use
\fIlibssh2_session_handshake(3)\fP instead.
\fIsession\fP - Session instance as returned by
\fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3)
\fIsocket\fP - Connected socket descriptor. Typically a TCP connection
though the protocol allows for any reliable transport and the library will
\fIsocket\fP - Connected socket descriptor. Typically a TCP connection
though the protocol allows for any reliable transport and the library will
attempt to use any berkeley socket.
Begin transport layer protocol negotiation with the connected host.
@ -25,14 +25,14 @@ Returns 0 on success, negative on failure.
\fILIBSSH2_ERROR_BANNER_SEND\fP - Unable to send banner to remote host.
\fILIBSSH2_ERROR_KEX_FAILURE\fP - >Encryption key exchange with the remote
\fILIBSSH2_ERROR_KEX_FAILURE\fP - >Encryption key exchange with the remote
host failed.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_SOCKET_DISCONNECT\fP - The socket was disconnected.
\fILIBSSH2_ERROR_PROTO\fP - An invalid SSH protocol response was received on
\fILIBSSH2_ERROR_PROTO\fP - An invalid SSH protocol response was received on
the socket.
\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block.

View File

@ -5,13 +5,13 @@ libssh2_sftp_close_handle - close filehandle
#include <libssh2.h>
#include <libssh2_sftp.h>
int
int
libssh2_sftp_close_handle(LIBSSH2_SFTP_HANDLE *handle);
int
int
libssh2_sftp_close(LIBSSH2_SFTP_HANDLE *handle);
int
int
libssh2_sftp_closedir(LIBSSH2_SFTP_HANDLE *handle);
.SH DESCRIPTION
@ -33,10 +33,10 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to
be returned by the server.
.SH SEE ALSO

View File

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

View File

@ -9,7 +9,7 @@ LIBSSH2_SFTP *
libssh2_sftp_init(LIBSSH2_SESSION *session);
.SH DESCRIPTION
\fIsession\fP - Session instance as returned by
\fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3)
Open a channel and initialize the SFTP subsystem. Although the SFTP subsystem
@ -26,10 +26,10 @@ A pointer to the newly allocated SFTP instance or NULL on failure.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to be
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to be
returned by the server.
\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would

View File

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

View File

@ -5,16 +5,16 @@ libssh2_sftp_mkdir_ex - create a directory on the remote file system
#include <libssh2.h>
#include <libssh2_sftp.h>
int
int
libssh2_sftp_mkdir_ex(LIBSSH2_SFTP *sftp, const char *path, unsigned int path_len, long mode);
int
int
libssh2_sftp_mkdir(LIBSSH2_SFTP *sftp, const char *path, long mode);
.SH DESCRIPTION
\fIsftp\fP - SFTP instance as returned by
\fIsftp\fP - SFTP instance as returned by
.BR libssh2_sftp_init(3)
\fIpath\fP - full path of the new directory to create. Note that the new
\fIpath\fP - full path of the new directory to create. Note that the new
directory's parents must all exist prior to making this call.
\fIpath_len\fP - length of the full path of the new directory to create.
@ -31,10 +31,10 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to be
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to be
returned by the server.
.SH SEE ALSO
.BR libssh2_sftp_open_ex(3)

View File

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

View File

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

View File

@ -6,7 +6,7 @@ libssh2_sftp_readdir_ex - read directory data from an SFTP handle
#include <libssh2.h>
#include <libssh2_sftp.h>
int
int
libssh2_sftp_readdir_ex(LIBSSH2_SFTP_HANDLE *handle,
char *buffer, size_t buffer_maxlen,
char *longentry, size_t longentry_maxlen,
@ -15,14 +15,14 @@ libssh2_sftp_readdir_ex(LIBSSH2_SFTP_HANDLE *handle,
Reads a block of data from a LIBSSH2_SFTP_HANDLE and returns file entry
information for the next entry, if any.
\fIhandle\fP - is the SFTP File Handle as returned by
\fIhandle\fP - is the SFTP File Handle as returned by
.BR libssh2_sftp_open_ex(3)
\fIbuffer\fP - is a pointer to a pre-allocated buffer of at least
\fIbuffer_maxlen\fP bytes to read data into.
\fIbuffer_maxlen\fP - is the length of buffer in bytes. If the length of the
filename is longer than the space provided by buffer_maxlen it will be
\fIbuffer_maxlen\fP - is the length of buffer in bytes. If the length of the
filename is longer than the space provided by buffer_maxlen it will be
truncated to fit.
\fIlongentry\fP - is a pointer to a pre-allocated buffer of at least
@ -35,7 +35,7 @@ a directory listing command is to simply display this data).
the full directory entry is longer than the space provided by
\fIlongentry_maxlen\fP it will be truncated to fit.
\fIattrs\fP - is a pointer to LIBSSH2_SFTP_ATTRIBUTES storage to populate
\fIattrs\fP - is a pointer to LIBSSH2_SFTP_ATTRIBUTES storage to populate
statbuf style data into.
.SH RETURN VALUE
Number of bytes actually populated into buffer (not counting the terminating
@ -51,10 +51,10 @@ and it is not possible for the application to tell when it happens!
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to be
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to be
returned by the server.
From 1.2.8, LIBSSH2_ERROR_BUFFER_TOO_SMALL is returned if any of the

View File

@ -5,35 +5,35 @@ libssh2_sftp_rename_ex - rename an SFTP file
#include <libssh2.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);
int
int
libssh2_sftp_rename_ex(LIBSSH2_SFTP *sftp, const char *source_filename, const char *dest_filename);
.SH DESCRIPTION
\fIsftp\fP - SFTP instance as returned by
\fIsftp\fP - SFTP instance as returned by
.BR libssh2_sftp_init(3)
\fIsourcefile\fP - Path and name of the existing filesystem entry
\fIsourcefile_len\fP - Length of the path and name of the existing
\fIsourcefile_len\fP - Length of the path and name of the existing
filesystem entry
\fIdestfile\fP - Path and name of the target filesystem entry
\fIdestfile_len\fP - Length of the path and name of the target
\fIdestfile_len\fP - Length of the path and name of the target
filesystem entry
\fIflags\fP -
\fIflags\fP -
Bitmask flags made up of LIBSSH2_SFTP_RENAME_* constants.
Rename a filesystem object on the remote filesystem. The semantics of
this command typically include the ability to move a filesystem object
between folders and/or filesystem mounts. If the LIBSSH2_SFTP_RENAME_OVERWRITE
flag is not set and the destfile entry already exists, the operation
will fail. Use of the other two flags indicate a preference (but not a
requirement) for the remote end to perform an atomic rename operation
Rename a filesystem object on the remote filesystem. The semantics of
this command typically include the ability to move a filesystem object
between folders and/or filesystem mounts. If the LIBSSH2_SFTP_RENAME_OVERWRITE
flag is not set and the destfile entry already exists, the operation
will fail. Use of the other two flags indicate a preference (but not a
requirement) for the remote end to perform an atomic rename operation
and/or using native system calls when possible.
.SH RETURN VALUE
@ -46,10 +46,10 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to
be returned by the server.
.SH SEE ALSO

View File

@ -11,7 +11,7 @@ int libssh2_sftp_rmdir_ex(LIBSSH2_SFTP *sftp, const char *path,
.SH DESCRIPTION
Remove a directory from the remote file system.
\fIsftp\fP - SFTP instance as returned by
\fIsftp\fP - SFTP instance as returned by
.BR libssh2_sftp_init(3)
\fIsourcefile\fP - Full path of the existing directory to remove.
@ -27,10 +27,10 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to
be returned by the server.
.SH SEE ALSO
.BR libssh2_sftp_init(3)

View File

@ -10,15 +10,15 @@ void libssh2_sftp_seek(LIBSSH2_SFTP_HANDLE *handle, size_t offset);
.SH DESCRIPTION
Deprecated function. Use \fIlibssh2_sftp_seek64(3)\fP instead!
\fIhandle\fP - SFTP File Handle as returned by
\fIhandle\fP - SFTP File Handle as returned by
.BR libssh2_sftp_open_ex(3)
\fIoffset\fP - Number of bytes from the beginning of file to seek to.
Move the file handle's internal pointer to an arbitrary location.
Note that libssh2 implements file pointers as a localized concept to make
file access appear more POSIX like. No packets are exchanged with the server
during a seek operation. The localized file pointer is simply used as a
Move the file handle's internal pointer to an arbitrary location.
Note that libssh2 implements file pointers as a localized concept to make
file access appear more POSIX like. No packets are exchanged with the server
during a seek operation. The localized file pointer is simply used as a
convenience offset during read/write operations.
.SH SEE ALSO
.BR libssh2_sftp_open_ex(3),

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,
libssh2_uint64_t offset);
.SH DESCRIPTION
\fIhandle\fP - SFTP File Handle as returned by
\fIhandle\fP - SFTP File Handle as returned by
.BR libssh2_sftp_open_ex(3)
\fIoffset\fP - Number of bytes from the beginning of file to seek to.

View File

@ -5,14 +5,14 @@ libssh2_sftp_shutdown - shut down an SFTP session
#include <libssh2.h>
#include <libssh2_sftp.h>
int
int
libssh2_sftp_shutdown(LIBSSH2_SFTP *sftp);
.SH DESCRIPTION
\fIsftp\fP - SFTP instance as returned by
\fIsftp\fP - SFTP instance as returned by
.BR libssh2_sftp_init(3)
Destroys a previously initialized SFTP session and frees all resources
Destroys a previously initialized SFTP session and frees all resources
associated with it.
.SH RETURN VALUE

View File

@ -10,15 +10,15 @@ int libssh2_sftp_stat_ex(LIBSSH2_SFTP *sftp, const char *path,
unsigned int path_len, int stat_type,
LIBSSH2_SFTP_ATTRIBUTES *attrs);
.SH DESCRIPTION
\fIsftp\fP - SFTP instance as returned by
\fIsftp\fP - SFTP instance as returned by
.BR libssh2_sftp_init(3)
\fIpath\fP - Remote filesystem object to stat/lstat/setstat.
\fIpath_len\fP - Length of the name of the remote filesystem object
\fIpath_len\fP - Length of the name of the remote filesystem object
to stat/lstat/setstat.
\fIstat_type\fP - One of the three constants specifying the type of
\fIstat_type\fP - One of the three constants specifying the type of
stat operation to perform:
.br
@ -34,9 +34,9 @@ metadata from or into depending on the value of stat_type.
Get or Set statbuf type data on a remote filesystem object. When getting
statbuf data,
.BR libssh2_sftp_stat(3)
will follow all symlinks, while
will follow all symlinks, while
.BR libssh2_sftp_lstat(3)
will return data about the object encountered, even if that object
will return data about the object encountered, even if that object
happens to be a symlink.
The LIBSSH2_SFTP_ATTRIBUTES struct looks like this:
@ -65,10 +65,10 @@ number, it isn't really a failure per se.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to
be returned by the server.
.SH SEE ALSO
.BR libssh2_sftp_init(3)

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_TIMEOUT\fP -
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to be returned

View File

@ -6,19 +6,19 @@ libssh2_sftp_symlink_ex - read or set a symbolic link
#include <libssh2.h>
#include <libssh2_sftp.h>
int
int
libssh2_sftp_symlink_ex(LIBSSH2_SFTP *sftp, const char *path,
unsigned int path_len, char *target,
unsigned int target_len, int link_type);
.SH DESCRIPTION
Create a symlink or read out symlink information from the remote side.
\fIsftp\fP - SFTP instance as returned by
\fIsftp\fP - SFTP instance as returned by
.BR libssh2_sftp_init(3)
\fIpath\fP - Remote filesystem object to create a symlink from or resolve.
\fIpath_len\fP - Length of the name of the remote filesystem object to
\fIpath_len\fP - Length of the name of the remote filesystem object to
create a symlink from or resolve.
\fItarget\fP - a pointer to a buffer. The buffer has different uses depending
@ -34,7 +34,7 @@ into.
\fItarget_len\fP - Length of the name of the remote filesystem target object.
\fIlink_type\fP - One of the three previously mentioned constants which
\fIlink_type\fP - One of the three previously mentioned constants which
determines the resulting behavior of this function.
These are convenience macros:
@ -69,10 +69,10 @@ for the application to tell when it happens!
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to
be returned by the server.
.SH SEE ALSO

View File

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

View File

@ -5,19 +5,19 @@ libssh2_sftp_unlink_ex - unlink an SFTP file
#include <libssh2.h>
#include <libssh2_sftp.h>
int
int
libssh2_sftp_unlink_ex(LIBSSH2_SFTP *sftp, const char *filename, unsigned int filename_len);
int
int
libssh2_sftp_unlink(LIBSSH2_SFTP *sftp, const char *filename);
.SH DESCRIPTION
\fIsftp\fP - SFTP instance as returned by
\fIsftp\fP - SFTP instance as returned by
.BR libssh2_sftp_init(3)
\fIfilename\fP - Path and name of the existing filesystem entry
\fIfilename_len\fP - Length of the path and name of the existing
\fIfilename_len\fP - Length of the path and name of the existing
filesystem entry
Unlink (delete) a file from the remote filesystem.
@ -32,10 +32,10 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
\fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to
be returned by the server.
.SH SEE ALSO

View File

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

View File

@ -22,10 +22,10 @@ typedef struct _LIBSSH2_PRIVKEY_SK {
} LIBSSH2_PRIVKEY_SK;
.SH DESCRIPTION
\fIsession\fP - Session instance as returned by
\fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3)
\fIsig\fP - A pointer to a buffer in which to place the signature. The caller
\fIsig\fP - A pointer to a buffer in which to place the signature. The caller
is responsible for freeing the signature with LIBSSH2_FREE.
\fIsig_len\fP - A pointer to the length of the sig parameter.
@ -34,48 +34,48 @@ is responsible for freeing the signature with LIBSSH2_FREE.
\fIdata_len\fP - The length of the data parameter.
\fIabstract\fP - A pointer to a pointer to a LIBSSH2_PRIVKEY_SK. See
\fIabstract\fP - A pointer to a pointer to a LIBSSH2_PRIVKEY_SK. See
description below.
Create a signature from a FIDO2 authenticator, using either the
sk-ssh-ed25519@openssh.com or sk-ecdsa-sha2-nistp256@openssh.com key
Create a signature from a FIDO2 authenticator, using either the
sk-ssh-ed25519@openssh.com or sk-ecdsa-sha2-nistp256@openssh.com key
exchange algorithms.
The abstract parameter is a pointer to a pointer due to the internal workings
of libssh2. The LIBSSH2_PRIVKEY_SK must be completely filled out, and the
The abstract parameter is a pointer to a pointer due to the internal workings
of libssh2. The LIBSSH2_PRIVKEY_SK must be completely filled out, and the
caller is responsible for all memory management of its fields.
\fIalgorithm\fP - The signing algorithm to use. Possible values are
\fIalgorithm\fP - The signing algorithm to use. Possible values are
LIBSSH2_HOSTKEY_TYPE_ED25519 and LIBSSH2_HOSTKEY_TYPE_ECDSA_256.
\fIflags\fP - A bitmask specifying options for the authenticator. When
\fIflags\fP - A bitmask specifying options for the authenticator. When
LIBSSH2_SK_PRESENCE_REQUIRED is set, the authenticator requires a touch. When
LIBSSH2_SK_VERIFICATION_REQUIRED is set, the authenticator requires a PIN.
Many servers and authenticators do not work properly when
LIBSSH2_SK_VERIFICATION_REQUIRED is set, the authenticator requires a PIN.
Many servers and authenticators do not work properly when
LIBSSH2_SK_PRESENCE_REQUIRED is not set.
\fIapplication\fP - A user-defined string to use as the RP name for the
\fIapplication\fP - A user-defined string to use as the RP name for the
authenticator. Usually "ssh:".
\fIkey_handle\fP - The key handle to use for the authenticator's allow list.
\fIhandle_len\fP - The length of the key_handle parameter.
\fIabstract\fP - User-defined data. When a PIN is required, use this to pass in
\fIabstract\fP - User-defined data. When a PIN is required, use this to pass in
the PIN, or a function pointer to retrieve the PIN.
\fIkey_handle\fP The decoded key handle from the private key file.
\fIhandle_len\fP The length of the key_handle parameter.
\fIsign_callback\fP - Responsible for communicating with the hardware
\fIsign_callback\fP - Responsible for communicating with the hardware
authenticator to generate a signature. On success, the signature information
must be placed in the `\fIsig_info\fP sig_info parameter and the callback must
must be placed in the `\fIsig_info\fP sig_info parameter and the callback must
return 0. On failure, it should return a negative number. See
.BR libssh2_userauth_publickey_sk(3)
for more information.
\fIorig_abstract\fP - User-defined data. When a PIN is required, use this to
\fIorig_abstract\fP - User-defined data. When a PIN is required, use this to
pass in the PIN, or a function pointer to retrieve the PIN.
.SH RETURN VALUE

View File

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

View File

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

View File

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

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

View File

@ -28,15 +28,15 @@ typedef struct _LIBSSH2_SK_SIG_INFO {
size_t sig_s_len;
} LIBSSH2_SK_SIG_INFO;
int name(LIBSSH2_SESSION *session, LIBSSH2_SK_SIG_INFO *sig_info,
int name(LIBSSH2_SESSION *session, LIBSSH2_SK_SIG_INFO *sig_info,
const unsigned char *data, size_t data_len, int algorithm,
uint8_t flags, const char *application,
const unsigned char *key_handle, size_t handle_len,
const unsigned char *key_handle, size_t handle_len,
void **abstract);
.fi
.SH DESCRIPTION
\fIsession\fP - Session instance as returned by
\fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3)
\fIusername\fP - Name of user to attempt authentication for.
@ -53,49 +53,49 @@ int name(LIBSSH2_SESSION *session, LIBSSH2_SK_SIG_INFO *sig_info,
\fIabstract\fP - User-provided data to pass to callback.
Attempt FIDO2 authentication. using either the sk-ssh-ed25519@openssh.com or
Attempt FIDO2 authentication. using either the sk-ssh-ed25519@openssh.com or
sk-ecdsa-sha2-nistp256@openssh.com key exchange algorithms.
This function is only supported when libssh2 is backed by OpenSSL.
.SH CALLBACK DESCRIPTION
\fIsession\fP - Session instance as returned by
\fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3)
\fIsig_info\fP - Filled in by the callback with the signature and accompanying
\fIsig_info\fP - Filled in by the callback with the signature and accompanying
information from the authenticator.
\fIdata\fP - The data to sign.
\fIdata_len\fP - The length of the data parameter.
\fIalgorithm\fP - The signing algorithm to use. Possible values are
\fIalgorithm\fP - The signing algorithm to use. Possible values are
LIBSSH2_HOSTKEY_TYPE_ED25519 and LIBSSH2_HOSTKEY_TYPE_ECDSA_256.
\fIflags\fP - A bitmask specifying options for the authenticator. When
\fIflags\fP - A bitmask specifying options for the authenticator. When
LIBSSH2_SK_PRESENCE_REQUIRED is set, the authenticator requires a touch. When
LIBSSH2_SK_VERIFICATION_REQUIRED is set, the authenticator requires a PIN.
Many servers and authenticators do not work properly when
LIBSSH2_SK_VERIFICATION_REQUIRED is set, the authenticator requires a PIN.
Many servers and authenticators do not work properly when
LIBSSH2_SK_PRESENCE_REQUIRED is not set.
\fIapplication\fP - A user-defined string to use as the RP name for the
\fIapplication\fP - A user-defined string to use as the RP name for the
authenticator. Usually "ssh:".
\fIkey_handle\fP - The key handle to use for the authenticator's allow list.
\fIhandle_len\fP - The length of the key_handle parameter.
\fIabstract\fP - User-defined data. When a PIN is required, use this to pass in
\fIabstract\fP - User-defined data. When a PIN is required, use this to pass in
the PIN, or a function pointer to retrieve the PIN.
The \fIsign_callback\fP is responsible for communicating with the hardware
The \fIsign_callback\fP is responsible for communicating with the hardware
authenticator to generate a signature. On success, the signature information
must be placed in the `\fIsig_info\fP sig_info parameter and the callback must
must be placed in the `\fIsig_info\fP sig_info parameter and the callback must
return 0. On failure, it should return a negative number.
The fields of the LIBSSH2_SK_SIG_INFO are as follows.
\fIflags\fP - A bitmask specifying options for the authenticator. This should
\fIflags\fP - A bitmask specifying options for the authenticator. This should
be read from the authenticator and not merely copied from the flags parameter
to the callback.
@ -103,15 +103,15 @@ to the callback.
\fIsig_r\fP - For Ed25519 signatures, this contains the entire signature, as
returned directly from the authenticator. For ECDSA signatures, this contains
the r component of the signature in a big-endian binary representation. For
the r component of the signature in a big-endian binary representation. For
both algorithms, use LIBSSH2_ALLOC to allocate memory. It will be freed by the
caller.
\fIsig_r_len\fP - The length of the sig_r parameter.
\fIsig_s\fP - For ECDSA signatures, this contains the s component of the
signature in a big-endian binary representation. Use LIBSSH2_ALLOC to allocate
memory. It will be freed by the caller. For Ed25519 signatures, set this to
\fIsig_s\fP - For ECDSA signatures, this contains the s component of the
signature in a big-endian binary representation. Use LIBSSH2_ALLOC to allocate
memory. It will be freed by the caller. For Ed25519 signatures, set this to
NULL.
\fIsig_s_len\fP - The length of the sig_s parameter.

View File

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

View File

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

View File

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

View File

@ -10,13 +10,13 @@
(c-comment-only-line-offset . 0)
(c-hanging-braces-alist . ((substatement-open before after)))
(c-offsets-alist . ((topmost-intro . 0)
(topmost-intro-cont . 0)
(substatement . +)
(substatement-open . 0)
(statement-case-intro . +)
(statement-case-open . 0)
(case-label . 0)
))
(topmost-intro-cont . 0)
(substatement . +)
(substatement-open . 0)
(statement-case-intro . +)
(statement-case-open . 0)
(case-label . 0)
))
)
"Libssh2 C Programming Style")
@ -33,10 +33,10 @@
;; add libssh2 style and set it for the current buffer
(c-add-style "libssh2" libssh2-c-style t)
(setq tab-width 8
indent-tabs-mode nil ; Use spaces, not tabs.
comment-column 40
c-font-lock-extra-types (append '("libssh2_int64_t" "LIBSSH2_USERAUTH_KBDINT_PROMPT" "LIBSSH2_SESSION" "LIBSSH2_CHANNEL" "ssize_t" "size_t" "uint32_t" "LIBSSH2_LISTENER" "LIBSSH2_POLLFD"))
)
indent-tabs-mode nil ; Use spaces, not tabs.
comment-column 40
c-font-lock-extra-types (append '("libssh2_int64_t" "LIBSSH2_USERAUTH_KBDINT_PROMPT" "LIBSSH2_SESSION" "LIBSSH2_CHANNEL" "ssize_t" "size_t" "uint32_t" "LIBSSH2_LISTENER" "LIBSSH2_POLLFD"))
)
;; keybindings for C, C++, and Objective-C. We can put these in
;; c-mode-base-map because of inheritance ...
(define-key c-mode-base-map "\M-q" 'c-fill-paragraph)

View File

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

View File

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

38
maketgz
View File

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

View File

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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