libssh2_channel_direct_tcpip(3)

πŸ“¦
version 1.11.1 Β· 3 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, debian trixie, epel 10, epel 9, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– libssh2_channel_direct_tcpip πŸ’–

okay bestie, welcome to the manual page for libssh2_channel_direct_tcpip(3) β€” that's the libssh2 one, yes, the SSH library, we're doing serious networking today and we're doing it cutely ✨


🌸 NAME 🌸

libssh2_channel_direct_tcpip β€” it's a convenience macro that wraps libssh2_channel_direct_tcpip_ex(3) calls πŸŽ€

like. that's literally its whole job. it's the lil shortcut bestie. the middle man. the girlypop who makes the call for you πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

first you gotta pull in the header, no cap:

#include <libssh2.h>

then, the moment you've been waiting for:

LIBSSH2_CHANNEL *
libssh2_channel_direct_tcpip(LIBSSH2_SESSION *session,
                             const char *host, int port);

three things go in: a session, a host, and a port. that's it. that's the whole vibe. 🌈


✨ DESCRIPTION ✨

so here's the tea β˜• β€” this one is a macro, not a full-on function, and it lives in a public libssh2 header file. and what does this macro do? it uses the underlying function libssh2_channel_direct_tcpip_ex(3) underneath. it's giving "I'm just here to make your life easier" energy, and honestly? iconic πŸ‘‘

so when you call it, you're really calling the _ex version, but with fewer things to type. obsessed fr fr πŸ’–


πŸ’€ RETURN VALUE πŸ’€

bestie I'm not gonna lie to you β€” this one doesn't spill its own tea. go look at libssh2_channel_direct_tcpip_ex(3) for the return value, okay? 🫢


πŸ™ˆ ERRORS πŸ™ˆ

same situation, same energy: see libssh2_channel_direct_tcpip_ex(3). that's where the error lore lives. ✨


πŸ‘‘ SEE ALSO πŸ‘‘


real talk, no cap: this page is short because the macro is short. the actual details are all in libssh2_channel_direct_tcpip_ex(3). don't @ me, @ the _ex page 😭

and that's the whole page bestie!! this lil cutie came from libssh2 1.2.4 and it's dated 20 Feb 2010 β€” an elder, a legend, a founding mother of the group chat πŸŒΈπŸ’… stay hydrated, read your _ex page, and stream responsibly πŸ¦‹βœ¨