package mirage-net-direct

  1. Overview
  2. Docs
type config = [
  1. | `DHCP
  2. | `IPv4 of Nettypes.ipv4_addr * Nettypes.ipv4_addr * Nettypes.ipv4_addr list
]
type id = OS.Netif.id
type interface
type t
type callback = t -> interface -> id -> unit Lwt.t
val get_id : interface -> id
val get_ethif : interface -> Ethif.t
val get_ipv4 : interface -> Ipv4.t
val get_icmp : interface -> Icmp.t
val get_udp : interface -> Udp.t
val get_tcp : interface -> Tcp.Pcb.t
val create : callback -> unit Lwt.t
val plug : t -> id -> OS.Netif.t -> unit Lwt.t
val unplug : t -> id -> unit
val configure : interface -> config -> unit Lwt.t
val set_promiscuous : t -> id -> (id -> Ethif.packet -> unit Lwt.t) -> unit
val inject_packet : t -> id -> Cstruct.t -> unit Lwt.t
val tcpv4_of_addr : t -> Nettypes.ipv4_addr option -> Tcp.Pcb.t list
val udpv4_of_addr : t -> Nettypes.ipv4_addr option -> Udp.t list
val tcpv4_of_dst_addr : t -> Nettypes.ipv4_addr -> Tcp.Pcb.t
val get_intf_name : t -> id -> string
val get_intf_mac : t -> id -> Nettypes.ethernet_mac
OCaml

Innovation. Community. Security.