module Pdu: sig .. end
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 : t -> string * int * int -> bool
val unpack : string * int * int -> t option
val pack_options : t -> Bitstring.bitstring
val pack : t -> Bitstring.bitstring
val make_base : ?mac:Eth.Addr.t ->
?xid:Int32.t ->
?name:string -> ?yiaddr:Ip.Addr.t -> Dhcp.MsgType.t -> t
val make_discover : ?mac:Eth.Addr.t -> ?xid:Int32.t -> ?name:string -> unit -> t
val make_offer : ?mac:Eth.Addr.t ->
?xid:Int32.t -> Ip.Addr.t -> Bitstring.bitstring option -> t
val make_request : ?mac:Eth.Addr.t ->
?xid:Int32.t -> ?name:string -> Ip.Addr.t -> Ip.Addr.t option -> t
val make_ack : ?mac:Eth.Addr.t ->
?xid:Int32.t -> Ip.Addr.t -> Bitstring.bitstring option -> t
val random : unit -> t