package charrua-core

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type host = {
  1. hostname : string;
  2. options : Dhcp_wire.dhcp_option list;
  3. fixed_addr : Ipaddr.V4.t option;
  4. hw_addr : Macaddr.t;
}

host config section entry.

val host_of_sexp : Sexplib.Sexp.t -> host
val sexp_of_host : host -> Sexplib.Sexp.t
type t = {
  1. options : Dhcp_wire.dhcp_option list;
  2. hostname : string;
  3. default_lease_time : int32;
  4. max_lease_time : int32;
  5. ip_addr : Ipaddr.V4.t;
  6. mac_addr : Macaddr.t;
  7. network : Ipaddr.V4.Prefix.t;
  8. range : (Ipaddr.V4.t * Ipaddr.V4.t) option;
  9. hosts : host list;
}

Server configuration

val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val parse : string -> (Ipaddr.V4.t * Macaddr.t) -> t

parse cf (addr * mac) Creates a server configuration by parsing cf as an ISC dhcpd.conf file, currently only the options at sample/dhcpd.conf are supported. addr and mac are the prefix address and mac address to be used for building replies, it must match one subnet section in cf. Raises Not_found if the (addr * mac) tuple does not match any network section.

val make : ?hostname:string -> ?default_lease_time:int -> ?max_lease_time:int -> ?hosts:host list -> addr_tuple:(Ipaddr.V4.t * Macaddr.t) -> network:Ipaddr.V4.Prefix.t -> range:(Ipaddr.V4.t * Ipaddr.V4.t) option -> options:Dhcp_wire.dhcp_option list -> t