Lines Matching refs:opts

242 pfctl_enable(int dev, int opts)  in pfctl_enable()  argument
250 if ((opts & PF_OPT_QUIET) == 0) in pfctl_enable()
261 pfctl_disable(int dev, int opts) in pfctl_disable() argument
269 if ((opts & PF_OPT_QUIET) == 0) in pfctl_disable()
280 pfctl_clear_stats(int dev, int opts) in pfctl_clear_stats() argument
284 if ((opts & PF_OPT_QUIET) == 0) in pfctl_clear_stats()
290 pfctl_clear_interface_flags(int dev, int opts) in pfctl_clear_interface_flags() argument
294 if ((opts & PF_OPT_NOACTION) == 0) { in pfctl_clear_interface_flags()
300 if ((opts & PF_OPT_QUIET) == 0) in pfctl_clear_interface_flags()
307 pfctl_clear_rules(int dev, int opts, char *anchorname) in pfctl_clear_rules() argument
318 if ((opts & PF_OPT_QUIET) == 0) in pfctl_clear_rules()
324 pfctl_clear_nat(int dev, int opts, char *anchorname) in pfctl_clear_nat() argument
336 if ((opts & PF_OPT_QUIET) == 0) in pfctl_clear_nat()
342 pfctl_clear_altq(int dev, int opts) in pfctl_clear_altq() argument
354 if ((opts & PF_OPT_QUIET) == 0) in pfctl_clear_altq()
360 pfctl_clear_src_nodes(int dev, int opts) in pfctl_clear_src_nodes() argument
364 if ((opts & PF_OPT_QUIET) == 0) in pfctl_clear_src_nodes()
370 pfctl_clear_states(int dev, const char *iface, int opts) in pfctl_clear_states() argument
381 if ((opts & PF_OPT_QUIET) == 0) in pfctl_clear_states()
437 pfctl_kill_src_nodes(int dev, const char *iface, int opts) in pfctl_kill_src_nodes() argument
537 if ((opts & PF_OPT_QUIET) == 0) in pfctl_kill_src_nodes()
544 pfctl_kill_states(int dev, const char *iface, int opts) in pfctl_kill_states() argument
647 if ((opts & PF_OPT_QUIET) == 0) in pfctl_kill_states()
711 pfctl_print_rule_counters(struct pf_rule *rule, int opts) in pfctl_print_rule_counters() argument
713 if (opts & PF_OPT_DEBUG) { in pfctl_print_rule_counters()
733 if (opts & PF_OPT_VERBOSE) { in pfctl_print_rule_counters()
741 if (!(opts & PF_OPT_DEBUG)) in pfctl_print_rule_counters()
757 pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format, in pfctl_show_rules() argument
762 int rule_numbers = opts & (PF_OPT_VERBOSE2 | PF_OPT_DEBUG); in pfctl_show_rules()
774 if (opts & PF_OPT_SHOWALL) { in pfctl_show_rules()
787 if (opts & PF_OPT_SHOWALL) { in pfctl_show_rules()
794 if (opts & PF_OPT_CLRRULECTRS) in pfctl_show_rules()
825 if (pr.rule.label[0] && (opts & PF_OPT_SHOWALL)) in pfctl_show_rules()
829 pfctl_print_rule_counters(&pr.rule, opts); in pfctl_show_rules()
871 if (pr.rule.label[0] && (opts & PF_OPT_SHOWALL)) in pfctl_show_rules()
873 INDENT(depth, !(opts & PF_OPT_VERBOSE)); in pfctl_show_rules()
877 *(--p) == '/')) || (opts & PF_OPT_RECURSE))) { in pfctl_show_rules()
892 pfctl_print_rule_counters(&pr.rule, opts); in pfctl_show_rules()
894 pfctl_show_rules(dev, path, opts, format, in pfctl_show_rules()
896 INDENT(depth, !(opts & PF_OPT_VERBOSE)); in pfctl_show_rules()
914 pfctl_show_nat(int dev, int opts, char *anchorname) in pfctl_show_nat() argument
919 int i, dotitle = opts & PF_OPT_SHOWALL; in pfctl_show_nat()
944 opts & PF_OPT_VERBOSE2); in pfctl_show_nat()
946 pfctl_print_rule_counters(&pr.rule, opts); in pfctl_show_nat()
954 pfctl_show_src_nodes(int dev, int opts) in pfctl_show_src_nodes() argument
987 if (psn.psn_len > 0 && (opts & PF_OPT_SHOWALL)) in pfctl_show_src_nodes()
990 print_src_node(p, opts); in pfctl_show_src_nodes()
999 pfctl_show_states(int dev, const char *iface, int opts) in pfctl_show_states() argument
1005 int i, dotitle = (opts & PF_OPT_SHOWALL); in pfctl_show_states()
1039 print_state(p, opts); in pfctl_show_states()
1047 pfctl_show_status(int dev, int opts) in pfctl_show_status() argument
1055 if (opts & PF_OPT_SHOWALL) in pfctl_show_status()
1057 print_status(&status, opts); in pfctl_show_status()
1062 pfctl_show_timeouts(int dev, int opts) in pfctl_show_timeouts() argument
1067 if (opts & PF_OPT_SHOWALL) in pfctl_show_timeouts()
1087 pfctl_show_limits(int dev, int opts) in pfctl_show_limits() argument
1092 if (opts & PF_OPT_SHOWALL) in pfctl_show_limits()
1114 if ((pf->opts & PF_OPT_NOACTION) == 0) { in pfctl_add_pool()
1122 if ((pf->opts & PF_OPT_NOACTION) == 0) { in pfctl_add_pool()
1225 if (pf->opts & PF_OPT_VERBOSE) in pfctl_load_ruleset()
1227 if ((pf->opts & PF_OPT_NOACTION) == 0 && in pfctl_load_ruleset()
1234 } else if (pf->opts & PF_OPT_VERBOSE) in pfctl_load_ruleset()
1250 } else if (pf->opts & PF_OPT_VERBOSE) in pfctl_load_ruleset()
1254 if (brace && pf->opts & PF_OPT_VERBOSE) { in pfctl_load_ruleset()
1255 INDENT(depth - 1, (pf->opts & PF_OPT_VERBOSE)); in pfctl_load_ruleset()
1277 if ((pf->opts & PF_OPT_NOACTION) == 0) in pfctl_load_rule()
1296 if ((pf->opts & PF_OPT_NOACTION) == 0) { in pfctl_load_rule()
1308 if (pf->opts & PF_OPT_VERBOSE) { in pfctl_load_rule()
1309 INDENT(depth, !(pf->opts & PF_OPT_VERBOSE2)); in pfctl_load_rule()
1311 pf->opts & PF_OPT_VERBOSE2); in pfctl_load_rule()
1324 if ((pf->opts & PF_OPT_NOACTION) == 0) { in pfctl_add_altq()
1341 pfctl_rules(int dev, char *filename, FILE *fin, int opts, int optimize, in pfctl_rules() argument
1379 pf.opts = opts; in pfctl_rules()
1405 if ((opts & PF_OPT_NOACTION) == 0) { in pfctl_rules()
1422 if ((opts & PF_OPT_NOACTION) == 0) in pfctl_rules()
1437 if ((opts & PF_OPT_NOACTION) == 0) in pfctl_rules()
1444 if (check_commit_altq(dev, opts) != 0) in pfctl_rules()
1457 if (trans == NULL && (opts & PF_OPT_NOACTION) == 0) { in pfctl_rules()
1468 if ((opts & PF_OPT_NOACTION) == 0) in pfctl_rules()
1556 if ((pf->opts & PF_OPT_MERGE) && !pf->limit_set[i]) in pfctl_load_options()
1579 if ((pf->opts & PF_OPT_MERGE) && !pf->timeout_set[i]) in pfctl_load_options()
1586 if (!(pf->opts & PF_OPT_MERGE) || pf->debug_set) in pfctl_load_options()
1591 if (!(pf->opts & PF_OPT_MERGE) || pf->ifname_set) in pfctl_load_options()
1596 if (!(pf->opts & PF_OPT_MERGE) || pf->hostid_set) in pfctl_load_options()
1621 if (pf->opts & PF_OPT_VERBOSE) in pfctl_set_limit()
1667 if (pf->opts & PF_OPT_VERBOSE && ! quiet) in pfctl_set_timeout()
1712 if (pf->opts & PF_OPT_VERBOSE) in pfctl_set_optimization()
1735 if (pf->opts & PF_OPT_VERBOSE) in pfctl_set_logif()
1770 if (pf->opts & PF_OPT_VERBOSE) in pfctl_set_hostid()
1809 if ((pf->opts & PF_OPT_NOACTION) == 0) in pfctl_set_debug()
1813 if (pf->opts & PF_OPT_VERBOSE) in pfctl_set_debug()
1845 if ((pf->opts & PF_OPT_NOACTION) == 0) { in pfctl_set_interface_flags()
1858 pfctl_debug(int dev, u_int32_t level, int opts) in pfctl_debug() argument
1862 if ((opts & PF_OPT_QUIET) == 0) { in pfctl_debug()
1886 pfctl_test_altqsupport(int dev, int opts) in pfctl_test_altqsupport() argument
1892 if (!(opts & PF_OPT_QUIET)) in pfctl_test_altqsupport()
1903 pfctl_show_anchors(int dev, int opts, char *anchorname) in pfctl_show_anchors() argument
1933 if (sub[0] != '_' || (opts & PF_OPT_VERBOSE)) in pfctl_show_anchors()
1935 if ((opts & PF_OPT_VERBOSE) && pfctl_show_anchors(dev, opts, sub)) in pfctl_show_anchors()
1957 int opts = 0; in main() local
1973 opts |= PF_OPT_DISABLE; in main()
1982 opts |= PF_OPT_ENABLE; in main()
1986 opts |= PF_OPT_QUIET; in main()
2018 opts |= PF_OPT_MERGE; in main()
2021 opts |= PF_OPT_NOACTION; in main()
2027 opts |= PF_OPT_USEDNS; in main()
2034 opts |= PF_OPT_DEBUG; in main()
2048 opts |= PF_OPT_OPTIMIZE; in main()
2074 if (opts & PF_OPT_VERBOSE) in main()
2075 opts |= PF_OPT_VERBOSE2; in main()
2076 opts |= PF_OPT_VERBOSE; in main()
2087 opts |= PF_OPT_CLRRULECTRS; in main()
2126 opts |= PF_OPT_RECURSE; in main()
2135 if ((opts & PF_OPT_NOACTION) == 0) { in main()
2139 altqsupport = pfctl_test_altqsupport(dev, opts); in main()
2143 opts |= PF_OPT_DUMMYACTION; in main()
2145 opts &= ~ (PF_OPT_DISABLE | PF_OPT_ENABLE); in main()
2150 if (opts & PF_OPT_DISABLE) in main()
2151 if (pfctl_disable(dev, opts)) in main()
2157 pfctl_show_anchors(dev, opts, anchorname); in main()
2160 pfctl_load_fingerprints(dev, opts); in main()
2161 pfctl_show_rules(dev, path, opts, PFCTL_SHOW_RULES, in main()
2165 pfctl_load_fingerprints(dev, opts); in main()
2166 pfctl_show_rules(dev, path, opts, PFCTL_SHOW_LABELS, in main()
2170 pfctl_load_fingerprints(dev, opts); in main()
2171 pfctl_show_nat(dev, opts, anchorname); in main()
2174 pfctl_show_altq(dev, ifaceopt, opts, in main()
2175 opts & PF_OPT_VERBOSE2); in main()
2178 pfctl_show_states(dev, ifaceopt, opts); in main()
2181 pfctl_show_src_nodes(dev, opts); in main()
2184 pfctl_show_status(dev, opts); in main()
2187 pfctl_show_timeouts(dev, opts); in main()
2190 pfctl_show_limits(dev, opts); in main()
2193 opts |= PF_OPT_SHOWALL; in main()
2194 pfctl_load_fingerprints(dev, opts); in main()
2196 pfctl_show_nat(dev, opts, anchorname); in main()
2197 pfctl_show_rules(dev, path, opts, 0, anchorname, 0); in main()
2198 pfctl_show_altq(dev, ifaceopt, opts, 0); in main()
2199 pfctl_show_states(dev, ifaceopt, opts); in main()
2200 pfctl_show_src_nodes(dev, opts); in main()
2201 pfctl_show_status(dev, opts); in main()
2202 pfctl_show_rules(dev, path, opts, 1, anchorname, 0); in main()
2203 pfctl_show_timeouts(dev, opts); in main()
2204 pfctl_show_limits(dev, opts); in main()
2205 pfctl_show_tables(anchorname, opts); in main()
2206 pfctl_show_fingerprints(opts); in main()
2209 pfctl_show_tables(anchorname, opts); in main()
2212 pfctl_load_fingerprints(dev, opts); in main()
2213 pfctl_show_fingerprints(opts); in main()
2216 pfctl_show_ifaces(ifaceopt, opts); in main()
2221 if ((opts & PF_OPT_CLRRULECTRS) && showopt == NULL) in main()
2222 pfctl_show_rules(dev, path, opts, PFCTL_SHOW_NOTHING, in main()
2232 pfctl_clear_rules(dev, opts, anchorname); in main()
2235 pfctl_clear_nat(dev, opts, anchorname); in main()
2238 pfctl_clear_altq(dev, opts); in main()
2241 pfctl_clear_states(dev, ifaceopt, opts); in main()
2244 pfctl_clear_src_nodes(dev, opts); in main()
2247 pfctl_clear_stats(dev, opts); in main()
2250 pfctl_clear_rules(dev, opts, anchorname); in main()
2251 pfctl_clear_nat(dev, opts, anchorname); in main()
2252 pfctl_clear_tables(anchorname, opts); in main()
2254 pfctl_clear_altq(dev, opts); in main()
2255 pfctl_clear_states(dev, ifaceopt, opts); in main()
2256 pfctl_clear_src_nodes(dev, opts); in main()
2257 pfctl_clear_stats(dev, opts); in main()
2258 pfctl_clear_fingerprints(dev, opts); in main()
2259 pfctl_clear_interface_flags(dev, opts); in main()
2263 pfctl_clear_fingerprints(dev, opts); in main()
2266 pfctl_clear_tables(anchorname, opts); in main()
2271 pfctl_kill_states(dev, ifaceopt, opts); in main()
2274 pfctl_kill_src_nodes(dev, ifaceopt, opts); in main()
2278 tblcmdopt, rulesopt, anchorname, opts); in main()
2307 if (pfctl_clear_interface_flags(dev, opts | PF_OPT_QUIET)) in main()
2310 if (rulesopt != NULL && !(opts & (PF_OPT_MERGE|PF_OPT_NOACTION)) && in main()
2312 if (pfctl_file_fingerprints(dev, opts, PF_OSFP_FILE)) in main()
2319 if (pfctl_rules(dev, rulesopt, fin, opts, optimize, in main()
2322 else if (!(opts & PF_OPT_NOACTION) && in main()
2327 if (opts & PF_OPT_ENABLE) in main()
2328 if (pfctl_enable(dev, opts)) in main()
2334 pfctl_debug(dev, PF_DEBUG_NONE, opts); in main()
2337 pfctl_debug(dev, PF_DEBUG_URGENT, opts); in main()
2340 pfctl_debug(dev, PF_DEBUG_MISC, opts); in main()
2343 pfctl_debug(dev, PF_DEBUG_NOISY, opts); in main()