ssh_commander_core/tools/
mod.rs1pub mod dns;
15pub mod git;
16pub mod ports;
17pub mod tcpdump;
18
19use thiserror::Error;
20
21#[derive(Debug, Error)]
22pub enum ToolsError {
23 #[error("connection not found: {0}")]
24 ConnectionNotFound(String),
25
26 #[error("connection is not SSH: {0}")]
27 NotSshConnection(String),
28
29 #[error("remote command failed (exit {exit:?}): {message}")]
30 RemoteCommand { exit: Option<i32>, message: String },
31
32 #[error("ssh exec failed: {0}")]
33 SshExec(String),
34
35 #[error("parse error: {0}")]
36 Parse(String),
37
38 #[error("capture not found: {0}")]
39 CaptureNotFound(u64),
40
41 #[error("io: {0}")]
42 Io(#[from] std::io::Error),
43}
44
45pub use dns::{DnsAnswer, DnsQuery, dns_resolve_local, dns_resolve_remote};
46pub use git::{GitStatus, git_status};
47pub use ports::{ListeningPort, listening_ports};
48pub use tcpdump::{TcpdumpEvent, TcpdumpRegistry};