type callback =
src:ipaddr ->
dst:ipaddr ->
src_port:int ->
Cstruct.t ->
unit Lwt.tval any_v6 : Unix.inet_addrtype t = {interface : [ `Any
| `Ip of Unix.inet_addr * Unix.inet_addr
| `V4_only of Unix.inet_addr
| `V6_only of Unix.inet_addr ];listen_fds : (int, Lwt_unix.file_descr * Lwt_unix.file_descr option)
Stdlib.Hashtbl.t;mutable switched_off : unit Lwt.t;
}val set_switched_off : t -> unit Lwt.t -> unitval ignore_canceled : exn -> unit Lwt.tval get_udpv4v6_listening_fd :
?preserve:bool ->
?v4_or_v6:[< `Both | `V4 | `V6 Both ] ->
t ->
int ->
(bool * Lwt_unix.file_descr list) Lwt.ttype error = [ | `Sendto_failed| `Different_ip_version
]val pp_error :
Stdlib.Format.formatter ->
[< `Different_ip_version | `Sendto_failed ] ->
unitval close : Lwt_unix.file_descr -> unit Lwt.tval connect :
ipv4_only:bool ->
ipv6_only:bool ->
Ipaddr.V4.Prefix.t ->
Ipaddr.V6.Prefix.t option ->
t Lwt.tval disconnect : t -> unit Lwt.tval write :
?src:'a ->
?src_port:int ->
?ttl:'b ->
dst:Ipaddr.t ->
dst_port:int ->
t ->
Cstruct.t ->
(unit, [> `Different_ip_version | `Sendto_failed ]) Stdlib.result Lwt.tval unlisten : t -> port:int -> unitval listen :
t ->
port:int ->
(src:Ipaddr.t ->
dst:('a, Ipaddr.V6.t) Ipaddr.v4v6 ->
src_port:int ->
Cstruct.t ->
unit Lwt.t) ->
unit