sig
type t = {
op : Dhcp.opcode;
htype : Arp.HwType.t;
hlen : int;
hops : int;
xid : int32;
secs : int;
broadcast : bool;
ciaddr : Ip.Addr.t;
yiaddr : Ip.Addr.t;
siaddr : Ip.Addr.t;
giaddr : Ip.Addr.t;
chaddr : Bitstring.bitstring;
sname : string;
file : string;
mutable msg_type : Dhcp.MsgType.t option;
mutable subnet_mask : Ip.Addr.t option;
mutable router : Ip.Addr.t option;
mutable ntp_server : Ip.Addr.t option;
mutable smtp_server : Ip.Addr.t option;
mutable pop3_server : Ip.Addr.t option;
mutable name_server : Ip.Addr.t option;
mutable client_name : string option;
mutable search_sfx : string option;
mutable lease_time : int32 option;
mutable server_id : Ip.Addr.t option;
mutable requested_ip : Ip.Addr.t option;
mutable message : string option;
mutable client_id : Bitstring.bitstring option;
mutable request_list : string option;
}
val unpack_options : Dhcp.Pdu.t -> string * int * int -> bool
val unpack : string * int * int -> Dhcp.Pdu.t option
val pack_options : Dhcp.Pdu.t -> Bitstring.bitstring
val pack : Dhcp.Pdu.t -> Bitstring.bitstring
val make_base :
?mac:Eth.Addr.t ->
?xid:Int32.t ->
?name:string -> ?yiaddr:Ip.Addr.t -> Dhcp.MsgType.t -> Dhcp.Pdu.t
val make_discover :
?mac:Eth.Addr.t -> ?xid:Int32.t -> ?name:string -> unit -> Dhcp.Pdu.t
val make_offer :
?mac:Eth.Addr.t ->
?xid:Int32.t -> Ip.Addr.t -> Bitstring.bitstring option -> Dhcp.Pdu.t
val make_request :
?mac:Eth.Addr.t ->
?xid:Int32.t ->
?name:string -> Ip.Addr.t -> Ip.Addr.t option -> Dhcp.Pdu.t
val make_ack :
?mac:Eth.Addr.t ->
?xid:Int32.t -> Ip.Addr.t -> Bitstring.bitstring option -> Dhcp.Pdu.t
val random : unit -> Dhcp.Pdu.t
end