tcpip

OCaml TCP/IP networking stack, used in MirageOS
Library udpv6_socket
Module Udpv6_socket
type buffer = Cstruct.t
type ipaddr = Ipaddr.V6.t
type +'a io = 'a Lwt.t
type ip = Ipaddr.V6.t option
type ipinput = unit Lwt.t
type callback = src:ipaddr -> dst:ipaddr -> src_port:int -> buffer -> unit io
type t = {
interface : Unix.inet_addr;
listen_fds : ( Unix.inet_addr * int, Lwt_unix.file_descr ) Hashtbl.t;
}
val get_udpv6_listening_fd : t -> int -> Lwt_unix.file_descr Lwt.t
type error = [
| `Unknown of string(*

an undiagnosed error

*)
]

IO operation errors

val connect : ip -> t Lwt.t
val disconnect : 'a -> unit Lwt.t
val id : t -> Ipaddr.V6.t option
val input : listeners:'a -> 'b -> 'c Lwt.t
val write : ?source_port:int -> dest_ip:Ipaddr.V6.t -> dest_port:int -> t -> Cstruct.t -> unit Lwt.t