sunset/config.rs
1// TODO
2pub const DEFAULT_WINDOW: usize = 1000;
3pub const DEFAULT_MAX_PACKET: usize = 1000;
4
5// TODO: Perhaps instead of MAX_CHANNELS we could have a type alias
6// of either heapless::Vec<> or std::vec::Vec<>
7//
8// This size is arbitrary and may be increased, though note that some code paths assume
9// a linear scan of channels can happen quickly, so may need reworking for performance.
10pub const MAX_CHANNELS: usize = 4;
11
12// Enough for longest 23 of "screen.konsole-256color" on my system
13// Unsure if this is specified somewhere
14pub const MAX_TERM: usize = 32;
15
16pub const DEFAULT_TERM: &str = "xterm";
17
18pub const RSA_DEFAULT_KEYSIZE: usize = 2048;
19pub const RSA_MIN_KEYSIZE: usize = 1024;
20
21/// Maximum username for client or server
22///
23/// 31 is the limit for various Linux APIs like wtmp
24/// A larger limit can be set with `larger` crate feature
25#[cfg(not(feature = "larger"))]
26pub const MAX_USERNAME: usize = 31;
27
28/// Maximum username for client or server
29///
30/// 32 is the limit for various Linux APIs like wtmp
31#[cfg(feature = "larger")]
32pub const MAX_USERNAME: usize = 256;
33
34// TODO: server auth timeout/tries