/freebsd-current/lib/libnv/tests/ |
H A D | nvlist_free_test.c | 48 nvlist_t *nvl; local 52 nvl = nvlist_create(0); 54 nvlist_add_null(nvl, "nvlist/null"); 55 nvlist_add_bool(nvl, "nvlist/bool", true); 56 nvlist_add_number(nvl, "nvlist/number", 0); 57 nvlist_add_string(nvl, "nvlist/string", "test"); 58 nvlist_add_nvlist(nvl, "nvlist/nvlist", nvl); 59 nvlist_add_descriptor(nvl, "nvlist/descriptor", STDERR_FILENO); 60 nvlist_add_binary(nvl, "nvlis [all...] |
H A D | nvlist_exists_test.c | 48 nvlist_t *nvl; local 52 nvl = nvlist_create(0); 54 CHECK(!nvlist_exists(nvl, "nvlist/null")); 55 CHECK(!nvlist_exists_null(nvl, "nvlist/null")); 56 CHECK(!nvlist_exists_bool(nvl, "nvlist/null")); 57 CHECK(!nvlist_exists_number(nvl, "nvlist/null")); 58 CHECK(!nvlist_exists_string(nvl, "nvlist/null")); 59 CHECK(!nvlist_exists_nvlist(nvl, "nvlist/null")); 60 CHECK(!nvlist_exists_descriptor(nvl, "nvlist/null")); 61 CHECK(!nvlist_exists_binary(nvl, "nvlis [all...] |
H A D | nvlist_add_test.c | 50 nvlist_t *nvl; local 54 nvl = nvlist_create(0); 56 CHECK(!nvlist_exists_null(nvl, "nvlist/null")); 57 nvlist_add_null(nvl, "nvlist/null"); 58 CHECK(nvlist_error(nvl) == 0); 59 CHECK(nvlist_exists_null(nvl, "nvlist/null")); 61 CHECK(!nvlist_exists_bool(nvl, "nvlist/bool/true")); 62 nvlist_add_bool(nvl, "nvlist/bool/true", true); 63 CHECK(nvlist_error(nvl) == 0); 64 CHECK(nvlist_exists_bool(nvl, "nvlis [all...] |
H A D | nvlist_get_test.c | 53 nvlist_t *nvl; local 58 nvl = nvlist_create(0); 60 CHECK(!nvlist_exists_bool(nvl, "nvlist/bool/true")); 61 nvlist_add_bool(nvl, "nvlist/bool/true", true); 62 CHECK(nvlist_error(nvl) == 0); 63 CHECK(nvlist_get_bool(nvl, "nvlist/bool/true") == true); 65 CHECK(!nvlist_exists_bool(nvl, "nvlist/bool/false")); 66 nvlist_add_bool(nvl, "nvlist/bool/false", false); 67 CHECK(nvlist_error(nvl) == 0); 68 CHECK(nvlist_get_bool(nvl, "nvlis [all...] |
H A D | dnv_tests.cc | 36 nvlist_t *nvl; local 40 nvl = nvlist_create(0); 44 nvlist_add_bool(nvl, key, value); 46 ATF_REQUIRE_EQ(dnvlist_get_bool(nvl, key, false), value); 47 ATF_REQUIRE_EQ(dnvlist_get_bool(nvl, "name", false), value); 49 nvlist_destroy(nvl); 55 nvlist_t *nvl; local 59 nvl = nvlist_create(0); 61 ATF_REQUIRE_EQ(dnvlist_get_bool(nvl, key, false), false); 62 ATF_REQUIRE_EQ(dnvlist_get_bool(nvl, "12 75 nvlist_t *nvl; local 94 nvlist_t *nvl; local 113 nvlist_t *nvl; local 134 nvlist_t *nvl; local 158 nvlist_t *nvl; local 179 nvlist_t *nvl; local 207 nvlist_t *nvl; local 228 nvlist_t *nvl; local 269 nvlist_t *nvl; local 288 nvlist_t *nvl; local 300 nvlist_t *nvl; local 313 nvlist_t *nvl; local 332 nvlist_t *nvl; local 344 nvlist_t *nvl; local 357 nvlist_t *nvl; local 381 nvlist_t *nvl; local 398 nvlist_t *nvl; local 416 nvlist_t *nvl; local 439 nvlist_t *nvl, *actual_val; local 453 nvlist_t *nvl; local 478 nvlist_t *nvl; local 505 nvlist_t *nvl; local 525 nvlist_t *nvl; local [all...] |
H A D | nvlist_move_test.c | 52 nvlist_t *nvl; local 59 nvl = nvlist_create(0); 61 CHECK(!nvlist_exists_string(nvl, "nvlist/string/")); 64 nvlist_move_string(nvl, "nvlist/string/", ptr); 65 CHECK(nvlist_error(nvl) == 0); 66 CHECK(nvlist_exists_string(nvl, "nvlist/string/")); 67 CHECK(ptr == nvlist_get_string(nvl, "nvlist/string/")); 69 CHECK(!nvlist_exists_string(nvl, "nvlist/string/x")); 72 nvlist_move_string(nvl, "nvlist/string/x", ptr); 73 CHECK(nvlist_error(nvl) [all...] |
H A D | cnv_tests.cc | 43 nvlist_t *nvl; local 49 nvl = nvlist_create(0); 50 ATF_REQUIRE(nvl != NULL); 51 ATF_REQUIRE_EQ(nvlist_error(nvl), 0); 52 ATF_REQUIRE(nvlist_empty(nvl)); 58 nvlist_add_bool(nvl, key, value); 59 ATF_REQUIRE_EQ(strcmp(key, nvlist_next(nvl, &type, &cookie)), 0); 60 ATF_REQUIRE_EQ(nvlist_error(nvl), 0); 62 ATF_REQUIRE(!nvlist_empty(nvl)); 63 ATF_REQUIRE(nvlist_exists(nvl, ke 77 nvlist_t *nvl; local 112 nvlist_t *nvl; local 146 nvlist_t *nvl, *value; local 215 nvlist_t *nvl; local 247 nvlist_t *nvl; local 291 nvlist_t *nvl; local 333 nvlist_t *nvl; local 375 nvlist_t *nvl; local 416 nvlist_t *nvl; local 499 nvlist_t *nvl; local 547 nvlist_t *nvl; local 590 nvlist_t *nvl; local 633 nvlist_t *nvl; local 680 nvlist_t *nvl, *value, *result; local 752 nvlist_t *nvl; local 804 nvlist_t *nvl; local 856 nvlist_t *nvl; local 909 nvlist_t *nvl; local 989 nvlist_t *nvl; local 1041 nvlist_t *nvl; local 1084 nvlist_t *nvl; local 1127 nvlist_t *nvl; local 1170 nvlist_t *nvl, *value; local 1230 nvlist_t *nvl; local 1279 nvlist_t *nvl; local 1324 nvlist_t *nvl; local 1369 nvlist_t *nvl; local 1412 nvlist_t *nvl; local [all...] |
H A D | nv_tests.cc | 44 nvlist_t *nvl; local 48 nvl = nvlist_create(0); 50 ATF_REQUIRE(nvl != NULL); 52 ATF_REQUIRE_EQ(nvlist_error(nvl), 0); 53 ATF_REQUIRE(nvlist_empty(nvl)); 56 ATF_REQUIRE_EQ(nvlist_next(nvl, &type, &it), static_cast<const char *>(NULL)); 58 nvlist_destroy(nvl); 64 nvlist_t *nvl; local 70 nvl = nvlist_create(0); 72 ATF_REQUIRE(nvl ! 94 nvlist_t *nvl; local 126 nvlist_t *nvl; local 159 nvlist_t *nvl; local 196 nvlist_t *nvl; local 239 nvlist_t *nvl, *parent; local 255 nvlist_t *nvl; local 300 nvlist_t *nvl, *clone; local 317 nvlist_t *nvl, *clone; local 354 nvlist_t *nvl, *sublist; local 369 verify_test_nvlist(const nvlist_t *nvl) argument 400 nvlist_t *nvl, *clone; local 416 nvlist_t *nvl, *clone; local 432 nvlist_t *nvl, *unpacked; local 455 nvlist_t *nvl, *unpacked; local 487 verify_null(const nvlist_t *nvl, int type) argument 494 verify_number(const nvlist_t *nvl, const char *name, int type, uint64_t value) argument 502 verify_string(const nvlist_t *nvl, const char *name, int type, const char * value) argument 511 verify_nvlist(const nvlist_t *nvl, const char *name, int type) argument 519 verify_binary(const nvlist_t *nvl, const char *name, int type, const void * value, size_t size) argument 536 nvlist_t *nvl, *unpacked, *nvvalue; local 607 nvlist_t *nvl; local 625 nvlist_t *nvl, *unpacked; local 662 nvlist_t *nvl; local 696 nvlist_t *nvl, *parent; local 711 nvlist_t *nvl; local 731 nvlist_t *nvl; local 754 nvlist_t *nvl; local 774 nvlist_t *nvl; local 808 nvlist_t *nvl; local 828 nvlist_t *nvl; local 862 nvlist_t *nvl; local 882 nvlist_t *nvl; local 916 nvlist_t *nvl; local 936 nvlist_t *nvl; local 967 nvlist_t *nvl; local 993 nvlist_t *nvl; local 1034 nvlist_t *nvl; local 1050 nvlist_t *nvl; local 1066 nvlist_t *nvl; local 1082 nvlist_t *nvl; local 1098 nvlist_t *nvl; local 1114 nvlist_t *nvl; local 1130 nvlist_t *nvl; local 1146 nvlist_t *nvl; local 1162 nvlist_t *nvl; local 1178 nvlist_t *nvl; local 1194 nvlist_t *nvl; local 1210 nvlist_t *nvl; local [all...] |
H A D | nvlist_append_test.c | 51 nvlist_t *nvl, *nvl1, *nvl2, **items; local 57 nvl = nvlist_create(0); 60 nvlist_append_bool_array(nvl, "nvl/bool", i % 2 == 0); 62 CHECK(nvlist_error(nvl) == 0); 63 CHECK(!nvlist_empty(nvl)); 64 CHECK(nvlist_exists_bool_array(nvl, "nvl/bool")); 66 bool_result = nvlist_get_bool_array(nvl, "nvl/boo [all...] |
H A D | nv_array_tests.cc | 50 nvlist_t *nvl; local 55 key = "nvl/bool"; 56 nvl = nvlist_create(0); 57 ATF_REQUIRE(nvl != NULL); 58 ATF_REQUIRE(nvlist_empty(nvl)); 59 ATF_REQUIRE(!nvlist_exists_string_array(nvl, key)); 64 nvlist_add_bool_array(nvl, key, testbool, 16); 65 ATF_REQUIRE_EQ(nvlist_error(nvl), 0); 66 ATF_REQUIRE(!nvlist_empty(nvl)); 67 ATF_REQUIRE(nvlist_exists_bool_array(nvl, ke 95 nvlist_t *nvl; local 153 nvlist_t *nvl; local 211 nvlist_t *nvl; local 257 nvlist_t *nvl; local 335 const nvlist_t *nvl; local 458 nvlist_t *nvl; local 495 nvlist_t *nvl; local 538 nvlist_t *nvl; local 588 nvlist_t *nvl; local 625 nvlist_t *nvl; local 662 nvlist_t *nvl; local 728 nvlist_t *nvl, *nvladd[1], **nvlmove; local 767 nvlist_t *nvl, *test[5], *nasted; local 835 nvlist_t *nvl, *test[5], *nasted; local 908 nvlist_t *nvl, *unpacked; local 952 nvlist_t *nvl, *unpacked; local 994 nvlist_t *nvl; local 1058 nvlist_t *nvl, *unpacked; local 1102 nvlist_t *nvl; local [all...] |
H A D | nvlist_send_recv_test.c | 53 nvlist_t *nvl; local 57 nvl = nvlist_create(0); 60 nvlist_add_bool(nvl, "nvlist/bool/true", true); 61 nvlist_add_bool(nvl, "nvlist/bool/false", false); 62 nvlist_add_number(nvl, "nvlist/number/0", 0); 63 nvlist_add_number(nvl, "nvlist/number/1", 1); 64 nvlist_add_number(nvl, "nvlist/number/-1", -1); 65 nvlist_add_number(nvl, "nvlist/number/UINT64_MAX", UINT64_MAX); 66 nvlist_add_number(nvl, "nvlist/number/INT64_MIN", INT64_MIN); 67 nvlist_add_number(nvl, "nvlis 96 nvlist_t *nvl; local 364 nvlist_t *nvl; local 401 nvlist_t *nvl; local 432 nvlist_t *nvl; local [all...] |
/freebsd-current/sys/netpfil/pf/ |
H A D | pf_nv.c | 42 pf_nv ## fnname ## _opt(const nvlist_t *nvl, const char *name, \ 46 if (! nvlist_exists_number(nvl, name)) { \ 50 raw = nvlist_get_number(nvl, name); \ 57 pf_nv ## fnname(const nvlist_t *nvl, const char *name, type *val) \ 60 if (! nvlist_exists_number(nvl, name)) \ 62 raw = nvlist_get_number(nvl, name); \ 69 pf_nv ## fnname ## _array(const nvlist_t *nvl, const char *name, \ 75 if (! nvlist_exists_number_array(nvl, name)) \ 77 n = nvlist_get_number_array(nvl, name, &nitems); \ 90 pf_ ## fnname ## _array_nv(nvlist_t *nvl, cons 101 pf_nvbool(const nvlist_t *nvl, const char *name, bool *val) argument 112 pf_nvbinary(const nvlist_t *nvl, const char *name, void *data, size_t expected_size) argument 138 pf_nvint(const nvlist_t *nvl, const char *name, int *val) argument 155 pf_nvstring(const nvlist_t *nvl, const char *name, char *str, size_t maxlen) argument 170 pf_nvaddr_to_addr(const nvlist_t *nvl, struct pf_addr *paddr) argument 178 nvlist_t *nvl; local 190 pf_nvmape_to_mape(const nvlist_t *nvl, struct pf_mape_portset *mape) argument 206 nvlist_t *nvl; local 220 pf_nvpool_to_pool(const nvlist_t *nvl, struct pf_kpool *kpool) argument 248 nvlist_t *nvl; local 280 pf_nvaddr_wrap_to_addr_wrap(const nvlist_t *nvl, struct pf_addr_wrap *addr) argument 324 nvlist_t *nvl; local 396 pf_nvrule_addr_to_rule_addr(const nvlist_t *nvl, struct pf_rule_addr *addr) argument 418 nvlist_t *nvl; local 442 pf_nvrule_uid_to_rule_uid(const nvlist_t *nvl, struct pf_rule_uid *uid) argument 460 nvlist_t *nvl; local 473 pf_nvrule_gid_to_rule_gid(const nvlist_t *nvl, struct pf_rule_gid *gid) argument 505 pf_nvrule_to_krule(const nvlist_t *nvl, struct pf_krule *rule) argument 662 nvlist_t *nvl; local 686 nvlist_t *nvl, *tmp; local 827 pf_nvstate_cmp_to_state_cmp(const nvlist_t *nvl, struct pf_state_cmp *cmp) argument 842 pf_nvstate_kill_to_kstate_kill(const nvlist_t *nvl, struct pf_kstate_kill *kill) argument 886 nvlist_t *nvl, *tmp; local 913 nvlist_t *nvl; local 931 nvlist_t *nvl, *tmp; local 1010 pf_nveth_rule_addr_to_keth_rule_addr(const nvlist_t *nvl, struct pf_keth_rule_addr *krule) argument 1033 nvlist_t *nvl; local 1049 nvlist_t *nvl, *addr; local 1130 pf_nveth_rule_to_keth_rule(const nvlist_t *nvl, struct pf_keth_rule *krule) argument [all...] |
H A D | pfsync_nv.c | 44 pfsync_syncpeer_nvlist_to_sockaddr(const nvlist_t *nvl, argument 49 if (!nvlist_exists_number(nvl, "af")) 51 if (!nvlist_exists_binary(nvl, "address")) 54 af = nvlist_get_number(nvl, "af"); 61 const void *addr = nvlist_get_binary(nvl, "address", &len); 75 const void *addr = nvlist_get_binary(nvl, "address", &len); 99 nvlist_t *nvl; local 101 nvl = nvlist_create(0); 102 if (nvl == NULL) { 103 return (nvl); 132 pfsync_nvstatus_to_kstatus(const nvlist_t *nvl, struct pfsync_kstatus *status) argument [all...] |
/freebsd-current/sys/sys/ |
H A D | nv.h | 86 void nvlist_destroy(nvlist_t *nvl); 87 int nvlist_error(const nvlist_t *nvl); 88 bool nvlist_empty(const nvlist_t *nvl); 89 int nvlist_flags(const nvlist_t *nvl); 90 void nvlist_set_error(nvlist_t *nvl, int error); 92 nvlist_t *nvlist_clone(const nvlist_t *nvl); 95 void nvlist_dump(const nvlist_t *nvl, int fd); 96 void nvlist_fdump(const nvlist_t *nvl, FILE *fp); 99 size_t nvlist_size(const nvlist_t *nvl); 100 void *nvlist_pack(const nvlist_t *nvl, size_ [all...] |
H A D | dnv.h | 61 bool dnvlist_get_bool(const nvlist_t *nvl, const char *name, bool defval); 62 uint64_t dnvlist_get_number(const nvlist_t *nvl, const char *name, uint64_t defval); 63 const char *dnvlist_get_string(const nvlist_t *nvl, const char *name, const char *defval); 64 const nvlist_t *dnvlist_get_nvlist(const nvlist_t *nvl, const char *name, const nvlist_t *defval); 65 int dnvlist_get_descriptor(const nvlist_t *nvl, const char *name, int defval); 66 const void *dnvlist_get_binary(const nvlist_t *nvl, const char *name, size_t *sizep, const void *defval, size_t defsize); 76 bool dnvlist_take_bool(nvlist_t *nvl, const char *name, bool defval); 77 uint64_t dnvlist_take_number(nvlist_t *nvl, const char *name, uint64_t defval); 78 char *dnvlist_take_string(nvlist_t *nvl, const char *name, char *defval); 79 nvlist_t *dnvlist_take_nvlist(nvlist_t *nvl, cons [all...] |
/freebsd-current/sbin/ifconfig/ |
H A D | ifpfsync.c | 52 pfsync_do_ioctl(if_ctx *ctx, uint cmd, nvlist_t **nvl) argument 58 data = nvlist_pack(*nvl, &nvlen); 71 nvlist_destroy(*nvl); 72 *nvl = NULL; 74 *nvl = nvlist_unpack(ifr.ifr_cap_nv.buffer, ifr.ifr_cap_nv.length, 0); 75 if (*nvl == NULL) { 87 nvlist_t *nvl; local 89 nvl = nvlist_create(0); 90 if (nvl == NULL) { 91 return (nvl); 121 pfsync_syncpeer_nvlist_to_sockaddr(const nvlist_t *nvl, struct sockaddr_storage *sa) argument 173 nvlist_t *nvl = nvlist_create(0); local 193 nvlist_t *nvl = nvlist_create(0); local 214 nvlist_t *nvl = nvlist_create(0); local 263 nvlist_t *nvl = nvlist_create(0); local 284 nvlist_t *nvl = nvlist_create(0); local 305 nvlist_t *nvl = nvlist_create(0); local 323 nvlist_t *nvl = nvlist_create(0); local 343 nvlist_t *nvl; local [all...] |
/freebsd-current/lib/libcasper/services/cap_syslog/ |
H A D | cap_syslog.c | 61 nvlist_t *nvl; local 66 nvl = nvlist_create(0); 67 nvlist_add_string(nvl, "cmd", "vsyslog"); 68 nvlist_add_number(nvl, "priority", priority); 69 nvlist_add_string(nvl, "message", message); 70 nvl = cap_xfer_nvlist(chan, nvl); 71 if (nvl == NULL) { 74 nvlist_destroy(nvl); 80 nvlist_t *nvl; local 102 nvlist_t *nvl; local 116 nvlist_t *nvl; local [all...] |
/freebsd-current/sys/contrib/libnv/ |
H A D | nvlist.c | 97 #define NVLIST_MAGIC 0x6e766c /* "nvl" */ 108 #define NVLIST_ASSERT(nvl) do { \ 109 PJDLOG_ASSERT((nvl) != NULL); \ 110 PJDLOG_ASSERT((nvl)->nvl_magic == NVLIST_MAGIC); \ 132 nvlist_t *nvl; local 136 nvl = nv_malloc(sizeof(*nvl)); 137 if (nvl == NULL) 139 nvl->nvl_error = 0; 140 nvl 151 nvlist_destroy(nvlist_t *nvl) argument 177 nvlist_set_error(nvlist_t *nvl, int error) argument 191 nvlist_error(const nvlist_t *nvl) argument 203 nvlist_get_nvpair_parent(const nvlist_t *nvl) argument 212 nvlist_get_parent(const nvlist_t *nvl, void **cookiep) argument 228 nvlist_set_parent(nvlist_t *nvl, nvpair_t *parent) argument 237 nvlist_set_array_next(nvlist_t *nvl, nvpair_t *ele) argument 253 nvlist_update_size(nvlist_t *nvl, nvpair_t *new, ssize_t mul) argument 298 nvlist_get_array_next_nvpair(nvlist_t *nvl) argument 307 nvlist_in_array(const nvlist_t *nvl) argument 316 nvlist_get_array_next(const nvlist_t *nvl) argument 330 nvlist_get_pararr(const nvlist_t *nvl, void **cookiep) argument 345 nvlist_empty(const nvlist_t *nvl) argument 355 nvlist_flags(const nvlist_t *nvl) argument 365 nvlist_set_flags(nvlist_t *nvl, int flags) argument 383 nvlist_find(const nvlist_t *nvl, int type, const char *name) argument 413 nvlist_exists_type(const nvlist_t *nvl, const char *name, int type) argument 425 nvlist_free_type(nvlist_t *nvl, const char *name, int type) argument 442 nvlist_clone(const nvlist_t *nvl) argument 471 nvlist_dump_error_check(const nvlist_t *nvl, int fd, int level) argument 487 nvlist_dump(const nvlist_t *nvl, int fd) argument 676 nvlist_fdump(const nvlist_t *nvl, FILE *fp) argument 688 nvlist_size(const nvlist_t *nvl) argument 696 nvlist_xdescriptors(const nvlist_t *nvl, int *descs) argument 755 nvlist_descriptors(const nvlist_t *nvl, size_t *nitemsp) argument 774 nvlist_ndescriptors(const nvlist_t *nvl) argument 831 nvlist_pack_header(const nvlist_t *nvl, unsigned char *ptr, size_t *leftp) argument 854 nvlist_xpack(const nvlist_t *nvl, int64_t *fdidxp, size_t *sizep) argument 1010 nvlist_pack(const nvlist_t *nvl, size_t *sizep) argument 1055 nvlist_unpack_header(nvlist_t *nvl, const unsigned char *ptr, size_t nfds, bool *isbep, size_t *leftp) argument 1100 nvlist_t *nvl, *retnvl, *tmpnvl, *array; local 1233 nvlist_send(int sock, const nvlist_t *nvl) argument 1278 nvlist_t *nvl, *ret; local 1343 nvlist_xfer(int sock, nvlist_t *nvl, int flags) argument 1356 nvlist_first_nvpair(const nvlist_t *nvl) argument 1396 nvlist_next(const nvlist_t *nvl, int *typep, void **cookiep) argument 1416 nvlist_exists(const nvlist_t *nvl, const char *name) argument 1478 nvlist_add_stringf(nvlist_t *nvl, const char *name, const char *valuefmt, ...) argument 1488 nvlist_add_stringv(nvlist_t *nvl, const char *name, const char *valuefmt, va_list valueap) argument 1508 nvlist_add_null(nvlist_t *nvl, const char *name) argument 1527 nvlist_add_binary(nvlist_t *nvl, const char *name, const void *value, size_t size) argument 1668 nvlist_move_string(nvlist_t *nvl, const char *name, char *value) argument 1688 nvlist_move_nvlist(nvlist_t *nvl, const char *name, nvlist_t *value) argument 1710 nvlist_move_descriptor(nvlist_t *nvl, const char *name, int value) argument 1731 nvlist_move_binary(nvlist_t *nvl, const char *name, void *value, size_t size) argument 1751 nvlist_move_bool_array(nvlist_t *nvl, const char *name, bool *value, size_t nitems) argument 1772 nvlist_move_string_array(nvlist_t *nvl, const char *name, char **value, size_t nitems) argument 1798 nvlist_move_nvlist_array(nvlist_t *nvl, const char *name, nvlist_t **value, size_t nitems) argument 1826 nvlist_move_number_array(nvlist_t *nvl, const char *name, uint64_t *value, size_t nitems) argument 1848 nvlist_move_descriptor_array(nvlist_t *nvl, const char *name, int *value, size_t nitems) argument 1876 nvlist_get_nvpair(const nvlist_t *nvl, const char *name) argument 2007 nvlist_remove_nvpair(nvlist_t *nvl, nvpair_t *nvp) argument 2019 nvlist_free(nvlist_t *nvl, const char *name) argument [all...] |
H A D | dnvlist.c | 58 dnvlist_get_##type(const nvlist_t *nvl, const char *name, ftype defval) \ 61 if (nvlist_exists_##type(nvl, name)) \ 62 return (nvlist_get_##type(nvl, name)); \ 78 dnvlist_get_binary(const nvlist_t *nvl, const char *name, size_t *sizep, 83 if (nvlist_exists_binary(nvl, name)) 84 value = nvlist_get_binary(nvl, name, sizep); 95 dnvlist_take_##type(nvlist_t *nvl, const char *name, ftype defval) \ 98 if (nvlist_exists_##type(nvl, name)) \ 99 return (nvlist_take_##type(nvl, name)); \ 115 dnvlist_take_binary(nvlist_t *nvl, cons [all...] |
H A D | nvlist_impl.h | 45 nvpair_t *nvlist_get_nvpair_parent(const nvlist_t *nvl); 46 const unsigned char *nvlist_unpack_header(nvlist_t *nvl,
|
/freebsd-current/lib/libcasper/services/cap_netdb/ |
H A D | cap_netdb.c | 46 protoent_unpack(nvlist_t *nvl) argument 54 nvlist_destroy(nvl); 58 pp->p_name = nvlist_take_string(nvl, "name"); 60 aliases = nvlist_take_string_array(nvl, "aliases", &n); 68 nvlist_destroy(nvl); 73 pp->p_proto = (int)nvlist_take_number(nvl, "proto"); 75 nvlist_destroy(nvl); 82 nvlist_t *nvl; local 84 nvl = nvlist_create(0); 85 nvlist_add_string(nvl, "cm 98 protoent_pack(const struct protoent *pp, nvlist_t *nvl) argument [all...] |
/freebsd-current/sys/contrib/openzfs/module/nvpair/ |
H A D | fnvpair.c | 53 nvlist_t *nvl; local 54 VERIFY0(nvlist_alloc(&nvl, NV_UNIQUE_NAME, KM_SLEEP)); 55 return (nvl); 59 fnvlist_free(nvlist_t *nvl) argument 61 nvlist_free(nvl); 65 fnvlist_size(nvlist_t *nvl) argument 68 VERIFY0(nvlist_size(nvl, &size, NV_ENCODE_NATIVE)); 77 fnvlist_pack(nvlist_t *nvl, size_t *sizep) argument 80 VERIFY3U(nvlist_pack(nvl, &packed, sizep, NV_ENCODE_NATIVE, 105 fnvlist_dup(const nvlist_t *nvl) argument 119 fnvlist_num_pairs(nvlist_t *nvl) argument 131 fnvlist_add_boolean(nvlist_t *nvl, const char *name) argument 137 fnvlist_add_boolean_value(nvlist_t *nvl, const char *name, boolean_t val) argument 143 fnvlist_add_byte(nvlist_t *nvl, const char *name, uchar_t val) argument 149 fnvlist_add_int8(nvlist_t *nvl, const char *name, int8_t val) argument 155 fnvlist_add_uint8(nvlist_t *nvl, const char *name, uint8_t val) argument 161 fnvlist_add_int16(nvlist_t *nvl, const char *name, int16_t val) argument 167 fnvlist_add_uint16(nvlist_t *nvl, const char *name, uint16_t val) argument 173 fnvlist_add_int32(nvlist_t *nvl, const char *name, int32_t val) argument 179 fnvlist_add_uint32(nvlist_t *nvl, const char *name, uint32_t val) argument 185 fnvlist_add_int64(nvlist_t *nvl, const char *name, int64_t val) argument 191 fnvlist_add_uint64(nvlist_t *nvl, const char *name, uint64_t val) argument 197 fnvlist_add_string(nvlist_t *nvl, const char *name, const char *val) argument 203 fnvlist_add_nvlist(nvlist_t *nvl, const char *name, nvlist_t *val) argument 209 fnvlist_add_nvpair(nvlist_t *nvl, nvpair_t *pair) argument 215 fnvlist_add_boolean_array(nvlist_t *nvl, const char *name, const boolean_t *val, uint_t n) argument 222 fnvlist_add_byte_array(nvlist_t *nvl, const char *name, const uchar_t *val, uint_t n) argument 229 fnvlist_add_int8_array(nvlist_t *nvl, const char *name, const int8_t *val, uint_t n) argument 236 fnvlist_add_uint8_array(nvlist_t *nvl, const char *name, const uint8_t *val, uint_t n) argument 243 fnvlist_add_int16_array(nvlist_t *nvl, const char *name, const int16_t *val, uint_t n) argument 250 fnvlist_add_uint16_array(nvlist_t *nvl, const char *name, const uint16_t *val, uint_t n) argument 257 fnvlist_add_int32_array(nvlist_t *nvl, const char *name, const int32_t *val, uint_t n) argument 264 fnvlist_add_uint32_array(nvlist_t *nvl, const char *name, const uint32_t *val, uint_t n) argument 271 fnvlist_add_int64_array(nvlist_t *nvl, const char *name, const int64_t *val, uint_t n) argument 278 fnvlist_add_uint64_array(nvlist_t *nvl, const char *name, const uint64_t *val, uint_t n) argument 285 fnvlist_add_string_array(nvlist_t *nvl, const char *name, const char * const *val, uint_t n) argument 292 fnvlist_add_nvlist_array(nvlist_t *nvl, const char *name, const nvlist_t * const *val, uint_t n) argument 299 fnvlist_remove(nvlist_t *nvl, const char *name) argument 305 fnvlist_remove_nvpair(nvlist_t *nvl, nvpair_t *pair) argument 311 fnvlist_lookup_nvpair(nvlist_t *nvl, const char *name) argument 320 fnvlist_lookup_boolean(const nvlist_t *nvl, const char *name) argument 326 fnvlist_lookup_boolean_value(const nvlist_t *nvl, const char *name) argument 334 fnvlist_lookup_byte(const nvlist_t *nvl, const char *name) argument 342 fnvlist_lookup_int8(const nvlist_t *nvl, const char *name) argument 350 fnvlist_lookup_int16(const nvlist_t *nvl, const char *name) argument 358 fnvlist_lookup_int32(const nvlist_t *nvl, const char *name) argument 366 fnvlist_lookup_int64(const nvlist_t *nvl, const char *name) argument 374 fnvlist_lookup_uint8(const nvlist_t *nvl, const char *name) argument 382 fnvlist_lookup_uint16(const nvlist_t *nvl, const char *name) argument 390 fnvlist_lookup_uint32(const nvlist_t *nvl, const char *name) argument 398 fnvlist_lookup_uint64(const nvlist_t *nvl, const char *name) argument 406 fnvlist_lookup_string(const nvlist_t *nvl, const char *name) argument 414 fnvlist_lookup_nvlist(nvlist_t *nvl, const char *name) argument 421 fnvlist_lookup_boolean_array(nvlist_t *nvl, const char *name, uint_t *n) argument 429 fnvlist_lookup_byte_array(nvlist_t *nvl, const char *name, uint_t *n) argument 437 fnvlist_lookup_int8_array(nvlist_t *nvl, const char *name, uint_t *n) argument 445 fnvlist_lookup_uint8_array(nvlist_t *nvl, const char *name, uint_t *n) argument 453 fnvlist_lookup_int16_array(nvlist_t *nvl, const char *name, uint_t *n) argument 461 fnvlist_lookup_uint16_array(nvlist_t *nvl, const char *name, uint_t *n) argument 469 fnvlist_lookup_int32_array(nvlist_t *nvl, const char *name, uint_t *n) argument 477 fnvlist_lookup_uint32_array(nvlist_t *nvl, const char *name, uint_t *n) argument 485 fnvlist_lookup_int64_array(nvlist_t *nvl, const char *name, uint_t *n) argument 493 fnvlist_lookup_uint64_array(nvlist_t *nvl, const char *name, uint_t *n) argument [all...] |
/freebsd-current/sys/contrib/openzfs/tests/zfs-tests/cmd/ |
H A D | nvlist_to_lua.c | 26 static nvlist_t *nvl; variable 92 dump_nvlist(nvl, 4); 95 10 * 1000 * 1000, 10 * 1024 * 1024, nvl, &outnvl); 102 * Verify that outnvl is the same as input nvl, if we expect 109 if (!nvlist_equal(nvl, real_outnvl)) { 120 fnvlist_free(nvl); 121 nvl = fnvlist_alloc(); 141 nvl = fnvlist_alloc(); 143 fnvlist_add_boolean(nvl, key); 146 fnvlist_add_boolean_value(nvl, ke [all...] |
/freebsd-current/usr.sbin/rtsold/ |
H A D | cap_script.c | 87 nvlist_t *nvl; local 94 nvl = nvlist_create(0); 95 nvlist_add_string(nvl, "cmd", "script_run"); 96 nvlist_add_string_array(nvl, "argv", argv, argc); 97 nvl = cap_xfer_nvlist(cap, nvl); 98 if (nvl == NULL) 101 error = (int)dnvlist_get_number(nvl, "error", 0); 103 wfd = nvlist_take_descriptor(nvl, "fd"); 104 nvlist_destroy(nvl); 131 nvlist_t *nvl; local [all...] |
/freebsd-current/lib/libcasper/services/cap_pwd/ |
H A D | cap_pwd.c | 74 passwd_unpack_string(const nvlist_t *nvl, const char *fieldname, char **fieldp, argument 80 str = nvlist_get_string(nvl, fieldname); 92 passwd_unpack(const nvlist_t *nvl, struct passwd *pwd, char *buffer, argument 97 if (!nvlist_exists_string(nvl, "pw_name")) 102 error = passwd_unpack_string(nvl, "pw_name", &pwd->pw_name, &buffer, 106 pwd->pw_uid = (uid_t)nvlist_get_number(nvl, "pw_uid"); 107 pwd->pw_gid = (gid_t)nvlist_get_number(nvl, "pw_gid"); 108 pwd->pw_change = (time_t)nvlist_get_number(nvl, "pw_change"); 109 error = passwd_unpack_string(nvl, "pw_passwd", &pwd->pw_passwd, &buffer, 113 error = passwd_unpack_string(nvl, "pw_clas 140 nvlist_t *nvl; local 276 nvlist_t *nvl; local 297 nvlist_t *nvl; local 322 nvlist_t *limits, *nvl; local 344 nvlist_t *limits, *nvl; local 540 pwd_pack(const nvlist_t *limits, const struct passwd *pwd, nvlist_t *nvl) argument [all...] |