package mirage

  1. Overview
  2. Docs
The MirageOS library operating system

Install

dune-project
 Dependency

Authors

Maintainers

Sources

mirage-4.0.0.tbz
sha256=f804161872de6cf20699364f09d03370ed06aafffb12f1d586190832c73a194d
sha512=75c1c1cac4c6f862c0055381c7ced123785193234b40da8a8e238cb289cba1a4494378587c4edf2ed872aee7fbfc756f84087941c1037ac19cbd1733ff6cca6a

doc/src/mirage.impl/mirage_impl_ethernet.ml.html

Source file mirage_impl_ethernet.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module Key = Mirage_key
open Functoria
open Mirage_impl_misc
open Mirage_impl_network

type ethernet = ETHERNET

let ethernet = Type.v ETHERNET

let etif_conf =
  let packages = [ package ~min:"3.0.0" ~max:"4.0.0" "ethernet" ] in
  let connect _ m = function
    | [ eth ] -> Fmt.str "%s.connect %s" m eth
    | _ -> failwith (connect_err "ethernet" 1)
  in
  impl ~packages ~connect "Ethernet.Make" (network @-> ethernet)

let etif network = etif_conf $ network