package mirage-net

  1. Overview
  2. Docs
type t
type interface
type id
val create : ?devs:int -> (t -> interface -> id -> unit Lwt.t) -> unit Lwt.t
type config = [
  1. | `DHCP
  2. | `IPv4 of Nettypes.ipv4_addr * Nettypes.ipv4_addr * Nettypes.ipv4_addr list
]
val configure : interface -> config -> unit Lwt.t
val get_udpv4 : t -> Lwt_unix.file_descr
val register_udpv4_listener : t -> (Nettypes.ipv4_addr option * int) -> Lwt_unix.file_descr -> unit
val get_udpv4_listener : t -> (Nettypes.ipv4_addr option * int) -> Lwt_unix.file_descr Lwt.t
val get_intf : interface -> string
val set_promiscuous : t -> id -> (id -> Cstruct.buf -> unit Lwt.t) -> unit
val inject_packet : t -> id -> Cstruct.buf -> unit Lwt.t
val get_intf_name : t -> id -> string
val get_intf_mac : t -> id -> string
OCaml

Innovation. Community. Security.