package charrua-client

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file dhcp_ipv4.ml

1
2
3
4
5
6
7
8
9
10
11
open Lwt.Infix

module Make(R : Mirage_random.S) (C : Mirage_clock.MCLOCK) (Time : Mirage_time.S) (Network : Mirage_net.S) (E : Ethernet.S) (Arp : Arp.S) = struct
  (* for now, just wrap a static ipv4 *)
  module DHCP = Dhcp_client_mirage.Make(R)(Time)(Network)
  include Static_ipv4.Make(R)(C)(E)(Arp)
  let connect net ethernet arp =
    DHCP.connect net >>= fun dhcp ->
    Lwt_stream.last_new dhcp >>= fun (cidr, gateway) ->
    connect ~cidr ?gateway ethernet arp
end
OCaml

Innovation. Community. Security.