Lines Matching refs:prs
644 struct pfioc_ruleset prs;
647 memset(&prs, 0, sizeof(prs));
648 strlcpy(prs.path, anchorname, sizeof(prs.path));
649 if (ioctl(pfctl_fd(pfh), DIOCGETRULESETS, &prs)) {
656 nr = prs.nr;
661 prs.nr = nr - 1;
662 if (ioctl(pfctl_fd(pfh), DIOCGETRULESET, &prs))
665 if ((t = strchr(prs.name, '(')) == NULL)
666 t = prs.name;
670 if (!prs.name[0] || errno ||
671 (*s && (t == prs.name || *s != ')')))
674 if (recursive_ruleset_purge(anchorname, prs.name))
687 struct pfioc_ruleset *prs = NULL;
712 if ((prs = calloc(1, sizeof(struct pfioc_ruleset))) == NULL)
714 snprintf(prs->path, sizeof(prs->path), "%s/%s", an, rs);
715 if (ioctl(pfctl_fd(pfh), DIOCGETRULESETS, prs)) {
720 int nr = prs->nr;
723 prs->nr = 0;
724 if (ioctl(pfctl_fd(pfh), DIOCGETRULESET, prs))
727 if (recursive_ruleset_purge(prs->path, prs->name))
740 free(prs);