type extension =
| Nsid of Cstruct.t | |
| Cookie of Cstruct.t | |
| Tcp_keepalive of int option | |
| Padding of int | |
| Extension of int * Cstruct.t | The type of supported extensions. |
type t = private {
extended_rcode : int; |
version : int; |
dnssec_ok : bool; |
payload_size : int; |
extensions : extension list; |
}
The type of an EDNS record.
val create : ?extended_rcode:int -> ?version:int -> ?dnssec_ok:bool -> ?payload_size:int -> ?extensions:extension list -> unit -> t
create ~extended_rcode ~version ~dnssec_ok ~payload_size ~extensions ()
constructs an EDNS record with the optionally provided data. The extended_rcode
defaults to 0, version
defaults to 0, dnssec_ok
to false, payload_size
to the minimum payload size (512 byte), extensions
to the empty list.
reply edns
either constructs an EDNS record and returns a maximum payload size, or None
(if no EDNS is provided).
compare a b
compares the EDNS record a
with b
by comparing individual fields in-order. The extension list must be exactly in the same order.