MCPcopy Create free account
hub / github.com/F-Stack/f-stack / pfr_table_count

Function pfr_table_count

freebsd/netpfil/pf/pf_table.c:1756–1770  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1754}
1755
1756int
1757pfr_table_count(struct pfr_table *filter, int flags)
1758{
1759 struct pf_kruleset *rs;
1760
1761 PF_RULES_ASSERT();
1762
1763 if (flags & PFR_FLAG_ALLRSETS)
1764 return (V_pfr_ktable_cnt);
1765 if (filter->pfrt_anchor[0]) {
1766 rs = pf_find_kruleset(filter->pfrt_anchor);
1767 return ((rs != NULL) ? rs->tables : -1);
1768 }
1769 return (pf_main_ruleset.tables);
1770}
1771
1772static int
1773pfr_skip_table(struct pfr_table *filter, struct pfr_ktable *kt, int flags)

Callers 4

pfioctlFunction · 0.85
pfr_clr_tablesFunction · 0.85
pfr_get_tablesFunction · 0.85
pfr_get_tstatsFunction · 0.85

Calls 1

pf_find_krulesetFunction · 0.85

Tested by

no test coverage detected