Lines Matching defs:opts

312 pfctl_enable(int dev, int opts)
324 if ((opts & PF_OPT_QUIET) == 0)
335 pfctl_disable(int dev, int opts)
345 if ((opts & PF_OPT_QUIET) == 0)
356 pfctl_clear_stats(struct pfctl_handle *h, int opts)
361 if ((opts & PF_OPT_QUIET) == 0)
445 pfctl_clear_interface_flags(int dev, int opts)
449 if ((opts & PF_OPT_NOACTION) == 0) {
455 if ((opts & PF_OPT_QUIET) == 0)
462 pfctl_flush_eth_rules(int dev, int opts, char *anchorname)
470 if ((opts & PF_OPT_QUIET) == 0)
477 pfctl_flush_rules(int dev, int opts, char *anchorname)
484 if ((opts & PF_OPT_QUIET) == 0)
490 pfctl_flush_nat(int dev, int opts, char *anchorname)
497 if ((opts & PF_OPT_QUIET) == 0)
503 pfctl_clear_altq(int dev, int opts)
515 if ((opts & PF_OPT_QUIET) == 0)
521 pfctl_clear_src_nodes(int dev, int opts)
525 if ((opts & PF_OPT_QUIET) == 0)
531 pfctl_clear_iface_states(int dev, const char *iface, int opts)
542 if (opts & PF_OPT_KILLMATCH)
547 if ((opts & PF_OPT_QUIET) == 0)
603 pfctl_kill_src_nodes(int dev, const char *iface, int opts)
699 if ((opts & PF_OPT_QUIET) == 0)
706 pfctl_net_kill_states(int dev, const char *iface, int opts)
734 if (opts & PF_OPT_KILLMATCH)
815 if ((opts & PF_OPT_QUIET) == 0)
822 pfctl_gateway_kill_states(int dev, const char *iface, int opts)
844 if (opts & PF_OPT_KILLMATCH)
880 if ((opts & PF_OPT_QUIET) == 0)
886 pfctl_label_kill_states(int dev, const char *iface, int opts)
901 if (opts & PF_OPT_KILLMATCH)
911 if ((opts & PF_OPT_QUIET) == 0)
918 pfctl_id_kill_states(int dev, const char *iface, int opts)
931 if (opts & PF_OPT_KILLMATCH)
951 if ((opts & PF_OPT_QUIET) == 0)
1011 pfctl_print_eth_rule_counters(struct pfctl_eth_rule *rule, int opts)
1013 if (opts & PF_OPT_VERBOSE) {
1022 if (opts & PF_OPT_VERBOSE2) {
1037 pfctl_print_rule_counters(struct pfctl_rule *rule, int opts)
1039 if (opts & PF_OPT_DEBUG) {
1059 if (opts & PF_OPT_VERBOSE) {
1067 if (!(opts & PF_OPT_DEBUG))
1073 if (opts & PF_OPT_VERBOSE2) {
1096 pfctl_show_eth_rules(int dev, char *path, int opts, enum pfctl_show format,
1103 int dotitle = opts & PF_OPT_SHOWALL;
1134 if (wildcard && (opts & PF_OPT_RECURSE)) {
1149 pfctl_print_eth_rule_counters(&rule, opts);
1155 INDENT(depth, !(opts & PF_OPT_VERBOSE));
1157 pfctl_show_eth_rules(dev, npath, opts,
1159 INDENT(depth, !(opts & PF_OPT_VERBOSE));
1172 INDENT(depth, !(opts & PF_OPT_VERBOSE));
1174 opts & PF_OPT_CLRRULECTRS, anchor_call)) != 0) {
1181 *(--p) == '/')) || (opts & PF_OPT_RECURSE))) {
1193 opts & (PF_OPT_VERBOSE2 | PF_OPT_DEBUG));
1198 pfctl_print_eth_rule_counters(&rule, opts);
1200 pfctl_show_eth_rules(dev, path, opts, format,
1202 INDENT(depth, !(opts & PF_OPT_VERBOSE));
1212 pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format,
1219 int rule_numbers = opts & (PF_OPT_VERBOSE2 | PF_OPT_DEBUG);
1220 int numeric = opts & PF_OPT_NUMERIC;
1250 if (wildcard && (opts & PF_OPT_RECURSE)) {
1263 pfctl_print_rule_counters(&rule, opts);
1267 INDENT(depth, !(opts & PF_OPT_VERBOSE));
1269 pfctl_show_rules(dev, npath, opts,
1271 INDENT(depth, !(opts & PF_OPT_VERBOSE));
1278 if (opts & PF_OPT_SHOWALL) {
1291 if (opts & PF_OPT_SHOWALL) {
1300 &rule, anchor_call, opts & PF_OPT_CLRRULECTRS)) != 0) {
1321 if (rule.label[0][0] && (opts & PF_OPT_SHOWALL))
1325 pfctl_print_rule_counters(&rule, opts);
1341 &rule, anchor_call, opts & PF_OPT_CLRRULECTRS)) != 0) {
1386 opts & PF_OPT_RECURSE)) {
1387 pfctl_show_rules(dev, npath, opts, format,
1393 if (rule.label[0][0] && (opts & PF_OPT_SHOWALL))
1395 INDENT(depth, !(opts & PF_OPT_VERBOSE));
1406 opts & PF_OPT_RECURSE)) {
1408 pfctl_print_rule_counters(&rule, opts);
1409 pfctl_show_rules(dev, npath, opts, format,
1412 INDENT(depth, !(opts & PF_OPT_VERBOSE));
1416 pfctl_print_rule_counters(&rule, opts);
1432 pfctl_show_nat(int dev, char *path, int opts, char *anchorname, int depth,
1440 int i, dotitle = opts & PF_OPT_SHOWALL;
1471 if (wildcard && (opts & PF_OPT_RECURSE)) {
1483 pfctl_print_rule_counters(&rule, opts);
1487 INDENT(depth, !(opts & PF_OPT_VERBOSE));
1489 pfctl_show_nat(dev, npath, opts,
1491 INDENT(depth, !(opts & PF_OPT_VERBOSE));
1505 INDENT(depth, !(opts & PF_OPT_VERBOSE));
1527 opts & PF_OPT_VERBOSE2, opts & PF_OPT_NUMERIC);
1531 opts & PF_OPT_RECURSE)) {
1533 pfctl_print_rule_counters(&rule, opts);
1534 pfctl_show_nat(dev, npath, opts, anchor_call,
1536 INDENT(depth, !(opts & PF_OPT_VERBOSE));
1540 pfctl_print_rule_counters(&rule, opts);
1550 int *opts = (int *)arg;
1552 if (*opts & PF_OPT_SHOWALL) {
1554 *opts &= ~PF_OPT_SHOWALL;
1557 print_src_node(sn, *opts);
1563 pfctl_show_src_nodes(int dev, int opts)
1567 error = pfctl_get_srcnodes(pfh, pfctl_print_src_node, &opts);
1573 int opts;
1587 print_state(s, a->opts);
1593 pfctl_show_states(int dev, const char *iface, int opts)
1601 arg.opts = opts;
1602 arg.dotitle = opts & PF_OPT_SHOWALL;
1612 pfctl_show_status(int dev, int opts)
1627 if (opts & PF_OPT_SHOWALL)
1629 print_status(status, &cookies, opts);
1653 pfctl_show_timeouts(int dev, int opts)
1659 if (opts & PF_OPT_SHOWALL)
1677 pfctl_show_limits(int dev, int opts)
1683 if (opts & PF_OPT_SHOWALL)
1698 pfctl_show_creators(int opts)
1723 if ((pf->opts & PF_OPT_NOACTION) == 0) {
1891 if (pf->opts & PF_OPT_VERBOSE)
1893 if ((pf->opts & PF_OPT_NOACTION) == 0 &&
1900 } else if (pf->opts & PF_OPT_VERBOSE)
1915 } else if (pf->opts & PF_OPT_VERBOSE)
1919 if (brace && pf->opts & PF_OPT_VERBOSE) {
1920 INDENT(depth - 1, (pf->opts & PF_OPT_VERBOSE));
1957 if ((pf->opts & PF_OPT_NOACTION) == 0)
1962 if (pf->opts & PF_OPT_VERBOSE) {
1963 INDENT(depth, !(pf->opts & PF_OPT_VERBOSE2));
1965 pf->opts & (PF_OPT_VERBOSE2 | PF_OPT_DEBUG));
1991 if (pf->opts & PF_OPT_VERBOSE)
1993 if ((pf->opts & PF_OPT_NOACTION) == 0 &&
2000 } else if (pf->opts & PF_OPT_VERBOSE)
2022 } else if (pf->opts & PF_OPT_VERBOSE)
2026 if (brace && pf->opts & PF_OPT_VERBOSE) {
2027 INDENT(depth - 1, (pf->opts & PF_OPT_VERBOSE));
2051 if ((pf->opts & PF_OPT_NOACTION) == 0)
2071 if ((pf->opts & PF_OPT_NOACTION) == 0) {
2072 if ((pf->opts & PF_OPT_NOACTION) == 0) {
2099 if (pf->opts & PF_OPT_VERBOSE) {
2100 INDENT(depth, !(pf->opts & PF_OPT_VERBOSE2));
2102 pf->opts & PF_OPT_VERBOSE2,
2103 pf->opts & PF_OPT_NUMERIC);
2119 if ((pf->opts & PF_OPT_NOACTION) == 0) {
2136 pfctl_rules(int dev, char *filename, int opts, int optimize,
2181 pf.opts = opts;
2223 if ((opts & PF_OPT_NOACTION) == 0) {
2242 if ((opts & PF_OPT_NOACTION) == 0)
2261 if ((opts & PF_OPT_NOACTION) == 0)
2268 if (check_commit_altq(dev, opts) != 0)
2276 if (trans == NULL && (opts & PF_OPT_NOACTION) == 0) {
2288 if ((opts & PF_OPT_NOACTION) == 0)
2375 if ((pf->opts & PF_OPT_MERGE) && !pf->limit_set[i])
2398 if ((pf->opts & PF_OPT_MERGE) && !pf->timeout_set[i])
2405 if (!(pf->opts & PF_OPT_MERGE) || pf->debug_set)
2410 if (!(pf->opts & PF_OPT_MERGE) || pf->ifname_set)
2415 if (!(pf->opts & PF_OPT_MERGE) || pf->hostid_set)
2420 if (!(pf->opts & PF_OPT_MERGE) || pf->reass_set)
2453 if (pf->opts & PF_OPT_VERBOSE)
2494 if (pf->opts & PF_OPT_VERBOSE && ! quiet)
2525 if (pf->opts & PF_OPT_VERBOSE)
2556 if (pf->opts & PF_OPT_VERBOSE)
2579 if (pf->opts & PF_OPT_VERBOSE)
2606 if (pf->opts & PF_OPT_VERBOSE)
2669 if (pf->opts & PF_OPT_VERBOSE) {
2716 if ((pf->opts & PF_OPT_NOACTION) == 0)
2720 if (pf->opts & PF_OPT_VERBOSE)
2759 if ((pf->opts & PF_OPT_NOACTION) == 0) {
2773 pfctl_debug(int dev, u_int32_t level, int opts)
2779 if ((opts & PF_OPT_QUIET) == 0) {
2803 pfctl_test_altqsupport(int dev, int opts)
2810 if (opts & PF_OPT_VERBOSE)
2821 pfctl_show_anchors(int dev, int opts, char *anchorname)
2849 if (sub[0] != '_' || (opts & PF_OPT_VERBOSE))
2851 if ((opts & PF_OPT_VERBOSE) && pfctl_show_anchors(dev, opts, sub))
2858 pfctl_show_eth_anchors(int dev, int opts, char *anchorname)
2887 if (sub[0] != '_' || (opts & PF_OPT_VERBOSE))
2889 if ((opts & PF_OPT_VERBOSE) && pfctl_show_eth_anchors(dev, opts, sub))
2911 int opts = 0;
2926 opts |= PF_OPT_DISABLE;
2935 opts |= PF_OPT_ENABLE;
2939 opts |= PF_OPT_QUIET;
2971 opts |= PF_OPT_MERGE;
2974 opts |= PF_OPT_KILLMATCH;
2977 opts |= PF_OPT_NOACTION;
2983 opts |= PF_OPT_USEDNS;
2990 opts |= PF_OPT_DEBUG;
3004 opts |= PF_OPT_OPTIMIZE;
3013 opts |= PF_OPT_NUMERIC;
3033 if (opts & PF_OPT_VERBOSE)
3034 opts |= PF_OPT_VERBOSE2;
3035 opts |= PF_OPT_VERBOSE;
3046 opts |= PF_OPT_CLRRULECTRS;
3085 opts |= PF_OPT_RECURSE;
3094 if ((opts & PF_OPT_NOACTION) == 0) {
3098 altqsupport = pfctl_test_altqsupport(dev, opts);
3102 opts |= PF_OPT_DUMMYACTION;
3104 opts &= ~ (PF_OPT_DISABLE | PF_OPT_ENABLE);
3116 if (opts & PF_OPT_DISABLE)
3117 if (pfctl_disable(dev, opts))
3123 pfctl_show_anchors(dev, opts, anchorname);
3124 if (opts & PF_OPT_VERBOSE2)
3126 pfctl_show_eth_anchors(dev, opts, anchorname);
3129 pfctl_load_fingerprints(dev, opts);
3130 pfctl_show_rules(dev, path, opts, PFCTL_SHOW_RULES,
3134 pfctl_load_fingerprints(dev, opts);
3135 pfctl_show_rules(dev, path, opts, PFCTL_SHOW_LABELS,
3139 pfctl_load_fingerprints(dev, opts);
3140 pfctl_show_nat(dev, path, opts, anchorname, 0, 0);
3143 pfctl_show_altq(dev, ifaceopt, opts,
3144 opts & PF_OPT_VERBOSE2);
3147 pfctl_show_states(dev, ifaceopt, opts);
3150 pfctl_show_src_nodes(dev, opts);
3153 pfctl_show_status(dev, opts);
3159 pfctl_show_timeouts(dev, opts);
3162 pfctl_show_limits(dev, opts);
3165 pfctl_show_eth_rules(dev, path, opts, 0, anchorname, 0,
3169 opts |= PF_OPT_SHOWALL;
3170 pfctl_load_fingerprints(dev, opts);
3172 pfctl_show_eth_rules(dev, path, opts, 0, anchorname, 0,
3175 pfctl_show_nat(dev, path, opts, anchorname, 0, 0);
3176 pfctl_show_rules(dev, path, opts, 0, anchorname, 0, 0);
3177 pfctl_show_altq(dev, ifaceopt, opts, 0);
3178 pfctl_show_states(dev, ifaceopt, opts);
3179 pfctl_show_src_nodes(dev, opts);
3180 pfctl_show_status(dev, opts);
3181 pfctl_show_rules(dev, path, opts, 1, anchorname, 0, 0);
3182 pfctl_show_timeouts(dev, opts);
3183 pfctl_show_limits(dev, opts);
3184 pfctl_show_tables(anchorname, opts);
3185 pfctl_show_fingerprints(opts);
3188 pfctl_show_tables(anchorname, opts);
3191 pfctl_load_fingerprints(dev, opts);
3192 pfctl_show_fingerprints(opts);
3195 pfctl_show_ifaces(ifaceopt, opts);
3198 pfctl_show_creators(opts);
3203 if ((opts & PF_OPT_CLRRULECTRS) && showopt == NULL) {
3204 pfctl_show_eth_rules(dev, path, opts, PFCTL_SHOW_NOTHING,
3206 pfctl_show_rules(dev, path, opts, PFCTL_SHOW_NOTHING,
3217 pfctl_flush_eth_rules(dev, opts, anchorname);
3220 pfctl_flush_rules(dev, opts, anchorname);
3223 pfctl_flush_nat(dev, opts, anchorname);
3226 pfctl_clear_altq(dev, opts);
3229 pfctl_clear_iface_states(dev, ifaceopt, opts);
3232 pfctl_clear_src_nodes(dev, opts);
3235 pfctl_clear_stats(pfh, opts);
3238 pfctl_flush_eth_rules(dev, opts, anchorname);
3239 pfctl_flush_rules(dev, opts, anchorname);
3240 pfctl_flush_nat(dev, opts, anchorname);
3241 pfctl_do_clear_tables(anchorname, opts);
3243 pfctl_clear_altq(dev, opts);
3244 pfctl_clear_iface_states(dev, ifaceopt, opts);
3245 pfctl_clear_src_nodes(dev, opts);
3246 pfctl_clear_stats(pfh, opts);
3247 pfctl_clear_fingerprints(dev, opts);
3248 pfctl_clear_interface_flags(dev, opts);
3252 pfctl_clear_fingerprints(dev, opts);
3255 pfctl_do_clear_tables(anchorname, opts);
3261 pfctl_label_kill_states(dev, ifaceopt, opts);
3263 pfctl_id_kill_states(dev, ifaceopt, opts);
3265 pfctl_gateway_kill_states(dev, ifaceopt, opts);
3267 pfctl_net_kill_states(dev, ifaceopt, opts);
3271 pfctl_kill_src_nodes(dev, ifaceopt, opts);
3275 tblcmdopt, rulesopt, anchorname, opts);
3294 !anchorname[0] && !(opts & PF_OPT_NOACTION))
3298 if (rulesopt != NULL && !(opts & (PF_OPT_MERGE|PF_OPT_NOACTION)) &&
3300 if (pfctl_file_fingerprints(dev, opts, PF_OSFP_FILE))
3307 if (pfctl_rules(dev, rulesopt, opts, optimize,
3310 else if (!(opts & PF_OPT_NOACTION) &&
3315 if (opts & PF_OPT_ENABLE)
3316 if (pfctl_enable(dev, opts))
3322 pfctl_debug(dev, PF_DEBUG_NONE, opts);
3325 pfctl_debug(dev, PF_DEBUG_URGENT, opts);
3328 pfctl_debug(dev, PF_DEBUG_MISC, opts);
3331 pfctl_debug(dev, PF_DEBUG_NOISY, opts);