encodeTerminalModes

fnubyte[] encodeTerminalModes(scope const SshTerminalMode[] modes)

Encodes terminal modes for a pty-req (RFC 4254 section 8).

The stream is a sequence of opcode/uint32 argument pairs terminated by TTY_OP_END (opcode 0). Opcodes outside the defined range 1..159 are rejected locally because peers stop parsing at undefined opcodes.

Parameters

modesMode pairs in transmission order.

Returns

The encoded mode stream including the terminator.

Throws

SshWireException when an opcode is outside 1..159 or

more than SshChannelLimits.terminalModesMax pairs are given.