/freebsd-12-stable/lib/libnv/tests/ |
H A D | nvlist_free_test.c | 50 nvlist_t *nvl; local 54 nvl = nvlist_create(0); 56 nvlist_add_null(nvl, "nvlist/null"); 57 nvlist_add_bool(nvl, "nvlist/bool", true); 58 nvlist_add_number(nvl, "nvlist/number", 0); 59 nvlist_add_string(nvl, "nvlist/string", "test"); 60 nvlist_add_nvlist(nvl, "nvlist/nvlist", nvl); 61 nvlist_add_descriptor(nvl, "nvlist/descriptor", STDERR_FILENO); 62 nvlist_add_binary(nvl, "nvlis [all...] |
H A D | nvlist_exists_test.c | 50 nvlist_t *nvl; local 54 nvl = nvlist_create(0); 56 CHECK(!nvlist_exists(nvl, "nvlist/null")); 57 CHECK(!nvlist_exists_null(nvl, "nvlist/null")); 58 CHECK(!nvlist_exists_bool(nvl, "nvlist/null")); 59 CHECK(!nvlist_exists_number(nvl, "nvlist/null")); 60 CHECK(!nvlist_exists_string(nvl, "nvlist/null")); 61 CHECK(!nvlist_exists_nvlist(nvl, "nvlist/null")); 62 CHECK(!nvlist_exists_descriptor(nvl, "nvlist/null")); 63 CHECK(!nvlist_exists_binary(nvl, "nvlis [all...] |
H A D | nvlist_add_test.c | 52 nvlist_t *nvl; local 56 nvl = nvlist_create(0); 58 CHECK(!nvlist_exists_null(nvl, "nvlist/null")); 59 nvlist_add_null(nvl, "nvlist/null"); 60 CHECK(nvlist_error(nvl) == 0); 61 CHECK(nvlist_exists_null(nvl, "nvlist/null")); 63 CHECK(!nvlist_exists_bool(nvl, "nvlist/bool/true")); 64 nvlist_add_bool(nvl, "nvlist/bool/true", true); 65 CHECK(nvlist_error(nvl) == 0); 66 CHECK(nvlist_exists_bool(nvl, "nvlis [all...] |
H A D | nvlist_get_test.c | 55 nvlist_t *nvl; local 60 nvl = nvlist_create(0); 62 CHECK(!nvlist_exists_bool(nvl, "nvlist/bool/true")); 63 nvlist_add_bool(nvl, "nvlist/bool/true", true); 64 CHECK(nvlist_error(nvl) == 0); 65 CHECK(nvlist_get_bool(nvl, "nvlist/bool/true") == true); 67 CHECK(!nvlist_exists_bool(nvl, "nvlist/bool/false")); 68 nvlist_add_bool(nvl, "nvlist/bool/false", false); 69 CHECK(nvlist_error(nvl) == 0); 70 CHECK(nvlist_get_bool(nvl, "nvlis [all...] |
H A D | dnv_tests.cc | 39 nvlist_t *nvl; local 43 nvl = nvlist_create(0); 47 nvlist_add_bool(nvl, key, value); 49 ATF_REQUIRE_EQ(dnvlist_get_bool(nvl, key, false), value); 50 ATF_REQUIRE_EQ(dnvlist_get_bool(nvl, "name", false), value); 52 nvlist_destroy(nvl); 58 nvlist_t *nvl; local 62 nvl = nvlist_create(0); 64 ATF_REQUIRE_EQ(dnvlist_get_bool(nvl, key, false), false); 65 ATF_REQUIRE_EQ(dnvlist_get_bool(nvl, "12 78 nvlist_t *nvl; local 97 nvlist_t *nvl; local 116 nvlist_t *nvl; local 137 nvlist_t *nvl; local 161 nvlist_t *nvl; local 182 nvlist_t *nvl; local 210 nvlist_t *nvl; local 231 nvlist_t *nvl; local 272 nvlist_t *nvl; local 291 nvlist_t *nvl; local 303 nvlist_t *nvl; local 316 nvlist_t *nvl; local 335 nvlist_t *nvl; local 347 nvlist_t *nvl; local 360 nvlist_t *nvl; local 384 nvlist_t *nvl; local 401 nvlist_t *nvl; local 419 nvlist_t *nvl; local 442 nvlist_t *nvl, *actual_val; local 456 nvlist_t *nvl; local 481 nvlist_t *nvl; local 508 nvlist_t *nvl; local 528 nvlist_t *nvl; local [all...] |
H A D | nvlist_move_test.c | 54 nvlist_t *nvl; local 61 nvl = nvlist_create(0); 63 CHECK(!nvlist_exists_string(nvl, "nvlist/string/")); 66 nvlist_move_string(nvl, "nvlist/string/", ptr); 67 CHECK(nvlist_error(nvl) == 0); 68 CHECK(nvlist_exists_string(nvl, "nvlist/string/")); 69 CHECK(ptr == nvlist_get_string(nvl, "nvlist/string/")); 71 CHECK(!nvlist_exists_string(nvl, "nvlist/string/x")); 74 nvlist_move_string(nvl, "nvlist/string/x", ptr); 75 CHECK(nvlist_error(nvl) [all...] |
H A D | cnv_tests.cc | 47 nvlist_t *nvl; local 53 nvl = nvlist_create(0); 54 ATF_REQUIRE(nvl != NULL); 55 ATF_REQUIRE_EQ(nvlist_error(nvl), 0); 56 ATF_REQUIRE(nvlist_empty(nvl)); 62 nvlist_add_bool(nvl, key, value); 63 ATF_REQUIRE_EQ(strcmp(key, nvlist_next(nvl, &type, &cookie)), 0); 64 ATF_REQUIRE_EQ(nvlist_error(nvl), 0); 66 ATF_REQUIRE(!nvlist_empty(nvl)); 67 ATF_REQUIRE(nvlist_exists(nvl, ke 81 nvlist_t *nvl; local 116 nvlist_t *nvl; local 150 nvlist_t *nvl, *value; local 219 nvlist_t *nvl; local 251 nvlist_t *nvl; local 295 nvlist_t *nvl; local 337 nvlist_t *nvl; local 379 nvlist_t *nvl; local 420 nvlist_t *nvl; local 503 nvlist_t *nvl; local 551 nvlist_t *nvl; local 594 nvlist_t *nvl; local 637 nvlist_t *nvl; local 684 nvlist_t *nvl, *value, *result; local 756 nvlist_t *nvl; local 808 nvlist_t *nvl; local 860 nvlist_t *nvl; local 913 nvlist_t *nvl; local 993 nvlist_t *nvl; local 1045 nvlist_t *nvl; local 1088 nvlist_t *nvl; local 1131 nvlist_t *nvl; local 1174 nvlist_t *nvl, *value; local 1234 nvlist_t *nvl; local 1283 nvlist_t *nvl; local 1328 nvlist_t *nvl; local 1373 nvlist_t *nvl; local 1416 nvlist_t *nvl; local [all...] |
H A D | nv_tests.cc | 46 nvlist_t *nvl; local 50 nvl = nvlist_create(0); 52 ATF_REQUIRE(nvl != NULL); 54 ATF_REQUIRE_EQ(nvlist_error(nvl), 0); 55 ATF_REQUIRE(nvlist_empty(nvl)); 58 ATF_REQUIRE_EQ(nvlist_next(nvl, &type, &it), static_cast<const char *>(NULL)); 60 nvlist_destroy(nvl); 66 nvlist_t *nvl; local 72 nvl = nvlist_create(0); 74 ATF_REQUIRE(nvl ! 96 nvlist_t *nvl; local 128 nvlist_t *nvl; local 161 nvlist_t *nvl; local 198 nvlist_t *nvl; local 241 nvlist_t *nvl, *parent; local 257 nvlist_t *nvl; local 302 nvlist_t *nvl, *clone; local 319 nvlist_t *nvl, *clone; local 356 nvlist_t *nvl, *sublist; local 371 verify_test_nvlist(const nvlist_t *nvl) argument 402 nvlist_t *nvl, *clone; local 418 nvlist_t *nvl, *clone; local 434 nvlist_t *nvl, *unpacked; local 457 nvlist_t *nvl, *unpacked; local 489 verify_null(const nvlist_t *nvl, int type) argument 496 verify_number(const nvlist_t *nvl, const char *name, int type, uint64_t value) argument 504 verify_string(const nvlist_t *nvl, const char *name, int type, const char * value) argument 513 verify_nvlist(const nvlist_t *nvl, const char *name, int type) argument 521 verify_binary(const nvlist_t *nvl, const char *name, int type, const void * value, size_t size) argument 538 nvlist_t *nvl, *unpacked, *nvvalue; local 609 nvlist_t *nvl; local 627 nvlist_t *nvl, *unpacked; local 664 nvlist_t *nvl; local 698 nvlist_t *nvl, *parent; local 713 nvlist_t *nvl; local 733 nvlist_t *nvl; local 756 nvlist_t *nvl; local 776 nvlist_t *nvl; local 810 nvlist_t *nvl; local 830 nvlist_t *nvl; local 864 nvlist_t *nvl; local 884 nvlist_t *nvl; local 918 nvlist_t *nvl; local 938 nvlist_t *nvl; local 969 nvlist_t *nvl; local 995 nvlist_t *nvl; local 1036 nvlist_t *nvl; local 1052 nvlist_t *nvl; local 1068 nvlist_t *nvl; local 1084 nvlist_t *nvl; local 1100 nvlist_t *nvl; local 1116 nvlist_t *nvl; local 1132 nvlist_t *nvl; local 1148 nvlist_t *nvl; local 1164 nvlist_t *nvl; local 1180 nvlist_t *nvl; local 1196 nvlist_t *nvl; local 1212 nvlist_t *nvl; local [all...] |
H A D | nvlist_append_test.c | 53 nvlist_t *nvl, *nvl1, *nvl2, **items; local 59 nvl = nvlist_create(0); 62 nvlist_append_bool_array(nvl, "nvl/bool", i % 2 == 0); 64 CHECK(nvlist_error(nvl) == 0); 65 CHECK(!nvlist_empty(nvl)); 66 CHECK(nvlist_exists_bool_array(nvl, "nvl/bool")); 68 bool_result = nvlist_get_bool_array(nvl, "nvl/boo [all...] |
H A D | nv_array_tests.cc | 53 nvlist_t *nvl; local 58 key = "nvl/bool"; 59 nvl = nvlist_create(0); 60 ATF_REQUIRE(nvl != NULL); 61 ATF_REQUIRE(nvlist_empty(nvl)); 62 ATF_REQUIRE(!nvlist_exists_string_array(nvl, key)); 67 nvlist_add_bool_array(nvl, key, testbool, 16); 68 ATF_REQUIRE_EQ(nvlist_error(nvl), 0); 69 ATF_REQUIRE(!nvlist_empty(nvl)); 70 ATF_REQUIRE(nvlist_exists_bool_array(nvl, ke 98 nvlist_t *nvl; local 156 nvlist_t *nvl; local 214 nvlist_t *nvl; local 260 nvlist_t *nvl; local 338 const nvlist_t *nvl; local 461 nvlist_t *nvl; local 498 nvlist_t *nvl; local 541 nvlist_t *nvl; local 591 nvlist_t *nvl; local 628 nvlist_t *nvl; local 665 nvlist_t *nvl; local 731 nvlist_t *nvl, *nvladd[1], **nvlmove; local 770 nvlist_t *nvl, *test[5], *nasted; local 838 nvlist_t *nvl, *test[5], *nasted; local 911 nvlist_t *nvl, *unpacked; local 955 nvlist_t *nvl, *unpacked; local 997 nvlist_t *nvl; local 1061 nvlist_t *nvl, *unpacked; local 1105 nvlist_t *nvl; local [all...] |
H A D | nvlist_send_recv_test.c | 59 nvlist_t *nvl; local 62 nvl = nvlist_create(0); 65 nvlist_add_bool(nvl, "nvlist/bool/true", true); 66 nvlist_add_bool(nvl, "nvlist/bool/false", false); 67 nvlist_add_number(nvl, "nvlist/number/0", 0); 68 nvlist_add_number(nvl, "nvlist/number/1", 1); 69 nvlist_add_number(nvl, "nvlist/number/-1", -1); 70 nvlist_add_number(nvl, "nvlist/number/UINT64_MAX", UINT64_MAX); 71 nvlist_add_number(nvl, "nvlist/number/INT64_MIN", INT64_MIN); 72 nvlist_add_number(nvl, "nvlis 90 nvlist_t *nvl; local 341 nvlist_t *nvl; local [all...] |
/freebsd-12-stable/sys/netpfil/pf/ |
H A D | pf_nv.c | 44 pf_nv ## fnname ## _opt(const nvlist_t *nvl, const char *name, \ 48 if (! nvlist_exists_number(nvl, name)) { \ 52 raw = nvlist_get_number(nvl, name); \ 59 pf_nv ## fnname(const nvlist_t *nvl, const char *name, type *val) \ 62 if (! nvlist_exists_number(nvl, name)) \ 64 raw = nvlist_get_number(nvl, name); \ 71 pf_nv ## fnname ## _array(const nvlist_t *nvl, const char *name, \ 77 if (! nvlist_exists_number_array(nvl, name)) \ 79 n = nvlist_get_number_array(nvl, name, &nitems); \ 92 pf_ ## fnname ## _array_nv(nvlist_t *nvl, cons 103 pf_nvbinary(const nvlist_t *nvl, const char *name, void *data, size_t expected_size) argument 129 pf_nvint(const nvlist_t *nvl, const char *name, int *val) argument 146 pf_nvstring(const nvlist_t *nvl, const char *name, char *str, size_t maxlen) argument 161 pf_nvaddr_to_addr(const nvlist_t *nvl, struct pf_addr *paddr) argument 169 nvlist_t *nvl; local 181 pf_nvmape_to_mape(const nvlist_t *nvl, struct pf_mape_portset *mape) argument 197 nvlist_t *nvl; local 211 pf_nvpool_to_pool(const nvlist_t *nvl, struct pf_kpool *kpool) argument 241 nvlist_t *nvl; local 273 pf_nvaddr_wrap_to_addr_wrap(const nvlist_t *nvl, struct pf_addr_wrap *addr) argument 317 nvlist_t *nvl; local 372 pf_nvrule_addr_to_rule_addr(const nvlist_t *nvl, struct pf_rule_addr *addr) argument 394 nvlist_t *nvl; local 418 pf_nvrule_uid_to_rule_uid(const nvlist_t *nvl, struct pf_rule_uid *uid) argument 436 nvlist_t *nvl; local 449 pf_nvrule_gid_to_rule_gid(const nvlist_t *nvl, struct pf_rule_gid *gid) argument 481 pf_nvrule_to_krule(const nvlist_t *nvl, struct pf_krule *rule) argument 636 nvlist_t *nvl; local 660 nvlist_t *nvl, *tmp; local 796 pf_nvstate_cmp_to_state_cmp(const nvlist_t *nvl, struct pf_state_cmp *cmp) argument 811 pf_nvstate_kill_to_kstate_kill(const nvlist_t *nvl, struct pf_kstate_kill *kill) argument 853 nvlist_t *nvl, *tmp; local 880 nvlist_t *nvl; local 896 nvlist_t *nvl, *tmp; local 928 nvlist_t *nvl, *tmp; local [all...] |
/freebsd-12-stable/sys/sys/ |
H A D | nv.h | 87 void nvlist_destroy(nvlist_t *nvl); 88 int nvlist_error(const nvlist_t *nvl); 89 bool nvlist_empty(const nvlist_t *nvl); 90 int nvlist_flags(const nvlist_t *nvl); 91 void nvlist_set_error(nvlist_t *nvl, int error); 93 nvlist_t *nvlist_clone(const nvlist_t *nvl); 96 void nvlist_dump(const nvlist_t *nvl, int fd); 97 void nvlist_fdump(const nvlist_t *nvl, FILE *fp); 100 size_t nvlist_size(const nvlist_t *nvl); 101 void *nvlist_pack(const nvlist_t *nvl, size_ [all...] |
H A D | dnv.h | 63 bool dnvlist_get_bool(const nvlist_t *nvl, const char *name, bool defval); 64 uint64_t dnvlist_get_number(const nvlist_t *nvl, const char *name, uint64_t defval); 65 const char *dnvlist_get_string(const nvlist_t *nvl, const char *name, const char *defval); 66 const nvlist_t *dnvlist_get_nvlist(const nvlist_t *nvl, const char *name, const nvlist_t *defval); 67 int dnvlist_get_descriptor(const nvlist_t *nvl, const char *name, int defval); 68 const void *dnvlist_get_binary(const nvlist_t *nvl, const char *name, size_t *sizep, const void *defval, size_t defsize); 78 bool dnvlist_take_bool(nvlist_t *nvl, const char *name, bool defval); 79 uint64_t dnvlist_take_number(nvlist_t *nvl, const char *name, uint64_t defval); 80 char *dnvlist_take_string(nvlist_t *nvl, const char *name, char *defval); 81 nvlist_t *dnvlist_take_nvlist(nvlist_t *nvl, cons [all...] |
/freebsd-12-stable/lib/libpfctl/ |
H A D | libpfctl.c | 57 pf_nvuint_8_array(const nvlist_t *nvl, const char *name, size_t maxelems, argument 63 tmp = nvlist_get_number_array(nvl, name, &elems); 74 pf_nvuint_16_array(const nvlist_t *nvl, const char *name, size_t maxelems, argument 80 tmp = nvlist_get_number_array(nvl, name, &elems); 91 pf_nvuint_32_array(const nvlist_t *nvl, const char *name, size_t maxelems, argument 97 tmp = nvlist_get_number_array(nvl, name, &elems); 108 pf_nvuint_64_array(const nvlist_t *nvl, const char *name, size_t maxelems, argument 114 tmp = nvlist_get_number_array(nvl, name, &elems); 128 nvlist_t *nvl = nvlist_create(0); local 130 nvlist_add_binary(nvl, "add 137 pf_nvaddr_to_addr(const nvlist_t *nvl, struct pf_addr *addr) argument 151 nvlist_t *nvl = nvlist_create(0); local 167 pf_nvaddr_wrap_to_addr_wrap(const nvlist_t *nvl, struct pf_addr_wrap *addr) argument 187 nvlist_t *nvl = nvlist_create(0); local 201 pf_nvrule_addr_to_rule_addr(const nvlist_t *nvl, struct pf_rule_addr *addr) argument 214 nvlist_t *nvl = nvlist_create(0); local 228 nvlist_t *nvl = nvlist_create(0); local 245 pf_nvmape_to_mape(const nvlist_t *nvl, struct pf_mape_portset *mape) argument 253 pf_nvpool_to_pool(const nvlist_t *nvl, struct pfctl_pool *pool) argument 277 nvlist_t *nvl = nvlist_create(0); local 289 pf_nvrule_uid_to_rule_uid(const nvlist_t *nvl, struct pf_rule_uid *uid) argument 299 nvlist_t *nvl = nvlist_create(0); local 309 pf_nvdivert_to_divert(const nvlist_t *nvl, struct pfctl_rule *rule) argument 316 pf_nvrule_to_rule(const nvlist_t *nvl, struct pfctl_rule *rule) argument 425 nvlist_t *nvl, *nvlr; local 548 nvlist_t *nvl; local 605 nvlist_t *nvl; local 624 pfctl_nv_add_state_cmp(nvlist_t *nvl, const char *name, const struct pfctl_state_cmp *cmp) argument 640 pf_nvstate_scrub_to_state_scrub(const nvlist_t *nvl, struct pfctl_state_scrub *scrub) argument 651 pf_nvstate_peer_to_state_peer(const nvlist_t *nvl, struct pfctl_state_peer *peer) argument 673 pf_nvstate_key_to_state_key(const nvlist_t *nvl, struct pfctl_state_key *key) argument 693 pf_nvstate_to_state(const nvlist_t *nvl, struct pfctl_state *s) argument 734 nvlist_t *nvl = NULL; local 825 nvlist_t *nvl; local [all...] |
/freebsd-12-stable/sys/cddl/contrib/opensolaris/common/nvpair/ |
H A D | opensolaris_fnvpair.c | 56 nvlist_t *nvl; local 57 VERIFY0(nvlist_alloc(&nvl, NV_UNIQUE_NAME, KM_SLEEP)); 58 return (nvl); 62 fnvlist_free(nvlist_t *nvl) argument 64 nvlist_free(nvl); 68 fnvlist_size(nvlist_t *nvl) argument 71 VERIFY0(nvlist_size(nvl, &size, NV_ENCODE_NATIVE)); 80 fnvlist_pack(nvlist_t *nvl, size_t *sizep) argument 83 VERIFY3U(nvlist_pack(nvl, &packed, sizep, NV_ENCODE_NATIVE, 108 fnvlist_dup(nvlist_t *nvl) argument 122 fnvlist_num_pairs(nvlist_t *nvl) argument 134 fnvlist_add_boolean(nvlist_t *nvl, const char *name) argument 140 fnvlist_add_boolean_value(nvlist_t *nvl, const char *name, boolean_t val) argument 146 fnvlist_add_byte(nvlist_t *nvl, const char *name, uchar_t val) argument 152 fnvlist_add_int8(nvlist_t *nvl, const char *name, int8_t val) argument 158 fnvlist_add_uint8(nvlist_t *nvl, const char *name, uint8_t val) argument 164 fnvlist_add_int16(nvlist_t *nvl, const char *name, int16_t val) argument 170 fnvlist_add_uint16(nvlist_t *nvl, const char *name, uint16_t val) argument 176 fnvlist_add_int32(nvlist_t *nvl, const char *name, int32_t val) argument 182 fnvlist_add_uint32(nvlist_t *nvl, const char *name, uint32_t val) argument 188 fnvlist_add_int64(nvlist_t *nvl, const char *name, int64_t val) argument 194 fnvlist_add_uint64(nvlist_t *nvl, const char *name, uint64_t val) argument 200 fnvlist_add_string(nvlist_t *nvl, const char *name, const char *val) argument 206 fnvlist_add_nvlist(nvlist_t *nvl, const char *name, nvlist_t *val) argument 212 fnvlist_add_nvpair(nvlist_t *nvl, nvpair_t *pair) argument 218 fnvlist_add_boolean_array(nvlist_t *nvl, const char *name, boolean_t *val, uint_t n) argument 225 fnvlist_add_byte_array(nvlist_t *nvl, const char *name, uchar_t *val, uint_t n) argument 231 fnvlist_add_int8_array(nvlist_t *nvl, const char *name, int8_t *val, uint_t n) argument 237 fnvlist_add_uint8_array(nvlist_t *nvl, const char *name, uint8_t *val, uint_t n) argument 243 fnvlist_add_int16_array(nvlist_t *nvl, const char *name, int16_t *val, uint_t n) argument 249 fnvlist_add_uint16_array(nvlist_t *nvl, const char *name, uint16_t *val, uint_t n) argument 256 fnvlist_add_int32_array(nvlist_t *nvl, const char *name, int32_t *val, uint_t n) argument 262 fnvlist_add_uint32_array(nvlist_t *nvl, const char *name, uint32_t *val, uint_t n) argument 269 fnvlist_add_int64_array(nvlist_t *nvl, const char *name, int64_t *val, uint_t n) argument 275 fnvlist_add_uint64_array(nvlist_t *nvl, const char *name, uint64_t *val, uint_t n) argument 282 fnvlist_add_string_array(nvlist_t *nvl, const char *name, char * const *val, uint_t n) argument 289 fnvlist_add_nvlist_array(nvlist_t *nvl, const char *name, nvlist_t **val, uint_t n) argument 296 fnvlist_remove(nvlist_t *nvl, const char *name) argument 302 fnvlist_remove_nvpair(nvlist_t *nvl, nvpair_t *pair) argument 308 fnvlist_lookup_nvpair(nvlist_t *nvl, const char *name) argument 317 fnvlist_lookup_boolean(nvlist_t *nvl, const char *name) argument 323 fnvlist_lookup_boolean_value(nvlist_t *nvl, const char *name) argument 331 fnvlist_lookup_byte(nvlist_t *nvl, const char *name) argument 339 fnvlist_lookup_int8(nvlist_t *nvl, const char *name) argument 347 fnvlist_lookup_int16(nvlist_t *nvl, const char *name) argument 355 fnvlist_lookup_int32(nvlist_t *nvl, const char *name) argument 363 fnvlist_lookup_int64(nvlist_t *nvl, const char *name) argument 371 fnvlist_lookup_uint8_t(nvlist_t *nvl, const char *name) argument 379 fnvlist_lookup_uint16(nvlist_t *nvl, const char *name) argument 387 fnvlist_lookup_uint32(nvlist_t *nvl, const char *name) argument 395 fnvlist_lookup_uint64(nvlist_t *nvl, const char *name) argument 403 fnvlist_lookup_string(nvlist_t *nvl, const char *name) argument 411 fnvlist_lookup_nvlist(nvlist_t *nvl, const char *name) argument [all...] |
/freebsd-12-stable/lib/libcasper/services/cap_syslog/ |
H A D | cap_syslog.c | 63 nvlist_t *nvl; local 68 nvl = nvlist_create(0); 69 nvlist_add_string(nvl, "cmd", "vsyslog"); 70 nvlist_add_number(nvl, "priority", priority); 71 nvlist_add_string(nvl, "message", message); 72 nvl = cap_xfer_nvlist(chan, nvl); 73 if (nvl == NULL) { 76 nvlist_destroy(nvl); 82 nvlist_t *nvl; local 104 nvlist_t *nvl; local 118 nvlist_t *nvl; local [all...] |
/freebsd-12-stable/sys/contrib/libnv/ |
H A D | nvlist.c | 97 #define NVLIST_MAGIC 0x6e766c /* "nvl" */ 107 #define NVLIST_ASSERT(nvl) do { \ 108 PJDLOG_ASSERT((nvl) != NULL); \ 109 PJDLOG_ASSERT((nvl)->nvl_magic == NVLIST_MAGIC); \ 131 nvlist_t *nvl; local 135 nvl = nv_malloc(sizeof(*nvl)); 136 if (nvl == NULL) 138 nvl->nvl_error = 0; 139 nvl 149 nvlist_destroy(nvlist_t *nvl) argument 175 nvlist_set_error(nvlist_t *nvl, int error) argument 189 nvlist_error(const nvlist_t *nvl) argument 201 nvlist_get_nvpair_parent(const nvlist_t *nvl) argument 210 nvlist_get_parent(const nvlist_t *nvl, void **cookiep) argument 226 nvlist_set_parent(nvlist_t *nvl, nvpair_t *parent) argument 235 nvlist_set_array_next(nvlist_t *nvl, nvpair_t *ele) argument 251 nvlist_in_array(const nvlist_t *nvl) argument 260 nvlist_get_array_next(const nvlist_t *nvl) argument 274 nvlist_get_pararr(const nvlist_t *nvl, void **cookiep) argument 289 nvlist_empty(const nvlist_t *nvl) argument 299 nvlist_flags(const nvlist_t *nvl) argument 309 nvlist_set_flags(nvlist_t *nvl, int flags) argument 327 nvlist_find(const nvlist_t *nvl, int type, const char *name) argument 357 nvlist_exists_type(const nvlist_t *nvl, const char *name, int type) argument 369 nvlist_free_type(nvlist_t *nvl, const char *name, int type) argument 386 nvlist_clone(const nvlist_t *nvl) argument 415 nvlist_dump_error_check(const nvlist_t *nvl, int fd, int level) argument 431 nvlist_dump(const nvlist_t *nvl, int fd) argument 620 nvlist_fdump(const nvlist_t *nvl, FILE *fp) argument 632 nvlist_size(const nvlist_t *nvl) argument 710 nvlist_xdescriptors(const nvlist_t *nvl, int *descs) argument 769 nvlist_descriptors(const nvlist_t *nvl, size_t *nitemsp) argument 788 nvlist_ndescriptors(const nvlist_t *nvl) argument 845 nvlist_pack_header(const nvlist_t *nvl, unsigned char *ptr, size_t *leftp) argument 868 nvlist_xpack(const nvlist_t *nvl, int64_t *fdidxp, size_t *sizep) argument 1024 nvlist_pack(const nvlist_t *nvl, size_t *sizep) argument 1069 nvlist_unpack_header(nvlist_t *nvl, const unsigned char *ptr, size_t nfds, bool *isbep, size_t *leftp) argument 1114 nvlist_t *nvl, *retnvl, *tmpnvl, *array; local 1247 nvlist_send(int sock, const nvlist_t *nvl) argument 1292 nvlist_t *nvl, *ret; local 1346 nvlist_xfer(int sock, nvlist_t *nvl, int flags) argument 1359 nvlist_first_nvpair(const nvlist_t *nvl) argument 1399 nvlist_next(const nvlist_t *nvl, int *typep, void **cookiep) argument 1419 nvlist_exists(const nvlist_t *nvl, const char *name) argument 1480 nvlist_add_stringf(nvlist_t *nvl, const char *name, const char *valuefmt, ...) argument 1490 nvlist_add_stringv(nvlist_t *nvl, const char *name, const char *valuefmt, va_list valueap) argument 1510 nvlist_add_null(nvlist_t *nvl, const char *name) argument 1529 nvlist_add_binary(nvlist_t *nvl, const char *name, const void *value, size_t size) argument 1667 nvlist_move_string(nvlist_t *nvl, const char *name, char *value) argument 1687 nvlist_move_nvlist(nvlist_t *nvl, const char *name, nvlist_t *value) argument 1709 nvlist_move_descriptor(nvlist_t *nvl, const char *name, int value) argument 1730 nvlist_move_binary(nvlist_t *nvl, const char *name, void *value, size_t size) argument 1750 nvlist_move_bool_array(nvlist_t *nvl, const char *name, bool *value, size_t nitems) argument 1771 nvlist_move_string_array(nvlist_t *nvl, const char *name, char **value, size_t nitems) argument 1797 nvlist_move_nvlist_array(nvlist_t *nvl, const char *name, nvlist_t **value, size_t nitems) argument 1825 nvlist_move_number_array(nvlist_t *nvl, const char *name, uint64_t *value, size_t nitems) argument 1847 nvlist_move_descriptor_array(nvlist_t *nvl, const char *name, int *value, size_t nitems) argument 1875 nvlist_get_nvpair(const nvlist_t *nvl, const char *name) argument 2006 nvlist_remove_nvpair(nvlist_t *nvl, nvpair_t *nvp) argument 2017 nvlist_free(nvlist_t *nvl, const char *name) argument [all...] |
H A D | dnvlist.c | 59 dnvlist_get_##type(const nvlist_t *nvl, const char *name, ftype defval) \ 62 if (nvlist_exists_##type(nvl, name)) \ 63 return (nvlist_get_##type(nvl, name)); \ 79 dnvlist_get_binary(const nvlist_t *nvl, const char *name, size_t *sizep, 84 if (nvlist_exists_binary(nvl, name)) 85 value = nvlist_get_binary(nvl, name, sizep); 96 dnvlist_take_##type(nvlist_t *nvl, const char *name, ftype defval) \ 99 if (nvlist_exists_##type(nvl, name)) \ 100 return (nvlist_take_##type(nvl, name)); \ 116 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-12-stable/lib/libcasper/services/cap_random/ |
H A D | cap_random.c | 53 nvlist_t *nvl; local 62 nvl = nvlist_create(0); 63 nvlist_add_string(nvl, "cmd", "generate"); 64 nvlist_add_number(nvl, "size", 66 nvl = cap_xfer_nvlist(chan, nvl); 67 if (nvl == NULL) 69 if (nvlist_get_number(nvl, "error") != 0) { 70 errno = (int)nvlist_get_number(nvl, "error"); 71 nvlist_destroy(nvl); [all...] |
/freebsd-12-stable/cddl/contrib/opensolaris/lib/libzfs_core/common/ |
H A D | libzfs_core_compat.c | 35 nvlist_t *nvl = NULL; local 53 nvlist_lookup_nvlist(*source, "props", &nvl); 54 *source = nvl; 59 nvlist_lookup_nvlist(*source, "props", &nvl); 61 *source = nvl; 64 nvl = fnvlist_lookup_nvlist(*source, "snaps"); 65 pair = nvlist_next_nvpair(nvl, NULL); 74 if (!error && nvlist_next_nvpair(nvl, pair) != NULL) 76 nvlist_free(nvl); 77 nvl 173 nvlist_t *nvl; local [all...] |
/freebsd-12-stable/usr.sbin/rtsold/ |
H A D | cap_script.c | 90 nvlist_t *nvl; local 97 nvl = nvlist_create(0); 98 nvlist_add_string(nvl, "cmd", "script_run"); 99 nvlist_add_string_array(nvl, "argv", argv, argc); 100 nvl = cap_xfer_nvlist(cap, nvl); 101 if (nvl == NULL) 104 error = (int)dnvlist_get_number(nvl, "error", 0); 106 wfd = nvlist_take_descriptor(nvl, "fd"); 107 nvlist_destroy(nvl); 134 nvlist_t *nvl; local [all...] |
/freebsd-12-stable/lib/libcasper/services/cap_pwd/ |
H A D | cap_pwd.c | 77 passwd_unpack_string(const nvlist_t *nvl, const char *fieldname, char **fieldp, argument 83 str = nvlist_get_string(nvl, fieldname); 95 passwd_unpack(const nvlist_t *nvl, struct passwd *pwd, char *buffer, argument 100 if (!nvlist_exists_string(nvl, "pw_name")) 105 error = passwd_unpack_string(nvl, "pw_name", &pwd->pw_name, &buffer, 109 pwd->pw_uid = (uid_t)nvlist_get_number(nvl, "pw_uid"); 110 pwd->pw_gid = (gid_t)nvlist_get_number(nvl, "pw_gid"); 111 pwd->pw_change = (time_t)nvlist_get_number(nvl, "pw_change"); 112 error = passwd_unpack_string(nvl, "pw_passwd", &pwd->pw_passwd, &buffer, 116 error = passwd_unpack_string(nvl, "pw_clas 143 nvlist_t *nvl; local 279 nvlist_t *nvl; local 300 nvlist_t *nvl; local 325 nvlist_t *limits, *nvl; local 347 nvlist_t *limits, *nvl; local 543 pwd_pack(const nvlist_t *limits, const struct passwd *pwd, nvlist_t *nvl) argument [all...] |
/freebsd-12-stable/lib/libcasper/libcasper/ |
H A D | libcasper.c | 176 nvlist_t *nvl; local 182 nvl = nvlist_create(channel_nvlist_flags(chan)); 183 nvlist_add_string(nvl, "cmd", "clone"); 184 nvl = cap_xfer_nvlist(chan, nvl); 185 if (nvl == NULL) 187 if (nvlist_get_number(nvl, "error") != 0) { 188 errno = (int)nvlist_get_number(nvl, "error"); 189 nvlist_destroy(nvl); 192 newsock = nvlist_take_descriptor(nvl, "soc 280 cap_send_nvlist(const cap_channel_t *chan, const nvlist_t *nvl) argument 301 cap_xfer_nvlist(const cap_channel_t *chan, nvlist_t *nvl) argument 315 nvlist_t *nvl; local [all...] |