Function trust_dns_proto::op::update_message::append
source · pub fn append(
rrset: RecordSet,
zone_origin: Name,
must_exist: bool,
use_edns: bool
) -> Message
Expand description
Appends a record to an existing rrset, optionally require the rrset to exist (atomicity depends on the server)
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.1 - Add To An RRset
RRs are added to the Update Section whose NAME, TYPE, TTL, RDLENGTH
and RDATA are those being added, and CLASS is the same as the zone
class. Any duplicate RRs will be silently ignored by the Primary
Zone Server.
Arguments
rrset
- the record(s) to append to an RRSetzone_origin
- the zone name to update, i.e. SOA namemust_exist
- if true, the request will fail if the record does not exist
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 created.