这篇教程C++ DNS_RDATASET_VALID函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中DNS_RDATASET_VALID函数的典型用法代码示例。如果您正苦于以下问题:C++ DNS_RDATASET_VALID函数的具体用法?C++ DNS_RDATASET_VALID怎么用?C++ DNS_RDATASET_VALID使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了DNS_RDATASET_VALID函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: dns_rdataset_trimttlvoiddns_rdataset_trimttl(dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset, dns_rdata_rrsig_t *rrsig, isc_stdtime_t now, isc_boolean_t acceptexpired){ isc_uint32_t ttl = 0; REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE(DNS_RDATASET_VALID(sigrdataset)); REQUIRE(rrsig != NULL); /* * If we accept expired RRsets keep them for no more than 120 seconds. */ if (acceptexpired && (isc_serial_le(rrsig->timeexpire, ((now + 120) & 0xffffffff)) || isc_serial_le(rrsig->timeexpire, now))) ttl = 120; else if (isc_serial_ge(rrsig->timeexpire, now)) ttl = rrsig->timeexpire - now; ttl = ISC_MIN(ISC_MIN(rdataset->ttl, sigrdataset->ttl), ISC_MIN(rrsig->originalttl, ttl)); rdataset->ttl = ttl; sigrdataset->ttl = ttl;}
开发者ID:zhongliangkang,项目名称:bind9.9.4,代码行数:26,
示例2: dns_db_addrdatasetisc_result_tdns_db_addrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version, isc_stdtime_t now, dns_rdataset_t *rdataset, unsigned int options, dns_rdataset_t *addedrdataset){ /* * Add 'rdataset' to 'node' in version 'version' of 'db'. */ REQUIRE(DNS_DB_VALID(db)); REQUIRE(node != NULL); REQUIRE(((db->attributes & DNS_DBATTR_CACHE) == 0 && version != NULL)|| ((db->attributes & DNS_DBATTR_CACHE) != 0 && version == NULL && (options & DNS_DBADD_MERGE) == 0)); REQUIRE((options & DNS_DBADD_EXACT) == 0 || (options & DNS_DBADD_MERGE) != 0); REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE(dns_rdataset_isassociated(rdataset)); REQUIRE(rdataset->rdclass == db->rdclass); REQUIRE(addedrdataset == NULL || (DNS_RDATASET_VALID(addedrdataset) && ! dns_rdataset_isassociated(addedrdataset))); return ((db->methods->addrdataset)(db, node, version, now, rdataset, options, addedrdataset));}
开发者ID:VargMon,项目名称:netbsd-cvs-mirror,代码行数:26,
示例3: dns_db_findextisc_result_tdns_db_findext(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version, dns_rdatatype_t type, unsigned int options, isc_stdtime_t now, dns_dbnode_t **nodep, dns_name_t *foundname, dns_clientinfomethods_t *methods, dns_clientinfo_t *clientinfo, dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset){ /* * Find the best match for 'name' and 'type' in version 'version' * of 'db', passing in 'arg'. */ REQUIRE(DNS_DB_VALID(db)); REQUIRE(type != dns_rdatatype_rrsig); REQUIRE(nodep == NULL || (nodep != NULL && *nodep == NULL)); REQUIRE(dns_name_hasbuffer(foundname)); REQUIRE(rdataset == NULL || (DNS_RDATASET_VALID(rdataset) && ! dns_rdataset_isassociated(rdataset))); REQUIRE(sigrdataset == NULL || (DNS_RDATASET_VALID(sigrdataset) && ! dns_rdataset_isassociated(sigrdataset))); if (db->methods->findext != NULL) return ((db->methods->findext)(db, name, version, type, options, now, nodep, foundname, methods, clientinfo, rdataset, sigrdataset)); else return ((db->methods->find)(db, name, version, type, options, now, nodep, foundname, rdataset, sigrdataset));}
开发者ID:VargMon,项目名称:netbsd-cvs-mirror,代码行数:34,
示例4: dns_rdataset_clonevoiddns_rdataset_clone(dns_rdataset_t *source, dns_rdataset_t *target) { /* * Make 'target' refer to the same rdataset as 'source'. */ REQUIRE(DNS_RDATASET_VALID(source)); REQUIRE(source->methods != NULL); REQUIRE(DNS_RDATASET_VALID(target)); REQUIRE(target->methods == NULL); (source->methods->clone)(source, target);}
开发者ID:zhongliangkang,项目名称:bind9.9.4,代码行数:14,
示例5: dns_rdataset_getadditional/* * Additional cache stuff */isc_result_tdns_rdataset_getadditional(dns_rdataset_t *rdataset, dns_rdatasetadditional_t type, dns_rdatatype_t qtype, dns_acache_t *acache, dns_zone_t **zonep, dns_db_t **dbp, dns_dbversion_t **versionp, dns_dbnode_t **nodep, dns_name_t *fname, dns_message_t *msg, isc_stdtime_t now){ REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE(rdataset->methods != NULL); REQUIRE(zonep == NULL || *zonep == NULL); REQUIRE(dbp != NULL && *dbp == NULL); REQUIRE(versionp != NULL && *versionp == NULL); REQUIRE(nodep != NULL && *nodep == NULL); REQUIRE(fname != NULL); REQUIRE(msg != NULL); if (acache != NULL && rdataset->methods->getadditional != NULL) { return ((rdataset->methods->getadditional)(rdataset, type, qtype, acache, zonep, dbp, versionp, nodep, fname, msg, now)); } return (ISC_R_FAILURE);}
开发者ID:zhongliangkang,项目名称:bind9.9.4,代码行数:35,
示例6: dns_rdataset_disassociatevoiddns_rdataset_disassociate(dns_rdataset_t *rdataset) { /* * Disassociate 'rdataset' from its rdata, allowing it to be reused. */ REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE(rdataset->methods != NULL); (rdataset->methods->disassociate)(rdataset); rdataset->methods = NULL; ISC_LINK_INIT(rdataset, link); rdataset->rdclass = 0; rdataset->type = 0; rdataset->ttl = 0; rdataset->trust = 0; rdataset->covers = 0; rdataset->attributes = 0; rdataset->count = ISC_UINT32_MAX; rdataset->private1 = NULL; rdataset->private2 = NULL; rdataset->private3 = NULL; rdataset->privateuint4 = 0; rdataset->private5 = NULL; rdataset->private6 = NULL;}
开发者ID:zhongliangkang,项目名称:bind9.9.4,代码行数:27,
示例7: dns_rdatalist_tordatasetisc_result_tdns_rdatalist_tordataset(dns_rdatalist_t *rdatalist, dns_rdataset_t *rdataset){ /* * Make 'rdataset' refer to the rdata in 'rdatalist'. */ REQUIRE(rdatalist != NULL); REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE(! dns_rdataset_isassociated(rdataset)); rdataset->methods = &methods; rdataset->rdclass = rdatalist->rdclass; rdataset->type = rdatalist->type; rdataset->covers = rdatalist->covers; rdataset->ttl = rdatalist->ttl; rdataset->trust = 0; rdataset->private1 = rdatalist; rdataset->private2 = NULL; rdataset->private3 = NULL; rdataset->privateuint4 = 0; rdataset->private5 = NULL; return (ISC_R_SUCCESS);}
开发者ID:jpostel,项目名称:FreeBSD-mirror,代码行数:26,
示例8: dns_rdataset_additionaldataisc_result_tdns_rdataset_additionaldata(dns_rdataset_t *rdataset, dns_additionaldatafunc_t add, void *arg){ dns_rdata_t rdata = DNS_RDATA_INIT; isc_result_t result; /* * For each rdata in rdataset, call 'add' for each name and type in the * rdata which is subject to additional section processing. */ REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE((rdataset->attributes & DNS_RDATASETATTR_QUESTION) == 0); result = dns_rdataset_first(rdataset); if (result != ISC_R_SUCCESS) return (result); do { dns_rdataset_current(rdataset, &rdata); result = dns_rdata_additionaldata(&rdata, add, arg); if (result == ISC_R_SUCCESS) result = dns_rdataset_next(rdataset); dns_rdata_reset(&rdata); } while (result == ISC_R_SUCCESS); if (result != ISC_R_NOMORE) return (result); return (ISC_R_SUCCESS);}
开发者ID:zhongliangkang,项目名称:bind9.9.4,代码行数:32,
示例9: dns_rdataset_invalidatevoiddns_rdataset_invalidate(dns_rdataset_t *rdataset) { /* * Invalidate 'rdataset'. */ REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE(rdataset->methods == NULL); rdataset->magic = 0; ISC_LINK_INIT(rdataset, link); rdataset->rdclass = 0; rdataset->type = 0; rdataset->ttl = 0; rdataset->trust = 0; rdataset->covers = 0; rdataset->attributes = 0; rdataset->count = ISC_UINT32_MAX; rdataset->private1 = NULL; rdataset->private2 = NULL; rdataset->private3 = NULL; rdataset->privateuint4 = 0; rdataset->private5 = NULL;}
开发者ID:zhongliangkang,项目名称:bind9.9.4,代码行数:25,
示例10: dns_rdataset_expirevoiddns_rdataset_expire(dns_rdataset_t *rdataset) { REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE(rdataset->methods != NULL); if (rdataset->methods->expire != NULL) (rdataset->methods->expire)(rdataset);}
开发者ID:zhongliangkang,项目名称:bind9.9.4,代码行数:8,
示例11: dns_rdataset_addclosestisc_result_tdns_rdataset_addclosest(dns_rdataset_t *rdataset, dns_name_t *name) { REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE(rdataset->methods != NULL); if (rdataset->methods->addclosest == NULL) return (ISC_R_NOTIMPLEMENTED); return((rdataset->methods->addclosest)(rdataset, name));}
开发者ID:zhongliangkang,项目名称:bind9.9.4,代码行数:9,
示例12: dns_rdataset_settrustvoiddns_rdataset_settrust(dns_rdataset_t *rdataset, dns_trust_t trust) { REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE(rdataset->methods != NULL); if (rdataset->methods->settrust != NULL) (rdataset->methods->settrust)(rdataset, trust); else rdataset->trust = trust;}
开发者ID:zhongliangkang,项目名称:bind9.9.4,代码行数:10,
示例13: dns_rdataset_getnoqnameisc_result_tdns_rdataset_getnoqname(dns_rdataset_t *rdataset, dns_name_t *name, dns_rdataset_t *neg, dns_rdataset_t *negsig){ REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE(rdataset->methods != NULL); if (rdataset->methods->getnoqname == NULL) return (ISC_R_NOTIMPLEMENTED); return((rdataset->methods->getnoqname)(rdataset, name, neg, negsig));}
开发者ID:zhongliangkang,项目名称:bind9.9.4,代码行数:11,
示例14: dns_db_findrdatasetisc_result_tdns_db_findrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version, dns_rdatatype_t type, dns_rdatatype_t covers, isc_stdtime_t now, dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset){ REQUIRE(DNS_DB_VALID(db)); REQUIRE(node != NULL); REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE(! dns_rdataset_isassociated(rdataset)); REQUIRE(covers == 0 || type == dns_rdatatype_rrsig); REQUIRE(type != dns_rdatatype_any); REQUIRE(sigrdataset == NULL || (DNS_RDATASET_VALID(sigrdataset) && ! dns_rdataset_isassociated(sigrdataset))); return ((db->methods->findrdataset)(db, node, version, type, covers, now, rdataset, sigrdataset));}
开发者ID:VargMon,项目名称:netbsd-cvs-mirror,代码行数:20,
示例15: dns_rdataset_currentvoiddns_rdataset_current(dns_rdataset_t *rdataset, dns_rdata_t *rdata) { /* * Make 'rdata' refer to the current rdata. */ REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE(rdataset->methods != NULL); (rdataset->methods->current)(rdataset, rdata);}
开发者ID:zhongliangkang,项目名称:bind9.9.4,代码行数:12,
示例16: dns_rdataset_countunsigned intdns_rdataset_count(dns_rdataset_t *rdataset) { /* * Return the number of records in 'rdataset'. */ REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE(rdataset->methods != NULL); return ((rdataset->methods->count)(rdataset));}
开发者ID:zhongliangkang,项目名称:bind9.9.4,代码行数:12,
示例17: dns_rdataset_nextisc_result_tdns_rdataset_next(dns_rdataset_t *rdataset) { /* * Move the rdata cursor to the next rdata in the rdataset (if any). */ REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE(rdataset->methods != NULL); return ((rdataset->methods->next)(rdataset));}
开发者ID:zhongliangkang,项目名称:bind9.9.4,代码行数:12,
示例18: dns_rdatasetiter_currentvoid dns_rdatasetiter_current (dns_rdatasetiter_t * iterator, dns_rdataset_t * rdataset){ /* * Return the current rdataset. */ REQUIRE (DNS_RDATASETITER_VALID (iterator)); REQUIRE (DNS_RDATASET_VALID (rdataset)); REQUIRE (!dns_rdataset_isassociated (rdataset)); iterator->methods->current (iterator, rdataset);}
开发者ID:274914765,项目名称:C,代码行数:12,
示例19: dns_rdataset_isassociatedisc_boolean_tdns_rdataset_isassociated(dns_rdataset_t *rdataset) { /* * Is 'rdataset' associated? */ REQUIRE(DNS_RDATASET_VALID(rdataset)); if (rdataset->methods != NULL) return (ISC_TRUE); return (ISC_FALSE);}
开发者ID:zhongliangkang,项目名称:bind9.9.4,代码行数:13,
示例20: dns_db_subtractrdatasetisc_result_tdns_db_subtractrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version, dns_rdataset_t *rdataset, unsigned int options, dns_rdataset_t *newrdataset){ /* * Remove any rdata in 'rdataset' from 'node' in version 'version' of * 'db'. */ REQUIRE(DNS_DB_VALID(db)); REQUIRE(node != NULL); REQUIRE((db->attributes & DNS_DBATTR_CACHE) == 0 && version != NULL); REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE(dns_rdataset_isassociated(rdataset)); REQUIRE(rdataset->rdclass == db->rdclass); REQUIRE(newrdataset == NULL || (DNS_RDATASET_VALID(newrdataset) && ! dns_rdataset_isassociated(newrdataset))); return ((db->methods->subtractrdataset)(db, node, version, rdataset, options, newrdataset));}
开发者ID:VargMon,项目名称:netbsd-cvs-mirror,代码行数:23,
示例21: dns_db_findrdatasetisc_result_tdns_db_findrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version, dns_rdatatype_t type, dns_rdatatype_t covers, isc_stdtime_t now, dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset){ /* * Search for an rdataset of type 'type' at 'node' that are in version * 'version' of 'db'. If found, make 'rdataset' refer to it. */ REQUIRE(DNS_DB_VALID(db)); REQUIRE(node != NULL); REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE(! dns_rdataset_isassociated(rdataset)); REQUIRE(covers == 0 || type == dns_rdatatype_rrsig); REQUIRE(type != dns_rdatatype_any); REQUIRE(sigrdataset == NULL || (DNS_RDATASET_VALID(sigrdataset) && ! dns_rdataset_isassociated(sigrdataset))); return ((db->methods->findrdataset)(db, node, version, type, covers, now, rdataset, sigrdataset));}
开发者ID:miettal,项目名称:armadillo420_standard,代码行数:24,
示例22: dns_rdataset_putadditionalisc_result_tdns_rdataset_putadditional(dns_acache_t *acache, dns_rdataset_t *rdataset, dns_rdatasetadditional_t type, dns_rdatatype_t qtype){ REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE(rdataset->methods != NULL); if (acache != NULL && rdataset->methods->putadditional != NULL) { return ((rdataset->methods->putadditional)(acache, rdataset, type, qtype)); } return (ISC_R_FAILURE);}
开发者ID:zhongliangkang,项目名称:bind9.9.4,代码行数:16,
示例23: dns_rdataset_makequestionvoiddns_rdataset_makequestion(dns_rdataset_t *rdataset, dns_rdataclass_t rdclass, dns_rdatatype_t type){ /* * Make 'rdataset' a valid, associated, question rdataset, with a * question class of 'rdclass' and type 'type'. */ REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE(rdataset->methods == NULL); rdataset->methods = &question_methods; rdataset->rdclass = rdclass; rdataset->type = type; rdataset->attributes |= DNS_RDATASETATTR_QUESTION;}
开发者ID:zhongliangkang,项目名称:bind9.9.4,代码行数:18,
示例24: dns_db_findzonecutisc_result_tdns_db_findzonecut(dns_db_t *db, dns_name_t *name, unsigned int options, isc_stdtime_t now, dns_dbnode_t **nodep, dns_name_t *foundname, dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset){ /* * Find the deepest known zonecut which encloses 'name' in 'db'. */ REQUIRE(DNS_DB_VALID(db)); REQUIRE((db->attributes & DNS_DBATTR_CACHE) != 0); REQUIRE(nodep == NULL || (nodep != NULL && *nodep == NULL)); REQUIRE(dns_name_hasbuffer(foundname)); REQUIRE(sigrdataset == NULL || (DNS_RDATASET_VALID(sigrdataset) && ! dns_rdataset_isassociated(sigrdataset))); return ((db->methods->findzonecut)(db, name, options, now, nodep, foundname, rdataset, sigrdataset));}
开发者ID:VargMon,项目名称:netbsd-cvs-mirror,代码行数:21,
示例25: dns_rdataset_setadditionalisc_result_tdns_rdataset_setadditional(dns_rdataset_t *rdataset, dns_rdatasetadditional_t type, dns_rdatatype_t qtype, dns_acache_t *acache, dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node, dns_name_t *fname){ REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE(rdataset->methods != NULL); if (acache != NULL && rdataset->methods->setadditional != NULL) { return ((rdataset->methods->setadditional)(rdataset, type, qtype, acache, zone, db, version, node, fname)); } return (ISC_R_FAILURE);}
开发者ID:zhongliangkang,项目名称:bind9.9.4,代码行数:23,
示例26: towiresortedstatic isc_result_ttowiresorted(dns_rdataset_t *rdataset, const dns_name_t *owner_name, dns_compress_t *cctx, isc_buffer_t *target, dns_rdatasetorderfunc_t order, const void *order_arg, isc_boolean_t partial, unsigned int options, unsigned int *countp, void **state){ dns_rdata_t rdata = DNS_RDATA_INIT; isc_region_t r; isc_result_t result; unsigned int i, count = 0, added, choice; isc_buffer_t savedbuffer, rdlen, rrbuffer; unsigned int headlen; isc_boolean_t question = ISC_FALSE; isc_boolean_t shuffle = ISC_FALSE; dns_rdata_t *shuffled = NULL, shuffled_fixed[MAX_SHUFFLE]; struct towire_sort *sorted = NULL, sorted_fixed[MAX_SHUFFLE]; /* count processed auswer ips */ int answer_count = 0; int is_no_auth_answer = 0; /* tmp count for record */ int tmp_count = 0; UNUSED(state); /* * Convert 'rdataset' to wire format, compressing names as specified * in cctx, and storing the result in 'target'. */ REQUIRE(DNS_RDATASET_VALID(rdataset)); REQUIRE(countp != NULL); REQUIRE((order == NULL) == (order_arg == NULL)); REQUIRE(cctx != NULL && cctx->mctx != NULL); if ((rdataset->attributes & DNS_RDATASETATTR_QUESTION) != 0) { question = ISC_TRUE; count = 1; result = dns_rdataset_first(rdataset); INSIST(result == ISC_R_NOMORE); } else if ((rdataset->attributes & DNS_RDATASETATTR_NEGATIVE) != 0) { /* * This is a negative caching rdataset. */ unsigned int ncache_opts = 0; if ((options & DNS_RDATASETTOWIRE_OMITDNSSEC) != 0) ncache_opts |= DNS_NCACHETOWIRE_OMITDNSSEC; return (dns_ncache_towire(rdataset, cctx, target, ncache_opts, countp)); } else { count = (rdataset->methods->count)(rdataset); result = dns_rdataset_first(rdataset); if (result == ISC_R_NOMORE) return (ISC_R_SUCCESS); if (result != ISC_R_SUCCESS) return (result); } /* * Do we want to shuffle this answer? */ if (!question && count > 1 && (!WANT_FIXED(rdataset) || order != NULL) && rdataset->type != dns_rdatatype_rrsig) shuffle = ISC_TRUE; if (shuffle && count > MAX_SHUFFLE) { shuffled = isc_mem_get(cctx->mctx, count * sizeof(*shuffled)); sorted = isc_mem_get(cctx->mctx, count * sizeof(*sorted)); if (shuffled == NULL || sorted == NULL) shuffle = ISC_FALSE; } else { shuffled = shuffled_fixed; sorted = sorted_fixed; } if (shuffle) { /* * First we get handles to all of the rdata. */ i = 0; do { INSIST(i < count); dns_rdata_init(&shuffled[i]); dns_rdataset_current(rdataset, &shuffled[i]); i++; result = dns_rdataset_next(rdataset); } while (result == ISC_R_SUCCESS); if (result != ISC_R_NOMORE) goto cleanup; INSIST(i == count); /* * Now we shuffle. */ if (WANT_FIXED(rdataset)) { /* * 'Fixed' order. *///.........这里部分代码省略.........
开发者ID:zhongliangkang,项目名称:bind9.9.4,代码行数:101,
注:本文中的DNS_RDATASET_VALID函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ DN_SK函数代码示例 C++ DNS_PEER_VALID函数代码示例 |