package mirage-net-direct

  1. Overview
  2. Docs
type t
type packet =
  1. | Input of Cstruct.t
  2. | Output of Cstruct.t list
val create : OS.Netif.t -> t * unit Lwt.t
val attach : t -> [< `IPv4 of Cstruct.t -> unit Lwt.t ] -> unit
val detach : t -> [< `IPv4 ] -> unit
val get_netif : t -> OS.Netif.t
val set_promiscuous : t -> (packet -> unit Lwt.t) -> unit
val disable_promiscuous : t -> unit
val default_process : t -> Cstruct.t -> unit Lwt.t
val input : t -> Cstruct.t -> unit Lwt.t
val listen : t -> unit Lwt.t
val add_ip : t -> Nettypes.ipv4_addr -> unit Lwt.t
val remove_ip : t -> Nettypes.ipv4_addr -> unit Lwt.t
val get_frame : t -> Cstruct.t Lwt.t
val write : t -> Cstruct.t -> unit Lwt.t
val writev : t -> Cstruct.t list -> unit Lwt.t
val sizeof_ethernet : int
val set_ethernet_dst : string -> int -> Cstruct.t -> unit
val set_ethernet_src : string -> int -> Cstruct.t -> unit
val set_ethernet_ethertype : Cstruct.t -> int -> unit
OCaml

Innovation. Community. Security.