📄 lwres_getrrsetbyname.3
字号:
.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC").\" Copyright (C) 2000, 2001 Internet Software Consortium..\".\" Permission to use, copy, modify, and distribute this software for any.\" purpose with or without fee is hereby granted, provided that the above.\" copyright notice and this permission notice appear in all copies..\".\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY.\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,.\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM.\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR.\" PERFORMANCE OF THIS SOFTWARE..\".\" $Id: lwres_getrrsetbyname.3,v 1.11.2.1.8.1 2004/03/06 07:41:43 marka Exp $.\".TH "LWRES_GETRRSETBYNAME" "3" "Oct 18, 2000" "BIND9" "".SH NAMElwres_getrrsetbyname, lwres_freerrset \- retrieve DNS records.SH SYNOPSIS\fB#include <lwres/netdb.h>.sp.naintlwres_getrrsetbyname(const char *hostname, unsigned int rdclass, unsigned int rdtype, unsigned int flags, struct rrsetinfo **res);.ad.sp.navoidlwres_freerrset(struct rrsetinfo *rrset);.ad\fR.PPThe following structures are used:.sp.nfstruct rdatainfo { unsigned int rdi_length; /* length of data */ unsigned char *rdi_data; /* record data */};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 */};.sp.fi.SH "DESCRIPTION".PP\fBlwres_getrrsetbyname()\fRgets a set of resource records associated with a\fIhostname\fR,\fIclass\fR,and\fItype\fR.\fIhostname\fRisa pointer a to null-terminated string. The\fIflags\fRfield is currently unused and must be zero..PPAfter a successful call to\fBlwres_getrrsetbyname()\fR,\fI*res\fRis a pointer to an\fBrrsetinfo\fRstructure, containing a list of one or more\fBrdatainfo\fRstructures containing resource records and potentially another list of\fBrdatainfo\fRstructures containing SIG resource recordsassociated with those records.The membersrri_rdclassandrri_rdtypeare copied from the parameters.rri_ttlandrri_nameare properties of the obtained rrset.The resource records contained inrri_rdatasandrri_sigsare in uncompressed DNS wire format.Properties of the rdataset are represented in therri_flagsbitfield. If the RRSET_VALIDATED bit is set, the data has been DNSSECvalidated and the signatures verified. .PPAll of the information returned by\fBlwres_getrrsetbyname()\fRis dynamically allocated: therrsetinfoandrdatainfostructures,and the canonical host name strings pointed to by therrsetinfostructure.Memory allocated for the dynamically allocated structures created bya successful call to\fBlwres_getrrsetbyname()\fRis released by\fBlwres_freerrset()\fR.\fIrrset\fRis a pointer to a\fBstruct rrset\fRcreated by a call to\fBlwres_getrrsetbyname()\fR..PP.SH "RETURN VALUES".PP\fBlwres_getrrsetbyname()\fRreturns zero on success, and one of the following errorcodes if an error occurred:.TP\fBERRSET_NONAME\fRthe name does not exist.TP\fBERRSET_NODATA\fRthe name exists, but does not have data of the desired type.TP\fBERRSET_NOMEMORY\fRmemory could not be allocated.TP\fBERRSET_INVAL\fRa parameter is invalid.TP\fBERRSET_FAIL\fRother failure.TP\fB\fR.SH "SEE ALSO".PP\fBlwres\fR(3).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -