Struct retina_core::protocols::stream::ssh::Ssh

source ·
pub struct Ssh {
    pub client_version_exchange: Option<SshVersionExchange>,
    pub server_version_exchange: Option<SshVersionExchange>,
    pub key_exchange: Option<SshKeyExchange>,
    pub client_dh_key_exchange: Option<SshDhInit>,
    pub server_dh_key_exchange: Option<SshDhResponse>,
    pub client_new_keys: Option<SshNewKeys>,
    pub server_new_keys: Option<SshNewKeys>,
}
Expand description

Parsed SSH handshake contents.

Fields§

§client_version_exchange: Option<SshVersionExchange>

Client protocol version exchange message.

§server_version_exchange: Option<SshVersionExchange>

Server protocol version exchange message.

§key_exchange: Option<SshKeyExchange>

Key Exchange message.

§client_dh_key_exchange: Option<SshDhInit>

Client Diffie-Hellman Key Exchange message.

§server_dh_key_exchange: Option<SshDhResponse>

Server Diffie-Hellman Key Exchange message.

§client_new_keys: Option<SshNewKeys>

Client New Keys message.

§server_new_keys: Option<SshNewKeys>

Server New Keys message.

Implementations§

source§

impl Ssh

source

pub fn protocol_version_ctos(&self) -> &str

Returns the SSH protocol version used by the client (e.g. 2.0).

source

pub fn software_version_ctos(&self) -> &str

Returns the SSH software version used by the client.

source

pub fn comments_ctos(&self) -> &str

Returns comments, or "" if there are no comments, in the protocol version exchange message sent from the client.

source

pub fn protocol_version_stoc(&self) -> &str

Returns the SSH protocol version used by the server (e.g. 2.0).

source

pub fn software_version_stoc(&self) -> &str

Returns the SSH software version used by the server.

source

pub fn comments_stoc(&self) -> &str

Returns comments, or "" if there are no comments, in the protocol version exchange message sent from the server.

Returns the cookie used in SSH key exchange.

source

pub fn kex_algs_stoc(&self) -> Vec<String>

Returns the key exchange algorithms used in SSH key exchange.

source

pub fn server_host_key_algs_stoc(&self) -> Vec<String>

Returns the algorithms supported for the server host key.

source

pub fn encryption_algs_ctos(&self) -> Vec<String>

Returns the symmetric encryption algorithms (ciphers) supported by the client.

source

pub fn encryption_algs_stoc(&self) -> Vec<String>

Returns the symmetric encryption algorithms (ciphers) supported by the server.

source

pub fn mac_algs_ctos(&self) -> Vec<String>

Returns the MAC algorithms supported by the client.

source

pub fn mac_algs_stoc(&self) -> Vec<String>

Returns the MAC algorithms supported by the server.

source

pub fn compression_algs_ctos(&self) -> Vec<String>

Returns the compression algorithms supported by the client.

source

pub fn compression_algs_stoc(&self) -> Vec<String>

Returns the compression algorithms supported by the server.

source

pub fn languages_ctos(&self) -> Vec<String>

Returns the language tags (if any) supported by the client.

source

pub fn languages_stoc(&self) -> Vec<String>

Returns the language tags (if any) supported by the server.

Trait Implementations§

source§

impl Debug for Ssh

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Ssh

source§

fn default() -> Ssh

Returns the “default value” for a type. Read more
source§

impl Serialize for Ssh

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Ssh

§

impl RefUnwindSafe for Ssh

§

impl Send for Ssh

§

impl Sync for Ssh

§

impl Unpin for Ssh

§

impl UnwindSafe for Ssh

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.