#serde #ssh #serialization #parsing #encoding

ssh_format

Data format used to communicate with openssh mux server

2 unstable releases

new 0.12.0 Jan 24, 2022
0.10.0 Jan 23, 2022
0.9.1 Dec 28, 2021
0.6.1 Nov 30, 2021

#294 in Encoding

Download history 29/week @ 2021-10-04 54/week @ 2021-10-11 32/week @ 2021-10-18 53/week @ 2021-10-25 181/week @ 2021-11-01 301/week @ 2021-11-08 122/week @ 2021-11-15 273/week @ 2021-11-22 246/week @ 2021-11-29 84/week @ 2021-12-06 290/week @ 2021-12-13 117/week @ 2021-12-20 167/week @ 2021-12-27 216/week @ 2022-01-03 152/week @ 2022-01-10 205/week @ 2022-01-17

750 downloads per month
Used in 3 crates (2 directly)

MIT license

35KB
891 lines

ssh_mux_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

~140–260KB