ddn.net.ssh.packet
SSH binary packet protocol (RFC 4253 section 6).
Cleartext framing used before the first key exchange completes: a packet is a uint32 length, a padding-length byte, the payload, and random padding. Assembly is incremental and bounded; every length is validated before any buffer growth, and sequence numbers advance per direction and never reset.
The protected (AEAD) framing lands with the packet-protection task and plugs into the same reader/writer interfaces.
Types 4
Packet-layer limits from the support matrix.
Raised for packet-layer violations: bad lengths, bad padding, or assembly overruns.
this(string msg, string file = __FILE__, size_t line = __LINE__)Constructs a packet-layer exception.Incremental cleartext packet assembler.
Feed transport bytes as they arrive; a complete, validated packet surfaces through take.
private ubyte[] buffer_private uint sequenceNumber_uint sequenceNumber() @property const pure nothrow @nogcReturns: the sequence number of the next packet to be assembled.bool packetReady() @property const pure nothrow @nogc @safeReturns: whether a full packet is buffered and ready.const(ubyte)[] pending() @property const pure nothrow @nogcReturns: bytes buffered so far that are not yet a full packet.void resetSequence() pure nothrow @nogc @safeResets the sequence counter (strict KEX after NEWKEYS).Cleartext packet writer: pads and frames payloads.
uint sequenceNumber() @property const pure nothrow @nogcReturns: the sequence number of the next packet to be written.void resetSequence() pure nothrow @nogc @safeResets the sequence counter (strict KEX after NEWKEYS).this(CryptoRandom rng)Constructs a writer.