package tcpip

  1. Overview
  2. Docs
val src : Logs.src
module Log : sig ... end
type ipaddr = Ipaddr.V4.t
type callback = src:ipaddr -> dst:ipaddr -> src_port:int -> Cstruct.t -> unit Lwt.t
type t = Udpv4_socket.t = {
  1. interface : Unix.inet_addr;
  2. listen_fds : (Unix.inet_addr * int, Lwt_unix.file_descr) Stdlib.Hashtbl.t;
  3. mutable switched_off : unit Lwt.t;
}
val set_switched_off : t -> unit Lwt.t -> unit
val ignore_canceled : exn -> unit Lwt.t
val get_udpv4_listening_fd : ?preserve:bool -> t -> int -> (bool * Lwt_unix.file_descr) Lwt.t
type error = [
  1. | `Sendto_failed
]
val pp_error : Stdlib.Format.formatter -> [< `Sendto_failed ] -> unit
val close : Lwt_unix.file_descr -> unit Lwt.t
val connect : Ipaddr.V4.Prefix.t -> t Lwt.t
val disconnect : t -> unit Lwt.t
val input : 'a -> src:'b -> dst:'c -> 'd -> unit Lwt.t
val write : ?src:'a -> ?src_port:int -> ?ttl:'b -> dst:Ipaddr.V4.t -> dst_port:int -> t -> Cstruct.t -> (unit, [> `Sendto_failed ]) Stdlib.result Lwt.t
val unlisten : t -> port:int -> unit
val listen : t -> port:int -> (src:Ipaddr.V4.t -> dst:Ipaddr.V4.t -> src_port:int -> Cstruct.t -> unit Lwt.t) -> unit
OCaml

Innovation. Community. Security.