本文整理汇总了C++中dns_name_digest函数的典型用法代码示例。如果您正苦于以下问题:C++ dns_name_digest函数的具体用法?C++ dns_name_digest怎么用?C++ dns_name_digest使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dns_name_digest函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: digest_in_px
static inline isc_result_t
digest_in_px(ARGS_DIGEST) {
isc_region_t r1, r2;
dns_name_t name;
isc_result_t result;
REQUIRE(rdata->type == dns_rdatatype_px);
REQUIRE(rdata->rdclass == dns_rdataclass_in);
dns_rdata_toregion(rdata, &r1);
r2 = r1;
isc_region_consume(&r2, 2);
r1.length = 2;
result = (digest)(arg, &r1);
if (result != ISC_R_SUCCESS)
return (result);
dns_name_init(&name, NULL);
dns_name_fromregion(&name, &r2);
result = dns_name_digest(&name, digest, arg);
if (result != ISC_R_SUCCESS)
return (result);
isc_region_consume(&r2, name_length(&name));
dns_name_init(&name, NULL);
dns_name_fromregion(&name, &r2);
return (dns_name_digest(&name, digest, arg));
}
示例2: digest_naptr
static inline isc_result_t
digest_naptr(ARGS_DIGEST) {
isc_region_t r1, r2;
unsigned int length, n;
isc_result_t result;
dns_name_t name;
REQUIRE(rdata->type == dns_rdatatype_naptr);
dns_rdata_toregion(rdata, &r1);
r2 = r1;
length = 0;
/*
* Order, preference.
*/
length += 4;
isc_region_consume(&r2, 4);
/*
* Flags.
*/
n = r2.base[0] + 1;
length += n;
isc_region_consume(&r2, n);
/*
* Service.
*/
n = r2.base[0] + 1;
length += n;
isc_region_consume(&r2, n);
/*
* Regexp.
*/
n = r2.base[0] + 1;
length += n;
isc_region_consume(&r2, n);
/*
* Digest the RR up to the replacement name.
*/
r1.length = length;
result = (digest)(arg, &r1);
if (result != ISC_R_SUCCESS)
return (result);
/*
* Replacement.
*/
dns_name_init(&name, NULL);
dns_name_fromregion(&name, &r2);
return (dns_name_digest(&name, digest, arg));
}
示例3: digest_rp
static inline isc_result_t
digest_rp(ARGS_DIGEST) {
isc_region_t r;
dns_name_t name;
REQUIRE(rdata->type == dns_rdatatype_rp);
dns_rdata_toregion(rdata, &r);
dns_name_init(&name, NULL);
dns_name_fromregion(&name, &r);
RETERR(dns_name_digest(&name, digest, arg));
isc_region_consume(&r, name_length(&name));
dns_name_init(&name, NULL);
dns_name_fromregion(&name, &r);
return (dns_name_digest(&name, digest, arg));
}
示例4: digest_minfo
static inline isc_result_t
digest_minfo(ARGS_DIGEST) {
isc_region_t r;
dns_name_t name;
isc_result_t result;
REQUIRE(rdata->type == 14);
dns_rdata_toregion(rdata, &r);
dns_name_init(&name, NULL);
dns_name_fromregion(&name, &r);
result = dns_name_digest(&name, digest, arg);
if (result != ISC_R_SUCCESS)
return (result);
isc_region_consume(&r, name_length(&name));
dns_name_init(&name, NULL);
dns_name_fromregion(&name, &r);
return (dns_name_digest(&name, digest, arg));
}
示例5: digest_mf
static inline isc_result_t
digest_mf(ARGS_DIGEST) {
isc_region_t r;
dns_name_t name;
REQUIRE(rdata->type == dns_rdatatype_mf);
dns_rdata_toregion(rdata, &r);
dns_name_init(&name, NULL);
dns_name_fromregion(&name, &r);
return (dns_name_digest(&name, digest, arg));
}
示例6: digest_in_nsap_ptr
static inline isc_result_t
digest_in_nsap_ptr(ARGS_DIGEST) {
isc_region_t r;
dns_name_t name;
REQUIRE(rdata->type == 23);
REQUIRE(rdata->rdclass == 1);
dns_rdata_toregion(rdata, &r);
dns_name_init(&name, NULL);
dns_name_fromregion(&name, &r);
return (dns_name_digest(&name, digest, arg));
}
示例7: digest_in_srv
static inline isc_result_t
digest_in_srv(ARGS_DIGEST) {
isc_region_t r1, r2;
dns_name_t name;
REQUIRE(rdata->type == dns_rdatatype_srv);
REQUIRE(rdata->rdclass == dns_rdataclass_in);
dns_rdata_toregion(rdata, &r1);
r2 = r1;
isc_region_consume(&r2, 6);
r1.length = 6;
RETERR((digest)(arg, &r1));
dns_name_init(&name, NULL);
dns_name_fromregion(&name, &r2);
return (dns_name_digest(&name, digest, arg));
}