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