ssh_format

Crates.iossh_format
lib.rsssh_format
version0.14.1
sourcesrc
created_at2021-09-27 02:51:48.032275
updated_at2022-10-18 11:10:06.644254
descriptionData format used to communicate with openssh mux server.
homepage
repositoryhttps://github.com/openssh-rust/ssh_format
max_upload_size
id456747
size38,369
Jon Gjengset (jonhoo)

documentation

README

ssh_format

Rust

crate.io downloads

crate.io version

docs

Data format used to communicate with openssh mux server.

Format details:

  • All integers are encoded in big endian;
  • Boolean are encoded as u32 according to here;
  • char are encoded as u32;
  • Strings and bytes are encoded as length(u32) + content, same as sshbuf_put_string;
  • Option::None are omitted while Option::Some(v) has the same encoding as v since openssh mux protocol allows optional parameter at the end of the message;
  • struct/tuple are encoded as-is, unit struct/tuple are omitted;
  • sequence are encoded as if it is a tuple according to here, thus it cannot be deserialized;
  • Variant is encoded as index(u32) + content encoded as-is (it is expected to manually implement Serialize and Deserialize to ensure the variant_index is the one you expected);
  • Serializing/Deserializing map is unsupported;

Feature

  • is_human_readable enables Serializer::is_human_readable and Deserializer::is_human_readable.
Commit count: 199

cargo fmt