Lines Matching defs:class

433 /* **************** kernel filter/class/params manipulation fns *********** */
532 * add a class to the kernel action action_name called class_name with
548 IPQOSCDBG4(APPLY, "add_class: action: %s, class: %s, "
559 /* add 'add class' config type */
574 /* add class name */
613 gettext("Failed to create class %s in action "
629 * modify the class in the kernel action action_name called class_name with
646 IPQOSCDBG5(APPLY, "modify_class: action: %s, class: %s, first: %s, "
657 /* add 'modify class' config type */
673 /* add class name */
703 gettext("Modifying class %s in action %s failed: %s.\n"),
716 * removes the class class_name from the kernel action action_name. The
718 * result in the action this class references being destroyed.
731 IPQOSCDBG3(APPLY, "remove_class: action: %s, class: %s, "
740 /* add 'remove class' config type */
756 /* add class name */
767 gettext("Removing class %s in action %s failed: %s.\n"),
794 "instance: %d, class: %s\n", action_name, flt->name,
819 /* add class name to nvlist */
918 "instance: %d, class: %s\n", action_name, flt->name,
964 /* add class name to nvlist */
1152 * difference class old against class new. It marks the new class as
1166 IPQOSCDBG1(DIFF, "marking class %s as modified\n", new->name);
1174 IPQOSCDBG1(DIFF, "marking class %s as modified\n", new->name);
1238 /* compare class name */
1296 IPQOSCDBG1(DIFF, "Marking prm class %s as modified.\n",
1301 IPQOSCDBG1(DIFF, "Marking class %s as del.\n",
1342 IPQOSCDBG1(DIFF, "Marking prm class %s as modified.\n",
1348 IPQOSCDBG1(DIFF, "Marking class %s as new.\n",
1477 * that are new/modified, approriately in the new class, and any removed
1478 * in the old class appropriately. Also marks the action which has had an
1502 /* if we created original class mark for deletion */
1505 IPQOSCDBG1(DIFF, "marking class %s for del\n",
1514 * if permanent class and next action created by us
1516 * add it to new action. This will cause the class
1517 * to be marked as and modified. This returns the class
1519 * case where the class is pointing at an action
1528 /* copy class */
1550 /* new ipqosconf class */
1555 IPQOSCDBG1(DIFF, "marking class %s new\n",
1563 /* existing ipqosconf/perm class */
2386 * the class is marked as new or if rem_undo is true and the class is
2387 * marked as deleted then add the class to the kernel action named by action
2403 /* for each class */
2406 * skip class if in normal mode and not new class or
2407 * if doing rollback and class wasn't deleted.
2414 /* add class to action */
2421 /* mark class as created */
2560 "class %s\n", cls->name);
2619 /* apply any class mods */
2721 /* for each class in action if class modified switch back */
3532 * print a class clause for class to fp. If printall is set the originator
3538 ipqos_conf_class_t *class,
3554 get_originator_nm(class->originator));
3561 quote_ws_string(class->name));
3564 print_action_nm(fp, class->alist->name);
3567 class->stats_enable == B_TRUE ? "true" : "false");
3629 /* print name and class */
3788 * print classes clause for each class if printall is set, else
4035 * check whether name is a valid action/class/filter name.
6270 /* ************************* class manip fns ****************************** */
6275 * make dst point at a dupicate class struct with duplicate elements to src.
6287 IPQOSCDBG1(DIFF, "In dup_class: class: %s\n", src->name);
6296 /* we're not interested in the nvlist for a class */
6314 * create a zero'd class struct and return a ptr to it.
6321 ipqos_conf_class_t *class;
6323 class = malloc(sizeof (ipqos_conf_class_t));
6324 if (class) {
6325 bzero(class, sizeof (ipqos_conf_class_t));
6330 return (class);
6350 /* finally free class itself */
6355 * Checks whether there is a class called class_nm in classes list.
6356 * RETURNS: ptr to first matched class, else if not matched NULL.
6871 * read a class clause from cfp into a class struct and point class at this.
6878 ipqos_conf_class_t **class,
6893 /* create and zero class struct */
6895 *class = alloc_class();
6896 if (!*class) {
6899 (*class)->originator = IPP_CONFIG_IPQOSCONF;
6902 (*class)->lineno = lineno;
6916 res = readnvpair(cfp, NULL, &(*class)->nvlist,
6921 /* reached end of class clause */
6928 * and place values in class structure.
6941 (void) strcpy((*class)->name, name);
6963 res = add_aref(&(*class)->alist,
6970 /* class stats enable */
6978 (*class)->stats_enable = bl;
6992 gettext("Missing class name/next action before line %u.\n"),
6997 /* change class originator field to permanent if permanent class */
6999 if (in_string_table(perm_classes, num_perm_classes, (*class)->name)) {
7000 IPQOSCDBG1(L0, "Setting class %s as permanent.\n", (*class)->name);
7001 (*class)->originator = IPP_CONFIG_PERMANENT;
7006 if (*class)
7007 free_class(*class);
7325 char *class;
7370 * catch name and class and place value into filter
7394 /* read class name */
7405 if (nvpair_value_string(nvp, &class) != 0) {
7409 if (valid_name(class) != IPQOS_CONF_SUCCESS) {
7412 (void) strcpy((*filter)->class_name, class);
7635 ipqos_msg(MT_ERROR, gettext("Missing filter/class name "
7794 ipqos_conf_class_t *class;
7972 /* read filter/class/params blocks until CURL_END */
7993 * read in either a filter/class or parameter block.
8064 /* read class */
8068 res = readclass(cfp, (*action)->module, &class,
8075 ADD_TO_LIST(&(*action)->classes, class);
8098 gettext("Params/filter/class clause expected "
8243 * check they are unique in this action and their class exists.
8260 * check existence of class and error if
8261 * class doesn't exist and not a perm class
8271 "class in filter %s, "
8284 /* check if class name unique (userland only) */
8288 gettext("Duplicate named class %s in "
8308 gettext("Undefined action in class %s, "
8665 ipqos_conf_class_t *class = NULL;
8701 * parse the passed class nvlist
8702 * and add result to action's class list.
8704 class = alloc_class();
8705 if (class == NULL) {
8710 ret = parse_kclass(class, nvl);
8712 free_class(class);
8717 ADD_TO_LIST(&action->classes, class);
8849 ipqos_conf_class_t *class,
8863 class->originator = u32;
8865 class->originator = IPP_CONFIG_IPQOSCONF;
8871 (void) strlcpy(class->name, str, IPQOS_CONF_NAME_LEN);
8872 IPQOSCDBG1(KRET, "reading class %s\n", class->name);
8877 ret = add_aref(&class->alist, NULL, str);
8886 class->stats_enable = *(boolean_t *)&u32;
8933 /* lookup class name */