#ssh #serialization #parser #serde #integer

ssh_format

Data format used to communicate with openssh mux server

9 releases

0.14.1 Oct 18, 2022
0.13.5 Oct 8, 2022
0.12.0 Jan 24, 2022
0.9.1 Dec 28, 2021
0.6.1 Nov 30, 2021

#377 in Encoding

Download history 14593/week @ 2023-12-17 17273/week @ 2023-12-24 15340/week @ 2023-12-31 14170/week @ 2024-01-07 21206/week @ 2024-01-14 16511/week @ 2024-01-21 19157/week @ 2024-01-28 10279/week @ 2024-02-04 8815/week @ 2024-02-11 10095/week @ 2024-02-18 10319/week @ 2024-02-25 9026/week @ 2024-03-03 11679/week @ 2024-03-10 9865/week @ 2024-03-17 9915/week @ 2024-03-24 6430/week @ 2024-03-31

39,094 downloads per month
Used in 12 crates (2 directly)

MIT license

39KB
957 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

~110–395KB