package charrua-client
DHCP client implementation
Install
dune-project
Dependency
Authors
Maintainers
Sources
charrua-2.1.0.tbz
sha256=53a6be65499aa901b5db6a3c0494c21b5bc3fe2098c6e56826d3b55c49ed2b99
sha512=37d171014c755f7fc2465fd0124f5a80cb377c3a493883a38afdd2e583bf2022bec410842e5c7425b7945c3be408a55e9153a498c0f5f211dd1baa2c44fd5d6f
doc/src/charrua-client.mirage/dhcp_ipv4.ml.html
Source file dhcp_ipv4.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
open Lwt.Infix module Make (Network : Mirage_net.S) (E : Ethernet.S) (Arp : Arp.S) = struct (* for now, just wrap a static ipv4 *) module DHCP = Dhcp_client_mirage.Make(Network) include Static_ipv4.Make(E)(Arp) let connect ?(no_init = false) ?cidr ?gateway ?options ?requests net ethernet arp = (match cidr, no_init with | None, false -> let requests = match requests with | None -> Dhcp_wire.[ SUBNET_MASK; ROUTERS ] | Some s -> s in DHCP.connect ?options ~requests net >>= fun dhcp -> Lwt_stream.last_new dhcp | None, true -> Lwt.return (Ipaddr.V4.(Prefix.make 32 localhost), gateway) | Some ip, _ -> Lwt.return (ip, gateway)) >>= fun (cidr, gateway) -> connect ~no_init ~cidr ?gateway ethernet arp end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>