Function trust_dns_proto::op::update_message::delete_rrset
source · pub fn delete_rrset(
record: Record,
zone_origin: Name,
use_edns: bool,
) -> Message
Expand description
Deletes an entire rrset, optionally require the rrset to exist.
RFC 2136, DNS Update, April 1997
2.4.1 - RRset Exists (Value Independent)
At least one RR with a specified NAME and TYPE (in the zone and class
specified in the Zone Section) must exist.
For this prerequisite, a requestor adds to the section a single RR
whose NAME and TYPE are equal to that of the zone RRset whose
existence is required. RDLENGTH is zero and RDATA is therefore
empty. CLASS must be specified as ANY to differentiate this
condition from that of an actual RR whose RDLENGTH is naturally zero
(0) (e.g., NULL). TTL is specified as zero (0).
2.5.2 - Delete An RRset
One RR is added to the Update Section whose NAME and TYPE are those
of the RRset to be deleted. TTL must be specified as zero (0) and is
otherwise not used by the Primary Zone Server. CLASS must be specified as
ANY. RDLENGTH must be zero (0) and RDATA must therefore be empty.
If no such RRset exists, then this Update RR will be silently ignored
by the Primary Zone Server.
§Arguments
record
- The name, class and record_type will be used to match and delete the RecordSetzone_origin
- the zone name to update, i.e. SOA name
The update must go to a zone authority (i.e. the server used in the ClientConnection). If the rrset does not exist and must_exist is false, then the RRSet will be deleted.