BBS: TELESC.NET.BR Assunto: src/ssh/TODO.md design-channel-io-api.md De: Deuc¨ Data: Sat, 28 Mar 2026 21:46:23 -0700 ----------------------------------------------------------- https://gitlab.synchro.net/main/sbbs/-/commit/e15d0a14b8c4bbca3b9d7781 Modified Files: src/ssh/TODO.md design-channel-io-api.md Log Message: Revise channel I/O design: dssh_chan_ API, RFC 4254 analysis, OpenSSH audit Major revision of design-channel-io-api.md based on deep-diving the RFC and reading the OpenSSH source. Key changes: - Document RFC 4254's underspecification: no ordering, multiplicity, or lifecycle constraints on channel requests; conventions are the de facto spec, not the protocol - Audit OpenSSH server (LARVAL state, initial_window=0, strict request gating) and client (non-zero window, no LARVAL, trusts server) - Both sides use initial_window=0 safer than OpenSSH client behavior - Rename to dssh_chan_ prefix; zero-copy API uses dssh_chan_zc_ - Channel type (shell/exec/subsystem) as parameter with union, not separate open functions; NULL params means defaults - dssh_chan_close() takes int64_t exit_code: negative means no exit-status, preserving full uint32 wire range (documents OpenSSH's exit-status truncation bug) - dssh_chan_shutwr() for half-close (EOF) with unambiguous naming - Signal, window-change, AND break delivered as stream-position callbacks during dssh_chan_read() window-change is SIGWINCH - Zero-copy send: app writes directly into tx_packet buffer - Document current allocation costs and path to zero-malloc I/O Add TODO item 101: eliminate per-packet malloc in channel send path via scatter write into tx_packet. Co-Authored-By: Claude Opus 4.6 (1M context)n --- mSynchronetn hgVertrauen n hHome of Synchronet n gh[vert/cvs/bbs].synchro.net ----------------------------------------------------------- [Voltar]