isc_result_t dns_peer_settransferdscp(dns_peer_t *peer, isc_dscp_t dscp) { REQUIRE(DNS_PEER_VALID(peer)); REQUIRE(dscp < 64); peer->transfer_dscp = dscp; DNS_BIT_SET(TRANSFER_DSCP_BIT, &peer->bitflags); return (ISC_R_SUCCESS); }
isc_result_t dns_peer_setquerydscp(dns_peer_t *peer, isc_dscp_t dscp) { REQUIRE(DNS_PEER_VALID(peer)); REQUIRE(dscp < 64); peer->query_dscp = dscp; DNS_BIT_SET(QUERY_DSCP_BIT, &peer->bitflags); return (ISC_R_SUCCESS); }
isc_result_t dns_peer_setednsversion(dns_peer_t *peer, isc_uint8_t ednsversion) { REQUIRE(DNS_PEER_VALID(peer)); peer->ednsversion = ednsversion; DNS_BIT_SET(EDNS_VERSION_BIT, &peer->bitflags); return (ISC_R_SUCCESS); }
isc_result_t dns_peer_setmaxudp(dns_peer_t *peer, isc_uint16_t maxudp) { isc_boolean_t existed; REQUIRE(DNS_PEER_VALID(peer)); existed = DNS_BIT_CHECK(SERVER_MAXUDP_BIT, &peer->bitflags); peer->maxudp = maxudp; DNS_BIT_SET(SERVER_MAXUDP_BIT, &peer->bitflags); return (existed ? ISC_R_EXISTS : ISC_R_SUCCESS); }
isc_result_t dns_peer_setudpsize(dns_peer_t *peer, isc_uint16_t udpsize) { isc_boolean_t existed; REQUIRE(DNS_PEER_VALID(peer)); existed = DNS_BIT_CHECK(SERVER_UDPSIZE_BIT, &peer->bitflags); peer->udpsize = udpsize; DNS_BIT_SET(SERVER_UDPSIZE_BIT, &peer->bitflags); return (existed ? ISC_R_EXISTS : ISC_R_SUCCESS); }
isc_result_t dns_peer_settransfers(dns_peer_t *peer, isc_uint32_t newval) { isc_boolean_t existed; REQUIRE(DNS_PEER_VALID(peer)); existed = DNS_BIT_CHECK(TRANSFERS_BIT, &peer->bitflags); peer->transfers = newval; DNS_BIT_SET(TRANSFERS_BIT, &peer->bitflags); return (existed ? ISC_R_EXISTS : ISC_R_SUCCESS); }
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); }
isc_result_t dns_peer_setsupportedns(dns_peer_t *peer, isc_boolean_t newval) { isc_boolean_t existed; REQUIRE(DNS_PEER_VALID(peer)); existed = DNS_BIT_CHECK(SUPPORT_EDNS_BIT, &peer->bitflags); peer->support_edns = newval; DNS_BIT_SET(SUPPORT_EDNS_BIT, &peer->bitflags); return (existed ? ISC_R_EXISTS : ISC_R_SUCCESS); }
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); }
isc_result_t dns_peer_setbogus(dns_peer_t *peer, isc_boolean_t newval) { isc_boolean_t existed; REQUIRE(DNS_PEER_VALID(peer)); existed = DNS_BIT_CHECK(BOGUS_BIT, &peer->bitflags); peer->bogus = newval; DNS_BIT_SET(BOGUS_BIT, &peer->bitflags); return (existed ? ISC_R_EXISTS : ISC_R_SUCCESS); }
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); }
isc_result_t dns_peer_settcpkeepalive(dns_peer_t *peer, isc_boolean_t newval) { isc_boolean_t existed; REQUIRE(DNS_PEER_VALID(peer)); existed = DNS_BIT_CHECK(REQUEST_TCP_KEEPALIVE_BIT, &peer->bitflags); peer->tcp_keepalive = newval; DNS_BIT_SET(REQUEST_TCP_KEEPALIVE_BIT, &peer->bitflags); return (existed ? ISC_R_EXISTS : ISC_R_SUCCESS); }
isc_result_t dns_peer_setsendcookie(dns_peer_t *peer, isc_boolean_t newval) { isc_boolean_t existed; REQUIRE(DNS_PEER_VALID(peer)); existed = DNS_BIT_CHECK(SEND_COOKIE_BIT, &peer->bitflags); peer->send_cookie = newval; DNS_BIT_SET(SEND_COOKIE_BIT, &peer->bitflags); return (existed ? ISC_R_EXISTS : ISC_R_SUCCESS); }
isc_result_t dns_peer_settransferformat(dns_peer_t *peer, dns_transfer_format_t newval) { isc_boolean_t existed; REQUIRE(DNS_PEER_VALID(peer)); existed = DNS_BIT_CHECK(SERVER_TRANSFER_FORMAT_BIT, &peer->bitflags); peer->transfer_format = newval; DNS_BIT_SET(SERVER_TRANSFER_FORMAT_BIT, &peer->bitflags); return (existed ? ISC_R_EXISTS : ISC_R_SUCCESS); }
isc_result_t dns_peer_setpadding(dns_peer_t *peer, isc_uint16_t padding) { isc_boolean_t existed; REQUIRE(DNS_PEER_VALID(peer)); existed = DNS_BIT_CHECK(SERVER_PADDING_BIT, &peer->bitflags); if (padding > 512) padding = 512; peer->padding = padding; DNS_BIT_SET(SERVER_PADDING_BIT, &peer->bitflags); return (existed ? ISC_R_EXISTS : ISC_R_SUCCESS); }