Wed Apr 22 23:40:40 2020 UTC ()
Externalize variables owned logically by pf_ruleset.c


(joerg)
diff -r1.5 -r1.6 src/dist/pf/sbin/pfctl/pfctl.c

cvs diff -r1.5 -r1.6 src/dist/pf/sbin/pfctl/pfctl.c (expand / switch to unified diff)

--- src/dist/pf/sbin/pfctl/pfctl.c 2008/06/18 09:06:26 1.5
+++ src/dist/pf/sbin/pfctl/pfctl.c 2020/04/22 23:40:40 1.6
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: pfctl.c,v 1.5 2008/06/18 09:06:26 yamt Exp $ */ 1/* $NetBSD: pfctl.c,v 1.6 2020/04/22 23:40:40 joerg Exp $ */
2/* $OpenBSD: pfctl.c,v 1.268 2007/06/30 18:25:08 henning Exp $ */ 2/* $OpenBSD: pfctl.c,v 1.268 2007/06/30 18:25:08 henning Exp $ */
3 3
4/* 4/*
5 * Copyright (c) 2001 Daniel Hartmeier 5 * Copyright (c) 2001 Daniel Hartmeier
6 * Copyright (c) 2002,2003 Henning Brauer 6 * Copyright (c) 2002,2003 Henning Brauer
7 * All rights reserved. 7 * All rights reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 12 *
13 * - Redistributions of source code must retain the above copyright 13 * - Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -86,28 +86,28 @@ int pfctl_show_src_nodes(int, int); @@ -86,28 +86,28 @@ int pfctl_show_src_nodes(int, int);
86int pfctl_show_states(int, const char *, int); 86int pfctl_show_states(int, const char *, int);
87int pfctl_show_status(int, int); 87int pfctl_show_status(int, int);
88int pfctl_show_timeouts(int, int); 88int pfctl_show_timeouts(int, int);
89int pfctl_show_limits(int, int); 89int pfctl_show_limits(int, int);
90void pfctl_debug(int, u_int32_t, int); 90void pfctl_debug(int, u_int32_t, int);
91int pfctl_test_altqsupport(int, int); 91int pfctl_test_altqsupport(int, int);
92int pfctl_show_anchors(int, int, char *); 92int pfctl_show_anchors(int, int, char *);
93int pfctl_ruleset_trans(struct pfctl *, char *, struct pf_anchor *); 93int pfctl_ruleset_trans(struct pfctl *, char *, struct pf_anchor *);
94int pfctl_load_ruleset(struct pfctl *, char *, 94int pfctl_load_ruleset(struct pfctl *, char *,
95 struct pf_ruleset *, int, int); 95 struct pf_ruleset *, int, int);
96int pfctl_load_rule(struct pfctl *, char *, struct pf_rule *, int); 96int pfctl_load_rule(struct pfctl *, char *, struct pf_rule *, int);
97const char *pfctl_lookup_option(char *, const char **); 97const char *pfctl_lookup_option(char *, const char **);
98 98
99struct pf_anchor_global pf_anchors; 99extern struct pf_anchor_global pf_anchors;
100struct pf_anchor pf_main_anchor; 100extern struct pf_anchor pf_main_anchor;
101 101
102const char *clearopt; 102const char *clearopt;
103char *rulesopt; 103char *rulesopt;
104const char *showopt; 104const char *showopt;
105const char *debugopt; 105const char *debugopt;
106char *anchoropt; 106char *anchoropt;
107const char *optiopt = NULL; 107const char *optiopt = NULL;
108char *pf_device = "/dev/pf"; 108char *pf_device = "/dev/pf";
109char *ifaceopt; 109char *ifaceopt;
110char *tableopt; 110char *tableopt;
111const char *tblcmdopt; 111const char *tblcmdopt;
112int src_node_killers; 112int src_node_killers;
113char *src_node_kill[2]; 113char *src_node_kill[2];