|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [MirageOS-devel] mirage-skeleton/applications/dhcp fails to build with static hosts uncommented.
On 3/26/19 7:55 AM, Adam Steen wrote: I'm not sure how big of a fan I am of the way this example reads its configuration; it seems pretty hard to use, but here's a diff that makes it compile with your static options: diff --git a/applications/dhcp/dhcp_config.ml b/applications/dhcp/dhcp_config.ml index 7a5b1ce..dfb5c54 100644 --- a/applications/dhcp/dhcp_config.ml +++ b/applications/dhcp/dhcp_config.ml @@ -12,7 +12,7 @@ let ip_address = ip "192.168.1.5" let network = net "192.168.1.5/24" let range = Some (ip "192.168.1.70", ip "192.168.1.100") (* List of dhcp options to be advertised *) -let options = [ +let options : dhcp_option list = [ (* Routers is a list of default routers *) Routers [ip "192.168.1.5"]; (* Dns_servers is a list of dns servers *) @@ -33,14 +33,14 @@ let options = [* `Time_offset', `Max_datagram; will always override the global (if present).
*)
-(* let static_host_1 = { *)
-(* hostname = "Static host 1"; *)
-(* options = [ *)
-(* Routers [ip "192.168.1.4"]; *)
-(* ]; *)
-(* hw_addr = mac "7a:bb:c1:aa:50:01"; *)
-(* fixed_addr = Some (ip "192.168.1.151"); (\* Must be outside of
range. *\) *)
-(* } *)
+let static_host_1 : Dhcp_server.Config.host = {
+ hostname = "Static host 1";
+ options = [
+ Routers [ip "192.168.1.4"];
+ ];
+ hw_addr = mac "7a:bb:c1:aa:50:01";
+ fixed_addr = Some (ip "192.168.1.151"); (* Must be outside of range. *)
+ }
(* let static_host_2 = { *)
(* hostname = "Static host 2"; *)
@@ -49,5 +49,5 @@ let options = [
(* fixed_addr = Some (ip "192.168.1.152"); (\* Must be outside of
range. *\) *)
(* } *) -(* let hosts = [static_host_1;static_host_2] *) let hosts = [] +let hosts = [static_host_1 (*;static_host_2*) ] _______________________________________________ MirageOS-devel mailing list MirageOS-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/mirageos-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |