1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-10-24 14:53:03 +03:00

docs: convert man page sources to "curldown" format

To render in Git webviews as-is, to make it easier to edit, verify,
and to sync up with curl.

- add options to not build the `.3` man pages:
  - autotools: `--disable-docs`
  - cmake: `LIBSSH2_BUILD_DOCS=OFF`
- building `.3` man pages requires Perl after this patch.
- drop `mansyntax` and the shell / `grep` / GNU `man` tool requirements with it.
- scripts and most logic were copied from curl.
- add `cd2nroff` from curl, with edits to relax curl-specific checks.
- used `nroff2cd` (from curl) to convert from `.3` to `.md`. Then
  manually fixed copyrights, inline function references and a couple
  of other things.

Credits-to: Daniel Stenberg

Ref: eefcc1bda4
Ref: https://github.com/curl/curl/pull/12730
Ref: https://github.com/libssh2/www/issues/25#issuecomment-3289431671

Closes #1660
This commit is contained in:
Viktor Szakats
2025-09-14 18:22:27 +02:00
parent cea796fc2d
commit b889b39945
320 changed files with 8216 additions and 4987 deletions

View File

@@ -553,8 +553,8 @@ jobs:
make install
cd ..
# Verify install
diff -u <(find docs -name '*.3' -printf '%f\n' | grep -v template | sort) <(find "$HOME"/temp/share/man/man3 -name '*.3' -printf '%f\n' | sort)
diff -u <(find include -name '*.h' -printf '%f\n' | sort) <(find "$HOME"/temp/include -name '*.h' -printf '%f\n' | sort)
diff -u <(find libssh2-99.98.97/docs -name '*.3' -printf '%f\n' | sort) <(find "$HOME"/temp/share/man/man3 -name '*.3' -printf '%f\n' | sort)
diff -u <(find libssh2-99.98.97/include -name '*.h' -printf '%f\n' | sort) <(find "$HOME"/temp/include -name '*.h' -printf '%f\n' | sort)
rm -rf libssh2-99.98.97
build_linux_cross_mingw64:

View File

@@ -547,7 +547,18 @@ if(LINT)
endif()
endif()
add_subdirectory(docs)
option(LIBSSH2_BUILD_DOCS "Build man pages" ON)
set(_build_docs FALSE)
if(LIBSSH2_BUILD_DOCS)
find_package(Perl)
if(PERL_FOUND)
set(_build_docs TRUE)
add_subdirectory(docs)
else()
message(WARNING "Perl not found. Will not build manuals.")
endif()
endif()
add_feature_info("Docs" _build_docs "build docs")
feature_summary(WHAT ALL)

View File

@@ -28,7 +28,6 @@ path = [
"docs/INSTALL_CMAKE.md",
"docs/SECURITY.md",
"docs/TODO",
"docs/template.3",
"os400/README400",
"tests/key_*",
"tests/openssh_server/.gitattributes",

View File

@@ -92,7 +92,41 @@ esac
dnl check for how to do large files
AC_SYS_LARGEFILE
# Crypto backends
dnl Perl
AC_PATH_PROG(PERL, perl,, $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin)
AC_SUBST(PERL)
AM_CONDITIONAL(PERL, test -n "$PERL")
dnl **********************************************************************
dnl Check whether to build documentation
dnl **********************************************************************
AC_MSG_CHECKING([whether to build documentation])
AC_ARG_ENABLE(docs,
AS_HELP_STRING([--enable-docs],[Enable documentation (default)])
AS_HELP_STRING([--disable-docs],[Disable documentation]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
BUILD_DOCS=0
;;
*)
AC_MSG_RESULT(yes)
BUILD_DOCS=1
;;
esac ],
AC_MSG_RESULT(yes)
BUILD_DOCS=1
)
if test -z "$PERL" -a "x$BUILD_DOCS" != "x0"; then
AC_MSG_WARN([perl was not found. Will not build documentation.])
BUILD_DOCS=0
fi
dnl set variable for use in automakefile(s)
AM_CONDITIONAL(BUILD_DOCS, test x"$BUILD_DOCS" = x1)
dnl Crypto backends
found_crypto=none
found_crypto_str=""

View File

@@ -1,46 +1,52 @@
# Copyright (C) Alexander Lamaison <alexander.lamaison@gmail.com>
# Copyright (C) Viktor Szakats
#
# Redistribution and use in source and binary forms,
# with or without modification, are permitted provided
# that the following conditions are met:
#
# Redistributions of source code must retain the above
# copyright notice, this list of conditions and the
# following disclaimer.
#
# Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# Neither the name of the copyright holder nor the names
# of any other contributors may be used to endorse or
# promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
# OF SUCH DAMAGE.
#
# SPDX-License-Identifier: BSD-3-Clause
libssh2_transform_makefile_inc("Makefile.am" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.am.cmake")
# Get dist_man_MANS variable
include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.am.cmake")
# Get man_MANS variable
libssh2_transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
# Generate man pages
function(libssh2_add_manual_pages _listname)
# Maximum number of files per command to stay within shell/OS limits
if(CMAKE_HOST_UNIX)
set(_files_per_batch 10000)
else() # e.g. Windows with cmd.exe and other obsolete/unidentified shells
set(_files_per_batch 200)
endif()
set(_file_count 0)
set(_rofffiles "")
set(_mdfiles "")
set(_eol "_EOL_")
foreach(_file IN LISTS ${_listname} _eol)
math(EXPR _file_count "${_file_count} + 1")
if(_file_count GREATER_EQUAL _files_per_batch OR _file STREQUAL "_EOL_")
add_custom_command(OUTPUT ${_rofffiles}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND "${PERL_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/cd2nroff" -k -d "${CMAKE_CURRENT_BINARY_DIR}" ${_mdfiles}
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/cd2nroff" ${_mdfiles}
VERBATIM
)
set(_file_count 0)
set(_rofffiles "")
set(_mdfiles "")
endif()
list(APPEND _rofffiles "${CMAKE_CURRENT_BINARY_DIR}/${_file}")
string(REPLACE ".3" ".md" _mdfile "${_file}")
list(APPEND _mdfiles "${_mdfile}")
endforeach()
unset(_rofffiles)
unset(_mdfiles)
endfunction()
libssh2_add_manual_pages(man_MANS)
add_custom_target(libssh2-man ALL DEPENDS ${man_MANS})
if(NOT LIBSSH2_DISABLE_INSTALL)
set(_src "")
foreach(_file IN LISTS man_MANS)
list(APPEND _src "${CMAKE_CURRENT_BINARY_DIR}/${_file}")
endforeach()
include(GNUInstallDirs)
install(FILES ${dist_man_MANS} DESTINATION "${CMAKE_INSTALL_MANDIR}/man3")
install(FILES ${_src} DESTINATION "${CMAKE_INSTALL_MANDIR}/man3")
unset(_src)
endif()

View File

@@ -1,193 +1,21 @@
# Copyright (C) The libssh2 project and its contributors.
# SPDX-License-Identifier: BSD-3-Clause
EXTRA_DIST = template.3 AUTHORS BINDINGS.md HACKING.md HACKING-CRYPTO \
INSTALL_AUTOTOOLS INSTALL_CMAKE.md SECURITY.md TODO CMakeLists.txt
AUTOMAKE_OPTIONS = foreign no-dependencies
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_sign.3 \
libssh2_agent_userauth.3 \
libssh2_banner_set.3 \
libssh2_base64_decode.3 \
libssh2_channel_close.3 \
libssh2_channel_direct_streamlocal_ex.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_signal_ex.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_callback_set2.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_read_timeout.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_method_pref.3 \
libssh2_session_methods.3 \
libssh2_session_set_blocking.3 \
libssh2_session_set_last_error.3 \
libssh2_session_set_read_timeout.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_open_ex_r.3 \
libssh2_sftp_open_r.3 \
libssh2_sftp_opendir.3 \
libssh2_sftp_posix_rename.3 \
libssh2_sftp_posix_rename_ex.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
if BUILD_DOCS
# Get man_MANS variable
include Makefile.inc
MANPAGES = $(man_MANS:.3=.md)
CLEANFILES = $(man_MANS)
SUFFIXES = .3 .md
.md.3:
$(srcdir)/cd2nroff $< >$@
endif
EXTRA_DIST = $(MANPAGES) template.md cd2nroff AUTHORS BINDINGS.md HACKING.md \
HACKING-CRYPTO INSTALL_AUTOTOOLS INSTALL_CMAKE.md SECURITY.md TODO \
CMakeLists.txt

192
docs/Makefile.inc Normal file
View File

@@ -0,0 +1,192 @@
# Copyright (C) The libssh2 project and its contributors.
# SPDX-License-Identifier: BSD-3-Clause
# Shared between CMakeLists.txt and Makefile.am
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_sign.3 \
libssh2_agent_userauth.3 \
libssh2_banner_set.3 \
libssh2_base64_decode.3 \
libssh2_channel_close.3 \
libssh2_channel_direct_streamlocal_ex.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_signal_ex.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_callback_set2.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_read_timeout.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_method_pref.3 \
libssh2_session_methods.3 \
libssh2_session_set_blocking.3 \
libssh2_session_set_last_error.3 \
libssh2_session_set_read_timeout.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_open_ex_r.3 \
libssh2_sftp_open_r.3 \
libssh2_sftp_opendir.3 \
libssh2_sftp_posix_rename.3 \
libssh2_sftp_posix_rename_ex.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

525
docs/cd2nroff Executable file
View File

@@ -0,0 +1,525 @@
#!/usr/bin/env perl
#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
# SPDX-License-Identifier: curl
#
###########################################################################
=begin comment
Converts a curldown file to nroff (manpage).
=end comment
=cut
use strict;
use warnings;
my $cd2nroff = "0.1"; # to keep check
my $dir;
my $extension;
my $keepfilename;
while(@ARGV) {
if($ARGV[0] eq "-d") {
shift @ARGV;
$dir = shift @ARGV;
}
elsif($ARGV[0] eq "-e") {
shift @ARGV;
$extension = shift @ARGV;
}
elsif($ARGV[0] eq "-k") {
shift @ARGV;
$keepfilename = 1;
}
elsif($ARGV[0] eq "-h") {
print <<HELP
Usage: cd2nroff [options] [file.md]
-d <dir> Write the output to the file name from the meta-data in the
specified directory, instead of writing to stdout
-e <ext> If -d is used, this option can provide an added "extension", arbitrary
text really, to append to the file name.
-h This help text,
-v Show version then exit
HELP
;
exit 0;
}
elsif($ARGV[0] eq "-v") {
print "cd2nroff version $cd2nroff\n";
exit 0;
}
else {
last;
}
}
use POSIX qw(strftime);
my @ts;
if(defined($ENV{SOURCE_DATE_EPOCH})) {
@ts = gmtime($ENV{SOURCE_DATE_EPOCH});
} else {
@ts = localtime;
}
my $date = strftime "%Y-%m-%d", @ts;
sub outseealso {
my (@sa) = @_;
my $comma = 0;
my @o;
push @o, ".SH SEE ALSO\n";
for my $s (sort @sa) {
push @o, sprintf "%s.BR $s", $comma ? ",\n": "";
$comma = 1;
}
push @o, "\n";
return @o;
}
sub outprotocols {
my (@p) = @_;
my $comma = 0;
my @o;
push @o, ".SH PROTOCOLS\n";
if($p[0] eq "TLS") {
push @o, "This functionality affects all TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.";
}
else {
my @s = sort @p;
push @o, "This functionality affects ";
for my $e (sort @s) {
push @o, sprintf "%s%s",
$comma ? (($e eq $s[-1]) ? " and " : ", "): "",
lc($e);
$comma = 1;
}
if($#s == 0) {
if($s[0] eq "All") {
push @o, " supported protocols";
}
else {
push @o, " only";
}
}
}
push @o, "\n";
return @o;
}
sub outtls {
my (@t) = @_;
my $comma = 0;
my @o;
if($t[0] eq "All") {
push @o, "\nAll TLS backends support this option.";
}
elsif($t[0] eq "none") {
push @o, "\nNo TLS backend supports this option.";
}
else {
push @o, "\nThis option works only with the following TLS backends:\n";
my @s = sort @t;
for my $e (@s) {
push @o, sprintf "%s$e",
$comma ? (($e eq $s[-1]) ? " and " : ", "): "";
$comma = 1;
}
}
push @o, "\n";
return @o;
}
my %knownprotos = (
'DICT' => 1,
'FILE' => 1,
'FTP' => 1,
'FTPS' => 1,
'GOPHER' => 1,
'GOPHERS' => 1,
'HTTP' => 1,
'HTTPS' => 1,
'IMAP' => 1,
'IMAPS' => 1,
'LDAP' => 1,
'LDAPS' => 1,
'MQTT' => 1,
'POP3' => 1,
'POP3S' => 1,
'RTMP' => 1,
'RTMPS' => 1,
'RTSP' => 1,
'SCP' => 1,
'SFTP' => 1,
'SMB' => 1,
'SMBS' => 1,
'SMTP' => 1,
'SMTPS' => 1,
'TELNET' => 1,
'TFTP' => 1,
'WS' => 1,
'WSS' => 1,
'TLS' => 1,
'TCP' => 1,
'QUIC' => 1,
'All' => 1
);
my %knowntls = (
'GnuTLS' => 1,
'mbedTLS' => 1,
'OpenSSL' => 1,
'rustls' => 1,
'Schannel' => 1,
'wolfSSL' => 1,
'All' => 1,
'none' => 1,
);
sub single {
my @seealso;
my @proto;
my @tls;
my $d;
my ($f)=@_;
my $copyright;
my $errors = 0;
my $fh;
my $line;
my $list;
my $tlslist;
my $section;
my $source;
my $addedin;
my $spdx;
my $start = 0;
my $title;
if(defined($f)) {
if(!open($fh, "<:crlf", "$f")) {
print STDERR "cd2nroff failed to open '$f' for reading: $!\n";
return 1;
}
}
else {
$f = "STDIN";
$fh = \*STDIN;
binmode($fh, ":crlf");
}
while(<$fh>) {
$line++;
if(!$start) {
if(/^---/) {
# header starts here
$start = 1;
}
next;
}
if(/^Title: *(.*)/i) {
$title=$1;
}
elsif(/^Section: *(.*)/i) {
$section=$1;
}
elsif(/^Source: *(.*)/i) {
$source=$1;
}
elsif(/^See-also: +(.*)/i) {
$list = 1; # 1 for see-also
push @seealso, $1;
}
elsif(/^See-also: */i) {
if($seealso[0]) {
print STDERR "$f:$line:1:ERROR: bad See-Also, needs list\n";
return 2;
}
$list = 1; # 1 for see-also
}
elsif(/^Protocol:/i) {
$list = 2; # 2 for protocol
}
elsif(/^TLS-backend:/i) {
$list = 3; # 3 for TLS backend
}
elsif(/^Added-in: *(.*)/i) {
$addedin=$1;
if(($addedin !~ /^[0-9.]+[0-9]\z/) &&
($addedin ne "n/a")) {
print STDERR "$f:$line:1:ERROR: invalid version number in Added-in line: $addedin\n";
return 2;
}
}
elsif(/^ +- (.*)/i) {
# the only lists we support are see-also and protocol
if($list == 1) {
push @seealso, $1;
}
elsif($list == 2) {
push @proto, $1;
}
elsif($list == 3) {
push @tls, $1;
}
else {
print STDERR "$f:$line:1:ERROR: list item without owner?\n";
return 2;
}
}
# REUSE-IgnoreStart
elsif(/^C: (.*)/i) {
$copyright=$1;
}
elsif(/^SPDX-License-Identifier: (.*)/i) {
$spdx=$1;
}
# REUSE-IgnoreEnd
elsif(/^---/) {
# end of the header section
if(!$title) {
print STDERR "$f:$line:1:ERROR: no 'Title:' in $f\n";
return 1;
}
if(!$section) {
print STDERR "$f:$line:1:ERROR: no 'Section:' in $f\n";
return 2;
}
if(!$source) {
print STDERR "$f:$line:1:ERROR: no 'Source:' in $f\n";
return 2;
}
if(($source eq "libcurl") && !$addedin) {
print STDERR "$f:$line:1:ERROR: no 'Added-in:' in $f\n";
return 2;
}
if(!$copyright) {
print STDERR "$f:$line:1:ERROR: no 'C:' field present\n";
return 2;
}
if(!$spdx) {
# REUSE-IgnoreStart
print STDERR "$f:$line:1:ERROR: no 'SPDX-License-Identifier:' field present\n";
# REUSE-IgnoreEnd
return 2;
}
last;
}
else {
chomp;
print STDERR "$f:$line:1:ERROR: unrecognized header keyword: '$_'\n";
$errors++;
}
}
if(!$start) {
print STDERR "$f:$line:1:ERROR: no header present\n";
return 2;
}
my @desc;
my $quote = 0;
my $blankline = 0;
my $header = 0;
# cut off the leading path from the file name, if any
$f =~ s/^(.*[\\\/])//;
push @desc, ".\\\" generated by cd2nroff $cd2nroff from $f\n";
push @desc, ".TH $title $section \"$date\" $source\n";
while(<$fh>) {
$line++;
$d = $_;
if($quote) {
if($quote == 4) {
# remove the indentation
if($d =~ /^ (.*)/) {
push @desc, "$1\n";
next;
}
else {
# end of quote
$quote = 0;
push @desc, ".fi\n";
next;
}
}
if(/^~~~/) {
# end of quote
$quote = 0;
push @desc, ".fi\n";
next;
}
# convert single backslashes to doubles
$d =~ s/\\/\\\\/g;
# lines starting with a period needs it escaped
$d =~ s/^\./\\&./;
push @desc, $d;
next;
}
# remove single line HTML comments
$d =~ s/<!--.*?-->//g;
# **bold**
$d =~ s/\*\*(\S.*?)\*\*/\\fB$1\\fP/g;
# *italics*
$d =~ s/\*(\S.*?)\*/\\fI$1\\fP/g;
my $back = $d;
# remove all backticked pieces
$back =~ s/\`(.*?)\`//g;
if($back =~ /[^\\][\<\>]/) {
print STDERR "$f:$line:1:ERROR: un-escaped < or > used\n";
$errors++;
}
# convert backslash-'<' or '> to just the second character
$d =~ s/\\([<>])/$1/g;
# mentions of curl symbols with manpages use italics by default
$d =~ s/((lib|)curl([^ ]*\(3\)))/\\fI$1\\fP/gi;
# backticked becomes italics
$d =~ s/\`(.*?)\`/\\fI$1\\fP/g;
if(/^## (.*)/) {
my $word = $1;
# if there are enclosing quotes, remove them first
$word =~ s/[\"\'\`](.*)[\"\'\`]\z/$1/;
# enclose in double quotes if there is a space present
if($word =~ / /) {
push @desc, ".IP \"$word\"\n";
}
else {
push @desc, ".IP $word\n";
}
$header = 1;
}
elsif(/^##/) {
# end of IP sequence
push @desc, ".PP\n";
$header = 1;
}
elsif(/^# (.*)/) {
my $word = $1;
# if there are enclosing quotes, remove them first
$word =~ s/[\"\'](.*)[\"\']\z/$1/;
push @desc, ".SH $word\n";
$header = 1;
}
elsif(/^~~~c/) {
# start of a code section, not indented
$quote = 1;
push @desc, "\n" if($blankline && !$header);
$header = 0;
push @desc, ".nf\n";
}
elsif(/^~~~/) {
# start of a quote section; not code, not indented
$quote = 1;
push @desc, "\n" if($blankline && !$header);
$header = 0;
push @desc, ".nf\n";
}
elsif(/^ (.*)/) {
# quoted, indented by 4 space
$quote = 4;
push @desc, "\n" if($blankline && !$header);
$header = 0;
push @desc, ".nf\n$1\n";
}
elsif(/^[ \t]*\n/) {
# count and ignore blank lines
$blankline++;
}
else {
# don't output newlines if this is the first content after a
# header
push @desc, "\n" if($blankline && !$header);
$blankline = 0;
$header = 0;
# quote minuses in the output
$d =~ s/([^\\])-/$1\\-/g;
# replace single quotes
$d =~ s/\'/\\(aq/g;
# handle double quotes first on the line
$d =~ s/^(\s*)\"/$1\\&\"/;
# lines starting with a period needs it escaped
$d =~ s/^\./\\&./;
if($d =~ /^(.*) /) {
printf STDERR "$f:$line:%d:ERROR: 2 spaces detected\n",
length($1);
$errors++;
}
if($d =~ /^[ \t]*\n/) {
# replaced away all contents
$blankline= 1;
}
else {
push @desc, $d;
}
}
}
if($fh != \*STDIN) {
close($fh);
}
push @desc, outseealso(@seealso);
if($dir) {
if($keepfilename) {
$title = $f;
$title =~ s/\.[^.]*$//;
}
my $outfile = "$dir/$title.$section";
if(defined($extension)) {
$outfile .= $extension;
}
if(!open(O, ">", $outfile)) {
print STDERR "Failed to open $outfile : $!\n";
return 1;
}
print O @desc;
close(O);
}
else {
print @desc;
}
return $errors;
}
if(@ARGV) {
for my $f (@ARGV) {
my $r = single($f);
if($r) {
exit $r;
}
}
}
else {
exit single();
}

View File

@@ -1,24 +0,0 @@
.\" Copyright (C) Daiki Ueno
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_agent_connect 3 "23 Dec 2009" "libssh2" "libssh2"
.SH NAME
libssh2_agent_connect - connect to an ssh-agent
.SH SYNOPSIS
.nf
#include <libssh2.h>
int
libssh2_agent_connect(LIBSSH2_AGENT *agent);
.fi
.SH DESCRIPTION
Connect to an ssh-agent running on the system.
Call \fBlibssh2_agent_disconnect(3)\fP to close the connection after
you are doing using it.
.SH RETURN VALUE
Returns 0 if succeeded, or a negative value for error.
.SH AVAILABILITY
Added in libssh2 1.2
.SH SEE ALSO
.BR libssh2_agent_init(3)
.BR libssh2_agent_disconnect(3)

View File

@@ -0,0 +1,38 @@
---
c: Copyright (C) Daiki Ueno
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_agent_connect
Section: 3
Source: libssh2
See-also:
- libssh2_agent_disconnect(3)
- libssh2_agent_init(3)
---
# NAME
libssh2_agent_connect - connect to an ssh-agent
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_agent_connect(LIBSSH2_AGENT *agent);
~~~
# DESCRIPTION
Connect to an ssh-agent running on the system.
Call **libssh2_agent_disconnect(3)** to close the connection after
you are doing using it.
# RETURN VALUE
Returns 0 if succeeded, or a negative value for error.
# AVAILABILITY
Added in libssh2 1.2

View File

@@ -1,22 +0,0 @@
.\" Copyright (C) Daiki Ueno
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_agent_disconnect 3 "23 Dec 2009" "libssh2" "libssh2"
.SH NAME
libssh2_agent_disconnect - close a connection to an ssh-agent
.SH SYNOPSIS
.nf
#include <libssh2.h>
int
libssh2_agent_disconnect(LIBSSH2_AGENT *agent);
.fi
.SH DESCRIPTION
Close a connection to an ssh-agent.
.SH RETURN VALUE
Returns 0 if succeeded, or a negative value for error.
.SH AVAILABILITY
Added in libssh2 1.2
.SH SEE ALSO
.BR libssh2_agent_connect(3)
.BR libssh2_agent_free(3)

View File

@@ -0,0 +1,35 @@
---
c: Copyright (C) Daiki Ueno
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_agent_disconnect
Section: 3
Source: libssh2
See-also:
- libssh2_agent_connect(3)
- libssh2_agent_free(3)
---
# NAME
libssh2_agent_disconnect - close a connection to an ssh-agent
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_agent_disconnect(LIBSSH2_AGENT *agent);
~~~
# DESCRIPTION
Close a connection to an ssh-agent.
# RETURN VALUE
Returns 0 if succeeded, or a negative value for error.
# AVAILABILITY
Added in libssh2 1.2

View File

@@ -1,22 +0,0 @@
.\" Copyright (C) Daiki Ueno
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_agent_free 3 "28 May 2009" "libssh2" "libssh2"
.SH NAME
libssh2_agent_free - free an ssh-agent handle
.SH SYNOPSIS
.nf
#include <libssh2.h>
void
libssh2_agent_free(LIBSSH2_AGENT *agent);
.fi
.SH DESCRIPTION
Free an ssh-agent handle. This function also frees the internal
collection of public keys.
.SH RETURN VALUE
None.
.SH AVAILABILITY
Added in libssh2 1.2
.SH SEE ALSO
.BR libssh2_agent_init(3)
.BR libssh2_agent_disconnect(3)

View File

@@ -0,0 +1,36 @@
---
c: Copyright (C) Daiki Ueno
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_agent_free
Section: 3
Source: libssh2
See-also:
- libssh2_agent_disconnect(3)
- libssh2_agent_init(3)
---
# NAME
libssh2_agent_free - free an ssh-agent handle
# SYNOPSIS
~~~c
#include <libssh2.h>
void
libssh2_agent_free(LIBSSH2_AGENT *agent);
~~~
# DESCRIPTION
Free an ssh-agent handle. This function also frees the internal
collection of public keys.
# RETURN VALUE
None.
# AVAILABILITY
Added in libssh2 1.2

View File

@@ -1,36 +1,50 @@
.\" Copyright (C) Daiki Ueno
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_agent_get_identity 3 "23 Dec 2009" "libssh2" "libssh2"
.SH NAME
---
c: Copyright (C) Daiki Ueno
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_agent_get_identity
Section: 3
Source: libssh2
See-also:
- libssh2_agent_list_identities(3)
- libssh2_agent_userauth(3)
---
# NAME
libssh2_agent_get_identity - get a public key off the collection of public keys managed by ssh-agent
.SH SYNOPSIS
.nf
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_agent_get_identity(LIBSSH2_AGENT *agent,
struct libssh2_agent_publickey **store,
struct libssh2_agent_publickey *prev);
.fi
.SH DESCRIPTION
\fIlibssh2_agent_get_identity(3)\fP allows an application to iterate
~~~
# DESCRIPTION
*libssh2_agent_get_identity(3)* allows an application to iterate
over all public keys in the collection managed by ssh-agent.
\fIstore\fP should point to a pointer that gets filled in to point to the
*store* should point to a pointer that gets filled in to point to the
public key data.
\fIprev\fP is a pointer to a previous 'struct libssh2_agent_publickey'
*prev* is a pointer to a previous 'struct libssh2_agent_publickey'
as returned by a previous invoke of this function, or NULL to get the
first entry in the internal collection.
.SH RETURN VALUE
# RETURN VALUE
Returns 0 if everything is fine and information about a host was stored in
the \fIstore\fP struct.
the *store* struct.
Returns 1 if it reached the end of public keys.
Returns negative values for error
.SH AVAILABILITY
# AVAILABILITY
Added in libssh2 1.2
.SH SEE ALSO
.BR libssh2_agent_list_identities(3)
.BR libssh2_agent_userauth(3)

View File

@@ -1,22 +1,35 @@
.\" Copyright (C) Will Cosgrove
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_agent_get_identity_path 3 "6 Mar 2019" "libssh2" "libssh2"
.SH NAME
---
c: Copyright (C) Will Cosgrove
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_agent_get_identity_path
Section: 3
Source: libssh2
See-also:
- libssh2_agent_init(3)
- libssh2_agent_set_identity_path(3)
---
# NAME
libssh2_agent_get_identity_path - gets the custom ssh-agent socket path
.SH SYNOPSIS
.nf
# SYNOPSIS
~~~c
#include <libssh2.h>
const char *
libssh2_agent_get_identity_path(LIBSSH2_AGENT *agent);
.fi
.SH DESCRIPTION
~~~
# DESCRIPTION
Returns the custom agent identity socket path if set using libssh2_agent_set_identity_path()
.SH RETURN VALUE
# RETURN VALUE
Returns the socket path on disk.
.SH AVAILABILITY
# AVAILABILITY
Added in libssh2 1.9
.SH SEE ALSO
.BR libssh2_agent_init(3)
.BR libssh2_agent_set_identity_path(3)

View File

@@ -1,28 +1,42 @@
.\" Copyright (C) Daiki Ueno
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_agent_init 3 "23 Dec 2009" "libssh2" "libssh2"
.SH NAME
---
c: Copyright (C) Daiki Ueno
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_agent_init
Section: 3
Source: libssh2
See-also:
- libssh2_agent_connect(3)
- libssh2_agent_free(3)
---
# NAME
libssh2_agent_init - init an ssh-agent handle
.SH SYNOPSIS
.nf
# SYNOPSIS
~~~c
#include <libssh2.h>
LIBSSH2_AGENT *
libssh2_agent_init(LIBSSH2_SESSION *session);
.fi
.SH DESCRIPTION
~~~
# DESCRIPTION
Init an ssh-agent handle. Returns the handle to an internal
representation of an ssh-agent connection. After the successful
initialization, an application can call \fBlibssh2_agent_connect(3)\fP
initialization, an application can call **libssh2_agent_connect(3)**
to connect to a running ssh-agent.
Call \fBlibssh2_agent_free(3)\fP to free the handle again after you are
Call **libssh2_agent_free(3)** to free the handle again after you are
doing using it.
.SH RETURN VALUE
# RETURN VALUE
Returns a handle pointer or NULL if something went wrong. The returned handle
is used as input to all other ssh-agent related functions libssh2 provides.
.SH AVAILABILITY
# AVAILABILITY
Added in libssh2 1.2
.SH SEE ALSO
.BR libssh2_agent_connect(3)
.BR libssh2_agent_free(3)

View File

@@ -1,25 +0,0 @@
.\" Copyright (C) Daiki Ueno
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_agent_list_identities 3 "23 Dec 2009" "libssh2" "libssh2"
.SH NAME
libssh2_agent_list_identities - request an ssh-agent to list of public keys.
.SH SYNOPSIS
.nf
#include <libssh2.h>
int
libssh2_agent_list_identities(LIBSSH2_AGENT *agent);
.fi
.SH DESCRIPTION
Request an ssh-agent to list of public keys, and stores them in the
internal collection of the handle. Call
\fIlibssh2_agent_get_identity(3)\fP to get a public key off the
collection.
.SH RETURN VALUE
Returns 0 if succeeded, or a negative value for error.
.SH AVAILABILITY
Added in libssh2 1.2
.SH SEE ALSO
.BR libssh2_agent_connect(3)
.BR libssh2_agent_get_identity(3)

View File

@@ -0,0 +1,37 @@
---
c: Copyright (C) Daiki Ueno
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_agent_list_identities
Section: 3
Source: libssh2
See-also:
- libssh2_agent_connect(3)
- libssh2_agent_get_identity(3)
---
# NAME
libssh2_agent_list_identities - request an ssh-agent to list of public keys.
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_agent_list_identities(LIBSSH2_AGENT *agent);
~~~
# DESCRIPTION
Request an ssh-agent to list of public keys, and stores them in the
internal collection of the handle. Call *libssh2_agent_get_identity(3)*
to get a public key off the collection.
# RETURN VALUE
Returns 0 if succeeded, or a negative value for error.
# AVAILABILITY
Added in libssh2 1.2

View File

@@ -1,22 +0,0 @@
.\" Copyright (C) Will Cosgrove
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_agent_set_identity_path 3 "6 Mar 2019" "libssh2" "libssh2"
.SH NAME
libssh2_agent_set_identity_path - set an ssh-agent socket path on disk
.SH SYNOPSIS
.nf
#include <libssh2.h>
void
libssh2_agent_set_identity_path(LIBSSH2_AGENT *agent, const char *path);
.fi
.SH DESCRIPTION
Allows a custom agent identity socket path instead of the default SSH_AUTH_SOCK env value
.SH RETURN VALUE
Returns void
.SH AVAILABILITY
Added in libssh2 1.9
.SH SEE ALSO
.BR libssh2_agent_init(3)
.BR libssh2_agent_get_identity_path(3)

View File

@@ -0,0 +1,35 @@
---
c: Copyright (C) Will Cosgrove
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_agent_set_identity_path
Section: 3
Source: libssh2
See-also:
- libssh2_agent_get_identity_path(3)
- libssh2_agent_init(3)
---
# NAME
libssh2_agent_set_identity_path - set an ssh-agent socket path on disk
# SYNOPSIS
~~~c
#include <libssh2.h>
void
libssh2_agent_set_identity_path(LIBSSH2_AGENT *agent, const char *path);
~~~
# DESCRIPTION
Allows a custom agent identity socket path instead of the default SSH_AUTH_SOCK env value
# RETURN VALUE
Returns void
# AVAILABILITY
Added in libssh2 1.9

View File

@@ -1,54 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_agent_sign 3 "1 Oct 2022" "libssh2" "libssh2"
.SH NAME
libssh2_agent_sign - sign data, with the help of ssh-agent
.SH SYNOPSIS
.nf
#include <libssh2.h>
int
libssh2_agent_sign(LIBSSH2_AGENT *agent,
struct libssh2_agent_publickey *identity,
unsigned char **sig,
size_t *s_len,
const unsigned char *data,
size_t d_len,
const char *method,
unsigned int method_len);
.fi
.SH DESCRIPTION
\fIagent\fP - ssh-agent handle as returned by
.BR libssh2_agent_init(3)
\fIidentity\fP - Public key to authenticate with, as returned by
.BR libssh2_agent_get_identity(3)
\fIsig\fP - A pointer to a buffer in which to place the signature. The caller
is responsible for freeing the signature with LIBSSH2_FREE.
\fIs_len\fP - A pointer to the length of the sig parameter.
\fIdata\fP - The data to sign.
\fId_len\fP - The length of the data parameter.
\fImethod\fP - A buffer indicating the signing method. This should match the
string at the start of identity->blob.
\fImethod_len\fP - The length of the method parameter.
Sign data using an ssh-agent. This function can be used in a callback
registered with libssh2_session_callback_set2(3) using
LIBSSH2_CALLBACK_AUTHAGENT_SIGN to sign an authentication challenge from a
server. However, the client is responsible for implementing the code that calls
this callback in response to a SSH2_AGENTC_SIGN_REQUEST message.
.SH RETURN VALUE
Returns 0 if succeeded, or a negative value for error.
.SH AVAILABILITY
Added in libssh2 1.11.0
.SH SEE ALSO
.BR libssh2_agent_init(3)
.BR libssh2_agent_get_identity(3)
.BR libssh2_agent_userauth(3)
.BR libssh2_session_callback_set2(3)

View File

@@ -0,0 +1,67 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_agent_sign
Section: 3
Source: libssh2
See-also:
- libssh2_agent_get_identity(3)
- libssh2_agent_init(3)
- libssh2_agent_userauth(3)
- libssh2_session_callback_set2(3)
---
# NAME
libssh2_agent_sign - sign data, with the help of ssh-agent
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_agent_sign(LIBSSH2_AGENT *agent,
struct libssh2_agent_publickey *identity,
unsigned char **sig,
size_t *s_len,
const unsigned char *data,
size_t d_len,
const char *method,
unsigned int method_len);
~~~
# DESCRIPTION
*agent* - ssh-agent handle as returned by libssh2_agent_init(3).
*identity* - Public key to authenticate with, as returned by
libssh2_agent_get_identity(3)
*sig* - A pointer to a buffer in which to place the signature. The caller
is responsible for freeing the signature with LIBSSH2_FREE.
*s_len* - A pointer to the length of the sig parameter.
*data* - The data to sign.
*d_len* - The length of the data parameter.
*method* - A buffer indicating the signing method. This should match the
string at the start of identity-\>blob.
*method_len* - The length of the method parameter.
Sign data using an ssh-agent. This function can be used in a callback
registered with libssh2_session_callback_set2(3) using
LIBSSH2_CALLBACK_AUTHAGENT_SIGN to sign an authentication challenge from a
server. However, the client is responsible for implementing the code that calls
this callback in response to a SSH2_AGENTC_SIGN_REQUEST message.
# RETURN VALUE
Returns 0 if succeeded, or a negative value for error.
# AVAILABILITY
Added in libssh2 1.11.0

View File

@@ -1,32 +0,0 @@
.\" Copyright (C) Daiki Ueno
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_agent_userauth 3 "23 Dec 2009" "libssh2" "libssh2"
.SH NAME
libssh2_agent_userauth - authenticate a session with a public key, with the help of ssh-agent
.SH SYNOPSIS
.nf
#include <libssh2.h>
int
libssh2_agent_userauth(LIBSSH2_AGENT *agent,
const char *username,
struct libssh2_agent_publickey *identity);
.fi
.SH DESCRIPTION
\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
.BR libssh2_agent_get_identity(3)
Attempt public key authentication with the help of ssh-agent.
.SH RETURN VALUE
Returns 0 if succeeded, or a negative value for error.
.SH AVAILABILITY
Added in libssh2 1.2
.SH SEE ALSO
.BR libssh2_agent_init(3)
.BR libssh2_agent_get_identity(3)
.BR libssh2_agent_sign(3)

View File

@@ -0,0 +1,45 @@
---
c: Copyright (C) Daiki Ueno
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_agent_userauth
Section: 3
Source: libssh2
See-also:
- libssh2_agent_get_identity(3)
- libssh2_agent_init(3)
- libssh2_agent_sign(3)
---
# NAME
libssh2_agent_userauth - authenticate a session with a public key, with the help of ssh-agent
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_agent_userauth(LIBSSH2_AGENT *agent,
const char *username,
struct libssh2_agent_publickey *identity);
~~~
# DESCRIPTION
*agent* - ssh-agent handle as returned by libssh2_agent_init(3)
*username* - Remote user name to authenticate as.
*identity* - Public key to authenticate with, as returned by
libssh2_agent_get_identity(3)
Attempt public key authentication with the help of ssh-agent.
# RETURN VALUE
Returns 0 if succeeded, or a negative value for error.
# AVAILABILITY
Added in libssh2 1.2

View File

@@ -1,36 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_banner_set 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
.SH NAME
libssh2_banner_set - set the SSH protocol banner for the local client
.SH SYNOPSIS
.nf
#include <libssh2.h>
int
libssh2_banner_set(LIBSSH2_SESSION *session, const char *banner);
.fi
.SH DESCRIPTION
This function is \fBDEPRECATED\fP in 1.4.0. Use the
\fIlibssh2_session_banner_set(3)\fP function instead!
\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
.BR libssh2_session_handshake(3)
This is optional; a banner corresponding to the protocol and libssh2 version
will be sent by default.
.SH RETURN VALUE
Return 0 on success or negative on failure. It returns
LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se.
.SH AVAILABILITY
Marked as deprecated since 1.4.0
.SH ERRORS
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
.SH SEE ALSO
.BR libssh2_session_handshake(3)

View File

@@ -0,0 +1,51 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_banner_set
Section: 3
Source: libssh2
See-also:
- libssh2_session_handshake(3)
- libssh2_session_init_ex(3)
---
# NAME
libssh2_banner_set - set the SSH protocol banner for the local client
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_banner_set(LIBSSH2_SESSION *session, const char *banner);
~~~
# DESCRIPTION
This function is **DEPRECATED** in 1.4.0. Use the
*libssh2_session_banner_set(3)* function instead!
*session* - Session instance as returned by libssh2_session_init_ex(3)
*banner* - 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 libssh2_session_handshake(3)
This is optional; a banner corresponding to the protocol and libssh2 version
will be sent by default.
# RETURN VALUE
Return 0 on success or negative on failure. It returns
LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se.
# AVAILABILITY
Marked as deprecated since 1.4.0
# ERRORS
*LIBSSH2_ERROR_ALLOC* - An internal memory allocation call failed.

View File

@@ -1,18 +1,29 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_base64_decode 3 "23 Dec 2008" "libssh2 0.1" "libssh2"
.SH NAME
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_base64_decode
Section: 3
Source: libssh2
See-also:
---
# NAME
libssh2_base64_decode - decode a base64 encoded string
.SH SYNOPSIS
.nf
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_base64_decode(LIBSSH2_SESSION *session, char **dest,
unsigned int *dest_len, const char *src,
unsigned int src_len);
.fi
.SH DESCRIPTION
~~~
# DESCRIPTION
This function is deemed DEPRECATED in 1.0 and will be removed from libssh2
in a future version. Do not use it!
@@ -22,9 +33,13 @@ to.
The returned buffer is allocated by this function, but it is not clear how to
free that memory!
.SH BUGS
# BUGS
The memory that *dest points to is allocated by the malloc function libssh2
uses, but there is no way for an application to free this data in a safe and
reliable way!
.SH RETURN VALUE
0 if successful, \-1 if any error occurred.
# RETURN VALUE
0 if successful, -1 if any error occurred.

View File

@@ -1,29 +1,43 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_close 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
.SH NAME
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_close
Section: 3
Source: libssh2
See-also:
- libssh2_channel_open_ex(3)
- libssh2_channel_wait_closed(3)
---
# NAME
libssh2_channel_close - close a channel
.SH SYNOPSIS
.nf
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_channel_close(LIBSSH2_CHANNEL *channel);
.fi
.SH DESCRIPTION
\fIchannel\fP - active channel stream to set closed status on.
~~~
# DESCRIPTION
*channel* - 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
.BR libssh2_channel_wait_closed(3)
.SH RETURN VALUE
connection as well, follow this command with libssh2_channel_wait_closed(3).
# RETURN VALUE
Return 0 on success or negative on failure. It returns
LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se.
.SH ERRORS
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
.SH SEE ALSO
.BR libssh2_channel_open_ex(3)
# ERRORS
*LIBSSH2_ERROR_SOCKET_SEND* - Unable to send data on socket.

View File

@@ -1,34 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_direct_streamlocal_ex 3 "10 Apr 2023" "libssh2 1.11.0" "libssh2"
.SH NAME
libssh2_channel_direct_streamlocal_ex - Tunnel a UNIX socket connection through an SSH session
.SH SYNOPSIS
.nf
#include <libssh2.h>
LIBSSH2_CHANNEL *
libssh2_channel_direct_streamlocal_ex(LIBSSH2_SESSION *session,
const char *socket_path,
const char *shost, int sport);
.fi
.SH DESCRIPTION
\fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3)
\fIsocket_path\fP - UNIX socket to connect to using the SSH host as a proxy.
\fIshost\fP - Host to tell the SSH server the connection originated on.
\fIsport\fP - Port to tell the SSH server the connection originated from.
Tunnel a UNIX socket 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
Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors.
.SH ERRORS
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
.SH SEE ALSO
.BR libssh2_session_init_ex(3)

View File

@@ -0,0 +1,47 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_direct_streamlocal_ex
Section: 3
Source: libssh2
See-also:
- libssh2_session_init_ex(3)
---
# NAME
libssh2_channel_direct_streamlocal_ex - Tunnel a UNIX socket connection through an SSH session
# SYNOPSIS
~~~c
#include <libssh2.h>
LIBSSH2_CHANNEL *
libssh2_channel_direct_streamlocal_ex(LIBSSH2_SESSION *session,
const char *socket_path,
const char *shost, int sport);
~~~
# DESCRIPTION
*session* - Session instance as returned by libssh2_session_init_ex(3)
*socket_path* - UNIX socket to connect to using the SSH host as a proxy.
*shost* - Host to tell the SSH server the connection originated on.
*sport* - Port to tell the SSH server the connection originated from.
Tunnel a UNIX socket 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.
# RETURN VALUE
Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors.
# ERRORS
*LIBSSH2_ERROR_ALLOC* - An internal memory allocation call failed.

View File

@@ -1,22 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_direct_tcpip 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2"
.SH NAME
libssh2_channel_direct_tcpip - convenience macro for \fIlibssh2_channel_direct_tcpip_ex(3)\fP calls
.SH SYNOPSIS
.nf
#include <libssh2.h>
LIBSSH2_CHANNEL *
libssh2_channel_direct_tcpip(LIBSSH2_SESSION *session,
const char *host, int port);
.fi
.SH DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function \fIlibssh2_channel_direct_tcpip_ex(3)\fP.
.SH RETURN VALUE
See \fIlibssh2_channel_direct_tcpip_ex(3)\fP
.SH ERRORS
See \fIlibssh2_channel_direct_tcpip_ex(3)\fP
.SH SEE ALSO
.BR libssh2_channel_direct_tcpip_ex(3)

View File

@@ -0,0 +1,36 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_direct_tcpip
Section: 3
Source: libssh2
See-also:
- libssh2_channel_direct_tcpip_ex(3)
---
# NAME
libssh2_channel_direct_tcpip - convenience macro for *libssh2_channel_direct_tcpip_ex(3)* calls
# SYNOPSIS
~~~c
#include <libssh2.h>
LIBSSH2_CHANNEL *
libssh2_channel_direct_tcpip(LIBSSH2_SESSION *session,
const char *host, int port);
~~~
# DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function *libssh2_channel_direct_tcpip_ex(3)*.
# RETURN VALUE
See *libssh2_channel_direct_tcpip_ex(3)*
# ERRORS
See *libssh2_channel_direct_tcpip_ex(3)*

View File

@@ -1,10 +1,20 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_direct_tcpip_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
.SH NAME
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_direct_tcpip_ex
Section: 3
Source: libssh2
See-also:
- libssh2_session_init_ex(3)
---
# NAME
libssh2_channel_direct_tcpip_ex - Tunnel a TCP connection through an SSH session
.SH SYNOPSIS
.nf
# SYNOPSIS
~~~c
#include <libssh2.h>
LIBSSH2_CHANNEL *
@@ -15,26 +25,29 @@ libssh2_channel_direct_tcpip_ex(LIBSSH2_SESSION *session,
LIBSSH2_CHANNEL *
libssh2_channel_direct_tcpip(LIBSSH2_SESSION *session,
const char *host, int port);
.fi
.SH DESCRIPTION
\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.
# DESCRIPTION
\fIport\fP - Port on third party host to connect to.
*session* - Session instance as returned by libssh2_session_init_ex(3)
\fIshost\fP - Host to tell the SSH server the connection originated on.
*host* - Third party host to connect to using the SSH host as a proxy.
\fIsport\fP - Port to tell the SSH server the connection originated from.
*port* - Port on third party host to connect to.
*shost* - Host to tell the SSH server the connection originated on.
*sport* - 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
in cleartext.
.SH RETURN VALUE
# RETURN VALUE
Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors.
.SH ERRORS
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
.SH SEE ALSO
.BR libssh2_session_init_ex(3)
# ERRORS
*LIBSSH2_ERROR_ALLOC* - An internal memory allocation call failed.

View File

@@ -1,21 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_eof 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
.SH NAME
libssh2_channel_eof - check a channel's EOF status
.SH SYNOPSIS
.nf
#include <libssh2.h>
int
libssh2_channel_eof(LIBSSH2_CHANNEL *channel);
.fi
.SH DESCRIPTION
\fIchannel\fP - active channel stream to set closed status on.
Check if the remote host has sent an EOF status for the selected stream.
.SH RETURN VALUE
Returns 1 if the remote host has sent EOF, otherwise 0. Negative on
failure.
.SH SEE ALSO
.BR libssh2_channel_close(3)

View File

@@ -0,0 +1,33 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_eof
Section: 3
Source: libssh2
See-also:
- libssh2_channel_close(3)
---
# NAME
libssh2_channel_eof - check a channel's EOF status
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_channel_eof(LIBSSH2_CHANNEL *channel);
~~~
# DESCRIPTION
*channel* - active channel stream to set closed status on.
Check if the remote host has sent an EOF status for the selected stream.
# RETURN VALUE
Returns 1 if the remote host has sent EOF, otherwise 0. Negative on
failure.

View File

@@ -1,21 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_exec 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2"
.SH NAME
libssh2_channel_exec - convenience macro for \fIlibssh2_channel_process_startup(3)\fP calls
.SH SYNOPSIS
.nf
#include <libssh2.h>
int
libssh2_channel_exec(LIBSSH2_CHANNEL *channel, const char *command);
.fi
.SH DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function \fIlibssh2_channel_process_startup(3)\fP.
.SH RETURN VALUE
See \fIlibssh2_channel_process_startup(3)\fP
.SH ERRORS
See \fIlibssh2_channel_process_startup(3)\fP
.SH SEE ALSO
.BR libssh2_channel_process_startup(3)

View File

@@ -0,0 +1,35 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_exec
Section: 3
Source: libssh2
See-also:
- libssh2_channel_process_startup(3)
---
# NAME
libssh2_channel_exec - convenience macro for *libssh2_channel_process_startup(3)* calls
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_channel_exec(LIBSSH2_CHANNEL *channel, const char *command);
~~~
# DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function *libssh2_channel_process_startup(3)*.
# RETURN VALUE
See *libssh2_channel_process_startup(3)*
# ERRORS
See *libssh2_channel_process_startup(3)*

View File

@@ -1,21 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_flush 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2"
.SH NAME
libssh2_channel_flush - convenience macro for \fIlibssh2_channel_flush_ex(3)\fP calls
.SH SYNOPSIS
.nf
#include <libssh2.h>
int
libssh2_channel_flush(LIBSSH2_CHANNEL *channel);
.fi
.SH DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function \fIlibssh2_channel_flush_ex(3)\fP.
.SH RETURN VALUE
See \fIlibssh2_channel_flush_ex(3)\fP
.SH ERRORS
See \fIlibssh2_channel_flush_ex(3)\fP
.SH SEE ALSO
.BR libssh2_channel_flush_ex(3)

View File

@@ -0,0 +1,35 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_flush
Section: 3
Source: libssh2
See-also:
- libssh2_channel_flush_ex(3)
---
# NAME
libssh2_channel_flush - convenience macro for *libssh2_channel_flush_ex(3)* calls
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_channel_flush(LIBSSH2_CHANNEL *channel);
~~~
# DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function *libssh2_channel_flush_ex(3)*.
# RETURN VALUE
See *libssh2_channel_flush_ex(3)*
# ERRORS
See *libssh2_channel_flush_ex(3)*

View File

@@ -1,10 +1,19 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_flush_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
.SH NAME
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_flush_ex
Section: 3
Source: libssh2
See-also:
---
# NAME
libssh2_channel_flush_ex - flush a channel
.SH SYNOPSIS
.nf
# SYNOPSIS
~~~c
#include <libssh2.h>
int
@@ -15,20 +24,24 @@ libssh2_channel_flush(LIBSSH2_CHANNEL *channel);
int
libssh2_channel_flush_stderr(LIBSSH2_CHANNEL *channel);
.fi
.SH DESCRIPTION
\fIchannel\fP - Active channel stream to flush.
~~~
\fIstreamid\fP - Specific substream number to flush. Groups of substreams may
# DESCRIPTION
*channel* - Active channel stream to flush.
*streamid* - 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
**LIBSSH2_CHANNEL_FLUSH_EXTENDED_DATA**: Flush all extended data substreams
**LIBSSH2_CHANNEL_FLUSH_ALL**: Flush all substreams
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
# RETURN VALUE
Return the number of bytes flushed or negative on failure.
It returns LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se.

View File

@@ -1,21 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_flush_stderr 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2"
.SH NAME
libssh2_channel_flush_stderr - convenience macro for \fIlibssh2_channel_flush_ex(3)\fP calls
.SH SYNOPSIS
.nf
#include <libssh2.h>
int
libssh2_channel_flush_stderr(LIBSSH2_CHANNEL *channel);
.fi
.SH DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function \fIlibssh2_channel_flush_ex(3)\fP.
.SH RETURN VALUE
See \fIlibssh2_channel_flush_ex(3)\fP
.SH ERRORS
See \fIlibssh2_channel_flush_ex(3)\fP
.SH SEE ALSO
.BR libssh2_channel_flush_ex(3)

View File

@@ -0,0 +1,35 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_flush_stderr
Section: 3
Source: libssh2
See-also:
- libssh2_channel_flush_ex(3)
---
# NAME
libssh2_channel_flush_stderr - convenience macro for *libssh2_channel_flush_ex(3)* calls
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_channel_flush_stderr(LIBSSH2_CHANNEL *channel);
~~~
# DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function *libssh2_channel_flush_ex(3)*.
# RETURN VALUE
See *libssh2_channel_flush_ex(3)*
# ERRORS
See *libssh2_channel_flush_ex(3)*

View File

@@ -1,23 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_forward_accept 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
.SH NAME
libssh2_channel_forward_accept - accept a queued connection
.SH SYNOPSIS
.nf
#include <libssh2.h>
LIBSSH2_CHANNEL *
libssh2_channel_forward_accept(LIBSSH2_LISTENER *listener);
.fi
.SH DESCRIPTION
\fIlistener\fP is a forwarding listener instance as returned by
\fBlibssh2_channel_forward_listen_ex(3)\fP.
.SH RETURN VALUE
A newly allocated channel instance or NULL on failure.
.SH ERRORS
When this function returns NULL use \fIlibssh2_session_last_errno(3)\fP to
extract the error code. If that code is \fILIBSSH2_ERROR_EAGAIN\fP, the
session is set to do non-blocking I/O but the call would block.
.SH SEE ALSO
.BR libssh2_channel_forward_listen_ex(3)

View File

@@ -0,0 +1,37 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_forward_accept
Section: 3
Source: libssh2
See-also:
- libssh2_channel_forward_listen_ex(3)
---
# NAME
libssh2_channel_forward_accept - accept a queued connection
# SYNOPSIS
~~~c
#include <libssh2.h>
LIBSSH2_CHANNEL *
libssh2_channel_forward_accept(LIBSSH2_LISTENER *listener);
~~~
# DESCRIPTION
*listener* is a forwarding listener instance as returned by
**libssh2_channel_forward_listen_ex(3)**.
# RETURN VALUE
A newly allocated channel instance or NULL on failure.
# ERRORS
When this function returns NULL use *libssh2_session_last_errno(3)* to
extract the error code. If that code is *LIBSSH2_ERROR_EAGAIN*, the
session is set to do non-blocking I/O but the call would block.

View File

@@ -1,28 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_forward_cancel 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
.SH NAME
libssh2_channel_forward_cancel - cancel a forwarded TCP port
.SH SYNOPSIS
.nf
#include <libssh2.h>
int
libssh2_channel_forward_cancel(LIBSSH2_LISTENER *listener);
.fi
.SH DESCRIPTION
\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.
.SH RETURN VALUE
Return 0 on success or negative on failure. It returns
LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se.
.SH ERRORS
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
.SH SEE ALSO
.BR libssh2_channel_forward_listen_ex(3)

View File

@@ -0,0 +1,42 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_forward_cancel
Section: 3
Source: libssh2
See-also:
- libssh2_channel_forward_listen_ex(3)
---
# NAME
libssh2_channel_forward_cancel - cancel a forwarded TCP port
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_channel_forward_cancel(LIBSSH2_LISTENER *listener);
~~~
# DESCRIPTION
*listener* - Forwarding listener instance as returned by
libssh2_channel_forward_listen_ex(3)
Instruct the remote host to stop listening for new connections on a previously
requested host/port.
# RETURN VALUE
Return 0 on success or negative on failure. It returns
LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se.
# ERRORS
*LIBSSH2_ERROR_ALLOC* - An internal memory allocation call failed.
*LIBSSH2_ERROR_SOCKET_SEND* - Unable to send data on socket.

View File

@@ -1,21 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_forward_listen 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2"
.SH NAME
libssh2_channel_forward_listen - convenience macro for \fIlibssh2_channel_forward_listen_ex(3)\fP calls
.SH SYNOPSIS
.nf
#include <libssh2.h>
int
libssh2_channel_forward_listen(LIBSSH2_SESSION *session, int port);
.fi
.SH DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function \fIlibssh2_channel_forward_listen_ex(3)\fP.
.SH RETURN VALUE
See \fIlibssh2_channel_forward_listen_ex(3)\fP
.SH ERRORS
See \fIlibssh2_channel_forward_listen_ex(3)\fP
.SH SEE ALSO
.BR libssh2_channel_forward_listen_ex(3)

View File

@@ -0,0 +1,35 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_forward_listen
Section: 3
Source: libssh2
See-also:
- libssh2_channel_forward_listen_ex(3)
---
# NAME
libssh2_channel_forward_listen - convenience macro for *libssh2_channel_forward_listen_ex(3)* calls
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_channel_forward_listen(LIBSSH2_SESSION *session, int port);
~~~
# DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function *libssh2_channel_forward_listen_ex(3)*.
# RETURN VALUE
See *libssh2_channel_forward_listen_ex(3)*
# ERRORS
See *libssh2_channel_forward_listen_ex(3)*

View File

@@ -1,51 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_forward_listen_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
.SH NAME
libssh2_channel_forward_listen_ex - listen to inbound connections
.SH SYNOPSIS
.nf
#include <libssh2.h>
LIBSSH2_LISTENER *
libssh2_channel_forward_listen_ex(LIBSSH2_SESSION *session,
char *host, int port,
int *bound_port, int queue_maxsize);
LIBSSH2_LISTENER *
libssh2_channel_forward_listen(LIBSSH2_SESSION *session, int port);
.fi
.SH DESCRIPTION
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().
\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.
\fIport\fP - port to bind to on the remote host. When 0 is passed, the remote
host will select the first available dynamic port.
\fIbound_port\fP - Populated with the actual port bound on the remote
host. Useful when requesting dynamic port numbers.
\fIqueue_maxsize\fP - Maximum number of pending connections to queue before
rejecting further attempts.
\fIlibssh2_channel_forward_listen(3)\fP is a macro.
.SH RETURN VALUE
A newly allocated LIBSSH2_LISTENER instance or NULL on failure.
.SH ERRORS
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_PROTO\fP - An invalid SSH protocol response was received on the socket.
\fILIBSSH2_ERROR_REQUEST_DENIED\fP - The remote server refused the request.
\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block.
.SH SEE ALSO
.BR libssh2_channel_forward_accept(3)

View File

@@ -0,0 +1,65 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_forward_listen_ex
Section: 3
Source: libssh2
See-also:
- libssh2_channel_forward_accept(3)
---
# NAME
libssh2_channel_forward_listen_ex - listen to inbound connections
# SYNOPSIS
~~~c
#include <libssh2.h>
LIBSSH2_LISTENER *
libssh2_channel_forward_listen_ex(LIBSSH2_SESSION *session,
char *host, int port,
int *bound_port, int queue_maxsize);
LIBSSH2_LISTENER *
libssh2_channel_forward_listen(LIBSSH2_SESSION *session, int port);
~~~
# DESCRIPTION
Instruct the remote SSH server to begin listening for inbound TCP/IP
connections. New connections will be queued by the library until accepted by
*libssh2_channel_forward_accept(3)*.
*session* - instance as returned by libssh2_session_init().
*host* - 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.
*port* - port to bind to on the remote host. When 0 is passed, the remote
host will select the first available dynamic port.
*bound_port* - Populated with the actual port bound on the remote
host. Useful when requesting dynamic port numbers.
*queue_maxsize* - Maximum number of pending connections to queue before
rejecting further attempts.
*libssh2_channel_forward_listen(3)* is a macro.
# RETURN VALUE
A newly allocated LIBSSH2_LISTENER instance or NULL on failure.
# ERRORS
*LIBSSH2_ERROR_ALLOC* - An internal memory allocation call failed.
*LIBSSH2_ERROR_SOCKET_SEND* - Unable to send data on socket.
*LIBSSH2_ERROR_PROTO* - An invalid SSH protocol response was received on the socket.
*LIBSSH2_ERROR_REQUEST_DENIED* - The remote server refused the request.
*LIBSSH2_ERROR_EAGAIN* - Marked for non-blocking I/O but the call would block.

View File

@@ -1,26 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_free 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
.SH NAME
libssh2_channel_free - free all resources associated with a channel
.SH SYNOPSIS
.nf
#include <libssh2.h>
int
libssh2_channel_free(LIBSSH2_CHANNEL *channel);
.fi
.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
.BR libssh2_channel_close(3)
, it will be called automatically so that the remote end may know that it
can safely free its own resources.
.SH RETURN VALUE
Return 0 on success or negative on failure. It returns
LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se.
.SH SEE ALSO
.BR libssh2_channel_close(3)

View File

@@ -0,0 +1,37 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_free
Section: 3
Source: libssh2
See-also:
- libssh2_channel_close(3)
---
# NAME
libssh2_channel_free - free all resources associated with a channel
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_channel_free(LIBSSH2_CHANNEL *channel);
~~~
# DESCRIPTION
*channel* - Channel stream to free.
Release all resources associated with a channel stream. If the channel has
not yet been closed with libssh2_channel_close(3) it will be called
automatically so that the remote end may know that it can safely free its
own resources.
# RETURN VALUE
Return 0 on success or negative on failure. It returns
LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se.

View File

@@ -1,10 +1,19 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_get_exit_signal 3 "4 Oct 2010" "libssh2 1.2.8" "libssh2"
.SH NAME
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_get_exit_signal
Section: 3
Source: libssh2
See-also:
---
# NAME
libssh2_channel_get_exit_signal - get the remote exit signal
.SH SYNOPSIS
.nf
# SYNOPSIS
~~~c
#include <libssh2.h>
int
@@ -12,28 +21,32 @@ 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);
.fi
.SH DESCRIPTION
\fIchannel\fP - Closed channel stream to retrieve exit signal from.
~~~
\fIexitsignal\fP - If not NULL, is populated by reference with the exit signal
# DESCRIPTION
*channel* - Closed channel stream to retrieve exit signal from.
*exitsignal* - 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.
\fIexitsignal_len\fP - If not NULL, is populated by reference with the length
*exitsignal_len* - If not NULL, is populated by reference with the length
of exitsignal.
\fIerrmsg\fP - If not NULL, is populated by reference with the error message
*errmsg* - 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
string is stored in a newly allocated buffer.
\fIerrmsg_len\fP - If not NULL, is populated by reference with the length of errmsg.
*errmsg_len* - 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
*langtag* - 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.
\fIlangtag_len\fP - If not NULL, is populated by reference with the length of langtag.
.SH RETURN VALUE
*langtag_len* - If not NULL, is populated by reference with the length of langtag.
# RETURN VALUE
Numeric error code corresponding to the the Error Code constants.

View File

@@ -1,20 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_get_exit_status 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
.SH NAME
libssh2_channel_get_exit_status - get the remote exit code
.SH SYNOPSIS
.nf
#include <libssh2.h>
int
libssh2_channel_get_exit_status(LIBSSH2_CHANNEL* channel)
.fi
.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
available if the remote end has not yet set its status to closed.
.SH RETURN VALUE
Returns 0 on failure, otherwise the \fIExit Status\fP reported by remote host

View File

@@ -0,0 +1,33 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_get_exit_status
Section: 3
Source: libssh2
See-also:
---
# NAME
libssh2_channel_get_exit_status - get the remote exit code
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_channel_get_exit_status(LIBSSH2_CHANNEL* channel)
~~~
# DESCRIPTION
*channel* - 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
available if the remote end has not yet set its status to closed.
# RETURN VALUE
Returns 0 on failure, otherwise the *Exit Status* reported by remote host

View File

@@ -1,39 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_handle_extended_data 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
.SH NAME
libssh2_channel_handle_extended_data - set extended data handling mode
.SH SYNOPSIS
.nf
#include <libssh2.h>
void
libssh2_channel_handle_extended_data(LIBSSH2_CHANNEL *channel,
int ignore_mode);
.fi
.SH DESCRIPTION
This function is \fBDEPRECATED\fP in 1.1.0. Use the
\fIlibssh2_channel_handle_extended_data2(3)\fP function instead!
\fIchannel\fP - Active channel stream to change extended data handling on.
\fIignore_mode\fP - One of the three LIBSSH2_CHANNEL_EXTENDED_DATA_* Constants.
.br
\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
\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
arrives.
Change how a channel deals with extended data packets. By default all extended
data is queued until read by \fIlibssh2_channel_read_ex(3)\fP
.SH RETURN VALUE
None.
.SH SEE ALSO
.BR libssh2_channel_handle_extended_data2(3)
.BR libssh2_channel_read_ex(3)

View File

@@ -0,0 +1,51 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_handle_extended_data
Section: 3
Source: libssh2
See-also:
- libssh2_channel_handle_extended_data2(3)
- libssh2_channel_read_ex(3)
---
# NAME
libssh2_channel_handle_extended_data - set extended data handling mode
# SYNOPSIS
~~~c
#include <libssh2.h>
void
libssh2_channel_handle_extended_data(LIBSSH2_CHANNEL *channel,
int ignore_mode);
~~~
# DESCRIPTION
This function is **DEPRECATED** in 1.1.0. Use the
*libssh2_channel_handle_extended_data2(3)* function instead!
*channel* - Active channel stream to change extended data handling on.
*ignore_mode* - One of the three LIBSSH2_CHANNEL_EXTENDED_DATA_* Constants.
**LIBSSH2_CHANNEL_EXTENDED_DATA_NORMAL**: Queue extended data for eventual
reading
**LIBSSH2_CHANNEL_EXTENDED_DATA_MERGE**: Treat extended data and ordinary
data the same. Merge all substreams such that calls to
*libssh2_channel_read(3)* will pull from all substreams on a
first-in/first-out basis.
**LIBSSH2_CHANNEL_EXTENDED_DATA_IGNORE**: 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 *libssh2_channel_read_ex(3)*
# RETURN VALUE
None.

View File

@@ -1,37 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_handle_extended_data2 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
.SH NAME
libssh2_channel_handle_extended_data2 - set extended data handling mode
.SH SYNOPSIS
.nf
#include <libssh2.h>
int
libssh2_channel_handle_extended_data2(LIBSSH2_CHANNEL *channel,
int ignore_mode);
.fi
.SH DESCRIPTION
\fIchannel\fP - Active channel stream to change extended data handling on.
\fIignore_mode\fP - One of the three LIBSSH2_CHANNEL_EXTENDED_DATA_* Constants.
.br
\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
.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
arrives.
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
Return 0 on success or LIBSSH2_ERROR_EAGAIN when it would otherwise block.
.SH SEE ALSO
.BR libssh2_channel_handle_extended_data(3)
.BR libssh2_channel_read_ex(3)

View File

@@ -0,0 +1,48 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_handle_extended_data2
Section: 3
Source: libssh2
See-also:
- libssh2_channel_handle_extended_data(3)
- libssh2_channel_read(3)
- libssh2_channel_read_ex(3)
---
# NAME
libssh2_channel_handle_extended_data2 - set extended data handling mode
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_channel_handle_extended_data2(LIBSSH2_CHANNEL *channel,
int ignore_mode);
~~~
# DESCRIPTION
*channel* - Active channel stream to change extended data handling on.
*ignore_mode* - One of the three LIBSSH2_CHANNEL_EXTENDED_DATA_* Constants.
**LIBSSH2_CHANNEL_EXTENDED_DATA_NORMAL**: Queue extended data for eventual
reading
**LIBSSH2_CHANNEL_EXTENDED_DATA_MERGE**: Treat extended data and ordinary
data the same. Merge all substreams such that calls to libssh2_channel_read(3)
will pull from all substreams on a first-in/first-out basis.
**LIBSSH2_CHANNEL_EXTENDED_DATA_IGNORE**: 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 libssh2_channel_read_ex(3).
# RETURN VALUE
Return 0 on success or LIBSSH2_ERROR_EAGAIN when it would otherwise block.

View File

@@ -1,25 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_ignore_extended_data 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2"
.SH NAME
libssh2_channel_ignore_extended_data - convenience macro for \fIlibssh2_channel_handle_extended_data(3)\fP calls
.SH SYNOPSIS
.nf
#include <libssh2.h>
void
libssh2_channel_ignore_extended_data(LIBSSH2_CHANNEL *channel,
int ignore_mode);
.fi
.SH DESCRIPTION
This function is \fBDEPRECATED\fP in 0.3.0. Use the
\fIlibssh2_channel_handle_extended_data2(3)\fP function instead!
This is a macro defined in a public libssh2 header file that is using the
underlying function \fIlibssh2_channel_handle_extended_data(3)\fP.
.SH RETURN VALUE
See \fIlibssh2_channel_handle_extended_data(3)\fP
.SH ERRORS
See \fIlibssh2_channel_handle_extended_data(3)\fP
.SH SEE ALSO
.BR libssh2_channel_handle_extended_data(3)

View File

@@ -0,0 +1,39 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_ignore_extended_data
Section: 3
Source: libssh2
See-also:
- libssh2_channel_handle_extended_data(3)
---
# NAME
libssh2_channel_ignore_extended_data - convenience macro for *libssh2_channel_handle_extended_data(3)* calls
# SYNOPSIS
~~~c
#include <libssh2.h>
void
libssh2_channel_ignore_extended_data(LIBSSH2_CHANNEL *channel,
int ignore_mode);
~~~
# DESCRIPTION
This function is **DEPRECATED** in 0.3.0. Use the
*libssh2_channel_handle_extended_data2(3)* function instead!
This is a macro defined in a public libssh2 header file that is using the
underlying function *libssh2_channel_handle_extended_data(3)*.
# RETURN VALUE
See *libssh2_channel_handle_extended_data(3)*
# ERRORS
See *libssh2_channel_handle_extended_data(3)*

View File

@@ -1,58 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_open_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
.SH NAME
libssh2_channel_open_ex - establish a generic session channel
.SH SYNOPSIS
.nf
#include <libssh2.h>
LIBSSH2_CHANNEL *
libssh2_channel_open_ex(LIBSSH2_SESSION *session, const char *channel_type,
unsigned int channel_type_len,
unsigned int window_size,
unsigned int packet_size,
const char *message, unsigned int message_len);
LIBSSH2_CHANNEL *
libssh2_channel_open_session(session);
.fi
.SH DESCRIPTION
\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
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
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
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:
.BR libssh2_channel_open_session(3)
or via
.BR libssh2_channel_direct_tcpip(3)
or
.BR libssh2_channel_forward_listen(3)
.SH RETURN VALUE
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_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_CHANNEL_FAILURE\fP -
\fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block.
.SH SEE ALSO
Add related functions

View File

@@ -0,0 +1,72 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_open_ex
Section: 3
Source: libssh2
See-also:
- libssh2_channel_direct_tcpip(3)
- libssh2_channel_forward_listen(3)
- libssh2_channel_open_session(3)
- libssh2_session_init_ex(3)
---
# NAME
libssh2_channel_open_ex - establish a generic session channel
# SYNOPSIS
~~~c
#include <libssh2.h>
LIBSSH2_CHANNEL *
libssh2_channel_open_ex(LIBSSH2_SESSION *session, const char *channel_type,
unsigned int channel_type_len,
unsigned int window_size,
unsigned int packet_size,
const char *message, unsigned int message_len);
LIBSSH2_CHANNEL *
libssh2_channel_open_session(session);
~~~
# DESCRIPTION
*session* - Session instance as returned by libssh2_session_init_ex(3)
*channel_type* - 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.
*channel_type_len* - Length of channel_type
*window_size* - Maximum amount of unacknowledged data remote host is
allowed to send before receiving an SSH_MSG_CHANNEL_WINDOW_ADJUST packet.
*packet_size* - Maximum number of bytes remote host is allowed to send
in a single SSH_MSG_CHANNEL_DATA or SSG_MSG_CHANNEL_EXTENDED_DATA packet.
*message* - Additional data as required by the selected channel_type.
*message_len* - Length of message parameter.
Allocate a new channel for exchanging data with the server. This method is
typically called through its macroized form:
*libssh2_channel_open_session(3)* or via *libssh2_channel_direct_tcpip(3)*
or *libssh2_channel_forward_listen(3)*
# RETURN VALUE
Pointer to a newly allocated LIBSSH2_CHANNEL instance, or NULL on errors.
# ERRORS
*LIBSSH2_ERROR_ALLOC* - An internal memory allocation call failed.
*LIBSSH2_ERROR_SOCKET_SEND* - Unable to send data on socket.
*LIBSSH2_ERROR_CHANNEL_FAILURE* -
*LIBSSH2_ERROR_EAGAIN* - Marked for non-blocking I/O but the call would block.
Add related functions

View File

@@ -1,21 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_open_session 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2"
.SH NAME
libssh2_channel_open_session - convenience macro for \fIlibssh2_channel_open_ex(3)\fP calls
.SH SYNOPSIS
.nf
#include <libssh2.h>
LIBSSH2_CHANNEL *
libssh2_channel_open_session(LIBSSH2_SESSION *session);
.fi
.SH DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function \fIlibssh2_channel_open_ex(3)\fP.
.SH RETURN VALUE
See \fIlibssh2_channel_open_ex(3)\fP
.SH ERRORS
See \fIlibssh2_channel_open_ex(3)\fP
.SH SEE ALSO
.BR libssh2_channel_open_ex(3)

View File

@@ -0,0 +1,35 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_open_session
Section: 3
Source: libssh2
See-also:
- libssh2_channel_open_ex(3)
---
# NAME
libssh2_channel_open_session - convenience macro for *libssh2_channel_open_ex(3)* calls
# SYNOPSIS
~~~c
#include <libssh2.h>
LIBSSH2_CHANNEL *
libssh2_channel_open_session(LIBSSH2_SESSION *session);
~~~
# DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function *libssh2_channel_open_ex(3)*.
# RETURN VALUE
See *libssh2_channel_open_ex(3)*
# ERRORS
See *libssh2_channel_open_ex(3)*

View File

@@ -1,42 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_process_startup 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
.SH NAME
libssh2_channel_process_startup - request a shell on a channel
.SH SYNOPSIS
.nf
#include <libssh2.h>
int
libssh2_channel_process_startup(LIBSSH2_CHANNEL *channel,
const char *request,
unsigned int request_len,
const char *message,
unsigned int message_len);
.fi
.SH DESCRIPTION
\fIchannel\fP - Active session channel instance.
\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.
\fImessage\fP - Request specific message data to include.
\fImessage_len\fP - Length of message parameter.
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
LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se.
.SH ERRORS
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP -
.SH SEE ALSO
.BR libssh2_channel_open_ex(3)

View File

@@ -0,0 +1,56 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_process_startup
Section: 3
Source: libssh2
See-also:
- libssh2_channel_open_ex(3)
---
# NAME
libssh2_channel_process_startup - request a shell on a channel
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_channel_process_startup(LIBSSH2_CHANNEL *channel,
const char *request,
unsigned int request_len,
const char *message,
unsigned int message_len);
~~~
# DESCRIPTION
*channel* - Active session channel instance.
*request* - Type of process to startup. The SSH2 protocol currently
defines shell, exec, and subsystem as standard process services.
*request_len* - Length of request parameter.
*message* - Request specific message data to include.
*message_len* - Length of message parameter.
Initiate a request on a session type channel such as returned by
libssh2_channel_open_ex(3).
# RETURN VALUE
Return 0 on success or negative on failure. It returns
LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se.
# ERRORS
*LIBSSH2_ERROR_ALLOC* - An internal memory allocation call failed.
*LIBSSH2_ERROR_SOCKET_SEND* - Unable to send data on socket.
*LIBSSH2_ERROR_CHANNEL_REQUEST_DENIED* -

View File

@@ -1,22 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_read 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2"
.SH NAME
libssh2_channel_read - convenience macro for \fIlibssh2_channel_read_ex(3)\fP calls
.SH SYNOPSIS
.nf
#include <libssh2.h>
ssize_t
libssh2_channel_read(LIBSSH2_CHANNEL *channel,
char *buf, size_t buflen);
.fi
.SH DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function \fIlibssh2_channel_read_ex(3)\fP.
.SH RETURN VALUE
See \fIlibssh2_channel_read_ex(3)\fP
.SH ERRORS
See \fIlibssh2_channel_read_ex(3)\fP
.SH SEE ALSO
.BR libssh2_channel_read_ex(3)

View File

@@ -0,0 +1,36 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_read
Section: 3
Source: libssh2
See-also:
- libssh2_channel_read_ex(3)
---
# NAME
libssh2_channel_read - convenience macro for *libssh2_channel_read_ex(3)* calls
# SYNOPSIS
~~~c
#include <libssh2.h>
ssize_t
libssh2_channel_read(LIBSSH2_CHANNEL *channel,
char *buf, size_t buflen);
~~~
# DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function *libssh2_channel_read_ex(3)*.
# RETURN VALUE
See *libssh2_channel_read_ex(3)*
# ERRORS
See *libssh2_channel_read_ex(3)*

View File

@@ -1,10 +1,20 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_read_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
.SH NAME
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_read_ex
Section: 3
Source: libssh2
See-also:
- libssh2_poll_channel_read(3)
---
# NAME
libssh2_channel_read_ex - read data from a channel stream
.SH SYNOPSIS
.nf
# SYNOPSIS
~~~c
#include <libssh2.h>
ssize_t
@@ -18,33 +28,37 @@ libssh2_channel_read(LIBSSH2_CHANNEL *channel,
ssize_t
libssh2_channel_read_stderr(LIBSSH2_CHANNEL *channel,
char *buf, size_t buflen);
.fi
.SH DESCRIPTION
~~~
# DESCRIPTION
Attempt to read data from an active channel stream. All channel streams have
one standard I/O substream (stream_id == 0), and may have up to 2^32 extended
data streams as identified by the selected \fIstream_id\fP. The SSH2 protocol
data streams as identified by the selected *stream_id*. The SSH2 protocol
currently defines a stream ID of 1 to be the stderr substream.
\fIchannel\fP - active channel stream to read from.
*channel* - active channel stream to read from.
\fIstream_id\fP - substream ID number (e.g. 0 or SSH_EXTENDED_DATA_STDERR)
*stream_id* - substream ID number (e.g. 0 or SSH_EXTENDED_DATA_STDERR)
\fIbuf\fP - pointer to storage buffer to read data into
*buf* - pointer to storage buffer to read data into
\fIbuflen\fP - size of the buf storage
*buflen* - size of the buf storage
\fIlibssh2_channel_read(3)\fP and \fIlibssh2_channel_read_stderr(3)\fP are
*libssh2_channel_read(3)* and *libssh2_channel_read_stderr(3)* are
macros.
.SH RETURN VALUE
# RETURN VALUE
Actual number of bytes read or negative on failure. It returns
LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se.
Note that a return value of zero (0) can in fact be a legitimate value and
only signals that no payload data was read. It is not an error.
.SH ERRORS
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_CHANNEL_CLOSED\fP - The channel has been closed.
.SH SEE ALSO
.BR libssh2_poll_channel_read(3)
# ERRORS
*LIBSSH2_ERROR_SOCKET_SEND* - Unable to send data on socket.
*LIBSSH2_ERROR_CHANNEL_CLOSED* - The channel has been closed.

View File

@@ -1,22 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_read_stderr 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2"
.SH NAME
libssh2_channel_read_stderr - convenience macro for \fIlibssh2_channel_read_ex(3)\fP calls
.SH SYNOPSIS
.nf
#include <libssh2.h>
ssize_t
libssh2_channel_read_stderr(LIBSSH2_CHANNEL *channel,
char *buf, size_t buflen);
.fi
.SH DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function \fIlibssh2_channel_read_ex(3)\fP.
.SH RETURN VALUE
See \fIlibssh2_channel_read_ex(3)\fP
.SH ERRORS
See \fIlibssh2_channel_read_ex(3)\fP
.SH SEE ALSO
.BR libssh2_channel_read_ex(3)

View File

@@ -0,0 +1,36 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_read_stderr
Section: 3
Source: libssh2
See-also:
- libssh2_channel_read_ex(3)
---
# NAME
libssh2_channel_read_stderr - convenience macro for *libssh2_channel_read_ex(3)* calls
# SYNOPSIS
~~~c
#include <libssh2.h>
ssize_t
libssh2_channel_read_stderr(LIBSSH2_CHANNEL *channel,
char *buf, size_t buflen);
~~~
# DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function *libssh2_channel_read_ex(3)*.
# RETURN VALUE
See *libssh2_channel_read_ex(3)*
# ERRORS
See *libssh2_channel_read_ex(3)*

View File

@@ -1,32 +1,46 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_receive_window_adjust 3 "15 Mar 2009" "libssh2 0.15" "libssh2"
.SH NAME
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_receive_window_adjust
Section: 3
Source: libssh2
See-also:
- libssh2_channel_window_read_ex(3)
---
# NAME
libssh2_channel_receive_window_adjust - adjust the channel window
.SH SYNOPSIS
.nf
# SYNOPSIS
~~~c
#include <libssh2.h>
unsigned long
libssh2_channel_receive_window_adjust(LIBSSH2_CHANNEL * channel,
unsigned long adjustment,
unsigned char force);
.fi
.SH DESCRIPTION
This function is \fBDEPRECATED\fP in 1.1.0. Use the
\fIlibssh2_channel_receive_window_adjust2(3)\fP function instead!
~~~
# DESCRIPTION
This function is **DEPRECATED** in 1.1.0. Use the
*libssh2_channel_receive_window_adjust2(3)* function instead!
Adjust the receive window for a channel by adjustment bytes. If the amount to
be adjusted is less than LIBSSH2_CHANNEL_MINADJUST and force is 0 the
adjustment amount will be queued for a later packet.
.SH RETURN VALUE
# RETURN VALUE
Returns the new size of the receive window (as understood by remote end). Note
that the window value sent over the wire is strictly 32bit, but this API is
made to return a 'long' which may not be 32 bit on all platforms.
.SH ERRORS
# ERRORS
In 1.0 and earlier, this function returns LIBSSH2_ERROR_EAGAIN for
non-blocking channels where it would otherwise block. However, that is a
negative number and this function only returns an unsigned value and this then
leads to a very strange value being returned.
.SH SEE ALSO
.BR libssh2_channel_window_read_ex(3)

View File

@@ -1,10 +1,20 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_receive_window_adjust2 3 "26 Mar 2009" "libssh2 1.1" "libssh2"
.SH NAME
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_receive_window_adjust2
Section: 3
Source: libssh2
See-also:
- libssh2_channel_window_read_ex(3)
---
# NAME
libssh2_channel_receive_window_adjust2 - adjust the channel window
.SH SYNOPSIS
.nf
# SYNOPSIS
~~~c
#include <libssh2.h>
int
@@ -12,19 +22,24 @@ libssh2_channel_receive_window_adjust2(LIBSSH2_CHANNEL * channel,
unsigned long adjustment,
unsigned char force,
unsigned int *window);
.fi
.SH DESCRIPTION
~~~
# DESCRIPTION
Adjust the receive window for a channel by adjustment bytes. If the amount to
be adjusted is less than LIBSSH2_CHANNEL_MINADJUST and force is 0 the
adjustment amount will be queued for a later packet.
This function stores the new size of the receive window (as understood by
remote end) in the variable 'window' points to.
.SH RETURN VALUE
# RETURN VALUE
Return 0 on success and a negative value on error. If used in non-blocking
mode it will return LIBSSH2_ERROR_EAGAIN when it would otherwise block.
.SH ERRORS
.SH AVAILABILITY
# ERRORS
# AVAILABILITY
Added in libssh2 1.1 since the previous API has deficiencies.
.SH SEE ALSO
.BR libssh2_channel_window_read_ex(3)

View File

@@ -1,33 +1,44 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_request_auth_agent 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
.SH NAME
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_request_auth_agent
Section: 3
Source: libssh2
See-also:
- libssh2_channel_open_ex(3)
- libssh2_session_callback_set2(3)
---
# NAME
libssh2_channel_request_auth_agent - request agent forwarding for a session
.SH SYNOPSIS
.nf
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_channel_request_auth_agent(LIBSSH2_CHANNEL *channel);
.fi
.SH DESCRIPTION
~~~
# DESCRIPTION
Request that agent forwarding be enabled for this SSH session. This sends the
request over this specific channel, which causes the agent listener to be
started on the remote side upon success. This agent listener will then run
for the duration of the SSH session.
To use agent forwarding,
.BR libssh2_session_callback_set2(3)
must first be called to set \fBLIBSSH2_CALLBACK_AUTHAGENT\fP.
To use agent forwarding, libssh2_session_callback_set2(3)
must first be called to set **LIBSSH2_CALLBACK_AUTHAGENT**.
This callback will be invoked when the remote host opens a connection to the
local agent.
\fIchannel\fP - Previously opened channel instance such as returned by
.BR libssh2_channel_open_ex(3)
.SH RETURN VALUE
*channel* - Previously opened channel instance such as returned by
libssh2_channel_open_ex(3)
# RETURN VALUE
Return 0 on success or negative on failure. It returns
LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se.
.SH SEE ALSO
.BR libssh2_session_callback_set2(3)

View File

@@ -1,21 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_request_pty 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2"
.SH NAME
libssh2_channel_request_pty - convenience macro for \fIlibssh2_channel_request_pty_ex(3)\fP calls
.SH SYNOPSIS
.nf
#include <libssh2.h>
int
libssh2_channel_request_pty(LIBSSH2_SESSION *session, const char *term);
.fi
.SH DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function \fIlibssh2_channel_request_pty_ex(3)\fP.
.SH RETURN VALUE
See \fIlibssh2_channel_request_pty_ex(3)\fP
.SH ERRORS
See \fIlibssh2_channel_request_pty_ex(3)\fP
.SH SEE ALSO
.BR libssh2_channel_request_pty_ex(3)

View File

@@ -0,0 +1,35 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_request_pty
Section: 3
Source: libssh2
See-also:
- libssh2_channel_request_pty_ex(3)
---
# NAME
libssh2_channel_request_pty - convenience macro for *libssh2_channel_request_pty_ex(3)* calls
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_channel_request_pty(LIBSSH2_SESSION *session, const char *term);
~~~
# DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function *libssh2_channel_request_pty_ex(3)*.
# RETURN VALUE
See *libssh2_channel_request_pty_ex(3)*
# ERRORS
See *libssh2_channel_request_pty_ex(3)*

View File

@@ -1,54 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_request_pty_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
.SH NAME
libssh2_channel_request_pty_ex - short function description
.SH SYNOPSIS
.nf
#include <libssh2.h>
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
libssh2_channel_request_pty(LIBSSH2_CHANNEL *channel, const char *term);
.fi
.SH DESCRIPTION
\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...)
\fIterm_len\fP - Length of term parameter
\fImodes\fP - Terminal mode modifier values
\fImodes_len\fP - Length of modes parameter.
\fIwidth\fP - Width of pty in characters
\fIheight\fP - Height of pty in characters
\fIwidth_px\fP - Width of pty in pixels
\fIheight_px\fP - Height of pty in pixels
Request a PTY on an established channel. Note that this does not make sense
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
LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se.
.SH ERRORS
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP -
.SH SEE ALSO
.BR libssh2_channel_open_ex(3)

View File

@@ -0,0 +1,68 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_request_pty_ex
Section: 3
Source: libssh2
See-also:
- libssh2_channel_open_ex(3)
---
# NAME
libssh2_channel_request_pty_ex - short function description
# SYNOPSIS
~~~c
#include <libssh2.h>
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
libssh2_channel_request_pty(LIBSSH2_CHANNEL *channel, const char *term);
~~~
# DESCRIPTION
*channel* - Previously opened channel instance such as returned by
libssh2_channel_open_ex(3)
*term* - Terminal emulation (e.g. vt102, ansi, etc...)
*term_len* - Length of term parameter
*modes* - Terminal mode modifier values
*modes_len* - Length of modes parameter.
*width* - Width of pty in characters
*height* - Height of pty in characters
*width_px* - Width of pty in pixels
*height_px* - 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
success.
# RETURN VALUE
Return 0 on success or negative on failure. It returns
LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se.
# ERRORS
*LIBSSH2_ERROR_ALLOC* - An internal memory allocation call failed.
*LIBSSH2_ERROR_SOCKET_SEND* - Unable to send data on socket.
*LIBSSH2_ERROR_CHANNEL_REQUEST_DENIED* -

View File

@@ -1,22 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_request_pty_size 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2"
.SH NAME
libssh2_channel_request_pty_size - convenience macro for \fIlibssh2_channel_request_pty_size_ex(3)\fP calls
.SH SYNOPSIS
.nf
#include <libssh2.h>
int
libssh2_channel_request_pty_size(LIBSSH2_CHANNEL *channel,
int width, int height);
.fi
.SH DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function \fIlibssh2_channel_request_pty_size_ex(3)\fP.
.SH RETURN VALUE
See \fIlibssh2_channel_request_pty_size_ex(3)\fP
.SH ERRORS
See \fIlibssh2_channel_request_pty_size_ex(3)\fP
.SH SEE ALSO
.BR libssh2_channel_request_pty_size_ex(3)

View File

@@ -0,0 +1,36 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_request_pty_size
Section: 3
Source: libssh2
See-also:
- libssh2_channel_request_pty_size_ex(3)
---
# NAME
libssh2_channel_request_pty_size - convenience macro for *libssh2_channel_request_pty_size_ex(3)* calls
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_channel_request_pty_size(LIBSSH2_CHANNEL *channel,
int width, int height);
~~~
# DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function *libssh2_channel_request_pty_size_ex(3)*.
# RETURN VALUE
See *libssh2_channel_request_pty_size_ex(3)*
# ERRORS
See *libssh2_channel_request_pty_size_ex(3)*

View File

@@ -1,12 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_request_pty_size_ex 3 "1 Jun 2007" "libssh2" "libssh2"
.SH NAME
libssh2_channel_request_pty_size_ex - TODO
.SH SYNOPSIS
.nf
.fi
.SH DESCRIPTION
.SH RETURN VALUE
.SH ERRORS
.SH SEE ALSO

View File

@@ -0,0 +1,23 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_request_pty_size_ex
Section: 3
Source: libssh2
See-also:
---
# NAME
libssh2_channel_request_pty_size_ex - TODO
# SYNOPSIS
~~~c
~~~
# DESCRIPTION
# RETURN VALUE
# ERRORS

View File

@@ -1,24 +1,38 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_send_eof 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
.SH NAME
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_send_eof
Section: 3
Source: libssh2
See-also:
- libssh2_channel_eof(3)
- libssh2_channel_wait_eof(3)
---
# NAME
libssh2_channel_send_eof - send EOF to remote server
.SH SYNOPSIS
.nf
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_channel_send_eof(LIBSSH2_CHANNEL *channel);
.fi
.SH DESCRIPTION
~~~
# DESCRIPTION
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
# RETURN VALUE
Return 0 on success or negative on failure. It returns
LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se.
.SH ERRORS
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
.SH SEE ALSO
.BR libssh2_channel_wait_eof(3)
.BR libssh2_channel_eof(3)
# ERRORS
*LIBSSH2_ERROR_SOCKET_SEND* - Unable to send data on socket.

View File

@@ -1,27 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_set_blocking 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
.SH NAME
libssh2_channel_set_blocking - set or clear blocking mode on channel
.SH SYNOPSIS
.nf
#include <libssh2.h>
void
libssh2_channel_set_blocking(LIBSSH2_CHANNEL *channel, int blocking);
.fi
.SH DESCRIPTION
\fIchannel\fP - channel stream to set or clean blocking status on.
\fIblocking\fP - Set to a non-zero value to make the channel block, or zero to
make it non-blocking.
Currently this is a short cut call to
.BR libssh2_session_set_blocking(3)
and therefore will affect the session and all channels.
.SH RETURN VALUE
None
.SH SEE ALSO
.BR libssh2_session_set_blocking(3)
.BR libssh2_channel_read_ex(3)
.BR libssh2_channel_write_ex(3)

View File

@@ -0,0 +1,38 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_set_blocking
Section: 3
Source: libssh2
See-also:
- libssh2_channel_read_ex(3)
- libssh2_channel_write_ex(3)
- libssh2_session_set_blocking(3)
---
# NAME
libssh2_channel_set_blocking - set or clear blocking mode on channel
# SYNOPSIS
~~~c
#include <libssh2.h>
void
libssh2_channel_set_blocking(LIBSSH2_CHANNEL *channel, int blocking);
~~~
# DESCRIPTION
*channel* - channel stream to set or clean blocking status on.
*blocking* - Set to a non-zero value to make the channel block, or zero to
make it non-blocking.
Currently this is a short cut call to libssh2_session_set_blocking(3)
and therefore will affect the session and all channels.
# RETURN VALUE
None

View File

@@ -1,22 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_setenv 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2"
.SH NAME
libssh2_channel_setenv - convenience macro for \fIlibssh2_channel_setenv_ex(3)\fP calls
.SH SYNOPSIS
.nf
#include <libssh2.h>
int
libssh2_channel_setenv(LIBSSH2_CHANNEL *channel,
const char *varname, const char *value);
.fi
.SH DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function \fIlibssh2_channel_setenv_ex(3)\fP.
.SH RETURN VALUE
See \fIlibssh2_channel_setenv_ex(3)\fP
.SH ERRORS
See \fIlibssh2_channel_setenv_ex(3)\fP
.SH SEE ALSO
.BR libssh2_channel_setenv_ex(3)

View File

@@ -0,0 +1,36 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_setenv
Section: 3
Source: libssh2
See-also:
- libssh2_channel_setenv_ex(3)
---
# NAME
libssh2_channel_setenv - convenience macro for *libssh2_channel_setenv_ex(3)* calls
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_channel_setenv(LIBSSH2_CHANNEL *channel,
const char *varname, const char *value);
~~~
# DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function *libssh2_channel_setenv_ex(3)*.
# RETURN VALUE
See *libssh2_channel_setenv_ex(3)*
# ERRORS
See *libssh2_channel_setenv_ex(3)*

View File

@@ -1,10 +1,20 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_setenv_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
.SH NAME
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_setenv_ex
Section: 3
Source: libssh2
See-also:
- libssh2_channel_open_ex(3)
---
# NAME
libssh2_channel_setenv_ex - set an environment variable on the channel
.SH SYNOPSIS
.nf
# SYNOPSIS
~~~c
#include <libssh2.h>
int
@@ -15,33 +25,36 @@ libssh2_channel_setenv_ex(LIBSSH2_CHANNEL *channel,
int
libssh2_channel_setenv(LIBSSH2_CHANNEL *channel,
char *varname, const char *value);
.fi
.SH DESCRIPTION
\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
# DESCRIPTION
*channel* - Previously opened channel instance such as returned by
libssh2_channel_open_ex(3)
*varname* - Name of environment variable to set on the remote
channel instance.
\fIvarname_len\fP - Length of passed varname parameter.
*varname_len* - Length of passed varname parameter.
\fIvalue\fP - Value to set varname to.
*value* - Value to set varname to.
\fIvalue_len\fP - Length of value parameter.
*value_len* - Length of value parameter.
Set an environment variable in the remote channel's process space. 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 VALUE
Return 0 on success or negative on failure. It returns
LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se.
.SH ERRORS
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
# ERRORS
\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
*LIBSSH2_ERROR_ALLOC* - An internal memory allocation call failed.
\fILIBSSH2_ERROR_CHANNEL_REQUEST_DENIED\fP -
.SH SEE ALSO
.BR libssh2_channel_open_ex(3)
*LIBSSH2_ERROR_SOCKET_SEND* - Unable to send data on socket.
*LIBSSH2_ERROR_CHANNEL_REQUEST_DENIED* -

View File

@@ -1,21 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_shell 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2"
.SH NAME
libssh2_channel_shell - convenience macro for \fIlibssh2_channel_process_startup(3)\fP calls
.SH SYNOPSIS
.nf
#include <libssh2.h>
int
libssh2_channel_shell(LIBSSH2_CHANNEL *channel);
.fi
.SH DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function \fIlibssh2_channel_process_startup(3)\fP.
.SH RETURN VALUE
See \fIlibssh2_channel_process_startup(3)\fP
.SH ERRORS
See \fIlibssh2_channel_process_startup(3)\fP
.SH SEE ALSO
.BR libssh2_channel_process_startup(3)

View File

@@ -0,0 +1,35 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_shell
Section: 3
Source: libssh2
See-also:
- libssh2_channel_process_startup(3)
---
# NAME
libssh2_channel_shell - convenience macro for *libssh2_channel_process_startup(3)* calls
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_channel_shell(LIBSSH2_CHANNEL *channel);
~~~
# DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function *libssh2_channel_process_startup(3)*.
# RETURN VALUE
See *libssh2_channel_process_startup(3)*
# ERRORS
See *libssh2_channel_process_startup(3)*

View File

@@ -1,32 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_signal_ex 3 "20 Apr 2023" "libssh2 1.11.0" "libssh2"
.SH NAME
libssh2_channel_signal_ex -- Send a signal to process previously opened on channel.
.SH SYNOPSIS
.nf
#include <libssh2.h>
int
libssh2_channel_signal_ex(LIBSSH2_CHANNEL *channel,
const char *signame,
size_t signame_len)
.fi
.SH DESCRIPTION
A signal can be delivered to the remote process/service. Some servers or
systems may not implement signals, in which case they will probably ignore this
message.
\fIchannel\fP - Previously opened channel instance such as returned by
.BR libssh2_channel_open_ex(3)
\fIsigname\fP - The signal name is the same as the signal name constant, without the leading "SIG".
\fIsigname_len\fP - Length of passed signal name parameter.
There is also a macro \fIlibssh2_channel_signal(channel, signame)\fP that supplies the strlen of the signame.
.SH RETURN VALUE
Normal channel error codes.
LIBSSH2_ERROR_EAGAIN when it would block.
.SH SEE ALSO
.BR libssh2_channel_get_exit_signal(3)

View File

@@ -0,0 +1,44 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_signal_ex
Section: 3
Source: libssh2
See-also:
- libssh2_channel_get_exit_signal(3)
- libssh2_channel_open_ex(3)
---
# NAME
libssh2_channel_signal_ex -- Send a signal to process previously opened on channel.
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_channel_signal_ex(LIBSSH2_CHANNEL *channel,
const char *signame,
size_t signame_len)
~~~
# DESCRIPTION
A signal can be delivered to the remote process/service. Some servers or
systems may not implement signals, in which case they will probably ignore this
message.
*channel* - Previously opened channel instance such as returned by libssh2_channel_open_ex(3).
*signame* - The signal name is the same as the signal name constant, without the leading "SIG".
*signame_len* - Length of passed signal name parameter.
There is also a macro *libssh2_channel_signal(channel, signame)* that supplies the strlen of the signame.
# RETURN VALUE
Normal channel error codes.
LIBSSH2_ERROR_EAGAIN when it would block.

View File

@@ -1,21 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_subsystem 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2"
.SH NAME
libssh2_channel_subsystem - convenience macro for \fIlibssh2_channel_process_startup(3)\fP calls
.SH SYNOPSIS
.nf
#include <libssh2.h>
int
libssh2_channel_subsystem(LIBSSH2_CHANNEL *channel, const char *subsystem);
.fi
.SH DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function \fIlibssh2_channel_process_startup(3)\fP.
.SH RETURN VALUE
See \fIlibssh2_channel_process_startup(3)\fP
.SH ERRORS
See \fIlibssh2_channel_process_startup(3)\fP
.SH SEE ALSO
.BR libssh2_channel_process_startup(3)

View File

@@ -0,0 +1,35 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_subsystem
Section: 3
Source: libssh2
See-also:
- libssh2_channel_process_startup(3)
---
# NAME
libssh2_channel_subsystem - convenience macro for *libssh2_channel_process_startup(3)* calls
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_channel_subsystem(LIBSSH2_CHANNEL *channel, const char *subsystem);
~~~
# DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function *libssh2_channel_process_startup(3)*.
# RETURN VALUE
See *libssh2_channel_process_startup(3)*
# ERRORS
See *libssh2_channel_process_startup(3)*

View File

@@ -1,25 +1,36 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_wait_closed 3 "29 Nov 2007" "libssh2 0.19" "libssh2"
.SH NAME
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_wait_closed
Section: 3
Source: libssh2
See-also:
- libssh2_channel_eof(3)
- libssh2_channel_send_eof(3)
- libssh2_channel_wait_eof(3)
---
# NAME
libssh2_channel_wait_closed - wait for the remote to close the channel
.SH SYNOPSIS
.nf
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_channel_wait_closed(LIBSSH2_CHANNEL *channel);
.fi
.SH DESCRIPTION
~~~
# DESCRIPTION
Enter a temporary blocking state until the remote host closes the named
channel. Typically sent after \fIlibssh2_channel_close(3)\fP in order to
channel. Typically sent after *libssh2_channel_close(3)* in order to
examine the exit status.
.SH RETURN VALUE
# RETURN VALUE
Return 0 on success or negative on failure. It returns LIBSSH2_ERROR_EAGAIN
when it would otherwise block. While LIBSSH2_ERROR_EAGAIN is a negative
number, it is not really a failure per se.
.SH SEE ALSO
.BR libssh2_channel_send_eof(3)
.BR libssh2_channel_eof(3)
.BR libssh2_channel_wait_eof(3)

View File

@@ -1,22 +1,33 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_wait_eof 3 "1 Jun 2007" "libssh2 0.15" "libssh2"
.SH NAME
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_wait_eof
Section: 3
Source: libssh2
See-also:
- libssh2_channel_eof(3)
- libssh2_channel_send_eof(3)
---
# NAME
libssh2_channel_wait_eof - wait for the remote to reply to an EOF request
.SH SYNOPSIS
.nf
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_channel_wait_eof(LIBSSH2_CHANNEL *channel);
.fi
.SH DESCRIPTION
~~~
# DESCRIPTION
Wait for the remote end to send EOF.
.SH RETURN VALUE
# RETURN VALUE
Return 0 on success or negative on failure. It returns
LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se.
.SH SEE ALSO
.BR libssh2_channel_send_eof(3)
.BR libssh2_channel_eof(3)

View File

@@ -1,21 +0,0 @@
.\" Copyright (C) The libssh2 project and its contributors.
.\" SPDX-License-Identifier: BSD-3-Clause
.TH libssh2_channel_window_read 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2"
.SH NAME
libssh2_channel_window_read - convenience macro for \fIlibssh2_channel_window_read_ex(3)\fP calls
.SH SYNOPSIS
.nf
#include <libssh2.h>
unsigned long
libssh2_channel_window_read(LIBSSH2_CHANNEL *channel);
.fi
.SH DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function \fIlibssh2_channel_window_read_ex(3)\fP.
.SH RETURN VALUE
See \fIlibssh2_channel_window_read_ex(3)\fP
.SH ERRORS
See \fIlibssh2_channel_window_read_ex(3)\fP
.SH SEE ALSO
.BR libssh2_channel_window_read_ex(3)

View File

@@ -0,0 +1,35 @@
---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_channel_window_read
Section: 3
Source: libssh2
See-also:
- libssh2_channel_window_read_ex(3)
---
# NAME
libssh2_channel_window_read - convenience macro for *libssh2_channel_window_read_ex(3)* calls
# SYNOPSIS
~~~c
#include <libssh2.h>
unsigned long
libssh2_channel_window_read(LIBSSH2_CHANNEL *channel);
~~~
# DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the
underlying function *libssh2_channel_window_read_ex(3)*.
# RETURN VALUE
See *libssh2_channel_window_read_ex(3)*
# ERRORS
See *libssh2_channel_window_read_ex(3)*

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