libssh2_trace(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_trace β€” bestie edition ✨

okay so this is a page from the libssh2 manual, and today we're doing libssh2_trace(3). yes queen, we're getting into the debug guts πŸ’…


πŸŽ€ NAME πŸŽ€

libssh2_trace β€” enable debug info from inside libssh2


🌸 SYNOPSIS 🌸

#include <libssh2.h>

void
libssh2_trace(LIBSSH2_SESSION *session, int bitmask);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so listen. this is a function that literally lives inside the library, and its whole job is to hand you debug info from within libssh2 while it's running. it's giving "backstage pass to the vibes". super helpful when you're trying to trace stuff or debug behaviors, like when something's acting up and you're just sitting there like 😭 why.

🚨 huge caveat, do not skip this one bestie: this function has no effect unless libssh2 was built to support tracing! it is usually disabled in release builds. so if you're calling it and getting absolutely nothing, that's not you, that's the build. no cap.

so bitmask can be set to the logical OR of none, one or more of these:

  • LIBSSH2_TRACE_SOCKET β€” socket low-level debugging 🧦
  • LIBSSH2_TRACE_TRANS β€” transport layer debugging 🚚
  • LIBSSH2_TRACE_KEX β€” key exchange debugging πŸ”‘
  • LIBSSH2_TRACE_AUTH β€” authentication debugging πŸͺͺ
  • LIBSSH2_TRACE_CONN β€” connection layer debugging πŸ”Œ
  • LIBSSH2_TRACE_SCP β€” SCP debugging πŸ“
  • LIBSSH2_TRACE_SFTP β€” SFTP debugging πŸ“‚
  • LIBSSH2_TRACE_ERROR β€” error debugging πŸ’€
  • LIBSSH2_TRACE_PUBLICKEY β€” Public Key debugging πŸ—οΈ

and that's the whole page, bestie. every flag, every word, nothing skipped, periodt. πŸ’–

this was libssh2 1.0, dated 26 Dec 2008, and the page you just read is libssh2_trace(3). slay, go trace something 🫢✨