Skip to main content

SshBackend

Trait SshBackend 

Source
pub trait SshBackend {
    // Required methods
    fn parse_packet<'a>(
        &mut self,
        packet: &'a [u8],
    ) -> Result<ParsedPacket<'a>, SshCoreError>;
    fn make_server_banner(&mut self) -> Result<Vec<u8>, SshCoreError>;
    fn make_kex_reply(
        &mut self,
        client_kex: &[u8],
        host_keys: &mut dyn HostKeyProvider,
    ) -> Result<Vec<u8>, SshCoreError>;
    fn make_auth_reply(
        &mut self,
        accepted: bool,
    ) -> Result<Vec<u8>, SshCoreError>;
    fn make_exec_reply(
        &mut self,
        channel_id: u32,
        accepted: bool,
    ) -> Result<Vec<u8>, SshCoreError>;
    fn make_disconnect(&mut self) -> Result<Vec<u8>, SshCoreError>;
}

Required Methods§

Source

fn parse_packet<'a>( &mut self, packet: &'a [u8], ) -> Result<ParsedPacket<'a>, SshCoreError>

Source

fn make_server_banner(&mut self) -> Result<Vec<u8>, SshCoreError>

Implements make server banner.

Source

fn make_kex_reply( &mut self, client_kex: &[u8], host_keys: &mut dyn HostKeyProvider, ) -> Result<Vec<u8>, SshCoreError>

Implements make kex reply.

Source

fn make_auth_reply(&mut self, accepted: bool) -> Result<Vec<u8>, SshCoreError>

Implements make auth reply.

Source

fn make_exec_reply( &mut self, channel_id: u32, accepted: bool, ) -> Result<Vec<u8>, SshCoreError>

Implements make exec reply.

Source

fn make_disconnect(&mut self) -> Result<Vec<u8>, SshCoreError>

Implements make disconnect.

Implementors§