package mirage-net-unix

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type page_aligned_buffer = Io_page.t
type buffer = Cstruct.t
type error = [
  1. | `Disconnected
  2. | `Unimplemented
  3. | `Unknown of string
]
type macaddr = Macaddr.t
type 'a io = 'a Lwt.t
type t
type id = string
val id : t -> id
val connect : id -> [ `Error of error | `Ok of t ] io
val disconnect : t -> unit io
val write : t -> buffer -> unit io
val writev : t -> buffer list -> unit io
val read : t -> page_aligned_buffer -> [ `Error of error | `Ok of buffer ] io
val mac : t -> macaddr
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.