#ssh #serialization #parser #serde #message-parser

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

#663 in Encoding

Download history 12622/week @ 2024-10-20 12358/week @ 2024-10-27 11444/week @ 2024-11-03 11673/week @ 2024-11-10 8941/week @ 2024-11-17 6899/week @ 2024-11-24 8751/week @ 2024-12-01 8087/week @ 2024-12-08 6346/week @ 2024-12-15 6829/week @ 2024-12-22 7728/week @ 2024-12-29 8660/week @ 2025-01-05 10430/week @ 2025-01-12 8625/week @ 2025-01-19 9043/week @ 2025-01-26 19877/week @ 2025-02-02

48,518 downloads per month
Used in 20 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

~100–370KB