package mirage-unix

  1. Overview
  2. Docs
type t
type id
val string_of_id : id -> string
val id_of_string : string -> id
type dev_type =
  1. | PCAP
  2. | ETH
exception Device_down of id
val get_writebuf : t -> Cstruct.t Lwt.t
val id : t -> id
val mac : t -> Macaddr.t
val add_vif : id -> dev_type -> Unix.file_descr -> unit
val create : unit -> t list Lwt.t
val listen : t -> (Cstruct.t -> unit Lwt.t) -> unit Lwt.t
val destroy : t -> unit Lwt.t
val write : t -> Cstruct.t -> unit Lwt.t
val writev : t -> Cstruct.t list -> unit Lwt.t
type stats = {
  1. mutable rx_bytes : int64;
  2. mutable rx_pkts : int32;
  3. mutable tx_bytes : int64;
  4. mutable tx_pkts : int32;
}
val get_stats_counters : t -> stats
val reset_stats_counters : t -> unit
OCaml

Innovation. Community. Security.