Lines Matching defs:group

2582 			FR_VERBOSE(("group %s\n", FR_NAME(fr, fr_grhead)));
2650 char group[FR_GROUPLEN];
2659 bcopy(fin->fin_group, group, FR_GROUPLEN);
2667 bcopy(group, fin->fin_group, FR_GROUPLEN);
3492 /* Returns: frgroup_t * - NULL = group not found, else pointer to group */
3494 /* group(I) - group name to search for */
3495 /* unit(I) - device to which this group belongs */
3498 /* to where to add the next (last) group or where */
3499 /* to delete group from. */
3501 /* Search amongst the defined groups for a particular group number. */
3504 ipf_findgroup(softc, group, unit, set, fgpp)
3506 char *group;
3520 if (strncmp(group, fg->fg_name, FR_GROUPLEN) == 0)
3533 /* Returns: frgroup_t * - NULL == did not create group, */
3534 /* != NULL == pointer to the group */
3536 /* num(I) - group number to add */
3539 /* unit(I) - device to which this group will belong to */
3543 /* Add a new group head, or if it already exists, increase the reference */
3547 ipf_group_add(softc, group, head, flags, unit, set)
3549 char *group;
3558 if (group == NULL)
3561 if (unit == IPL_LOGIPF && *group == '\0')
3567 fg = ipf_findgroup(softc, group, unit, set, &fgp);
3584 bcopy(group, fg->fg_name, strlen(group) + 1);
3598 /* group(I) - group name to delete */
3599 /* fr(I) - filter rule from which group is referenced */
3602 /* This function is called whenever a reference to a group is to be dropped */
3603 /* and thus its reference count needs to be lowered and the group free'd if */
3608 ipf_group_del(softc, group, fr)
3610 frgroup_t *group;
3614 if (group->fg_head == fr)
3615 group->fg_head = NULL;
3617 group->fg_ref--;
3618 if ((group->fg_ref == 0) && (group->fg_start == NULL))
3619 ipf_group_free(group);
3626 /* Parameters: group(I) - pointer to filter rule group */
3628 /* Remove the group from the list of groups and free it. */
3631 ipf_group_free(group)
3632 frgroup_t *group;
3636 for (gp = group->fg_set; *gp != NULL; gp = &(*gp)->fg_next) {
3637 if (*gp == group) {
3638 *gp = group->fg_next;
3642 KFREE(group);
3648 /* Returns: int - number of rules flush from group */
3650 /* Parameters: group(I) - pointer to filter rule group */
3652 /* Remove all of the rules that currently are listed under the given group. */
3655 ipf_group_flush(softc, group)
3657 frgroup_t *group;
3661 (void) ipf_flushlist(softc, &gone, &group->fg_start);
3673 /* group(I) - group name */
3676 /* Find rule # n in group # g and return a pointer to it. Return NULl if */
3677 /* group # g doesn't exist or there are less than n rules in the group. */
3680 ipf_getrulen(softc, unit, group, n)
3683 char *group;
3689 fg = ipf_findgroup(softc, group, unit, softc->ipf_active, NULL);
3709 /* encountered. if a rule is the head of a group and it has lost all its */
3710 /* group members, then also delete the group reference. nfreedp is needed */
3814 /* grhead(I) - pointer to the start of the group list to flush */
3817 /* Walk through all of the groups under the given group head and remove all */
3822 /* removed from the group then it is necessary to start again. */
4491 char *group;
4618 * Check that each group name in the rule has a start index that
4655 group = FR_NAME(fp, fr_group);
4657 fg = ipf_group_add(softc, group, NULL,
4661 fg = ipf_findgroup(softc, group, unit,
4680 * If a rule is going to be part of a group then it does
4682 * isn't in a group, then it does...
5013 * For SIOCAD*FR, this should be the last rule in the group of
5125 group = FR_NAME(fp, fr_icmphead);
5126 fg = ipf_group_add(softc, group, fp, 0, unit, set);
5132 group = FR_NAME(fp, fr_grhead);
5133 fg = ipf_group_add(softc, group, fp, fp->fr_flags,
5569 /* Looks for group hash table fr_arg and stores a pointer to it in fr_ptr. */
5628 /* Look for a rule group head in a hash table, using the source address as */
5629 /* the key, and descend into that group and continue matching rules against */
5658 /* Look for a rule group head in a hash table, using the destination */
5659 /* address as the key, and descend into that group and continue matching */
7877 /* find the 'next rule'. This may include searching rule group lists or */
8440 /* rules belonging to the head group this rule specifies. */