--- fwsync/driver/fwsync.h 2022/06/22 13:01:55 1.1 +++ fwsync/driver/fwsync.h 2022/06/29 19:44:58 1.2 @@ -21,7 +21,10 @@ #include #include #include +#include #include +#include +#include #include #include #include @@ -42,18 +45,14 @@ #if 0 #include -#include #include -#include #include #include -#include #include #include #include #include -#include #endif @@ -135,10 +134,6 @@ struct fwsync_context { #define CTX_COLLECTOR_2_ONLINE 0x100 #if 0 - -#define DRV_PKTSTART 0xDEADBEEF -#define DRV_PKTEND 0xDEBADEBA - #define DRETFLUSH _IOW('D', 1, u_char) #define DRETADDFILT _IOW('D', 2, struct dret_filter) #define DRETDELFILT _IOW('D', 3, struct dret_filter) @@ -168,10 +163,21 @@ struct dret_filter { } while (0) #endif +struct fws_sndpkt { + struct fws_proto sp_proto; + TAILQ_ENTRY(fws_sndpkt) sp_next; +}; + +typedef TAILQ_HEAD(, fws_sndpkt) fwsync_sndpkt_t; + extern int fwsync_debug; extern struct fwsync_context fws_ctx; extern struct cfg_sync fws_cfg; extern struct task fws_sndpkt_task; +extern struct taskqueue *fws_tq; +extern struct mtx fws_mtx_c, fws_mtx_e; +extern struct mbuf *fws_sndpkt; +extern fwsync_sndpkt_t fwsync_sndpkt; int fwsync_cfg(struct ip_fw_chain *ch, ip_fw3_opheader *op3, struct sockopt_data *sd); int fwsync_destroy(struct ip_fw_chain *ch, ip_fw3_opheader *op3, struct sockopt_data *sd);