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_arpv4.ml.html

Source file mirage_impl_arpv4.ml

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

type arpv4 = Arpv4

let arpv4 = Type.v Arpv4

let arp_conf =
  let packages =
    [ package ~min:"3.0.0" ~max:"4.0.0" ~sublibs:[ "mirage" ] "arp" ]
  in
  let connect _ modname = function
    | [ eth; _time ] -> Fmt.str "%s.connect %s" modname eth
    | _ -> failwith (connect_err "arp" 3)
  in
  impl ~packages ~connect "Arp.Make" (ethernet @-> time @-> arpv4)

let arp ?(time = default_time) (eth : ethernet impl) = arp_conf $ eth $ time