4 * Copyright (C) 2012 by Darren Reed.
6 * See the IPFILTER.LICENCE file for details on licencing.
8 * @(#)ip_frag.h 1.5 3/24/96
10 * Id: ip_frag.h,v 2.23.2.1 2004/03/29 16:21:56 darrenr Exp
19 struct ipfr *ipfr_hnext, **ipfr_hprev;
20 struct ipfr *ipfr_next, **ipfr_prev;
29 u_short ipfr_firstend;
33 * All of the fields, from ipfr_ifp to ipfr_pass, are compared
34 * using bcmp to see if an identical entry is present. It is
35 * therefore important for this set to remain together.
48 #define ipfr_src ipfr_source.in4
49 #define ipfr_dst ipfr_dest.in4
52 typedef struct ipfrstat {
53 u_long ifs_exists; /* add & already exists */
68 u_long ifs_newrestrictnot0;
69 struct ipfr **ifs_table;
70 struct ipfr **ifs_nattab;
73 typedef struct ipf_frag_softc_s {
74 ipfrwlock_t ipfr_ipidfrag;
75 ipfrwlock_t ipfr_frag;
76 ipfrwlock_t ipfr_natfrag;
84 ipfr_t **ipfr_nattail;
85 ipfr_t *ipfr_ipidlist;
86 ipfr_t **ipfr_ipidtail;
89 ipfr_t **ipfr_ipidtab;
90 ipfrstat_t ipfr_stats;
93 #define IPFR_CMPSZ (offsetof(ipfr_t, ipfr_pass) - \
94 offsetof(ipfr_t, ipfr_ifp))
96 extern void *ipf_frag_soft_create __P((ipf_main_softc_t *));
97 extern int ipf_frag_soft_init __P((ipf_main_softc_t *, void *));
98 extern int ipf_frag_soft_fini __P((ipf_main_softc_t *, void *));
99 extern void ipf_frag_soft_destroy __P((ipf_main_softc_t *, void *));
100 extern int ipf_frag_main_load __P((void));
101 extern int ipf_frag_main_unload __P((void));
102 extern int ipf_frag_load __P((void));
103 extern void ipf_frag_clear __P((ipf_main_softc_t *));
104 extern void ipf_frag_expire __P((ipf_main_softc_t *));
105 extern void ipf_frag_forget __P((void *));
106 extern int ipf_frag_init __P((void));
107 extern u_32_t ipf_frag_ipidknown __P((fr_info_t *));
108 extern int ipf_frag_ipidnew __P((fr_info_t *, u_32_t));
109 extern frentry_t *ipf_frag_known __P((fr_info_t *, u_32_t *));
110 extern void ipf_frag_natforget __P((ipf_main_softc_t *, void *));
111 extern int ipf_frag_natnew __P((ipf_main_softc_t *, fr_info_t *, u_32_t, struct nat *));
112 extern nat_t *ipf_frag_natknown __P((fr_info_t *));
113 extern int ipf_frag_new __P((ipf_main_softc_t *, fr_info_t *, u_32_t));
114 extern ipfrstat_t *ipf_frag_stats __P((void *));
115 extern void ipf_frag_setlock __P((void *, int));
116 extern void ipf_frag_pkt_deref __P((ipf_main_softc_t *, void *));
117 extern int ipf_frag_pkt_next __P((ipf_main_softc_t *, ipftoken_t *,
119 extern void ipf_frag_nat_deref __P((ipf_main_softc_t *, void *));
120 extern int ipf_frag_nat_next __P((ipf_main_softc_t *, ipftoken_t *,
122 extern void ipf_slowtimer __P((ipf_main_softc_t *));
124 #endif /* __IP_FRAG_H__ */