Lines Matching full:limits

310 limit_remove(nvlist_t *limits, const char *prefix)
319 while ((name = nvlist_next(limits, NULL, &cookie)) != NULL) {
321 nvlist_free(limits, name);
331 nvlist_t *limits;
336 if (cap_limit_get(chan, &limits) < 0)
338 if (limits == NULL)
339 limits = nvlist_create(0);
341 limit_remove(limits, "type");
345 nvlist_add_string(limits, nvlname, types[i]);
347 return (cap_limit_set(chan, limits));
354 nvlist_t *limits;
359 if (cap_limit_get(chan, &limits) < 0)
361 if (limits == NULL)
362 limits = nvlist_create(0);
364 limit_remove(limits, "family");
368 nvlist_add_number(limits, nvlname, (uint64_t)families[i]);
370 return (cap_limit_set(chan, limits));
377 dns_allowed_type(const nvlist_t *limits, const char *type)
383 if (limits == NULL)
388 while ((name = nvlist_next(limits, NULL, &cookie)) != NULL) {
392 if (strcmp(nvlist_get_string(limits, name), type) == 0)
404 dns_allowed_family(const nvlist_t *limits, int family)
410 if (limits == NULL)
415 while ((name = nvlist_next(limits, NULL, &cookie)) != NULL) {
421 if (nvlist_get_number(limits, name) == (uint64_t)family)
468 dns_gethostbyname(const nvlist_t *limits, const nvlist_t *nvlin,
474 if (!dns_allowed_type(limits, "NAME2ADDR") &&
475 !dns_allowed_type(limits, "NAME"))
480 if (!dns_allowed_family(limits, family))
491 dns_gethostbyaddr(const nvlist_t *limits, const nvlist_t *nvlin,
499 if (!dns_allowed_type(limits, "ADDR2NAME") &&
500 !dns_allowed_type(limits, "ADDR"))
505 if (!dns_allowed_family(limits, family))
517 dns_getnameinfo(const nvlist_t *limits, const nvlist_t *nvlin, nvlist_t *nvlout)
526 if (!dns_allowed_type(limits, "ADDR2NAME") &&
527 !dns_allowed_type(limits, "ADDR"))
569 if (!dns_allowed_family(limits, (int)sast.ss_family)) {
611 dns_getaddrinfo(const nvlist_t *limits, const nvlist_t *nvlin, nvlist_t *nvlout)
620 if (!dns_allowed_type(limits, "NAME2ADDR") &&
621 !dns_allowed_type(limits, "NAME"))
646 if (!dns_allowed_family(limits, family))
667 limit_has_entry(const nvlist_t *limits, const char *prefix)
673 if (limits == NULL)
679 while ((name = nvlist_next(limits, NULL, &cookie)) != NULL) {
748 dns_command(const char *cmd, const nvlist_t *limits, nvlist_t *nvlin,
754 error = dns_gethostbyname(limits, nvlin, nvlout);
756 error = dns_gethostbyaddr(limits, nvlin, nvlout);
758 error = dns_getnameinfo(limits, nvlin, nvlout);
760 error = dns_getaddrinfo(limits, nvlin, nvlout);