Getrrsetbyname – Comtrol eCos User Manual
Page 529
Chapter 38. TCP/IP Library Reference
protocols(5)
HISTORY
The getprotoent(), getprotobynumber(), getprotobyname(), setprotoent(),
and endprotoent() functions appeared in 4.2BSD.
BUGS
These functions use a static data space; if the data is needed for future
use, it should be copied before any subsequent calls overwrite it.
Only
the Internet protocols are currently understood.
BSD
June 4, 1993
BSD
getrrsetbyname
GETRRSETBYNAME(3)
System Library Functions Manual
GETRRSETBYNAME(3)
NAME
getrrsetbyname - retrieve DNS records
SYNOPSIS
#include
<
netdb.h>
int
getrrsetbyname(const char *hostname, unsigned int rdclass,
unsigned int rdtype, unsigned int flags, struct rrsetinfo **res);
int
freerrset(struct rrsetinfo **rrset);
DESCRIPTION
getrrsetbyname() gets a set of resource records associated with a
hostname, class and type.
hostname is a pointer a to null-terminated
string.
The flags field is currently unused and must be zero.
After a successful call to getrrsetbyname(), *res is a pointer to an
rrsetinfo structure, containing a list of one or more rdatainfo struc-
tures containing resource records and potentially another list of
rdatainfo structures containing SIG resource records associated with
those records.
The members rri_rdclass and rri_rdtype are copied from
the parameters.
rri_ttl and rri_name are properties of the obtained
rrset.
The resource records contained in rri_rdatas and rri_sigs are in
uncompressed DNS wire format.
Properties of the rdataset are represented
in the rri_flags bitfield. If the RRSET_VALIDATED bit is set, the data
has been DNSSEC validated and the signatures verified.
The following structures are used:
struct
rdatainfo {
unsigned int
rdi_length;
/* length of data */
unsigned char
*rdi_data;
/* record data */
};
425