Lines Matching defs:flt

785  * add the filter flt to the kernel action named action_name.
791 ipqos_conf_filter_t *flt,
795 nvlist_t *nvl = flt->nvlist;
799 "instance: %d, class: %s\n", action_name, flt->name,
800 flt->instance, flt->class_name);
819 if (nvlist_add_string(nvl, CLASSIFIER_FILTER_NAME, flt->name) != 0) {
825 if (nvlist_add_string(nvl, CLASSIFIER_CLASS_NAME, flt->class_name) !=
841 if (flt->src_nd_name != NULL &&
843 flt->src_nd_name) != 0) {
847 if (flt->dst_nd_name != NULL &&
849 flt->dst_nd_name) != 0) {
859 if (flt->ip_versions != 0) {
860 (void) sprintf(ipvsbuf, "%d", flt->ip_versions);
871 flt->instance) != 0) {
877 if (ipp_action_modify(action_name, &flt->nvlist, 0) != 0) {
884 "%s in action %s.\n"), flt->name, action_name);
897 "%s: %s.\n"), flt->name, action_name,
909 * modify the filter flt in the kernel action named action_name.
915 ipqos_conf_filter_t *flt,
919 nvlist_t *nvl = flt->nvlist;
923 "instance: %d, class: %s\n", action_name, flt->name,
924 flt->instance, flt->class_name);
964 if (nvlist_add_string(nvl, CLASSIFIER_FILTER_NAME, flt->name) != 0) {
970 if (nvlist_add_string(nvl, CLASSIFIER_CLASS_NAME, flt->class_name) !=
986 if (flt->src_nd_name &&
988 flt->src_nd_name) != 0) {
992 if (flt->dst_nd_name &&
994 flt->dst_nd_name) != 0) {
1004 if (flt->ip_versions != 0) {
1005 (void) sprintf(ipvsbuf, "%d", flt->ip_versions);
1016 flt->instance) != 0) {
1022 if (ipp_action_modify(action_name, &flt->nvlist, 0) != 0) {
1029 flt->name, action_name);
1036 "%s.\n"), flt->name, action_name, strerror(errno));
1277 ipqos_conf_filter_t *flt;
1284 for (flt = action->filters; flt; flt = flt->next) {
1285 if (flt->originator == IPP_CONFIG_PERMANENT) {
1287 flt->name);
1289 flt->modified = B_TRUE;
1292 flt->name);
1294 flt->todel = B_TRUE;
1321 ipqos_conf_filter_t *flt;
1329 for (flt = action->filters; flt; flt = flt->next) {
1330 if (flt->originator == IPP_CONFIG_PERMANENT) {
1332 flt->name);
1334 flt->modified = B_TRUE;
1338 flt->name);
1340 flt->new = B_TRUE;
1598 ipqos_conf_filter_t *flt;
1606 for (flt = new->filters; flt; flt = flt->next) {
1610 if ((tmpf = filterexist(flt->name, -1, old->filters)) == NULL) {
1615 "new\n", flt->name);
1617 flt->new = B_TRUE;
1620 if (flt->next == NULL ||
1621 strcmp(flt->next->name, flt->name) != 0) {
1624 flt = flt->next;
1635 flt->src_nd_name || flt->dst_nd_name) {
1658 strcmp(tmpf->name, flt->name) == 0);
1673 flt->name, newi);
1675 flt->new = B_TRUE;
1676 flt->instance = newi++;
1677 if (flt->next == NULL ||
1678 strcmp(flt->next->name,
1679 flt->name) != 0) {
1682 flt = flt->next;
1693 res = difffilter(tmpf, flt, new->module);
1697 if (flt->modified == B_TRUE) {
1712 for (flt = old->filters; flt; flt = flt->next) {
1714 if (flt->originator == IPP_CONFIG_IPQOSCONF &&
1715 filterexist(flt->name, -1, new->filters) == NULL) {
1719 IPQOSCDBG2(DIFF, "marking flt %s, inst %d "
1720 "for del\n", flt->name, flt->instance);
1722 flt->todel = B_TRUE;
1725 if (flt->next == NULL ||
1726 strcmp(flt->next->name, flt->name) != 0) {
1729 flt = flt->next;
2361 ipqos_conf_filter_t *flt;
2366 for (flt = filters; flt; flt = flt->next) {
2371 if ((rem_undo == B_FALSE && flt->new == B_FALSE) ||
2372 (rem_undo == B_TRUE && flt->deleted == B_FALSE)) {
2377 if (add_filter(action, flt, module_version) !=
2383 flt->cr_mod = B_TRUE;
2477 ipqos_conf_filter_t *flt;
2529 for (flt = act->filters; flt; flt = flt->next) {
2530 if ((add_undo == B_FALSE && flt->todel == B_TRUE) ||
2531 (add_undo == B_TRUE && flt->new == B_TRUE &&
2532 flt->cr_mod == B_TRUE)) {
2536 res = remove_filter(act->name, flt->name,
2537 flt->instance, act->module_version);
2540 "filter %s, inst: %d\n", flt->name,
2541 flt->instance);
2548 flt->deleted = B_TRUE;
2595 ipqos_conf_filter_t *flt;
2642 for (flt = act->filters; flt; flt = flt->next) {
2643 if (flt->modified) {
2644 res = modify_filter(act->name, flt,
2651 flt->cr_mod = B_TRUE;
2675 ipqos_conf_filter_t *flt;
2713 for (flt = act->filters; flt; flt = flt->next) {
2714 if (flt->modified == B_TRUE &&
2715 flt->cr_mod == B_TRUE) {
2716 oldflt = filterexist(flt->name, -1,
2756 for (flt = act->filters; flt != NULL; flt = flt->next) {
2757 if (flt->originator == IPP_CONFIG_PERMANENT) {
2758 res = modify_filter(act->name, flt,
3171 ipqos_conf_filter_t *flt, /* used to determine if node name set */
3305 0 && flt->src_nd_name ||
3307 0 && flt->dst_nd_name)) {
3769 ipqos_conf_filter_t *flt;
3809 for (flt = action->filters; flt != NULL; flt = flt->next) {
3811 flt->originator == IPP_CONFIG_IPQOSCONF ||
3812 flt->originator == IPP_CONFIG_PERMANENT) {
3814 res = printfilter(fp, action->module, &flt, printall,
6425 ipqos_conf_filter_t *flt;
6427 flt = malloc(sizeof (ipqos_conf_filter_t));
6428 if (flt) {
6429 bzero(flt, sizeof (ipqos_conf_filter_t));
6430 flt->instance = -1;
6435 return (flt);
6438 /* free flt and all it's contents. */
6441 free_filter(ipqos_conf_filter_t *flt)
6444 IPQOSCDBG2(L1, "In free_filter: filter: %s, inst: %d\n", flt->name,
6445 flt->instance);
6447 if (flt == NULL)
6450 if (flt->src_nd_name)
6451 free(flt->src_nd_name);
6452 if (flt->dst_nd_name)
6453 free(flt->dst_nd_name);
6454 if (flt->nvlist) {
6455 nvlist_free(flt->nvlist);
6457 free(flt);
6656 ipqos_conf_filter_t *flt, *nf;
6677 flt = act->filters;
6678 while (flt != NULL) {
6679 nf = flt->next;
6680 free_filter(flt);
6681 flt = nf;
6698 flt = act->retry_filters;
6699 while (flt != NULL) {
6700 nf = flt->next;
6701 free_filter(flt);
6702 flt = nf;
8231 ipqos_conf_filter_t *flt;
8253 for (flt = act->filters; flt; flt = flt->next) {
8257 if (filterexist(flt->name, flt->instance,
8258 flt->next)) {
8261 "%s in action %s.\n"), flt->name,
8271 if (!classexist(flt->class_name,
8275 flt->class_name)) {
8279 "action %s.\n"), flt->name,
9250 ipqos_conf_filter_t *flt;
9263 for (flt = act->retry_filters; flt != NULL; flt = flt->next) {
9265 if (domultihome(flt, new_filters, B_TRUE) !=
9270 if (flt->nlerr == 0) {
9278 for (flt = *new_filters; flt != NULL; flt = flt->next) {
9279 if (add_filter(act->name, flt, act->module_version) !=