From 9e49f4c1d04c66c9f104d05330d1c86e07944286 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Thu, 27 Aug 2026 15:07:30 -0700 Subject: [PATCH] fwd: drop the declarations with no definition wolfSSH_CTX_SetFwdEnable() and wolfSSH_SetFwdEnable() are declared in ssh.h and defined nowhere, so calling either is a link error rather than a way to gate forwarding. Nothing can depend on them today. - delete both declarations - say in the header that the WS_CallbackFwdIO passed to wolfSSH_CTX_SetFwdCb() is stored and never called; the parameter stays so existing calls still compile The third dead corner, the WOLFSSH_FWD_LOCAL_CLEANUP action the library never emits, needs a setup/cleanup pairing record and a callback that names the channel. That work is parked on ccb-phase2-local-cleanup. --- wolfssh/ssh.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wolfssh/ssh.h b/wolfssh/ssh.h index da09504f9..8e653c48f 100644 --- a/wolfssh/ssh.h +++ b/wolfssh/ssh.h @@ -246,6 +246,9 @@ typedef enum WS_FwdCbError { * even though the setup returned success. */ typedef int (*WS_CallbackFwd)(WS_FwdCbAction action, void* fwdCbCtx, const char* address, word32 port); +/* Reserved. wolfSSH_CTX_SetFwdCb() stores one of these, but nothing in the + * library calls it: forwarded data moves through the channel API. The + * parameter is kept so existing calls still compile. */ typedef int (*WS_CallbackFwdIO)(WS_FwdIoCbAction action, void* buf, word32 bufSz, void* fwdCbCtx); @@ -259,8 +262,6 @@ WOLFSSH_API WOLFSSH_CHANNEL* wolfSSH_ChannelFwdNewRemote(WOLFSSH* ssh, WOLFSSH_API int wolfSSH_CTX_SetFwdCb(WOLFSSH_CTX* ctx, WS_CallbackFwd fwdCb, WS_CallbackFwdIO fwdIoCb); WOLFSSH_API int wolfSSH_SetFwdCbCtx(WOLFSSH* ssh, void* ctx); -WOLFSSH_API int wolfSSH_CTX_SetFwdEnable(WOLFSSH_CTX* ctx, byte enable); -WOLFSSH_API int wolfSSH_SetFwdEnable(WOLFSSH* ssh, byte enable); DEPRECATED WOLFSSH_API WOLFSSH_CHANNEL* wolfSSH_ChannelFwdNew(WOLFSSH* ssh, const char* host, word32 hostPort, const char* origin, word32 originPort);