#ssh #serialization #parser #serde

ssh_format_error

Data format used to communicate with openssh mux server

1 unstable release

0.1.0 Oct 11, 2022

#2203 in Encoding

Download history 15029/week @ 2024-01-05 14350/week @ 2024-01-12 14827/week @ 2024-01-19 14100/week @ 2024-01-26 8839/week @ 2024-02-02 2501/week @ 2024-02-09 7495/week @ 2024-02-16 7153/week @ 2024-02-23 5186/week @ 2024-03-01 8471/week @ 2024-03-08 5698/week @ 2024-03-15 9238/week @ 2024-03-22 3776/week @ 2024-03-29 8766/week @ 2024-04-05 10081/week @ 2024-04-12 5861/week @ 2024-04-19

30,023 downloads per month
Used in 14 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

~110–355KB