update copyright notice
This commit is contained in:
+23
-23
@@ -41,37 +41,37 @@
|
||||
static char *Tokens[MAXTOKS + 1];
|
||||
|
||||
#define BINDABLE(name) \
|
||||
((name->attributes & (DNS_NAMEATTR_READONLY|DNS_NAMEATTR_DYNAMIC)) \
|
||||
== 0)
|
||||
((name->attributes & (DNS_NAMEATTR_READONLY|DNS_NAMEATTR_DYNAMIC)) \
|
||||
== 0)
|
||||
|
||||
static isc_result_t
|
||||
dns_name_fromstring2(dns_name_t *target, const char *src,
|
||||
const dns_name_t *origin, unsigned int options,
|
||||
isc_mem_t *mctx)
|
||||
const dns_name_t *origin, unsigned int options,
|
||||
isc_mem_t *mctx)
|
||||
{
|
||||
isc_result_t result;
|
||||
isc_buffer_t buf;
|
||||
dns_fixedname_t fn;
|
||||
dns_name_t *name;
|
||||
isc_result_t result;
|
||||
isc_buffer_t buf;
|
||||
dns_fixedname_t fn;
|
||||
dns_name_t *name;
|
||||
|
||||
REQUIRE(src != NULL);
|
||||
REQUIRE(src != NULL);
|
||||
|
||||
isc_buffer_init(&buf, src, strlen(src));
|
||||
isc_buffer_add(&buf, strlen(src));
|
||||
if (BINDABLE(target) && target->buffer != NULL)
|
||||
name = target;
|
||||
else {
|
||||
dns_fixedname_init(&fn);
|
||||
name = dns_fixedname_name(&fn);
|
||||
}
|
||||
isc_buffer_init(&buf, src, strlen(src));
|
||||
isc_buffer_add(&buf, strlen(src));
|
||||
if (BINDABLE(target) && target->buffer != NULL)
|
||||
name = target;
|
||||
else {
|
||||
dns_fixedname_init(&fn);
|
||||
name = dns_fixedname_name(&fn);
|
||||
}
|
||||
|
||||
result = dns_name_fromtext(name, &buf, origin, options, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
result = dns_name_fromtext(name, &buf, origin, options, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
if (name != target)
|
||||
result = dns_name_dupwithoffsets(name, mctx, target);
|
||||
return (result);
|
||||
if (name != target)
|
||||
result = dns_name_dupwithoffsets(name, mctx, target);
|
||||
return (result);
|
||||
}
|
||||
|
||||
#ifdef NEED_PBUF
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2007, 2008, 2012 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
|
||||
+15
-15
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005, 2007, 2012 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
@@ -21,12 +21,12 @@
|
||||
|
||||
/**
|
||||
* DESCRIPTION
|
||||
*
|
||||
*
|
||||
* lwres_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 lwres_getrrsetbyname(), *res is a pointer
|
||||
* to an #rrsetinfo structure, containing a list of one or more #rdatainfo
|
||||
* structures containing resource records and potentially another list of
|
||||
@@ -37,7 +37,7 @@
|
||||
* 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.
|
||||
*
|
||||
*
|
||||
* All of the information returned by lwres_getrrsetbyname() is
|
||||
* dynamically allocated: the rrsetinfo and rdatainfo structures, and the
|
||||
* canonical host name strings pointed to by the rrsetinfostructure.
|
||||
@@ -45,15 +45,15 @@
|
||||
* successful call to lwres_getrrsetbyname() is released by
|
||||
* lwres_freerrset(). rrset is a pointer to a struct rrset created by a
|
||||
* call to lwres_getrrsetbyname().
|
||||
*
|
||||
*
|
||||
* The following structures are used:
|
||||
*
|
||||
*
|
||||
* \code
|
||||
* struct 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
|
||||
@@ -66,23 +66,23 @@
|
||||
* struct rdatainfo *rri_sigs; // individual signatures
|
||||
* };
|
||||
* \endcode
|
||||
*
|
||||
*
|
||||
* \section getrrset_return Return Values
|
||||
*
|
||||
*
|
||||
* lwres_getrrsetbyname() returns zero on success, and one of the
|
||||
* following error codes if an error occurred:
|
||||
*
|
||||
*
|
||||
* \li #ERRSET_NONAME: the name does not exist
|
||||
*
|
||||
*
|
||||
* \li #ERRSET_NODATA:
|
||||
* the name exists, but does not have data of the desired type
|
||||
*
|
||||
*
|
||||
* \li #ERRSET_NOMEMORY:
|
||||
* memory could not be allocated
|
||||
*
|
||||
*
|
||||
* \li #ERRSET_INVAL:
|
||||
* a parameter is invalid
|
||||
*
|
||||
*
|
||||
* \li #ERRSET_FAIL:
|
||||
* other failure
|
||||
*/
|
||||
@@ -179,7 +179,7 @@ lwres_getrrsetbyname(const char *hostname, unsigned int rdclass,
|
||||
lwflags = 0;
|
||||
|
||||
lwresult = lwres_getrdatabyname(lwrctx, hostname,
|
||||
(lwres_uint16_t)rdclass,
|
||||
(lwres_uint16_t)rdclass,
|
||||
(lwres_uint16_t)rdtype,
|
||||
lwflags, &response);
|
||||
if (lwresult != LWRES_R_SUCCESS) {
|
||||
|
||||
Reference in New Issue
Block a user