當前位置: 首頁>>代碼示例>>C++>>正文


C++ DNS_BIT_CHECK函數代碼示例

本文整理匯總了C++中DNS_BIT_CHECK函數的典型用法代碼示例。如果您正苦於以下問題:C++ DNS_BIT_CHECK函數的具體用法?C++ DNS_BIT_CHECK怎麽用?C++ DNS_BIT_CHECK使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了DNS_BIT_CHECK函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: dns_peer_getsendcookie

isc_result_t
dns_peer_getsendcookie(dns_peer_t *peer, isc_boolean_t *retval) {
	REQUIRE(DNS_PEER_VALID(peer));
	REQUIRE(retval != NULL);

	if (DNS_BIT_CHECK(SEND_COOKIE_BIT, &peer->bitflags)) {
		*retval = peer->send_cookie;
		return (ISC_R_SUCCESS);
	} else
		return (ISC_R_NOTFOUND);
}
開發者ID:each,項目名稱:bind9-collab,代碼行數:11,代碼來源:peer.c

示例2: dns_peer_getsupportedns

isc_result_t
dns_peer_getsupportedns(dns_peer_t *peer, isc_boolean_t *retval) {
	REQUIRE(DNS_PEER_VALID(peer));
	REQUIRE(retval != NULL);

	if (DNS_BIT_CHECK(SUPPORT_EDNS_BIT, &peer->bitflags)) {
		*retval = peer->support_edns;
		return (ISC_R_SUCCESS);
	} else
		return (ISC_R_NOTFOUND);
}
開發者ID:execunix,項目名稱:vinos,代碼行數:11,代碼來源:peer.c

示例3: dns_peer_getforcetcp

isc_result_t
dns_peer_getforcetcp(dns_peer_t *peer, isc_boolean_t *retval) {
	REQUIRE(DNS_PEER_VALID(peer));
	REQUIRE(retval != NULL);

	if (DNS_BIT_CHECK(FORCE_TCP_BIT, &peer->bitflags)) {
		*retval = peer->force_tcp;
		return (ISC_R_SUCCESS);
	} else
		return (ISC_R_NOTFOUND);
}
開發者ID:krichter722,項目名稱:bind9,代碼行數:11,代碼來源:peer.c

示例4: dns_peer_getbogus

isc_result_t
dns_peer_getbogus(dns_peer_t *peer, isc_boolean_t *retval) {
	REQUIRE(DNS_PEER_VALID(peer));
	REQUIRE(retval != NULL);

	if (DNS_BIT_CHECK(BOGUS_BIT, &peer->bitflags)) {
		*retval = peer->bogus;
		return (ISC_R_SUCCESS);
	} else
		return (ISC_R_NOTFOUND);
}
開發者ID:execunix,項目名稱:vinos,代碼行數:11,代碼來源:peer.c

示例5: dns_peer_getednsversion

isc_result_t
dns_peer_getednsversion(dns_peer_t *peer, isc_uint8_t *ednsversion) {
	REQUIRE(DNS_PEER_VALID(peer));
	REQUIRE(ednsversion != NULL);

	if (DNS_BIT_CHECK(EDNS_VERSION_BIT, &peer->bitflags)) {
		*ednsversion = peer->ednsversion;
		return (ISC_R_SUCCESS);
	} else
		return (ISC_R_NOTFOUND);
}
開發者ID:krichter722,項目名稱:bind9,代碼行數:11,代碼來源:peer.c

示例6: dns_peer_gettcpkeepalive

isc_result_t
dns_peer_gettcpkeepalive(dns_peer_t *peer, isc_boolean_t *retval) {
	REQUIRE(DNS_PEER_VALID(peer));
	REQUIRE(retval != NULL);

	if (DNS_BIT_CHECK(REQUEST_TCP_KEEPALIVE_BIT, &peer->bitflags)) {
		*retval = peer->tcp_keepalive;
		return (ISC_R_SUCCESS);
	} else
		return (ISC_R_NOTFOUND);
}
開發者ID:each,項目名稱:bind9-collab,代碼行數:11,代碼來源:peer.c

示例7: dns_peer_getrequestsit

isc_result_t
dns_peer_getrequestsit(dns_peer_t *peer, isc_boolean_t *retval) {
	REQUIRE(DNS_PEER_VALID(peer));
	REQUIRE(retval != NULL);

	if (DNS_BIT_CHECK(REQUEST_SIT_BIT, &peer->bitflags)) {
		*retval = peer->request_sit;
		return (ISC_R_SUCCESS);
	} else
		return (ISC_R_NOTFOUND);
}
開發者ID:execunix,項目名稱:vinos,代碼行數:11,代碼來源:peer.c

示例8: dns_peer_getquerydscp

isc_result_t
dns_peer_getquerydscp(dns_peer_t *peer, isc_dscp_t *dscpp) {
	REQUIRE(DNS_PEER_VALID(peer));
	REQUIRE(dscpp != NULL);

	if (DNS_BIT_CHECK(QUERY_DSCP_BIT, &peer->bitflags)) {
		*dscpp = peer->query_dscp;
		return (ISC_R_SUCCESS);
	}
	return (ISC_R_NOTFOUND);
}
開發者ID:execunix,項目名稱:vinos,代碼行數:11,代碼來源:peer.c

示例9: dns_peer_getprovideixfr

isc_result_t
dns_peer_getprovideixfr(dns_peer_t *peer, isc_boolean_t *retval) {
	REQUIRE(DNS_PEER_VALID(peer));
	REQUIRE(retval != NULL);

	if (DNS_BIT_CHECK(PROVIDE_IXFR_BIT, &peer->bitflags)) {
		*retval = peer->provide_ixfr;
		return (ISC_R_SUCCESS);
	} else {
		return (ISC_R_NOTFOUND);
	}
}
開發者ID:execunix,項目名稱:vinos,代碼行數:12,代碼來源:peer.c

示例10: dns_peer_gettransfers

isc_result_t
dns_peer_gettransfers(dns_peer_t *peer, isc_uint32_t *retval) {
	REQUIRE(DNS_PEER_VALID(peer));
	REQUIRE(retval != NULL);

	if (DNS_BIT_CHECK(TRANSFERS_BIT, &peer->bitflags)) {
		*retval = peer->transfers;
		return (ISC_R_SUCCESS);
	} else {
		return (ISC_R_NOTFOUND);
	}
}
開發者ID:execunix,項目名稱:vinos,代碼行數:12,代碼來源:peer.c

示例11: dns_peer_gettransferformat

isc_result_t
dns_peer_gettransferformat(dns_peer_t *peer, dns_transfer_format_t *retval) {
	REQUIRE(DNS_PEER_VALID(peer));
	REQUIRE(retval != NULL);

	if (DNS_BIT_CHECK(SERVER_TRANSFER_FORMAT_BIT, &peer->bitflags)) {
		*retval = peer->transfer_format;
		return (ISC_R_SUCCESS);
	} else {
		return (ISC_R_NOTFOUND);
	}
}
開發者ID:execunix,項目名稱:vinos,代碼行數:12,代碼來源:peer.c

示例12: dns_peer_setrequestsit

isc_result_t
dns_peer_setrequestsit(dns_peer_t *peer, isc_boolean_t newval) {
	isc_boolean_t existed;

	REQUIRE(DNS_PEER_VALID(peer));

	existed = DNS_BIT_CHECK(REQUEST_SIT_BIT, &peer->bitflags);

	peer->request_sit = newval;
	DNS_BIT_SET(REQUEST_SIT_BIT, &peer->bitflags);

	return (existed ? ISC_R_EXISTS : ISC_R_SUCCESS);
}
開發者ID:execunix,項目名稱:vinos,代碼行數:13,代碼來源:peer.c

示例13: dns_peer_setprovideixfr

isc_result_t
dns_peer_setprovideixfr(dns_peer_t *peer, isc_boolean_t newval) {
	isc_boolean_t existed;

	REQUIRE(DNS_PEER_VALID(peer));

	existed = DNS_BIT_CHECK(PROVIDE_IXFR_BIT, &peer->bitflags);

	peer->provide_ixfr = newval;
	DNS_BIT_SET(PROVIDE_IXFR_BIT, &peer->bitflags);

	return (existed ? ISC_R_EXISTS : ISC_R_SUCCESS);
}
開發者ID:execunix,項目名稱:vinos,代碼行數:13,代碼來源:peer.c

示例14: dns_peer_setforcetcp

isc_result_t
dns_peer_setforcetcp(dns_peer_t *peer, isc_boolean_t newval) {
	isc_boolean_t existed;

	REQUIRE(DNS_PEER_VALID(peer));

	existed = DNS_BIT_CHECK(FORCE_TCP_BIT, &peer->bitflags);

	peer->force_tcp = newval;
	DNS_BIT_SET(FORCE_TCP_BIT, &peer->bitflags);

	return (existed ? ISC_R_EXISTS : ISC_R_SUCCESS);
}
開發者ID:krichter722,項目名稱:bind9,代碼行數:13,代碼來源:peer.c

示例15: dns_peer_getpadding

isc_result_t
dns_peer_getpadding(dns_peer_t *peer, isc_uint16_t *padding) {

	REQUIRE(DNS_PEER_VALID(peer));
	REQUIRE(padding != NULL);

	if (DNS_BIT_CHECK(SERVER_PADDING_BIT, &peer->bitflags)) {
		*padding = peer->padding;
		return (ISC_R_SUCCESS);
	} else {
		return (ISC_R_NOTFOUND);
	}
}
開發者ID:each,項目名稱:bind9-collab,代碼行數:13,代碼來源:peer.c


注:本文中的DNS_BIT_CHECK函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。