diff --git a/share/man/man4/pf.4 b/share/man/man4/pf.4 --- a/share/man/man4/pf.4 +++ b/share/man/man4/pf.4 @@ -682,7 +682,7 @@ [PFR_DIR_MAX][PFR_OP_TABLE_MAX]; u_int64_t pfrts_match; u_int64_t pfrts_nomatch; - long pfrts_tzero; + time_t pfrts_tzero; int pfrts_cnt; int pfrts_refcnt[PFR_REFCNT_MAX]; }; @@ -822,7 +822,7 @@ [PFR_DIR_MAX][PFR_OP_ADDR_MAX]; u_int64_t pfras_bytes [PFR_DIR_MAX][PFR_OP_ADDR_MAX]; - long pfras_tzero; + time_t pfras_tzero; }; .Ed .It Dv DIOCRCLRASTATS Fa "struct pfioc_table *io" diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1434,7 +1434,7 @@ struct pfr_addr pfras_a; u_int64_t pfras_packets[PFR_DIR_MAX][PFR_OP_ADDR_MAX]; u_int64_t pfras_bytes[PFR_DIR_MAX][PFR_OP_ADDR_MAX]; - long pfras_tzero; + time_t pfras_tzero; }; enum { PFR_REFCNT_RULE, PFR_REFCNT_ANCHOR, PFR_REFCNT_MAX }; @@ -1445,7 +1445,7 @@ u_int64_t pfrts_bytes[PFR_DIR_MAX][PFR_OP_TABLE_MAX]; u_int64_t pfrts_match; u_int64_t pfrts_nomatch; - long pfrts_tzero; + time_t pfrts_tzero; int pfrts_cnt; int pfrts_refcnt[PFR_REFCNT_MAX]; }; @@ -1507,7 +1507,7 @@ struct pfr_kstate_counter pfrkts_bytes[PFR_DIR_MAX][PFR_OP_TABLE_MAX]; struct pfr_kstate_counter pfrkts_match; struct pfr_kstate_counter pfrkts_nomatch; - long pfrkts_tzero; + time_t pfrkts_tzero; int pfrkts_cnt; int pfrkts_refcnt[PFR_REFCNT_MAX]; }; @@ -1528,7 +1528,7 @@ struct pfr_kcounters { counter_u64_t pfrkc_counters; - long pfrkc_tzero; + time_t pfrkc_tzero; }; #define pfr_kentry_counter(kc, dir, op, t) \ ((kc)->pfrkc_counters + \ @@ -1586,7 +1586,7 @@ #define pfik_list _pfik_glue._pfik_list struct pf_counter_u64 pfik_packets[2][2][2]; struct pf_counter_u64 pfik_bytes[2][2][2]; - u_int32_t pfik_tzero; + time_t pfik_tzero; u_int pfik_flags; struct ifnet *pfik_ifp; struct ifg_group *pfik_group; @@ -2489,7 +2489,7 @@ int pfr_clr_tstats(struct pfr_table *, int, int *, int); int pfr_set_tflags(struct pfr_table *, int, int, int, int *, int *, int); int pfr_clr_addrs(struct pfr_table *, int *, int); -int pfr_insert_kentry(struct pfr_ktable *, struct pfr_addr *, long); +int pfr_insert_kentry(struct pfr_ktable *, struct pfr_addr *, time_t); int pfr_add_addrs(struct pfr_table *, struct pfr_addr *, int, int *, int); int pfr_del_addrs(struct pfr_table *, struct pfr_addr *, int, int *, diff --git a/sys/netpfil/pf/pf_table.c b/sys/netpfil/pf/pf_table.c --- a/sys/netpfil/pf/pf_table.c +++ b/sys/netpfil/pf/pf_table.c @@ -139,11 +139,11 @@ static void pfr_destroy_kentries(struct pfr_kentryworkq *); static void pfr_destroy_kentry(struct pfr_kentry *); static void pfr_insert_kentries(struct pfr_ktable *, - struct pfr_kentryworkq *, long); + struct pfr_kentryworkq *, time_t); static void pfr_remove_kentries(struct pfr_ktable *, struct pfr_kentryworkq *); static void pfr_clstats_kentries(struct pfr_ktable *, - struct pfr_kentryworkq *, long, int); + struct pfr_kentryworkq *, time_t, int); static void pfr_reset_feedback(struct pfr_addr *, int); static void pfr_prepare_network(union sockaddr_union *, int, int); static int pfr_route_kentry(struct pfr_ktable *, @@ -153,16 +153,16 @@ static int pfr_walktree(struct radix_node *, void *); static int pfr_validate_table(struct pfr_table *, int, int); static int pfr_fix_anchor(char *); -static void pfr_commit_ktable(struct pfr_ktable *, long); +static void pfr_commit_ktable(struct pfr_ktable *, time_t); static void pfr_insert_ktables(struct pfr_ktableworkq *); static void pfr_insert_ktable(struct pfr_ktable *); static void pfr_setflags_ktables(struct pfr_ktableworkq *); static void pfr_setflags_ktable(struct pfr_ktable *, int); -static void pfr_clstats_ktables(struct pfr_ktableworkq *, long, +static void pfr_clstats_ktables(struct pfr_ktableworkq *, time_t, int); -static void pfr_clstats_ktable(struct pfr_ktable *, long, int); +static void pfr_clstats_ktable(struct pfr_ktable *, time_t, int); static struct pfr_ktable - *pfr_create_ktable(struct pfr_table *, long, int); + *pfr_create_ktable(struct pfr_table *, time_t, int); static void pfr_destroy_ktables(struct pfr_ktableworkq *, int); static void pfr_destroy_ktable(struct pfr_ktable *, int); static int pfr_ktable_compare(struct pfr_ktable *, @@ -245,7 +245,7 @@ struct pfr_kentry *p, *q; struct pfr_addr *ad; int i, rv, xadd = 0; - long tzero = time_second; + time_t tzero = time_second; PF_RULES_WASSERT(); @@ -397,7 +397,7 @@ struct pfr_kentry *p, *q; struct pfr_addr ad; int i, rv, xadd = 0, xdel = 0, xchange = 0; - long tzero = time_second; + time_t tzero = time_second; PF_RULES_WASSERT(); @@ -584,7 +584,7 @@ struct pfr_walktree w; struct pfr_kentryworkq workq; int rv; - long tzero = time_second; + time_t tzero = time_second; PF_RULES_RASSERT(); @@ -828,7 +828,7 @@ static void pfr_insert_kentries(struct pfr_ktable *kt, - struct pfr_kentryworkq *workq, long tzero) + struct pfr_kentryworkq *workq, time_t tzero) { struct pfr_kentry *p; int rv, n = 0; @@ -847,7 +847,7 @@ } int -pfr_insert_kentry(struct pfr_ktable *kt, struct pfr_addr *ad, long tzero) +pfr_insert_kentry(struct pfr_ktable *kt, struct pfr_addr *ad, time_t tzero) { struct pfr_kentry *p; int rv; @@ -896,7 +896,7 @@ static void pfr_clstats_kentries(struct pfr_ktable *kt, struct pfr_kentryworkq *workq, - long tzero, int negchange) + time_t tzero, int negchange) { struct pfr_kentry *p; int i; @@ -1173,7 +1173,7 @@ struct pfr_ktableworkq addq, changeq; struct pfr_ktable *p, *q, *r, key; int i, rv, xadd = 0; - long tzero = time_second; + time_t tzero = time_second; ACCEPT_FLAGS(flags, PFR_FLAG_DUMMY); SLIST_INIT(&addq); @@ -1318,7 +1318,7 @@ struct pfr_ktable *p; struct pfr_ktableworkq workq; int n, nn; - long tzero = time_second; + time_t tzero = time_second; int pfr_dir, pfr_op; /* XXX PFR_FLAG_CLSTATS disabled */ @@ -1375,7 +1375,7 @@ struct pfr_ktableworkq workq; struct pfr_ktable *p, key; int i, xzero = 0; - long tzero = time_second; + time_t tzero = time_second; ACCEPT_FLAGS(flags, PFR_FLAG_DUMMY | PFR_FLAG_ADDRSTOO); SLIST_INIT(&workq); @@ -1619,7 +1619,7 @@ struct pfr_ktableworkq workq; struct pf_kruleset *rs; int xadd = 0, xchange = 0; - long tzero = time_second; + time_t tzero = time_second; PF_RULES_WASSERT(); @@ -1657,7 +1657,7 @@ } static void -pfr_commit_ktable(struct pfr_ktable *kt, long tzero) +pfr_commit_ktable(struct pfr_ktable *kt, time_t tzero) { counter_u64_t *pkc, *qkc; struct pfr_ktable *shadow = kt->pfrkt_shadow; @@ -1882,7 +1882,7 @@ } static void -pfr_clstats_ktables(struct pfr_ktableworkq *workq, long tzero, int recurse) +pfr_clstats_ktables(struct pfr_ktableworkq *workq, time_t tzero, int recurse) { struct pfr_ktable *p; @@ -1891,7 +1891,7 @@ } static void -pfr_clstats_ktable(struct pfr_ktable *kt, long tzero, int recurse) +pfr_clstats_ktable(struct pfr_ktable *kt, time_t tzero, int recurse) { struct pfr_kentryworkq addrq; int pfr_dir, pfr_op; @@ -1914,7 +1914,7 @@ } static struct pfr_ktable * -pfr_create_ktable(struct pfr_table *tbl, long tzero, int attachruleset) +pfr_create_ktable(struct pfr_table *tbl, time_t tzero, int attachruleset) { struct pfr_ktable *kt; struct pf_kruleset *rs;