Lines Matching defs:nvlp

207 static int	ippctl_attach_modname(nvlist_t *nvlp, char *val);
208 static int ippctl_attach_modname_array(nvlist_t *nvlp, char **val, int);
209 static int ippctl_attach_aname_array(nvlist_t *nvlp, char **val, int);
762 nvlist_t *nvlp,
772 if ((rc = nvlist_lookup_byte(nvlp, IPPCTL_OP, valp)) != 0)
775 (void) nvlist_remove_all(nvlp, IPPCTL_OP);
783 nvlist_t *nvlp,
794 if ((rc = nvlist_lookup_string(nvlp, IPPCTL_ANAME, &ptr)) != 0)
799 (void) nvlist_remove_all(nvlp, IPPCTL_ANAME);
807 nvlist_t *nvlp,
818 if ((rc = nvlist_lookup_string(nvlp, IPPCTL_MODNAME, &ptr)) != 0)
823 (void) nvlist_remove_all(nvlp, IPPCTL_MODNAME);
831 nvlist_t *nvlp,
839 return (nvlist_add_string(nvlp, IPPCTL_MODNAME, modname));
846 nvlist_t *nvlp,
855 return (nvlist_add_string_array(nvlp, IPPCTL_MODNAME_ARRAY,
863 nvlist_t *nvlp,
872 return (nvlist_add_string_array(nvlp, IPPCTL_ANAME_ARRAY,
880 nvlist_t *nvlp,
890 if ((rc = nvlist_lookup_uint32(nvlp, IPPCTL_FLAGS,
894 (void) nvlist_remove_all(nvlp, IPPCTL_FLAGS);
906 nvlist_t *nvlp = NULL;
924 if ((rc = nvlist_unpack(cbuf, cbuflen, &nvlp, KM_SLEEP)) != 0)
931 if ((rc = ippctl_extract_op(nvlp, &op)) != 0) {
932 nvlist_free(nvlp);
949 if ((rc = ippctl_extract_modname(nvlp, &modname)) != 0) {
950 nvlist_free(nvlp);
954 if ((rc = ippctl_extract_aname(nvlp, &aname)) != 0) {
956 nvlist_free(nvlp);
960 if ((rc = ippctl_extract_flags(nvlp, &flags)) != 0) {
963 nvlist_free(nvlp);
968 rc = ippctl_action_create(modname, aname, nvlp, flags);
983 if ((rc = ippctl_extract_aname(nvlp, &aname)) != 0) {
984 nvlist_free(nvlp);
988 if ((rc = ippctl_extract_flags(nvlp, &flags)) != 0) {
990 nvlist_free(nvlp);
994 rc = ippctl_action_modify(aname, nvlp, flags);
1009 if ((rc = ippctl_extract_aname(nvlp, &aname)) != 0) {
1010 nvlist_free(nvlp);
1014 if ((rc = ippctl_extract_flags(nvlp, &flags)) != 0) {
1016 nvlist_free(nvlp);
1020 nvlist_free(nvlp);
1036 if ((rc = ippctl_extract_aname(nvlp, &aname)) != 0) {
1037 nvlist_free(nvlp);
1041 if ((rc = ippctl_extract_flags(nvlp, &flags)) != 0) {
1042 nvlist_free(nvlp);
1047 nvlist_free(nvlp);
1063 if ((rc = ippctl_extract_aname(nvlp, &aname)) != 0) {
1064 nvlist_free(nvlp);
1068 nvlist_free(nvlp);
1080 nvlist_free(nvlp);
1092 if ((rc = ippctl_extract_modname(nvlp, &modname)) != 0) {
1093 nvlist_free(nvlp);
1097 nvlist_free(nvlp);
1107 nvlist_free(nvlp);
1133 nvlist_t *nvlp,
1149 ipp_rc = ipp_action_create(mid, aname, &nvlp, flags, &aid);
1158 if (nvlp != NULL) {
1159 nvlist_free(nvlp);
1175 if (nvlp != NULL) {
1176 rc = ippctl_callback(nvlp, NULL);
1177 nvlist_free(nvlp);
1224 nvlist_t *nvlp,
1238 ipp_rc = ipp_action_modify(aid, &nvlp, flags);
1246 nvlist_free(nvlp);
1255 if (nvlp != NULL) {
1256 rc = ippctl_callback(nvlp, NULL);
1257 nvlist_free(nvlp);
1313 nvlist_t *nvlp;
1343 if ((rc = nvlist_alloc(&nvlp, NV_UNIQUE_NAME, KM_SLEEP)) != 0)
1346 if ((rc = ippctl_attach_modname(nvlp, modname)) != 0) {
1347 nvlist_free(nvlp);
1353 rc = ippctl_callback(nvlp, NULL);
1354 nvlist_free(nvlp);
1367 nvlist_t *nvlp;
1410 if ((rc = nvlist_alloc(&nvlp, NV_UNIQUE_NAME,
1416 if ((rc = ippctl_attach_modname_array(nvlp,
1419 nvlist_free(nvlp);
1425 if ((rc = ippctl_callback(nvlp, NULL)) != 0) {
1426 nvlist_free(nvlp);
1430 nvlist_free(nvlp);
1453 nvlist_t *nvlp;
1504 if ((rc = nvlist_alloc(&nvlp, NV_UNIQUE_NAME,
1510 if ((rc = ippctl_attach_aname_array(nvlp, aname_array,
1513 nvlist_free(nvlp);
1519 if ((rc = ippctl_callback(nvlp, NULL)) != 0) {
1520 nvlist_free(nvlp);
1524 nvlist_free(nvlp);
1628 nvlist_t *nvlp,
1646 if ((rc = nvlist_pack(nvlp, &buf, &buflen, NV_ENCODE_NATIVE,
1670 nvlist_t *nvlp,
1696 if ((rc = ippctl_add_nvlist(nvlp, i)) == 0)
1708 nvlist_t *nvlp;
1715 if ((rc = nvlist_alloc(&nvlp, NV_UNIQUE_NAME, KM_SLEEP)) != 0)
1718 if ((rc = nvlist_add_int32(nvlp, IPPCTL_RC, val)) != 0) {
1719 nvlist_free(nvlp);
1727 rc = ippctl_add_nvlist(nvlp, 0);
1729 nvlist_free(nvlp);