#![allow(dead_code)]
#![allow(missing_docs)]
pub(crate) mod msg {
pub const DISCONNECT: u8 = 1;
pub const IGNORE: u8 = 2;
pub const UNIMPLEMENTED: u8 = 3;
pub const DEBUG: u8 = 4;
pub const SERVICE_REQUEST: u8 = 5;
pub const SERVICE_ACCEPT: u8 = 6;
pub const EXT_INFO: u8 = 7;
pub const NEWCOMPRESS: u8 = 8;
pub const KEXINIT: u8 = 20;
pub const NEWKEYS: u8 = 21;
pub const USERAUTH_REQUEST: u8 = 50;
pub const USERAUTH_FAILURE: u8 = 51;
pub const USERAUTH_SUCCESS: u8 = 52;
pub const USERAUTH_BANNER: u8 = 53;
pub const GLOBAL_REQUEST: u8 = 80;
pub const REQUEST_SUCCESS: u8 = 81;
pub const REQUEST_FAILURE: u8 = 82;
pub const CHANNEL_OPEN: u8 = 90;
pub const CHANNEL_OPEN_CONFIRMATION: u8 = 91;
pub const CHANNEL_OPEN_FAILURE: u8 = 92;
pub const CHANNEL_WINDOW_ADJUST: u8 = 93;
pub const CHANNEL_DATA: u8 = 94;
pub const CHANNEL_EXTENDED_DATA: u8 = 95;
pub const CHANNEL_EOF: u8 = 96;
pub const CHANNEL_CLOSE: u8 = 97;
pub const CHANNEL_REQUEST: u8 = 98;
pub const CHANNEL_SUCCESS: u8 = 99;
pub const CHANNEL_FAILURE: u8 = 100;
pub const KEX_ECDH_INIT: u8 = 30;
pub const KEX_ECDH_REPLY: u8 = 31;
pub const KEXDH_INIT: u8 = 30;
pub const KEXDH_REPLY: u8 = 31;
pub const USERAUTH_PASSWD_CHANGEREQ: u8 = 60;
pub const USERAUTH_PK_OK: u8 = 60;
}
pub mod disconnect {
pub const HOST_NOT_ALLOWED_TO_CONNECT: u32 = 1;
pub const PROTOCOL_ERROR: u32 = 2;
pub const KEY_EXCHANGE_FAILED: u32 = 3;
pub const RESERVED: u32 = 4;
pub const MAC_ERROR: u32 = 5;
pub const COMPRESSION_ERROR: u32 = 6;
pub const SERVICE_NOT_AVAILABLE: u32 = 7;
pub const PROTOCOL_VERSION_NOT_SUPPORTED: u32 = 8;
pub const HOST_KEY_NOT_VERIFIABLE: u32 = 9;
pub const CONNECTION_LOST: u32 = 10;
pub const BY_APPLICATION: u32 = 11;
pub const TOO_MANY_CONNECTIONS: u32 = 12;
pub const AUTH_CANCELLED_BY_USER: u32 = 13;
pub const NO_MORE_AUTH_METHODS_AVAILABLE: u32 = 14;
pub const ILLEGAL_USER_NAME: u32 = 15;
pub const fn to_str(code: u32) -> Option<&'static str> {
Some(match code {
HOST_NOT_ALLOWED_TO_CONNECT => "host not allowed to connect",
PROTOCOL_ERROR => "protocol error",
KEY_EXCHANGE_FAILED => "key exchange failed",
RESERVED => "reserved",
MAC_ERROR => "mac error",
COMPRESSION_ERROR => "compression error",
SERVICE_NOT_AVAILABLE => "service not available",
PROTOCOL_VERSION_NOT_SUPPORTED => "protocol version not supported",
HOST_KEY_NOT_VERIFIABLE => "host key not verifiable",
CONNECTION_LOST => "connection lost",
BY_APPLICATION => "by application",
TOO_MANY_CONNECTIONS => "too many connections",
AUTH_CANCELLED_BY_USER => "auth cancelled by user",
NO_MORE_AUTH_METHODS_AVAILABLE => "no more auth methods available",
ILLEGAL_USER_NAME => "illegal user name",
_ => return None,
})
}
}
pub mod open {
pub const ADMINISTRATIVELY_PROHIBITED: u32 = 1;
pub const CONNECT_FAILED: u32 = 2;
pub const UNKNOWN_CHANNEL_TYPE: u32 = 3;
pub const RESOURCE_SHORTAGE: u32 = 4;
pub const fn to_str(code: u32) -> Option<&'static str> {
Some(match code {
ADMINISTRATIVELY_PROHIBITED => "administratively prohibited",
CONNECT_FAILED => "connect failed",
UNKNOWN_CHANNEL_TYPE => "unknown channel type",
RESOURCE_SHORTAGE => "resource shortage",
_ => return None,
})
}
}
pub mod signal {
pub static ABRT: &str = "ABRT";
pub static ALRM: &str = "ALRM";
pub static FPE: &str = "FPE";
pub static HUP: &str = "HUP";
pub static ILL: &str = "ILL";
pub static INT: &str = "INT";
pub static KILL: &str = "KILL";
pub static PIPE: &str = "PIPE";
pub static QUIT: &str = "QUIT";
pub static SEGV: &str = "SEGV";
pub static TERM: &str = "TERM";
pub static USR1: &str = "USR1";
pub static USR2: &str = "USR2";
}
pub mod terminal_mode {
pub const TTY_OP_END: u8 = 0;
pub const VINTR: u8 = 1;
pub const VQUIT: u8 = 2;
pub const VERASE: u8 = 3;
pub const VKILL: u8 = 4;
pub const VEOF: u8 = 5;
pub const VEOL: u8 = 6;
pub const VEOL2: u8 = 7;
pub const VSTART: u8 = 8;
pub const VSTOP: u8 = 9;
pub const VSUSP: u8 = 10;
pub const VDSUSP: u8 = 11;
pub const VREPRINT: u8 = 12;
pub const VWERASE: u8 = 13;
pub const VLNEXT: u8 = 14;
pub const VFLUSH: u8 = 15;
pub const VSWTCH: u8 = 16;
pub const VSTATUS: u8 = 17;
pub const VDISCARD: u8 = 18;
pub const IGNPAR: u8 = 30;
pub const PARMRK: u8 = 31;
pub const INPCK: u8 = 32;
pub const ISTRIP: u8 = 33;
pub const INLCR: u8 = 34;
pub const IGNCR: u8 = 35;
pub const ICRNL: u8 = 36;
pub const IUCLC: u8 = 37;
pub const IXON: u8 = 38;
pub const IXANY: u8 = 39;
pub const IXOFF: u8 = 40;
pub const IMAXBEL: u8 = 41;
pub const IUTF8: u8 = 42;
pub const ISIG: u8 = 50;
pub const ICANON: u8 = 51;
pub const XCASE: u8 = 52;
pub const ECHO: u8 = 53;
pub const ECHOE: u8 = 54;
pub const ECHOK: u8 = 55;
pub const ECHONL: u8 = 56;
pub const NOFLSH: u8 = 57;
pub const TOSTOP: u8 = 58;
pub const IEXTEN: u8 = 59;
pub const ECHOCTL: u8 = 60;
pub const ECHOKE: u8 = 61;
pub const PENDIN: u8 = 62;
pub const OPOST: u8 = 70;
pub const OLCUC: u8 = 71;
pub const ONLCR: u8 = 72;
pub const OCRNL: u8 = 73;
pub const ONOCR: u8 = 74;
pub const ONLRET: u8 = 75;
pub const CS7: u8 = 90;
pub const CS8: u8 = 91;
pub const PARENB: u8 = 92;
pub const PARODD: u8 = 93;
pub const TTY_OP_ISPEED: u8 = 128;
pub const TTY_OP_OSPEED: u8 = 129;
}