Comtrol eCos User Manual
Page 530

Chapter 38. TCP/IP Library Reference
struct
rrsetinfo {
unsigned int
rri_flags;
/* RRSET_VALIDATED ... */
unsigned int
rri_rdclass;
/* class number */
unsigned int
rri_rdtype;
/* RR type number */
unsigned int
rri_ttl;
/* time to live */
unsigned int
rri_nrdatas;
/* size of rdatas array */
unsigned int
rri_nsigs;
/* size of sigs array */
char
*rri_name;
/* canonical name */
struct rdatainfo
*rri_rdatas;
/* individual records */
struct rdatainfo
*rri_sigs;
/* individual signatures */
};
All of the information returned by getrrsetbyname() is dynamically allo-
cated: the rrsetinfo and rdatainfo structures, and the canonical host
name strings pointed to by the rrsetinfostructure. Memory allocated for
the dynamically allocated structures created by a successful call to
getrrsetbyname() is released by freerrset().
rrset is a pointer to a
struct rrset created by a call to getrrsetbyname().
If the EDNS0 option is activated in resolv.conf(3), getrrsetbyname() will
request DNSSEC authentication using the EDNS0 DNSSEC OK (DO) bit.
RETURN VALUES
getrrsetbyname() returns zero on success, and one of the following error
codes if an error occurred:
ERRSET_NONAME
the name does not exist
ERRSET_NODATA
the name exists, but does not have data of the desired
type
ERRSET_NOMEMORY
memory could not be allocated
ERRSET_INVAL
a parameter is invalid
ERRSET_FAIL
other failure
SEE ALSO
resolver(3), resolv.conf(5), named(8)
AUTHORS
Jakob Schlyter
<
HISTORY
getrrsetbyname() first appeared in OpenBSD 3.0.
The API first appeared
in ISC BIND version 9.
BUGS
The data in *rdi_data should be returned in uncompressed wire format.
Currently, the data is in compressed format and the caller can’t uncom-
press since it doesn’t have the full message.
CAVEATS
The RRSET_VALIDATED flag in rri_flags is set if the AD (autenticated
data) bit in the DNS answer is set. This flag should not be trusted
unless the transport between the nameserver and the resolver is secure
(e.g. IPsec, trusted network, loopback communication).
426