package awa

  1. Overview
  2. Docs
val sizeof_pkt_hdr : int
val get_pkt_hdr_pkt_len : Cstruct.t -> Cstruct.uint32
val set_pkt_hdr_pkt_len : Cstruct.t -> Cstruct.uint32 -> unit
val get_pkt_hdr_pad_len : Cstruct.t -> Cstruct.uint8
val set_pkt_hdr_pad_len : Cstruct.t -> Cstruct.uint8 -> unit
val hexdump_pkt_hdr_to_buffer : Stdlib.Buffer.t -> Cstruct.t -> unit
val hexdump_pkt_hdr : Cstruct.t -> unit
val version_banner : string
val max_pkt_len : int
val max_len : int
val channel_win_len : int32
val channel_win_adj_threshold : int32
val channel_max_pkt_len : int32
val max_channels : int
val min_dh : int32
val n : int32
val max_dh : int32
val guard_sshlen : int -> (unit, string) Rresult.result
val guard_sshlen_exn : int -> unit
type message_id =
  1. | MSG_DISCONNECT
  2. | MSG_IGNORE
  3. | MSG_UNIMPLEMENTED
  4. | MSG_DEBUG
  5. | MSG_SERVICE_REQUEST
  6. | MSG_SERVICE_ACCEPT
  7. | MSG_KEXINIT
  8. | MSG_NEWKEYS
  9. | MSG_KEX_0
  10. | MSG_KEX_1
  11. | MSG_KEX_2
  12. | MSG_KEX_3
  13. | MSG_KEX_4
  14. | MSG_USERAUTH_REQUEST
  15. | MSG_USERAUTH_FAILURE
  16. | MSG_USERAUTH_SUCCESS
  17. | MSG_USERAUTH_BANNER
  18. | MSG_USERAUTH_PK_OK
  19. | MSG_GLOBAL_REQUEST
  20. | MSG_REQUEST_SUCCESS
  21. | MSG_REQUEST_FAILURE
  22. | MSG_CHANNEL_OPEN
  23. | MSG_CHANNEL_OPEN_CONFIRMATION
  24. | MSG_CHANNEL_OPEN_FAILURE
  25. | MSG_CHANNEL_WINDOW_ADJUST
  26. | MSG_CHANNEL_DATA
  27. | MSG_CHANNEL_EXTENDED_DATA
  28. | MSG_CHANNEL_EOF
  29. | MSG_CHANNEL_CLOSE
  30. | MSG_CHANNEL_REQUEST
  31. | MSG_CHANNEL_SUCCESS
  32. | MSG_CHANNEL_FAILURE
  33. | MSG_VERSION
val int_to_message_id : int -> message_id option
val message_id_to_int : message_id -> int
val compare_message_id : message_id -> message_id -> int
val message_id_to_string : message_id -> string
val string_to_message_id : string -> message_id option
val sexp_of_message_id : message_id -> Sexplib.Sexp.t
val message_id_of_sexp : Sexplib.Sexp.t -> message_id
type kexinit = {
  1. cookie : Cstruct_sexp.t;
  2. kex_algs : string list;
  3. server_host_key_algs : string list;
  4. encryption_algs_ctos : string list;
  5. encryption_algs_stoc : string list;
  6. mac_algs_ctos : string list;
  7. mac_algs_stoc : string list;
  8. compression_algs_ctos : string list;
  9. compression_algs_stoc : string list;
  10. languages_ctos : string list;
  11. languages_stoc : string list;
  12. first_kex_packet_follows : bool;
  13. rawkex : Cstruct_sexp.t;
}
val kexinit_of_sexp : Sexplib0.Sexp.t -> kexinit
val sexp_of_kexinit : kexinit -> Sexplib0.Sexp.t
type disconnect_code =
  1. | DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT
  2. | DISCONNECT_PROTOCOL_ERROR
  3. | DISCONNECT_KEY_EXCHANGE_FAILED
  4. | DISCONNECT_RESERVED
  5. | DISCONNECT_MAC_ERROR
  6. | DISCONNECT_COMPRESSION_ERROR
  7. | DISCONNECT_SERVICE_NOT_AVAILABLE
  8. | DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED
  9. | DISCONNECT_HOST_KEY_NOT_VERIFIABLE
  10. | DISCONNECT_CONNECTION_LOST
  11. | DISCONNECT_BY_APPLICATION
  12. | DISCONNECT_TOO_MANY_CONNECTIONS
  13. | DISCONNECT_AUTH_CANCELLED_BY_USER
  14. | DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE
  15. | DISCONNECT_ILLEGAL_USER_NAME
val disconnect_code_to_int : disconnect_code -> int32
val compare_disconnect_code : disconnect_code -> disconnect_code -> int
val disconnect_code_to_string : disconnect_code -> string
val string_to_disconnect_code : string -> disconnect_code option
val sexp_of_disconnect_code : disconnect_code -> Sexplib.Sexp.t
val disconnect_code_of_sexp : Sexplib.Sexp.t -> disconnect_code
val int_to_disconnect_code : int32 -> disconnect_code
type channel_open_code =
  1. | OPEN_ADMINISTRATIVELY_PROHIBITED
  2. | OPEN_CONNECT_FAILED
  3. | OPEN_UNKNOWN_CHANNEL_TYPE
  4. | OPEN_RESOURCE_SHORTAGE
val int_to_channel_open_code : int32 -> channel_open_code option
val channel_open_code_to_int : channel_open_code -> int32
val compare_channel_open_code : channel_open_code -> channel_open_code -> int
val channel_open_code_to_string : channel_open_code -> string
val string_to_channel_open_code : string -> channel_open_code option
val sexp_of_channel_open_code : channel_open_code -> Sexplib.Sexp.t
val channel_open_code_of_sexp : Sexplib.Sexp.t -> channel_open_code
type mpint = Z.t
val sexp_of_mpint : Z.t -> Sexplib0__.Sexp.t
type global_request =
  1. | Tcpip_forward of string * int32
  2. | Cancel_tcpip_forward of string * int32
  3. | Unknown_request of string
val global_request_of_sexp : Sexplib0.Sexp.t -> global_request
val sexp_of_global_request : global_request -> Sexplib0.Sexp.t
type channel_request =
  1. | Pty_req of string * int32 * int32 * int32 * int32 * string
  2. | X11_req of bool * string * string * int32
  3. | Env of string * string
  4. | Shell
  5. | Exec of string
  6. | Subsystem of string
  7. | Window_change of int32 * int32 * int32 * int32
  8. | Xon_xoff of bool
  9. | Signal of string
  10. | Exit_status of int32
  11. | Exit_signal of string * bool * string * string
  12. | Raw_data of Cstruct_sexp.t
val channel_request_of_sexp : Sexplib0.Sexp.t -> channel_request
val sexp_of_channel_request : channel_request -> Sexplib0.Sexp.t
type channel_open =
  1. | Session
  2. | X11 of string * int32
  3. | Forwarded_tcpip of string * int32 * string * int32
  4. | Direct_tcpip of string * int32 * string * int32
  5. | Raw_data of Cstruct_sexp.t
val channel_open_of_sexp : Sexplib0.Sexp.t -> channel_open
val sexp_of_channel_open : channel_open -> Sexplib0.Sexp.t
type password = string
val sexp_of_password : 'a -> Sexplib0__.Sexp.t
val password_of_sexp : 'a -> 'b
type auth_method =
  1. | Pubkey of Hostkey.pub * (Hostkey.alg * Cstruct_sexp.t) option
  2. | Password of password * password option
  3. | Hostbased of string * Cstruct_sexp.t * string * string * Cstruct_sexp.t
  4. | Authnone
val auth_method_of_sexp : Sexplib0.Sexp.t -> auth_method
val sexp_of_auth_method : auth_method -> Sexplib0.Sexp.t
val auth_method_equal : auth_method -> auth_method -> bool
type message =
  1. | Msg_disconnect of disconnect_code * string * string
  2. | Msg_ignore of string
  3. | Msg_unimplemented of int32
  4. | Msg_debug of bool * string * string
  5. | Msg_service_request of string
  6. | Msg_service_accept of string
  7. | Msg_kexinit of kexinit
  8. | Msg_newkeys
  9. | Msg_kexdh_reply of Hostkey.pub * mpint * Hostkey.alg * Cstruct_sexp.t
  10. | Msg_kexdh_init of mpint
  11. | Msg_kexecdh_reply of Hostkey.pub * mpint * Hostkey.alg * Cstruct_sexp.t
  12. | Msg_kexecdh_init of mpint
  13. | Msg_kexdh_gex_request of int32 * int32 * int32
  14. | Msg_kexdh_gex_group of mpint * mpint
  15. | Msg_kexdh_gex_init of mpint
  16. | Msg_kexdh_gex_reply of Hostkey.pub * mpint * Hostkey.alg * Cstruct_sexp.t
  17. | Msg_kex of message_id * Cstruct_sexp.t
  18. | Msg_userauth_request of string * string * auth_method
  19. | Msg_userauth_failure of string list * bool
  20. | Msg_userauth_success
  21. | Msg_userauth_banner of string * string
  22. | Msg_userauth_pk_ok of Hostkey.pub
  23. | Msg_global_request of string * bool * global_request
  24. | Msg_request_success of Cstruct_sexp.t option
  25. | Msg_request_failure
  26. | Msg_channel_open of int32 * int32 * int32 * channel_open
  27. | Msg_channel_open_confirmation of int32 * int32 * int32 * int32 * Cstruct_sexp.t
  28. | Msg_channel_open_failure of int32 * int32 * string * string
  29. | Msg_channel_window_adjust of int32 * int32
  30. | Msg_channel_data of int32 * Cstruct_sexp.t
  31. | Msg_channel_extended_data of int32 * int32 * Cstruct_sexp.t
  32. | Msg_channel_eof of int32
  33. | Msg_channel_close of int32
  34. | Msg_channel_request of int32 * bool * channel_request
  35. | Msg_channel_success of int32
  36. | Msg_channel_failure of int32
  37. | Msg_version of string
val sexp_of_message : message -> Sexplib0.Sexp.t
val message_to_string : message -> string
val message_to_id : message -> message_id
val message_to_int : message -> int
val disconnect_msg : disconnect_code -> string -> message
OCaml

Innovation. Community. Security.