charrua-core

DHCP wire frame encoder and decoder
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library charrua-core.server
Module Dhcp_server . Lease
type t = {
tm_start : int32;
tm_end : int32;
addr : Ipaddr.V4.t;
client_id : Dhcp_wire.client_id;
}
include Ppx_sexp_conv_lib.Sexpable.S with type t := t
val t_of_sexp : Sexplib0.Sexp.t -> t
val sexp_of_t : t -> Sexplib0.Sexp.t
val sexp_of_t : t -> Sexplib.Sexp.t
val t_of_sexp : Sexplib.Sexp.t -> 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 extend : t -> now:int32 -> t
val expired : t -> now:int32 -> bool
val to_string : t -> string
type database
val make_db : unit -> database
val to_list : database -> t list
val garbage_collect : database -> now:int32 -> database
val remove : t -> database -> database
val replace : t -> database -> database
val lease_of_client_id : Dhcp_wire.client_id -> database -> t option
val lease_of_addr : Ipaddr.V4.t -> database -> t option
val addr_allocated : Ipaddr.V4.t -> database -> bool
val addr_available : Ipaddr.V4.t -> database -> now:int32 -> bool
val get_usable_addr : Dhcp_wire.client_id -> database -> (Ipaddr.V4.t * Ipaddr.V4.t) option -> now:int32 -> Ipaddr.V4.t option