Struct ResourceRecord
Fields
Name | Type | Description |
class_
|
CLASS | Two octets which specify the class of the data in the RDATA field.
|
name
|
Domain | A domain name to which this resource record pertains.
|
ttl
|
uint | A 32 bit unsigned integer that specifies the time interval (in seconds)
that the resource record may be cached before it should be discarded.
Zero values are interpreted to mean that the RR can only be used for the
transaction in progress, and should not be cached.
|
type
|
TYPE | Two octets containing one of the RR type codes.
This field specifies the meaning of the data in the RDATA field.
|
Methods
Name | Description |
fromBinary
(ctx)
|
Support for network serialization
|
make
(name, ttl, rdata)
|
Make a record of the given type
|
make
(name, ttl, soa)
|
Make a record of SOA type
|
make
(name, ttl, cname)
|
Make a record of CNAME type
|
make
(name, ttl, ipv4)
|
Make a record of A type
|
make
(name, ttl, ipv6)
|
Make a record of AAAA type
|
make
(name, ttl, server)
|
Make a record of NS type
|
make
(name, ttl, uri, prio, weight)
|
Make a record of URI type
|
opEquals
(other)
|
Compare ResourceRecord with its data according to their types
|
serialize
(dg)
|
Support for network serialization
|
toString
(sink)
|
Pretty-print the record
|
Unions
Name | Description |
RDATA
|
A variable length string of octets that describes the resource.
The format of this information varies according to the TYPE and CLASS
of the resource record.
For example, the if the TYPE is A and the CLASS is IN,
the RDATA field is a 4 octet ARPA Internet address.
|
https
//datatracker.ietf.org/doc/html/rfc1035#section-4.1.3