Lines Matching defs:res
450 int res;
458 res = nvlist_alloc(nvl, NV_UNIQUE_NAME, 0);
459 if (res != 0) {
466 res = nvlist_add_byte(*nvl, IPP_CONFIG_TYPE, IPP_SET);
467 if (res != 0) {
482 res = nvlist_add_uint32(*nvl, IPP_ACTION_STATS_ENABLE,
484 if (res != 0) {
490 res = add_orig_ipqosconf(*nvl);
491 if (res != IPQOS_CONF_SUCCESS) {
496 res = ipp_action_modify(action_name, nvl, 0);
497 if (res != 0) {
1196 int res;
1208 res = diffnvlists(old->nvlist, new->nvlist, module_name, &diff,
1210 if (res != IPQOS_CONF_SUCCESS) {
1211 return (res);
1233 int res;
1249 res = diffnvlists(old->nvlist, new->nvlist, module_name, &diff,
1251 if (res != IPQOS_CONF_SUCCESS) {
1252 return (res);
1384 int res;
1406 res = diffaction(tmp, act);
1407 if (res != IPQOS_CONF_SUCCESS) {
1408 return (res);
1442 int res;
1447 res = diffclasses(old, new);
1448 if (res != IPQOS_CONF_SUCCESS) {
1449 return (res);
1453 res = difffilters(old, new);
1454 if (res != IPQOS_CONF_SUCCESS) {
1455 return (res);
1459 res = diffparams(old->params, new->params, old->module);
1460 if (res != IPQOS_CONF_SUCCESS) {
1461 return (res);
1493 int res;
1530 res = dup_class(cls, &ncls);
1531 if (res != IPQOS_CONF_SUCCESS) {
1565 res = diffclass(tmpc, cls);
1566 if (res != IPQOS_CONF_SUCCESS) {
1567 return (res);
1597 int res;
1688 res = difffilter(tmpf, flt, new->module);
1689 if (res != IPQOS_CONF_SUCCESS) {
1690 return (res);
1750 int res;
1795 res = readtype(tfp, module_name, SHORT_NAME(nme), &type,
1797 if (res != IPQOS_CONF_SUCCESS) {
1798 return (res);
1816 res = nvlist_lookup_uint32(old, nme, &oifidx);
1817 if (res == 0) {
1835 res = nvlist_lookup_byte(old, nme, &oproto);
1836 if (res == 0) {
1849 res = nvlist_lookup_uint16(old, nme, &oport);
1850 if (res == 0) {
1864 res = nvlist_lookup_string(old, nme, &ostr);
1865 if (res == 0) {
1891 res = nvlist_lookup_uint32_array(old, nme,
1893 if (res == 0) {
1914 res = nvlist_lookup_uint32(old, nme, (uint32_t *)&obl);
1915 if (res == 0) {
1920 res = readbool(dfltst, &obl);
1921 if (res == IPQOS_CONF_SUCCESS) {
1933 res = nvlist_lookup_byte(old, nme, (uchar_t *)&ou8);
1934 if (res == 0) {
1937 res = readuint8(dfltst, &ou8, &lo);
1938 if (res == IPQOS_CONF_SUCCESS) {
1950 res = nvlist_lookup_int16(old, nme, &oi16);
1951 if (res == 0) {
1954 res = readint16(dfltst, &oi16, &lo);
1955 if (res == IPQOS_CONF_SUCCESS) {
1967 res = nvlist_lookup_uint16(old, nme, &oui16);
1968 if (res == 0) {
1971 res = readuint16(dfltst, &oui16, &lo);
1972 if (res == IPQOS_CONF_SUCCESS) {
1989 res = nvlist_lookup_int32(old, nme, &oi32);
1990 if (res == 0) {
1993 res = readint32(dfltst, &oi32, &lo);
1994 if (res == IPQOS_CONF_SUCCESS) {
2006 res = nvlist_lookup_uint32(old, nme, &oui32);
2007 if (res == 0) {
2010 res = readuint32(dfltst, &oui32, &lo);
2011 if (res == IPQOS_CONF_SUCCESS) {
2023 res = nvlist_lookup_uint32(old, nme, &oeval);
2024 if (res == 0) {
2027 res = readuint32(dfltst, &oeval, &lo);
2028 if (res == IPQOS_CONF_SUCCESS) {
2038 res = nvlist_lookup_byte(old, nme, &oidx);
2039 if (res == 0)
2048 res = nvlist_lookup_int32_array(old, nme, &oarr,
2050 if (res == 0)
2106 int res;
2113 res = add_items(actions, B_FALSE);
2114 if (res != IPQOS_CONF_SUCCESS) {
2115 return (res);
2120 res = modify_items(actions);
2121 if (res != IPQOS_CONF_SUCCESS) {
2122 return (res);
2127 res = remove_items(old_actions, B_FALSE);
2128 if (res != IPQOS_CONF_SUCCESS) {
2129 return (res);
2141 int res;
2156 res = add_action(act);
2157 if (res != IPQOS_CONF_SUCCESS) {
2158 return (res);
2168 res = add_item(act, rem_undo);
2169 if (res != IPQOS_CONF_SUCCESS) {
2189 int res;
2212 res = add_item(cls->alist->action, rem_undo);
2213 if (res != IPQOS_CONF_SUCCESS) {
2214 return (res);
2224 res = add_item(pact->action, rem_undo);
2225 if (res != IPQOS_CONF_SUCCESS) {
2226 return (res);
2237 res = add_action(act);
2238 if (res != IPQOS_CONF_SUCCESS) {
2239 return (res);
2267 int res;
2278 res = nvlist_alloc(nvl, NV_UNIQUE_NAME, 0);
2279 if (res != 0) {
2310 res = ipp_action_create(act->module, act->name, nvl, 0);
2311 if (res != 0) {
2398 int res;
2415 res = add_class(action, cls->name, module_version,
2417 if (res != IPQOS_CONF_SUCCESS) {
2439 int res;
2449 res = remove_item(act, add_undo);
2450 if (res != IPQOS_CONF_SUCCESS) {
2451 return (res);
2474 int res;
2498 res = remove_item(dep->action, add_undo);
2499 if (res != IPQOS_CONF_SUCCESS) {
2500 return (res);
2507 res = ipp_action_destroy(act->name, 0);
2508 if (res != 0) {
2531 res = remove_filter(act->name, flt->name,
2533 if (res != IPQOS_CONF_SUCCESS) {
2556 res = remove_class(act->name, cls->name,
2558 if (res != IPQOS_CONF_SUCCESS) {
2589 int res;
2609 res = modify_params(act->name,
2612 if (res != IPQOS_CONF_SUCCESS) {
2623 res = modify_class(act->name, cls->name,
2626 if (res != IPQOS_CONF_SUCCESS) {
2639 res = modify_filter(act->name, flt,
2641 if (res != 0) {
2676 int res;
2698 res = modify_params(act->name,
2701 if (res != IPQOS_CONF_SUCCESS) {
2702 return (res);
2713 res = modify_filter(act->name, oldflt,
2715 if (res != IPQOS_CONF_SUCCESS) {
2716 return (res);
2728 res = modify_class(act->name,
2733 if (res != IPQOS_CONF_SUCCESS) {
2734 return (res);
2753 res = modify_filter(act->name, flt,
2755 if (res != IPQOS_CONF_SUCCESS) {
2756 return (res);
2763 res = modify_class(act->name, cls->name,
2766 if (res != IPQOS_CONF_SUCCESS) {
2767 return (res);
2789 int res;
2795 res = add_items(old_actions, B_TRUE);
2796 if (res != IPQOS_CONF_SUCCESS) {
2797 return (res);
2802 res = undo_modifys(old_actions, actions);
2803 if (res != IPQOS_CONF_SUCCESS) {
2804 return (res);
2809 res = remove_items(actions, B_TRUE);
2810 if (res != IPQOS_CONF_SUCCESS) {
2811 return (res);
3179 int res;
3420 res = read_int_array_info(dfltst,
3428 if (res == IPQOS_CONF_SUCCESS) {
3478 int res;
3500 res = printnvlist(fp, module, params->nvlist, printall, NULL,
3502 if (res != IPQOS_CONF_SUCCESS) {
3503 return (res);
3614 int res;
3674 res = printnvlist(fp, module, (*filter)->nvlist, printall, *filter,
3676 if (res != IPQOS_CONF_SUCCESS) {
3677 return (res);
3766 int res;
3781 res = printparams(fp, action->module, action->params, printall,
3783 if (res != IPQOS_CONF_SUCCESS) {
3784 return (res);
3809 res = printfilter(fp, action->module, &flt, printall,
3811 if (res != IPQOS_CONF_SUCCESS) {
3812 return (res);
4316 int res;
4354 res = readtoken(fp, &token);
4355 while ((res != IPQOS_CONF_CURL_END) && (res != IPQOS_CONF_ERR) &&
4356 (res != IPQOS_CONF_EOF)) {
4359 res = readtoken(fp, &token);
4361 if (res != IPQOS_CONF_CURL_END) {
4401 res = read_enum_value(NULL, svalue, enum_nvs,
4403 if (res != IPQOS_CONF_SUCCESS)
4428 res = readrange(range, &lower, &upper);
4429 if (res != IPQOS_CONF_SUCCESS)
4635 int res;
4647 res = readuint8(proto_str, proto, &lo);
4648 if (res != IPQOS_CONF_SUCCESS || proto == 0) {
5056 int res;
5073 res = readtype(tfp, module, map_name, &type, &enum_nvs,
5075 if (res != IPQOS_CONF_SUCCESS) {
5113 res = nvlist_add_byte(*nvlp, tmpname,
5115 if (res != 0) {
5124 res = nvlist_add_uint32(*nvlp, tmpname,
5126 if (res != 0) {
5174 int res;
5215 res = readrange(token, lower, upper);
5216 if (res != IPQOS_CONF_SUCCESS) {
5414 int res;
5448 res = sscanf(lbuf,
5452 if (res < 2) {
5711 int res;
5721 res = readtoken(cfp, &name);
5726 if (res == IPQOS_CONF_EOF) {
5729 } else if (res == IPQOS_CONF_ERR) {
5730 return (res);
5731 } else if (res == IPQOS_CONF_CURL_END) {
5733 return (res);
5739 res = readtoken(cfp, &valst);
5744 if (res != IPQOS_CONF_SUCCESS && res != IPQOS_CONF_CURL_BEGIN) {
5745 if (res == IPQOS_CONF_EOF) {
5747 } else if (res == IPQOS_CONF_CURL_END) {
5809 res = nvlist_alloc(nvlp, NV_UNIQUE_NAME, 0);
5810 if (res != 0) {
5835 res = readifindex(valst, (int *)&ifidx);
5836 if (res == IPQOS_CONF_SUCCESS) {
5837 res = nvlist_add_uint32(*nvlp, IPGPC_IF_INDEX,
5839 if (res != 0) {
5863 res = readproto(valst, &proto);
5864 if (res == IPQOS_CONF_SUCCESS) {
5865 res = nvlist_add_byte(*nvlp, name, proto);
5866 if (res != 0) {
5876 res = readport(valst, &port);
5877 if (res == IPQOS_CONF_SUCCESS) {
5881 res = nvlist_add_uint16(*nvlp, name, port);
5882 if (res != 0) {
5891 res = nvlist_add_uint16(*nvlp,
5895 res = nvlist_add_uint16(*nvlp,
5898 if (res != 0) {
5909 res = nvlist_add_string(*nvlp, name, valst);
5910 if (res != 0) {
5918 res = readbool(valst, &b);
5919 if (res == IPQOS_CONF_SUCCESS) {
5920 res = nvlist_add_uint32(*nvlp, name,
5922 if (res != 0) {
5933 res = readuint8(valst, &u8, &tmp);
5934 if (res == IPQOS_CONF_SUCCESS) {
5935 res = nvlist_add_byte(*nvlp, name, u8);
5936 if (res != 0) {
5946 res = readint16(valst, &i16, &tmp);
5947 if (res == IPQOS_CONF_SUCCESS) {
5948 res = nvlist_add_int16(*nvlp, name, i16);
5949 if (res != 0) {
5960 res = readuint16(valst, &u16, &tmp);
5961 if (res == IPQOS_CONF_SUCCESS) {
5962 res = nvlist_add_uint16(*nvlp, name, u16);
5963 if (res != 0) {
5974 res = readint32(valst, &i32, &tmp);
5975 if (res == IPQOS_CONF_SUCCESS) {
5976 res = nvlist_add_int32(*nvlp, name, i32);
5977 if (res != 0) {
5988 res = readuint32(valst, &u32, &tmp);
5989 if (res == IPQOS_CONF_SUCCESS) {
5990 res = nvlist_add_uint32(*nvlp, name, u32);
5991 if (res != 0) {
6002 res = read_enum_value(cfp, valst, enum_nvs, &val);
6003 if (res == IPQOS_CONF_SUCCESS) {
6004 res = nvlist_add_uint32(*nvlp, name, val);
6005 if (res != 0) {
6024 res = readuint8(valst, &u8, &tmp);
6025 if (res == IPQOS_CONF_SUCCESS) {
6026 res = nvlist_add_byte(*nvlp, name, u8);
6027 if (res != 0) {
6036 res = read_mapped_values(tfp, nvlp, module_name,
6038 if (res != IPQOS_CONF_SUCCESS) {
6052 res = read_int_array_info(dfltst, &arr_enum_nvs, &size,
6054 if (res != IPQOS_CONF_SUCCESS) {
6062 res = read_int_array(cfp, valst, &arr, size, llimit,
6064 if (res != IPQOS_CONF_SUCCESS) {
6071 res = nvlist_add_int32_array(*nvlp, name, arr, size);
6072 if (res != 0) {
6089 res = readuser(valst, &uid);
6090 if (res == IPQOS_CONF_SUCCESS) {
6091 res = nvlist_add_int32(*nvlp, name, (int)uid);
6092 if (res != 0) {
6110 if (res != 0) {
6147 int res;
6160 res = read_curl_begin(cfp);
6161 if (res != IPQOS_CONF_SUCCESS) {
6162 return (res);
6172 res = readnvpair(cfp, tfp, ¶ms->nvlist,
6174 if (res == IPQOS_CONF_ERR) {
6179 } else if (res == IPQOS_CONF_CURL_END) {
6236 res = nvlist_add_string(params->nvlist,
6240 res = nvlist_add_string(params->nvlist,
6243 if (res != 0) {
6252 res = add_aref(¶ms->actions, nm, action);
6285 int res;
6302 res = add_aref(&cls->alist, src->alist->field, src->alist->name);
6303 if (res != IPQOS_CONF_SUCCESS) {
6305 return (res);
6473 int res;
6518 res = nvlist_dup(ofilter->nvlist, &nf->nvlist, 0);
6519 if (res != 0) {
6546 res = nvlist_add_byte(nf->nvlist, IPGPC_FILTER_TYPE,
6548 if (res != 0) {
6884 int res;
6906 res = read_curl_begin(cfp);
6907 if (res != IPQOS_CONF_SUCCESS) {
6916 res = readnvpair(cfp, NULL, &(*class)->nvlist,
6918 if (res == IPQOS_CONF_ERR) {
6922 } else if (res == IPQOS_CONF_CURL_END) {
6963 res = add_aref(&(*class)->alist,
6965 if (res != IPQOS_CONF_SUCCESS) {
7048 int res;
7209 res = dup_filter(filter, &nfilter, saf,
7211 if (res != IPQOS_CONF_SUCCESS) {
7239 res = dup_filter(filter, &nfilter, saf, !in32b, &saddr,
7241 if (res != IPQOS_CONF_SUCCESS) {
7267 res = dup_filter(filter, &nfilter, daf, !in32b, NULL,
7269 if (res != IPQOS_CONF_SUCCESS) {
7310 int res;
7345 res = read_curl_begin(cfp);
7346 if (res != IPQOS_CONF_SUCCESS) {
7358 res = readnvpair(cfp, tfp, &(*filter)->nvlist,
7360 if (res == IPQOS_CONF_ERR) {
7365 } else if (res == IPQOS_CONF_CURL_END) {
7512 res = nvlist_add_byte(
7515 if (res != 0) {
7523 res = nvlist_add_uint32_array((*filter)->nvlist,
7526 if (res != 0) {
7539 res = readuint8(sl, &mlen, &lo);
7540 if (res != IPQOS_CONF_SUCCESS ||
7558 res = nvlist_add_uint32_array((*filter)->nvlist,
7561 if (res != 0) {
7667 int res;
7670 res = readtoken(cfp, &st);
7672 if (res != IPQOS_CONF_CURL_BEGIN) {
7673 if (res == IPQOS_CONF_EOF) {
7677 } else if (res != IPQOS_CONF_ERR) {
7788 int res;
7802 res = readtoken(cfp, &st);
7803 if (res == IPQOS_CONF_ERR || res == IPQOS_CONF_EOF) {
7804 return (res);
7827 res = read_curl_begin(cfp);
7828 if (res != IPQOS_CONF_SUCCESS) {
7838 res = readnvpair(cfp, NULL, &(*action)->nvlist, &nvp, &type,
7840 if (res == IPQOS_CONF_ERR) {
7845 } else if (res == IPQOS_CONF_CURL_END) {
7937 res = read_perm_items(0, tfp, (*action)->module,
7939 if (res != IPQOS_CONF_SUCCESS) {
7945 res = read_perm_items(1, tfp, (*action)->module,
7947 if (res != IPQOS_CONF_SUCCESS) {
7976 res = readtoken(cfp, &st);
7978 if (res == IPQOS_CONF_ERR) {
7980 } else if (res == IPQOS_CONF_EOF) {
7986 } else if (res == IPQOS_CONF_CURL_END) {
8001 res = readfilter(cfp, tfp, (*action)->module, &filter,
8003 if (res != IPQOS_CONF_SUCCESS) {
8015 res = domultihome(filter, &(*action)->filters,
8023 if (res != IPQOS_CONF_SUCCESS) {
8068 res = readclass(cfp, (*action)->module, &class,
8071 if (res != IPQOS_CONF_SUCCESS) {
8087 res = readparams(cfp, tfp, (*action)->module,
8089 if (res != IPQOS_CONF_SUCCESS) {
8222 int res;
8316 res = add_aref(&dact->dependencies, NULL, act->name);
8317 if (res != IPQOS_CONF_SUCCESS) {
8351 res = add_aref(&dact->dependencies, NULL,
8353 if (res != IPQOS_CONF_SUCCESS) {
8405 int res;
8413 res = readtoken(cfp, &sp);
8414 if (res != IPQOS_CONF_SUCCESS) {
8425 res = readtoken(cfp, &sp);
8426 if (res != IPQOS_CONF_SUCCESS) {
8458 int res;
8492 res = readaction(cfp, &action);
8493 if (res == IPQOS_CONF_ERR) {
8499 if (res == IPQOS_CONF_EOF) {
8537 int res;
8555 res = ipp_list_mods(&modnames, &nmods);
8556 if (res != 0) {
8595 res = ipp_mod_list_actions(modnames[x], &actnames, &nacts);
8596 if (res != 0) {
8621 res = ipp_action_info(actnames[y],
8624 if (res != 0) {
9025 int res;
9039 res = ipp_list_mods(&modnames, &nmods);
9040 if (res != 0) {
9052 res = ipp_mod_list_actions(modnames[x], &actnames, &nacts);
9053 if (res != 0) {
9061 res = ipp_action_destroy(actnames[y], IPP_DESTROY_REF);
9066 if (res != 0 && errno != ENOENT && errno != EBUSY) {
9073 if (res == 0)
9095 int res;
9101 res = flush(&modified);
9102 if ((force_flush == B_FALSE) && (res != IPQOS_CONF_SUCCESS) &&
9105 } else if (res == IPQOS_CONF_SUCCESS) {
9113 while (res != IPQOS_CONF_SUCCESS) {
9121 res = flush(&modified);
9136 int res;
9141 if ((res = block_all_signals()) == -1)
9144 res = atomic_flush(B_FALSE);
9151 if (res == IPQOS_CONF_SUCCESS) {
9157 return (res);
9298 int res;
9362 res = printaction(tmpfp, act, 0, 0);
9363 if (res != IPQOS_CONF_SUCCESS) {
9366 return (res);
9442 int res;
9459 res = applydiff(oconf, NULL);
9463 if (res != IPQOS_CONF_SUCCESS) {
9483 int res;
9504 res = readconf(ifp, &conf);
9505 if (res != IPQOS_CONF_SUCCESS) {
9511 res = validconf(conf, 1);
9512 if (res != IPQOS_CONF_SUCCESS) {
9518 res = readkconf(&oconf);
9519 if (res != IPQOS_CONF_SUCCESS) {
9556 res = validconf(oconf, 0);
9557 if (res != IPQOS_CONF_SUCCESS) {
9563 res = diffconf(oconf, conf);
9564 if (res != IPQOS_CONF_SUCCESS) {
9570 if ((res = block_all_signals()) == -1) {
9571 res = IPQOS_CONF_ERR;
9577 res = applydiff(conf, oconf);
9579 if (force_rback || res != IPQOS_CONF_SUCCESS) {
9581 if (res != IPQOS_CONF_SUCCESS) {
9584 res = rollback(conf, oconf);
9585 if (res != IPQOS_CONF_SUCCESS) {
9586 res = rollback_recover(oconf);
9587 if (res != IPQOS_CONF_SUCCESS) {
9592 res = IPQOS_CONF_RECOVER_ERR;
9597 res = IPQOS_CONF_ERR;
9603 res = IPQOS_CONF_ERR;
9610 res = retry_name_lookups(conf);
9611 if (res != IPQOS_CONF_SUCCESS) {
9612 res = rollback(conf, oconf);
9613 if (res != IPQOS_CONF_SUCCESS) {
9614 res = rollback_recover(oconf);
9615 if (res != IPQOS_CONF_SUCCESS) {
9620 res = IPQOS_CONF_RECOVER_ERR;
9625 res = IPQOS_CONF_ERR;
9631 res = IPQOS_CONF_ERR;
9653 if (res == IPQOS_CONF_RECOVER_ERR)
9655 return (res);
9847 int res;
9859 res = readconf(ifp, &conf);
9860 if (res != IPQOS_CONF_SUCCESS) {
9867 res = printaction(stdout, act, viewall, 0);
9868 if (res != IPQOS_CONF_SUCCESS) {
9870 return (res);