Lines Matching refs:obj

574 	const cfg_obj_t *obj;
588 obj = cfg_listelt_value(element);
589 str = cfg_obj_asstring(cfg_tuple_get(obj, "name"));
594 value = cfg_obj_asboolean(cfg_tuple_get(obj, "value"));
616 const cfg_obj_t *obj = NULL;
621 result = ns_config_get(maps, "query-source", &obj);
625 result = ns_config_get(maps, "query-source-v6", &obj);
632 sa = *(cfg_obj_assockaddr(obj));
668 INSIST(obj != NULL);
670 cfg_obj_log(obj, ns_g_lctx, ISC_LOG_INFO,
720 const cfg_obj_t *obj;
738 obj = cfg_tuple_get(ent, "name");
739 if (cfg_obj_isstring(obj))
740 str = cfg_obj_asstring(obj);
752 obj = cfg_tuple_get(ent, "ordering");
753 INSIST(cfg_obj_isstring(obj));
754 str = cfg_obj_asstring(obj);
784 const cfg_obj_t *obj;
796 obj = NULL;
797 (void)cfg_map_get(cpeer, "bogus", &obj);
798 if (obj != NULL)
799 CHECK(dns_peer_setbogus(peer, cfg_obj_asboolean(obj)));
801 obj = NULL;
802 (void)cfg_map_get(cpeer, "provide-ixfr", &obj);
803 if (obj != NULL)
804 CHECK(dns_peer_setprovideixfr(peer, cfg_obj_asboolean(obj)));
806 obj = NULL;
807 (void)cfg_map_get(cpeer, "request-ixfr", &obj);
808 if (obj != NULL)
809 CHECK(dns_peer_setrequestixfr(peer, cfg_obj_asboolean(obj)));
811 obj = NULL;
812 (void)cfg_map_get(cpeer, "request-nsid", &obj);
813 if (obj != NULL)
814 CHECK(dns_peer_setrequestnsid(peer, cfg_obj_asboolean(obj)));
816 obj = NULL;
817 (void)cfg_map_get(cpeer, "edns", &obj);
818 if (obj != NULL)
819 CHECK(dns_peer_setsupportedns(peer, cfg_obj_asboolean(obj)));
821 obj = NULL;
822 (void)cfg_map_get(cpeer, "edns-udp-size", &obj);
823 if (obj != NULL) {
824 isc_uint32_t udpsize = cfg_obj_asuint32(obj);
832 obj = NULL;
833 (void)cfg_map_get(cpeer, "max-udp-size", &obj);
834 if (obj != NULL) {
835 isc_uint32_t udpsize = cfg_obj_asuint32(obj);
843 obj = NULL;
844 (void)cfg_map_get(cpeer, "transfers", &obj);
845 if (obj != NULL)
846 CHECK(dns_peer_settransfers(peer, cfg_obj_asuint32(obj)));
848 obj = NULL;
849 (void)cfg_map_get(cpeer, "transfer-format", &obj);
850 if (obj != NULL) {
851 str = cfg_obj_asstring(obj);
862 obj = NULL;
863 (void)cfg_map_get(cpeer, "keys", &obj);
864 if (obj != NULL) {
865 result = dns_peer_setkeybycharp(peer, cfg_obj_asstring(obj));
870 obj = NULL;
872 (void)cfg_map_get(cpeer, "transfer-source", &obj);
874 (void)cfg_map_get(cpeer, "transfer-source-v6", &obj);
875 if (obj != NULL) {
877 cfg_obj_assockaddr(obj));
880 ns_add_reserved_dispatch(ns_g_server, cfg_obj_assockaddr(obj));
883 obj = NULL;
885 (void)cfg_map_get(cpeer, "notify-source", &obj);
887 (void)cfg_map_get(cpeer, "notify-source-v6", &obj);
888 if (obj != NULL) {
890 cfg_obj_assockaddr(obj));
893 ns_add_reserved_dispatch(ns_g_server, cfg_obj_assockaddr(obj));
896 obj = NULL;
898 (void)cfg_map_get(cpeer, "query-source", &obj);
900 (void)cfg_map_get(cpeer, "query-source-v6", &obj);
901 if (obj != NULL) {
903 cfg_obj_assockaddr(obj));
906 ns_add_reserved_dispatch(ns_g_server, cfg_obj_assockaddr(obj));
1151 const cfg_obj_t *obj;
1197 obj = NULL;
1198 (void)cfg_map_get(zoptions, "type", &obj);
1199 INSIST(obj != NULL);
1200 if (strcasecmp(cfg_obj_asstring(obj), "forward") == 0) {
1201 obj = NULL;
1202 (void)cfg_map_get(zoptions, "forward", &obj);
1203 if (obj == NULL)
1205 if (strcasecmp(cfg_obj_asstring(obj), "only") != 0)
1332 const cfg_obj_t *obj;
1401 obj = NULL;
1402 (void)ns_config_get(maps, "acache-enable", &obj);
1403 if (obj != NULL && cfg_obj_asboolean(obj)) {
1412 obj = NULL;
1413 result = ns_config_get(maps, "acache-cleaning-interval", &obj);
1416 cfg_obj_asuint32(obj) * 60);
1418 obj = NULL;
1419 result = ns_config_get(maps, "max-acache-size", &obj);
1421 if (cfg_obj_isstring(obj)) {
1422 str = cfg_obj_asstring(obj);
1428 value = cfg_obj_asuint64(obj);
1430 cfg_obj_log(obj, ns_g_lctx, ISC_LOG_ERROR,
1482 obj = NULL;
1485 "database", &obj);
1486 if (obj != NULL) {
1487 char *s = isc_mem_strdup(mctx, cfg_obj_asstring(obj));
1499 obj = cfg_tuple_get(dlz, "name");
1500 result = dns_dlzcreate(mctx, cfg_obj_asstring(obj),
1516 obj = NULL;
1517 result = ns_checknames_get(maps, "response", &obj);
1520 str = cfg_obj_asstring(obj);
1533 obj = NULL;
1534 result = ns_config_get(maps, "zero-no-soa-ttl-cache", &obj);
1536 zero_no_soattl = cfg_obj_asboolean(obj);
1538 obj = NULL;
1539 result = ns_config_get(maps, "dnssec-accept-expired", &obj);
1541 view->acceptexpired = cfg_obj_asboolean(obj);
1543 obj = NULL;
1544 result = ns_config_get(maps, "dnssec-validation", &obj);
1546 view->enablevalidation = cfg_obj_asboolean(obj);
1548 obj = NULL;
1549 result = ns_config_get(maps, "max-cache-ttl", &obj);
1551 view->maxcachettl = cfg_obj_asuint32(obj);
1553 obj = NULL;
1554 result = ns_config_get(maps, "max-ncache-ttl", &obj);
1556 view->maxncachettl = cfg_obj_asuint32(obj);
1625 obj = NULL;
1626 result = ns_config_get(maps, "cache-file", &obj);
1628 CHECK(dns_cache_setfilename(cache, cfg_obj_asstring(obj)));
1633 obj = NULL;
1634 result = ns_config_get(maps, "cleaning-interval", &obj);
1636 dns_cache_setcleaninginterval(cache, cfg_obj_asuint32(obj) * 60);
1638 obj = NULL;
1639 result = ns_config_get(maps, "max-cache-size", &obj);
1641 if (cfg_obj_isstring(obj)) {
1642 str = cfg_obj_asstring(obj);
1647 value = cfg_obj_asuint64(obj);
1649 cfg_obj_log(obj, ns_g_lctx, ISC_LOG_ERROR,
1708 obj = NULL;
1709 result = ns_config_get(maps, "lame-ttl", &obj);
1711 lame_ttl = cfg_obj_asuint32(obj);
1719 obj = NULL;
1720 result = ns_config_get(maps, "edns-udp-size", &obj);
1722 udpsize = cfg_obj_asuint32(obj);
1732 obj = NULL;
1733 result = ns_config_get(maps, "max-udp-size", &obj);
1735 udpsize = cfg_obj_asuint32(obj);
1873 obj = NULL;
1874 (void)ns_config_get(maps, "match-recursive-only", &obj);
1875 if (obj != NULL && cfg_obj_asboolean(obj))
1883 obj = NULL;
1884 result = ns_config_get(maps, "recursion", &obj);
1886 view->recursion = cfg_obj_asboolean(obj);
1888 obj = NULL;
1889 result = ns_config_get(maps, "auth-nxdomain", &obj);
1891 view->auth_nxdomain = cfg_obj_asboolean(obj);
1893 obj = NULL;
1894 result = ns_config_get(maps, "minimal-responses", &obj);
1896 view->minimalresponses = cfg_obj_asboolean(obj);
1898 obj = NULL;
1899 result = ns_config_get(maps, "transfer-format", &obj);
1901 str = cfg_obj_asstring(obj);
1913 obj = NULL;
1914 result = ns_config_get(maps, "additional-from-auth", &obj);
1916 view->additionalfromauth = cfg_obj_asboolean(obj);
1918 cfg_obj_log(obj, ns_g_lctx, ISC_LOG_WARNING,
1924 obj = NULL;
1925 result = ns_config_get(maps, "additional-from-cache", &obj);
1927 view->additionalfromcache = cfg_obj_asboolean(obj);
1929 cfg_obj_log(obj, ns_g_lctx, ISC_LOG_WARNING,
2023 obj = NULL;
2024 result = ns_config_get(maps, "request-ixfr", &obj);
2026 view->requestixfr = cfg_obj_asboolean(obj);
2028 obj = NULL;
2029 result = ns_config_get(maps, "provide-ixfr", &obj);
2031 view->provideixfr = cfg_obj_asboolean(obj);
2033 obj = NULL;
2034 result = ns_config_get(maps, "request-nsid", &obj);
2036 view->requestnsid = cfg_obj_asboolean(obj);
2038 obj = NULL;
2039 result = ns_config_get(maps, "max-clients-per-query", &obj);
2041 max_clients_per_query = cfg_obj_asuint32(obj);
2043 obj = NULL;
2044 result = ns_config_get(maps, "clients-per-query", &obj);
2047 cfg_obj_asuint32(obj),
2050 obj = NULL;
2051 result = ns_config_get(maps, "dnssec-enable", &obj);
2053 view->enablednssec = cfg_obj_asboolean(obj);
2055 obj = NULL;
2056 result = ns_config_get(maps, "dnssec-lookaside", &obj);
2058 for (element = cfg_list_first(obj);
2066 obj = cfg_listelt_value(element);
2078 str = cfg_obj_asstring(cfg_tuple_get(obj,
2085 str = cfg_obj_asstring(cfg_tuple_get(obj,
2104 obj = NULL;
2105 result = ns_config_get(maps, "dnssec-must-be-secure", &obj);
2107 CHECK(mustbesecure(obj, view->resolver));
2109 obj = NULL;
2110 result = ns_config_get(maps, "preferred-glue", &obj);
2112 str = cfg_obj_asstring(obj);
2122 obj = NULL;
2123 result = ns_config_get(maps, "root-delegation-only", &obj);
2126 if (!cfg_obj_isvoid(obj)) {
2135 for (element = cfg_list_first(obj);
2155 obj = NULL;
2156 (void)ns_config_get(maps, "empty-zones-enable", &obj);
2158 if (obj == NULL && disablelist == NULL &&
2164 if (obj != NULL)
2165 empty_zones_enable = cfg_obj_asboolean(obj);
2190 obj = NULL;
2191 result = ns_config_get(maps, "empty-server", &obj);
2193 str = cfg_obj_asstring(obj);
2205 obj = NULL;
2206 result = ns_config_get(maps, "empty-contact", &obj);
2208 str = cfg_obj_asstring(obj);
2220 obj = NULL;
2221 result = ns_config_get(maps, "zone-statistics", &obj);
2223 zonestats_on = cfg_obj_asboolean(obj);
2868 const cfg_obj_t *obj = NULL;
2871 result = ns_config_get(maps, name, &obj);
2873 isc_quota_max(quota, cfg_obj_asuint32(obj));
2881 directory_callback(const char *clausename, const cfg_obj_t *obj, void *arg) {
2893 directory = cfg_obj_asstring(obj);
2896 cfg_obj_log(obj, ns_g_lctx, ISC_LOG_WARNING,
2902 cfg_obj_log(obj, ns_g_lctx, ISC_LOG_ERROR,
3141 * or NULL if whether 'obj' is a string or void value, respectively.
3144 setoptstring(ns_server_t *server, char **field, const cfg_obj_t *obj) {
3145 if (cfg_obj_isvoid(obj))
3148 return (setstring(server, field, cfg_obj_asstring(obj)));
3156 const cfg_obj_t *obj = NULL;
3161 if (ns_config_get(maps, configname, &obj) != ISC_R_SUCCESS)
3164 if (cfg_obj_isstring(obj)) {
3165 resource = cfg_obj_asstring(obj);
3173 value = cfg_obj_asuint64(obj);
3204 const cfg_obj_t *obj = cfg_listelt_value(element);
3206 if (cfg_obj_isuint32(obj)) {
3207 in_port_t port = (in_port_t)cfg_obj_asuint32(obj);
3217 obj_loport = cfg_tuple_get(obj, "loport");
3219 obj_hiport = cfg_tuple_get(obj, "hiport");
3284 const cfg_obj_t *obj;
3410 obj = NULL;
3411 result = ns_config_get(maps, "reserved-sockets", &obj);
3413 reserved = cfg_obj_asuint32(obj);
3450 obj = NULL;
3451 result = ns_config_get(maps, "match-mapped-addresses", &obj);
3453 server->aclenv.match_mapped = cfg_obj_asboolean(obj);
3520 obj = NULL;
3521 result = ns_config_get(maps, "edns-udp-size", &obj);
3523 udpsize = cfg_obj_asuint32(obj);
3533 obj = NULL;
3534 result = ns_config_get(maps, "transfers-in", &obj);
3536 dns_zonemgr_settransfersin(server->zonemgr, cfg_obj_asuint32(obj));
3538 obj = NULL;
3539 result = ns_config_get(maps, "transfers-per-ns", &obj);
3541 dns_zonemgr_settransfersperns(server->zonemgr, cfg_obj_asuint32(obj));
3543 obj = NULL;
3544 result = ns_config_get(maps, "serial-query-rate", &obj);
3546 dns_zonemgr_setserialqueryrate(server->zonemgr, cfg_obj_asuint32(obj));
3559 obj = NULL;
3560 result = ns_config_get(maps, "tcp-listen-queue", &obj);
3562 ns_g_listen = cfg_obj_asuint32(obj);
3642 obj = NULL;
3643 result = ns_config_get(maps, "interface-interval", &obj);
3645 interface_interval = cfg_obj_asuint32(obj) * 60;
3661 obj = NULL;
3662 result = ns_config_get(maps, "heartbeat-interval", &obj);
3664 heartbeat_interval = cfg_obj_asuint32(obj) * 60;
3826 obj = NULL;
3827 result = ns_config_get(maps, "random-device", &obj);
3833 const char *randomdev = cfg_obj_asstring(obj);
3950 obj = NULL;
3951 if (ns_config_get(maps, "querylog", &obj) == ISC_R_SUCCESS) {
3952 server->log_queries = cfg_obj_asboolean(obj);
3968 obj = cfg_listelt_value(element);
3969 catobj = cfg_tuple_get(obj, "name");
3978 obj = NULL;
3979 if (ns_config_get(maps, "pid-file", &obj) == ISC_R_SUCCESS)
3980 if (cfg_obj_isvoid(obj))
3983 ns_os_writepidfile(cfg_obj_asstring(obj), first_time);
3989 obj = NULL;
3991 cfg_map_get(options, "memstatistics", &obj) == ISC_R_SUCCESS)
3992 ns_g_memstatistics = cfg_obj_asboolean(obj);
3997 obj = NULL;
3998 if (ns_config_get(maps, "memstatistics-file", &obj) == ISC_R_SUCCESS)
3999 ns_main_setmemstats(cfg_obj_asstring(obj));
4005 obj = NULL;
4006 result = ns_config_get(maps, "statistics-file", &obj);
4008 CHECKM(setstring(server, &server->statsfile, cfg_obj_asstring(obj)),
4011 obj = NULL;
4012 result = ns_config_get(maps, "dump-file", &obj);
4014 CHECKM(setstring(server, &server->dumpfile, cfg_obj_asstring(obj)),
4017 obj = NULL;
4018 result = ns_config_get(maps, "recursing-file", &obj);
4020 CHECKM(setstring(server, &server->recfile, cfg_obj_asstring(obj)),
4023 obj = NULL;
4024 result = ns_config_get(maps, "version", &obj);
4026 CHECKM(setoptstring(server, &server->version, obj), "strdup");
4032 obj = NULL;
4033 result = ns_config_get(maps, "hostname", &obj);
4035 CHECKM(setoptstring(server, &server->hostname, obj), "strdup");
4041 obj = NULL;
4042 result = ns_config_get(maps, "server-id", &obj);
4044 if (result == ISC_R_SUCCESS && cfg_obj_isboolean(obj)) {
4046 server->server_usehostname = cfg_obj_asboolean(obj);
4051 CHECKM(setoptstring(server, &server->server_id, obj), "strdup");
4057 obj = NULL;
4058 result = ns_config_get(maps, "flush-zones-on-shutdown", &obj);
4060 server->flushonshutdown = cfg_obj_asboolean(obj);