package awa

  1. Overview
  2. Docs
type event =
  1. | Channel_exec of int32 * string
  2. | Channel_data of int32 * Cstruct.t
  3. | Channel_eof of int32
  4. | Disconnected of string
type t = {
  1. client_version : string option;
  2. server_version : string;
  3. client_kexinit : Ssh.kexinit option;
  4. server_kexinit : Ssh.kexinit;
  5. neg_kex : Kex.negotiation option;
  6. host_key : Hostkey.priv;
  7. session_id : Cstruct.t option;
  8. keys_ctos : Kex.keys;
  9. keys_stoc : Kex.keys;
  10. new_keys_ctos : Kex.keys option;
  11. new_keys_stoc : Kex.keys option;
  12. keying : bool;
  13. key_eol : Mtime.t option;
  14. expect : Ssh.message_id option;
  15. auth_state : Auth.state;
  16. user_db : Auth.db;
  17. channels : Channel.db;
  18. ignore_next_packet : bool;
}
val guard_msg : t -> Ssh.message -> (unit, string) result
val make : Hostkey.priv -> Auth.db -> t * Ssh.message list
val of_new_keys_ctos : t -> (t, string) result
val of_new_keys_stoc : t -> (t, string) result
val rekey : t -> (t * Ssh.message) option
val should_rekey : t -> Mtime.t -> bool
val maybe_rekey : t -> Mtime.t -> (t * Ssh.message) option
val pop_msg2 : t -> Cstruct.t -> (t * Ssh.message option * Cstruct.t, string) result
val make_noreply : 'a -> ('b * 'c list * 'd option, 'e) result
val make_reply : 'a -> 'b -> ('c * 'd list * 'e option, 'f) result
val make_replies : 'a -> 'b -> ('c * 'd * 'e option, 'f) result
val make_event : 'a -> 'b -> ('c * 'd list * 'e option, 'f) result
val make_reply_with_event : 'a -> 'b -> 'c -> ('d * 'e list * 'f option, 'g) result
val make_disconnect : 'a -> Ssh.disconnect_code -> string -> ('b * Ssh.message list * event option, 'c) result
val input_userauth_request : t -> string -> string -> Ssh.auth_method -> (t * Ssh.message list * event option, string) result
val input_channel_open : t -> int32 -> int32 -> int32 -> Ssh.channel_open -> (t * Ssh.message list * 'a option, 'b) result
val input_channel_request : t -> Channel.Channel_map.key -> bool -> Ssh.channel_request -> (t * Ssh.message list * event option, 'a) result
val input_msg : t -> Ssh.message -> Mtime.t -> (t * Ssh.message list * event option, string) result
val output_msg : t -> Ssh.message -> (t * Cstruct.t, string) result
val output_channel_data : t -> Channel.Channel_map.key -> Cstruct_sexp.t -> (t * Ssh.message list, string) result
OCaml

Innovation. Community. Security.