Lines Matching refs:act

235 static int add_action(ipqos_conf_action_t *act);
1385 ipqos_conf_action_t *act; in diffconf() local
1392 for (act = new; act; act = act->next) { in diffconf()
1396 if ((tmp = actionexist(act->name, old)) == NULL) { in diffconf()
1397 IPQOSCDBG1(DIFF, "marking act %s as new\n", act->name); in diffconf()
1399 act->new = B_TRUE; in diffconf()
1400 mark_classes_filters_new(act); in diffconf()
1406 res = diffaction(tmp, act); in diffconf()
1417 for (act = old; act; act = act->next) { in diffconf()
1418 if (act->params->originator == IPP_CONFIG_IPQOSCONF && in diffconf()
1419 actionexist(act->name, new) == NULL) { in diffconf()
1420 IPQOSCDBG1(DIFF, "marking act %s for del\n", act->name); in diffconf()
1422 act->todel = B_TRUE; in diffconf()
1423 mark_classes_filters_del(act); in diffconf()
2142 ipqos_conf_action_t *act; in add_items() local
2151 act = actionexist(IPGPC_CLASSIFY, actions); in add_items()
2152 if (act && in add_items()
2153 (rem_undo == B_FALSE && act->new == B_TRUE || in add_items()
2154 rem_undo == B_TRUE && act->deleted == B_TRUE)) { in add_items()
2156 res = add_action(act); in add_items()
2167 for (act = actions; act; act = act->next) { in add_items()
2168 res = add_item(act, rem_undo); in add_items()
2188 ipqos_conf_action_t *act = actions; in add_item() local
2198 if (act->visited == ADD_VISITED) { in add_item()
2202 act->visited = ADD_VISITED; in add_item()
2207 for (cls = act->classes; cls; cls = cls->next) { in add_item()
2219 for (pact = act->params->actions; pact; pact = pact->next) { in add_item()
2234 if (((rem_undo == B_FALSE && act->new == B_TRUE) || in add_item()
2235 (rem_undo == B_TRUE && act->deleted == B_TRUE)) && in add_item()
2236 strcmp(act->name, IPGPC_CLASSIFY) != 0) { in add_item()
2237 res = add_action(act); in add_item()
2245 if (add_classes(act->classes, act->name, act->module_version, in add_item()
2247 add_filters(act->filters, act->name, act->module_version, in add_item()
2264 add_action(ipqos_conf_action_t *act) in add_action() argument
2270 IPQOSCDBG2(APPLY, "add_action: action: %s, module: %s\n", act->name, in add_action()
2271 act->module); in add_action()
2273 nvl = &act->params->nvlist; in add_action()
2289 (uint32_t)act->module_version) != 0) { in add_action()
2297 (uint32_t)act->params->stats_enable) != 0) { in add_action()
2310 res = ipp_action_create(act->module, act->name, nvl, 0); in add_action()
2313 act->name, act->module); in add_action()
2320 act->name); in add_action()
2325 "%s.\n"), act->name); in add_action()
2329 "%s: %s.\n"), act->name, strerror(errno)); in add_action()
2336 act->cr_mod = B_TRUE; in add_action()
2440 ipqos_conf_action_t *act; in remove_items() local
2448 for (act = actions; act; act = act->next) { in remove_items()
2449 res = remove_item(act, add_undo); in remove_items()
2467 ipqos_conf_action_t *act, in remove_item() argument
2477 act->name, add_undo, act->modified); in remove_item()
2482 if (act->visited == REM_VISITED) { in remove_item()
2486 act->visited = REM_VISITED; in remove_item()
2491 if (add_undo == B_FALSE && act->todel == B_TRUE || in remove_item()
2492 add_undo == B_TRUE && act->new == B_TRUE && in remove_item()
2493 act->cr_mod == B_TRUE) { in remove_item()
2497 for (dep = act->dependencies; dep; dep = dep->next) { in remove_item()
2506 IPQOSCDBG1(APPLY, "deleting action %s\n", act->name); in remove_item()
2507 res = ipp_action_destroy(act->name, 0); in remove_item()
2510 act->name); in remove_item()
2516 act->deleted = B_TRUE; in remove_item()
2520 } else if (act->modified == B_TRUE) { in remove_item()
2524 for (flt = act->filters; flt; flt = flt->next) { in remove_item()
2531 res = remove_filter(act->name, flt->name, in remove_item()
2532 flt->instance, act->module_version); in remove_item()
2549 for (cls = act->classes; cls; cls = cls->next) { in remove_item()
2556 res = remove_class(act->name, cls->name, in remove_item()
2557 act->module_version, 0); in remove_item()
2573 act->cr_mod = B_TRUE; in remove_item()
2588 ipqos_conf_action_t *act; in modify_items() local
2598 for (act = actions; act; act = act->next) { in modify_items()
2602 if (act->modified == B_FALSE) { in modify_items()
2608 if (act->params->modified) { in modify_items()
2609 res = modify_params(act->name, in modify_items()
2610 &act->params->nvlist, in modify_items()
2611 act->module_version, act->params->stats_enable); in modify_items()
2616 act->params->cr_mod = B_TRUE; in modify_items()
2621 for (cls = act->classes; cls; cls = cls->next) { in modify_items()
2623 res = modify_class(act->name, cls->name, in modify_items()
2624 act->module_version, cls->stats_enable, in modify_items()
2637 for (flt = act->filters; flt; flt = flt->next) { in modify_items()
2639 res = modify_filter(act->name, flt, in modify_items()
2640 act->module_version); in modify_items()
2652 act->cr_mod = B_TRUE; in modify_items()
2672 ipqos_conf_action_t *act; in undo_modifys() local
2682 for (act = nactions; act; act = act->next) { in undo_modifys()
2683 oldact = actionexist(act->name, oactions); in undo_modifys()
2696 if (act->params->modified == B_TRUE && in undo_modifys()
2697 act->params->cr_mod == B_TRUE) { in undo_modifys()
2698 res = modify_params(act->name, in undo_modifys()
2700 act->module_version, act->params->stats_enable); in undo_modifys()
2708 for (flt = act->filters; flt; flt = flt->next) { in undo_modifys()
2713 res = modify_filter(act->name, oldflt, in undo_modifys()
2714 act->module_version); in undo_modifys()
2723 for (cls = act->classes; cls; cls = cls->next) { in undo_modifys()
2728 res = modify_class(act->name, in undo_modifys()
2729 cls->name, act->module_version, in undo_modifys()
2745 for (act = oactions; act != NULL; act = act->next) { in undo_modifys()
2747 if (act->deleted == B_FALSE) { in undo_modifys()
2751 for (flt = act->filters; flt != NULL; flt = flt->next) { in undo_modifys()
2753 res = modify_filter(act->name, flt, in undo_modifys()
2754 act->module_version); in undo_modifys()
2761 for (cls = act->classes; cls != NULL; cls = cls->next) { in undo_modifys()
2763 res = modify_class(act->name, cls->name, in undo_modifys()
2764 act->module_version, cls->stats_enable, in undo_modifys()
6648 ipqos_conf_action_t *act = actions; in free_actions() local
6653 while (act != NULL) { in free_actions()
6656 if (act->params != NULL) { in free_actions()
6657 free_arefs(act->params->actions); in free_actions()
6658 if (act->params->nvlist != NULL) { in free_actions()
6659 nvlist_free(act->params->nvlist); in free_actions()
6661 free(act->params); in free_actions()
6666 if (act->nvlist != NULL) in free_actions()
6667 free(act->nvlist); in free_actions()
6671 flt = act->filters; in free_actions()
6680 cls = act->classes; in free_actions()
6688 cleanup_string_table(act->perm_classes, act->num_perm_classes); in free_actions()
6692 flt = act->retry_filters; in free_actions()
6700 free_arefs(act->dependencies); in free_actions()
6702 next = act->next; in free_actions()
6703 free(act); in free_actions()
6704 act = next; in free_actions()
6883 int nm, act; in readclass() local
6913 stats = nm = act = 0; in readclass()
6946 } else if (act == 0 && in readclass()
6968 act++; in readclass()
6990 if (nm == 0 || act == 0) { in readclass()
8221 ipqos_conf_action_t *act; in validconf() local
8239 for (act = actions; act; act = act->next) { in validconf()
8246 for (flt = act->filters; flt; flt = flt->next) { in validconf()
8255 act->name); in validconf()
8265 act->classes)) { in validconf()
8266 if (!in_string_table(act->perm_classes, in validconf()
8267 act->num_perm_classes, in validconf()
8273 act->name); in validconf()
8282 for (cls = act->classes; cls; cls = cls->next) { in validconf()
8289 "action %s.\n"), cls->name, act->name); in validconf()
8309 "action %s.\n"), cls->name, act->name); in validconf()
8316 res = add_aref(&dact->dependencies, NULL, act->name); in validconf()
8320 dact->dependencies->action = act; in validconf()
8326 params = act->params; in validconf()
8344 SHORT_NAME(aref->field), act->name); in validconf()
8352 act->name); in validconf()
8356 dact->dependencies->action = act; in validconf()
8367 for (act = actions; act; act = act->next) { in validconf()
8371 if (in_cycle(act)) { in validconf()
8374 act->name); in validconf()
8380 if (act->dependencies == NULL && in validconf()
8381 strcmp(act->name, IPGPC_CLASSIFY) != 0) { in validconf()
8383 "referenced by any other actions.\n"), act->name); in validconf()
8754 char *act; in parse_kparams() local
8819 (void) nvpair_value_string(nvp, &act); in parse_kparams()
8820 ret = add_aref(&params->actions, nvpair_name(nvp), act); in parse_kparams()
9241 ipqos_conf_action_t *act; in retry_name_lookups() local
9247 for (act = actions; act != NULL; act = act->next) { in retry_name_lookups()
9250 GET_LIST_END(&act->filters, &new_filters); in retry_name_lookups()
9256 for (flt = act->retry_filters; flt != NULL; flt = flt->next) { in retry_name_lookups()
9272 if (add_filter(act->name, flt, act->module_version) != in retry_name_lookups()
9297 ipqos_conf_action_t *act; in writeconf() local
9360 for (act = conf; act != NULL; act = act->next) { in writeconf()
9361 if (act->params->originator == IPP_CONFIG_IPQOSCONF) { in writeconf()
9362 res = printaction(tmpfp, act, 0, 0); in writeconf()
9482 ipqos_conf_action_t *act, *oact; local
9532 for (act = conf; act != NULL; act = act->next) {
9535 if (strcmp(act->name, oact->name) == 0) {
9537 if (strcmp(act->module, oact->module) != 0) {
9543 act->lineno);
9800 ipqos_conf_action_t *act; local
9821 for (act = conf; act != NULL; act = act->next) {
9822 ret = printaction(stdout, act, viewall, 0);
9846 ipqos_conf_action_t *act; local
9866 for (act = conf; act != NULL; act = act->next) {
9867 res = printaction(stdout, act, viewall, 0);