4 * Copyright (C) 1993-2001 by Darren Reed.
6 * See the IPFILTER.LICENCE file for details on licencing.
8 * @(#)ip_frag.h 1.5 3/24/96
9 * Id: ip_frag.h,v 2.23.2.7 2009/01/01 03:53:17 darrenr Exp
12 #ifndef _NETINET_IP_FRAG_H_
13 #define _NETINET_IP_FRAG_H_
18 struct ipfr
*ipfr_hnext
, **ipfr_hprev
;
19 struct ipfr
*ipfr_next
, **ipfr_prev
;
27 * All of the fields, from ipfr_ifp to ipfr_pass, are compared
28 * using bcmp to see if an identical entry is present. It is
29 * therefore important for this set to remain together.
44 typedef struct ipfrstat
{
45 u_long ifs_exists
; /* add & already exists */
53 struct ipfr
**ifs_table
;
54 struct ipfr
**ifs_nattab
;
57 #define IPFR_CMPSZ (offsetof(ipfr_t, ipfr_pass) - \
58 offsetof(ipfr_t, ipfr_ifp))
60 extern ipfr_t
*ipfr_list
, **ipfr_tail
;
61 extern ipfr_t
*ipfr_natlist
, **ipfr_nattail
;
63 extern int fr_ipfrttl
;
64 extern int fr_frag_lock
;
65 extern int fr_fraginit
__P((void));
66 extern void fr_fragunload
__P((void));
67 extern ipfrstat_t
*fr_fragstats
__P((void));
69 extern int fr_newfrag
__P((fr_info_t
*, u_32_t
));
70 extern frentry_t
*fr_knownfrag
__P((fr_info_t
*, u_32_t
*));
72 extern int fr_nat_newfrag
__P((fr_info_t
*, u_32_t
, struct nat
*));
73 extern nat_t
*fr_nat_knownfrag
__P((fr_info_t
*));
75 extern int fr_ipid_newfrag
__P((fr_info_t
*, u_32_t
));
76 extern u_32_t fr_ipid_knownfrag
__P((fr_info_t
*));
78 extern void fr_fragderef
__P((ipfr_t
**, ipfrwlock_t
*));
79 extern int fr_nextfrag
__P((ipftoken_t
*, ipfgeniter_t
*, ipfr_t
**, \
80 ipfr_t
***, ipfrwlock_t
*));
82 extern void fr_fragderef
__P((ipfr_t
**));
83 extern int fr_nextfrag
__P((ipftoken_t
*, ipfgeniter_t
*, ipfr_t
**, \
87 extern void fr_forget
__P((void *));
88 extern void fr_forgetnat
__P((void *));
89 extern void fr_fragclear
__P((void));
90 extern void fr_fragexpire
__P((void));
92 #if defined(_KERNEL) && ((defined(BSD) && (BSD >= 199306)) || SOLARIS || \
93 defined(__sgi) || defined(__osf__) || (defined(__sgi) && (IRIX >= 60500)))
94 # if defined(SOLARIS2) && (SOLARIS2 < 7)
95 extern void fr_slowtimer
__P((void));
97 extern void fr_slowtimer
__P((void *));
100 # if defined(linux) && defined(_KERNEL)
101 extern void fr_slowtimer
__P((long));
103 extern int fr_slowtimer
__P((void));
107 #endif /* _NETINET_IP_FRAG_H_ */