#ssh #serialization #serde #parser

ssh_format_error

Data format used to communicate with openssh mux server

1 unstable release

0.1.0 Oct 11, 2022

#2689 in Encoding

Download history 6080/week @ 2024-12-25 6846/week @ 2025-01-01 6839/week @ 2025-01-08 6999/week @ 2025-01-15 7872/week @ 2025-01-22 5185/week @ 2025-01-29 33934/week @ 2025-02-05 107874/week @ 2025-02-12 114815/week @ 2025-02-19 125373/week @ 2025-02-26 113995/week @ 2025-03-05 108481/week @ 2025-03-12 38924/week @ 2025-03-19 86404/week @ 2025-03-26 65445/week @ 2025-04-02 68730/week @ 2025-04-09

276,786 downloads per month
Used in 21 crates (3 directly)

MIT license

4KB
73 lines

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.

Dependencies

~96–315KB