Lines Matching defs:limits

311 limit_remove(nvlist_t *limits, const char *prefix)
320 while ((name = nvlist_next(limits, NULL, &cookie)) != NULL) {
322 nvlist_free(limits, name);
332 nvlist_t *limits;
337 if (cap_limit_get(chan, &limits) < 0)
339 if (limits == NULL)
340 limits = nvlist_create(0);
342 limit_remove(limits, "type");
346 nvlist_add_string(limits, nvlname, types[i]);
348 return (cap_limit_set(chan, limits));
355 nvlist_t *limits;
360 if (cap_limit_get(chan, &limits) < 0)
362 if (limits == NULL)
363 limits = nvlist_create(0);
365 limit_remove(limits, "family");
369 nvlist_add_number(limits, nvlname, (uint64_t)families[i]);
371 return (cap_limit_set(chan, limits));
378 dns_allowed_type(const nvlist_t *limits, const char *type)
384 if (limits == NULL)
389 while ((name = nvlist_next(limits, NULL, &cookie)) != NULL) {
393 if (strcmp(nvlist_get_string(limits, name), type) == 0)
405 dns_allowed_family(const nvlist_t *limits, int family)
411 if (limits == NULL)
416 while ((name = nvlist_next(limits, NULL, &cookie)) != NULL) {
422 if (nvlist_get_number(limits, name) == (uint64_t)family)
469 dns_gethostbyname(const nvlist_t *limits, const nvlist_t *nvlin,
475 if (!dns_allowed_type(limits, "NAME2ADDR") &&
476 !dns_allowed_type(limits, "NAME"))
481 if (!dns_allowed_family(limits, family))
492 dns_gethostbyaddr(const nvlist_t *limits, const nvlist_t *nvlin,
500 if (!dns_allowed_type(limits, "ADDR2NAME") &&
501 !dns_allowed_type(limits, "ADDR"))
506 if (!dns_allowed_family(limits, family))
518 dns_getnameinfo(const nvlist_t *limits, const nvlist_t *nvlin, nvlist_t *nvlout)
527 if (!dns_allowed_type(limits, "ADDR2NAME") &&
528 !dns_allowed_type(limits, "ADDR"))
570 if (!dns_allowed_family(limits, (int)sast.ss_family)) {
612 dns_getaddrinfo(const nvlist_t *limits, const nvlist_t *nvlin, nvlist_t *nvlout)
621 if (!dns_allowed_type(limits, "NAME2ADDR") &&
622 !dns_allowed_type(limits, "NAME"))
647 if (!dns_allowed_family(limits, family))
668 limit_has_entry(const nvlist_t *limits, const char *prefix)
674 if (limits == NULL)
680 while ((name = nvlist_next(limits, NULL, &cookie)) != NULL) {
749 dns_command(const char *cmd, const nvlist_t *limits, nvlist_t *nvlin,
755 error = dns_gethostbyname(limits, nvlin, nvlout);
757 error = dns_gethostbyaddr(limits, nvlin, nvlout);
759 error = dns_getnameinfo(limits, nvlin, nvlout);
761 error = dns_getaddrinfo(limits, nvlin, nvlout);