? bpf_movein.size_t Index: if_pflow.c =================================================================== RCS file: /cvs/src/sys/net/if_pflow.c,v retrieving revision 1.96 diff -u -p -r1.96 if_pflow.c --- if_pflow.c 12 Aug 2022 16:38:50 -0000 1.96 +++ if_pflow.c 10 Nov 2022 17:50:15 -0000 @@ -40,12 +40,14 @@ #include #include +#include #include #include #include #include #include +#include #include #include "bpfilter.h" Index: pfvar.h =================================================================== RCS file: /cvs/src/sys/net/pfvar.h,v retrieving revision 1.517 diff -u -p -r1.517 pfvar.h --- pfvar.h 10 Nov 2022 16:29:20 -0000 1.517 +++ pfvar.h 10 Nov 2022 17:50:15 -0000 @@ -741,37 +741,7 @@ struct pf_state_cmp { u_int8_t pad[3]; }; -struct pf_state { - u_int64_t id; - u_int32_t creatorid; - u_int8_t direction; - u_int8_t pad[3]; - - TAILQ_ENTRY(pf_state) sync_list; - TAILQ_ENTRY(pf_state) sync_snap; - TAILQ_ENTRY(pf_state) entry_list; - SLIST_ENTRY(pf_state) gc_list; - RB_ENTRY(pf_state) entry_id; - struct pf_state_peer src; - struct pf_state_peer dst; - struct pf_rule_slist match_rules; - union pf_rule_ptr rule; - union pf_rule_ptr anchor; - union pf_rule_ptr natrule; - struct pf_addr rt_addr; - struct pf_sn_head src_nodes; - struct pf_state_key *key[2]; /* addresses stack and wire */ - struct pfi_kif *kif; - u_int64_t packets[2]; - u_int64_t bytes[2]; - int32_t creation; - int32_t expire; - int32_t pfsync_time; - int rtableid[2]; /* rtables stack and wire */ - u_int16_t qid; - u_int16_t pqid; - u_int16_t tag; - u_int16_t state_flags; +/* struct pf_state.state_flags */ #define PFSTATE_ALLOWOPTS 0x0001 #define PFSTATE_SLOPPY 0x0002 #define PFSTATE_PFLOW 0x0004 @@ -785,21 +755,6 @@ struct pf_state { #define PFSTATE_INP_UNLINKED 0x0400 #define PFSTATE_SCRUBMASK (PFSTATE_NODF|PFSTATE_RANDOMID|PFSTATE_SCRUB_TCP) #define PFSTATE_SETMASK (PFSTATE_SETTOS|PFSTATE_SETPRIO) - u_int8_t log; - u_int8_t timeout; - u_int8_t sync_state; /* PFSYNC_S_x */ - u_int8_t sync_updates; - u_int8_t min_ttl; - u_int8_t set_tos; - u_int8_t set_prio[2]; - u_int16_t max_mss; - u_int16_t if_index_in; - u_int16_t if_index_out; - pf_refcnt_t refcnt; - u_int16_t delay; - u_int8_t rt; - u_int8_t snapped; -}; /* * Unified state structures for pulling states out of the kernel Index: pfvar_priv.h =================================================================== RCS file: /cvs/src/sys/net/pfvar_priv.h,v retrieving revision 1.12 diff -u -p -r1.12 pfvar_priv.h --- pfvar_priv.h 7 Nov 2022 16:35:12 -0000 1.12 +++ pfvar_priv.h 10 Nov 2022 17:50:15 -0000 @@ -40,6 +40,54 @@ #include #include +struct pf_state { + u_int64_t id; + u_int32_t creatorid; + u_int8_t direction; + u_int8_t pad[3]; + + TAILQ_ENTRY(pf_state) sync_list; + TAILQ_ENTRY(pf_state) sync_snap; + TAILQ_ENTRY(pf_state) entry_list; + SLIST_ENTRY(pf_state) gc_list; + RB_ENTRY(pf_state) entry_id; + struct pf_state_peer src; + struct pf_state_peer dst; + struct pf_rule_slist match_rules; + union pf_rule_ptr rule; + union pf_rule_ptr anchor; + union pf_rule_ptr natrule; + struct pf_addr rt_addr; + struct pf_sn_head src_nodes; + struct pf_state_key *key[2]; /* addresses stack and wire */ + struct pfi_kif *kif; + u_int64_t packets[2]; + u_int64_t bytes[2]; + int32_t creation; + int32_t expire; + int32_t pfsync_time; + int rtableid[2]; /* rtables stack and wire */ + u_int16_t qid; + u_int16_t pqid; + u_int16_t tag; + u_int16_t state_flags; + u_int8_t log; + u_int8_t timeout; + u_int8_t sync_state; /* PFSYNC_S_x */ + u_int8_t sync_updates; + u_int8_t min_ttl; + u_int8_t set_tos; + u_int8_t set_prio[2]; + u_int16_t max_mss; + u_int16_t if_index_in; + u_int16_t if_index_out; + pf_refcnt_t refcnt; + u_int16_t delay; + u_int8_t rt; + u_int8_t snapped; +}; + + /* * * states are linked into a global list to support the following