Lines Matching defs:group

2578 			FR_VERBOSE(("group %s\n", FR_NAME(fr, fr_grhead)));
2646 char group[FR_GROUPLEN];
2655 bcopy(fin->fin_group, group, FR_GROUPLEN);
2663 bcopy(group, fin->fin_group, FR_GROUPLEN);
3481 /* Returns: frgroup_t * - NULL = group not found, else pointer to group */
3483 /* group(I) - group name to search for */
3484 /* unit(I) - device to which this group belongs */
3487 /* to where to add the next (last) group or where */
3488 /* to delete group from. */
3490 /* Search amongst the defined groups for a particular group number. */
3493 ipf_findgroup(softc, group, unit, set, fgpp)
3495 char *group;
3509 if (strncmp(group, fg->fg_name, FR_GROUPLEN) == 0)
3522 /* Returns: frgroup_t * - NULL == did not create group, */
3523 /* != NULL == pointer to the group */
3525 /* num(I) - group number to add */
3528 /* unit(I) - device to which this group will belong to */
3532 /* Add a new group head, or if it already exists, increase the reference */
3536 ipf_group_add(softc, group, head, flags, unit, set)
3538 char *group;
3547 if (group == NULL)
3550 if (unit == IPL_LOGIPF && *group == '\0')
3556 fg = ipf_findgroup(softc, group, unit, set, &fgp);
3573 bcopy(group, fg->fg_name, strlen(group) + 1);
3587 /* group(I) - group name to delete */
3588 /* fr(I) - filter rule from which group is referenced */
3591 /* This function is called whenever a reference to a group is to be dropped */
3592 /* and thus its reference count needs to be lowered and the group free'd if */
3597 ipf_group_del(softc, group, fr)
3599 frgroup_t *group;
3603 if (group->fg_head == fr)
3604 group->fg_head = NULL;
3606 group->fg_ref--;
3607 if ((group->fg_ref == 0) && (group->fg_start == NULL))
3608 ipf_group_free(group);
3615 /* Parameters: group(I) - pointer to filter rule group */
3617 /* Remove the group from the list of groups and free it. */
3620 ipf_group_free(group)
3621 frgroup_t *group;
3625 for (gp = group->fg_set; *gp != NULL; gp = &(*gp)->fg_next) {
3626 if (*gp == group) {
3627 *gp = group->fg_next;
3631 KFREE(group);
3637 /* Returns: int - number of rules flush from group */
3639 /* Parameters: group(I) - pointer to filter rule group */
3641 /* Remove all of the rules that currently are listed under the given group. */
3644 ipf_group_flush(softc, group)
3646 frgroup_t *group;
3650 (void) ipf_flushlist(softc, &gone, &group->fg_start);
3662 /* group(I) - group name */
3665 /* Find rule # n in group # g and return a pointer to it. Return NULl if */
3666 /* group # g doesn't exist or there are less than n rules in the group. */
3669 ipf_getrulen(softc, unit, group, n)
3672 char *group;
3678 fg = ipf_findgroup(softc, group, unit, softc->ipf_active, NULL);
3698 /* encountered. if a rule is the head of a group and it has lost all its */
3699 /* group members, then also delete the group reference. nfreedp is needed */
3803 /* grhead(I) - pointer to the start of the group list to flush */
3806 /* Walk through all of the groups under the given group head and remove all */
3811 /* removed from the group then it is necessary to start again. */
4532 char *group;
4659 * Check that each group name in the rule has a start index that
4696 group = FR_NAME(fp, fr_group);
4698 fg = ipf_group_add(softc, group, NULL,
4702 fg = ipf_findgroup(softc, group, unit,
4721 * If a rule is going to be part of a group then it does
4723 * isn't in a group, then it does...
5051 * For SIOCAD*FR, this should be the last rule in the group of
5162 group = FR_NAME(fp, fr_icmphead);
5163 fg = ipf_group_add(softc, group, fp, 0, unit, set);
5169 group = FR_NAME(fp, fr_grhead);
5170 fg = ipf_group_add(softc, group, fp, fp->fr_flags,
5603 /* Looks for group hash table fr_arg and stores a pointer to it in fr_ptr. */
5662 /* Look for a rule group head in a hash table, using the source address as */
5663 /* the key, and descend into that group and continue matching rules against */
5692 /* Look for a rule group head in a hash table, using the destination */
5693 /* address as the key, and descend into that group and continue matching */
7904 /* find the 'next rule'. This may include searching rule group lists or */
8467 /* rules belonging to the head group this rule specifies. */