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 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_mac : t -> id -> Nettypes.ethernet_mac
val get_intf_ipv4addr : t -> id -> Nettypes.ipv4_addr
val get_intfs : t -> (id * interface) list
OCaml

Innovation. Community. Security.