package mirage

  1. Overview
  2. Docs
type page_aligned_buffer = Io_page.t
type buffer = Cstruct.t
type error = [
  1. | `Disconnected
  2. | `Unimplemented
  3. | `Unknown of string
]
type macaddr
type 'a io = 'a Lwt.t
type t
type id
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 listen : t -> (buffer -> unit io) -> unit 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