Dhcp_server.Config
type host = {
hostname : string;
options : Dhcp_wire.dhcp_option list;
fixed_addr : Ipaddr.V4.t option;
hw_addr : Macaddr.t;
}
host
config section entry.
type t = {
options : Dhcp_wire.dhcp_option list;
hostname : string;
default_lease_time : int32;
max_lease_time : int32;
ip_addr : Ipaddr.V4.t;
mac_addr : Macaddr.t;
network : Ipaddr.V4.Prefix.t;
range : (Ipaddr.V4.t * Ipaddr.V4.t) option;
hosts : host list;
}
Server configuration
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