Skip to content
This repository has been archived by the owner on Oct 2, 2022. It is now read-only.

0.9.2: Unique global request, channel, and channel request IDs

Pre-release
Pre-release
Compare
Choose a tag to compare
released this 15 Nov 10:59
· 68 commits to main since this release

This release adds unique global request, channel, and channel request IDs.

In this change we are adding an uint64 parameter to all handler methods that deal with requests and channels. IDs are unique within their scope: global request IDs are unique among all global requests within the connection, channel IDs are guaranteed to be unique among all channel IDs within the conection, and channel request IDs are guaranteed to be unique within the channel. These IDs are also guaranteed to be monotonic, but they are not guaranteed to be continuous.

Furthermore, the onExit methods in the SessionChannelHandler interface now take the alias type sshserver.ExitStatus instead of uint32 to provide better documentation.

The affected method changes are listed below.

Changes to the SSHConnectionHandler interface

  • OnUnsupportedGlobalRequest(requestID uint64, ...): added requestID
  • OnUnsupportedChannel(channelID uint64, ...): added channelID
  • OnSessionChannel(channelID uint64, ...) (...): added channelID

Changes to the SessionChannelHandler interface

  • OnUnsupportedChannelRequest(requestID uint64, ...): added requestID
  • OnFailedDecodeChannelRequest(requestID uint64, ...): added requestID
  • OnEnvRequest(requestID uint64, ...): added requestID
  • OnPtyRequest(requestID uint64, ...): added requestID
  • OnExecRequest(requestID uint64, ..., onExit func(exitStatus ExitStatus)): added requestID, changed onExit
  • OnShell(requestID uint64, ..., onExit func(exitStatus ExitStatus)): added requestID, changed onExit
  • OnSubsystem(requestID uint64, ..., onExit func(exitStatus ExitStatus)): added requestID, changed onExit
  • OnSignal(requestID uint64, ...): added requestID
  • OnWindow(requestID uint64, ...): added requestID