package mirage-net-socket

  1. Overview
  2. Docs
type t
val get_udpv4 : t -> Lwt_unix.file_descr
val register_udpv4_listener : t -> (Ipaddr.V4.t option * int) -> Lwt_unix.file_descr -> unit
val get_udpv4_listener : t -> (Ipaddr.V4.t option * int) -> Lwt_unix.file_descr Lwt.t
type interface = unit
type id = string
type config = [
  1. | `DHCP
  2. | `IPv4 of Ipaddr.V4.t * Ipaddr.V4.t * Ipaddr.V4.t list
]
val configure : interface -> config -> unit Lwt.t
val get_intf : interface -> string
type callback = t -> interface -> id -> unit Lwt.t
val create : callback -> unit Lwt.t
val attach : t -> string -> bool Lwt.t
val detach : t -> string -> bool Lwt.t
val set_promiscuous : t -> id -> (id -> Cstruct.t -> unit Lwt.t) -> unit
val inject_packet : t -> id -> Cstruct.t -> unit Lwt.t
val get_intf_name : t -> id -> string
val get_intf_mac : t -> id -> Macaddr.t
OCaml

Innovation. Community. Security.