package mirage

  1. Overview
  2. Docs
The MirageOS library operating system

Install

dune-project
 Dependency

Authors

Maintainers

Sources

mirage-4.10.0.tbz
sha256=795cc176ffbc67363d4c4ef69354aced9681c0b1e24bf93f0a270975ee0b608b
sha512=96a2fb3971613b146371a02af1ce59c73ca86dd1f42c0c47334bfbabe7d5f4cffb080c2c585e2e21fe3d33133bbe86b703cb9d276dd86ce3a90a544f03293af5

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

Source file arp.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
open Functoria.DSL
open Ethernet
open Misc

type arpv4 = Arpv4

let arpv4 = typ Arpv4

let arp_conf =
  let packages =
    [ package ~min:"4.0.0" ~max:"5.0.0" ~sublibs:[ "mirage" ] "arp" ]
  in
  let connect _ modname = function
    | [ eth ] -> code ~pos:__POS__ "%s.connect %s" modname eth
    | _ -> connect_err "arp" 1
  in
  impl ~packages ~connect "Arp.Make" (ethernet @-> arpv4)

let arp (eth : ethernet impl) = arp_conf $ eth