package charrua-server

  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 sexp_of_host : host -> Sexplib0.Sexp.t
val host_of_sexp : Sexplib0.Sexp.t -> host
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

include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.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 -> unit -> t
OCaml

Innovation. Community. Security.