Dhcp_server.Lease
val make :
Dhcp_wire.client_id ->
Ipaddr.V4.t ->
duration:int32 ->
now:int32 ->
t
val make_fixed : Macaddr.t -> Ipaddr.V4.t -> duration:int32 -> now:int32 -> t
val timeleft : t -> now:int32 -> int32
val timeleft_exn : t -> now:int32 -> int32
val timeleft3 : t -> float -> float -> now:int32 -> int32 * int32 * int32
val expired : t -> now:int32 -> bool
val to_string : t -> string
val make_db : unit -> database
val db_to_string : database -> string
val db_of_string : string -> database
val lease_of_client_id : Dhcp_wire.client_id -> database -> t option
val lease_of_addr : Ipaddr.V4.t -> database -> Dhcp_wire.client_id option
val addr_allocated : Ipaddr.V4.t -> database -> bool
val addr_free : Ipaddr.V4.t -> database -> bool
val get_usable_addr :
Dhcp_wire.client_id ->
database ->
(Ipaddr.V4.t * Ipaddr.V4.t) option ->
Ipaddr.V4.t option