package mirage

  1. Overview
  2. Docs
The MirageOS library operating system

Install

dune-project
 Dependency

Authors

Maintainers

Sources

mirage-4.11.1.tbz
sha256=58488022e67513a370f1de91297b6c0de15dd15584381276028c08d4ab4ae158
sha512=0ddc27adfdaa88a5ff492261de57d40df89a968db18501b16ac83393446f994f50674b40345625382728a731c22aa82e70675c400310d015829bf0ec1980ecb2

doc/src/mirage.devices/ethernet.ml.html

Source file ethernet.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
open Functoria.DSL

type ethernet = ETHERNET

let ethernet = typ ETHERNET

let ethif_conf =
  let packages = [ package ~min:"3.0.0" ~max:"4.0.0" "ethernet" ] in
  let connect _ m = function
    | [ eth ] -> code ~pos:__POS__ "%s.connect %s" m eth
    | _ -> Misc.connect_err "etif" 1
  in
  impl ~packages ~connect "Ethernet.Make" (Network.network @-> ethernet)

let ethif network = ethif_conf $ network