1/* $FreeBSD: head/sys/contrib/ipfilter/netinet/ip_frag.h 145522 2005-04-25 18:43:14Z darrenr $ */
|
1/* $FreeBSD: head/sys/contrib/ipfilter/netinet/ip_frag.h 153876 2005-12-30 11:32:23Z guido $ */ |
2 3/* 4 * Copyright (C) 1993-2001 by Darren Reed. 5 * 6 * See the IPFILTER.LICENCE file for details on licencing. 7 * 8 * @(#)ip_frag.h 1.5 3/24/96
|
9 * $FreeBSD: head/sys/contrib/ipfilter/netinet/ip_frag.h 145522 2005-04-25 18:43:14Z darrenr $
|
9 * $FreeBSD: head/sys/contrib/ipfilter/netinet/ip_frag.h 153876 2005-12-30 11:32:23Z guido $ |
10 * Id: ip_frag.h,v 2.23.2.1 2004/03/29 16:21:56 darrenr Exp 11 */ 12 13#ifndef __IP_FRAG_H__ 14#define __IP_FRAG_H__ 15 16#define IPFT_SIZE 257 17 18typedef struct ipfr { 19 struct ipfr *ipfr_hnext, **ipfr_hprev; 20 struct ipfr *ipfr_next, **ipfr_prev; 21 void *ipfr_data; 22 void *ipfr_ifp; 23 struct in_addr ipfr_src; 24 struct in_addr ipfr_dst; 25 u_32_t ipfr_optmsk; 26 u_short ipfr_secmsk; 27 u_short ipfr_auth; 28 u_short ipfr_id; 29 u_char ipfr_p; 30 u_char ipfr_tos; 31 u_32_t ipfr_pass; 32 u_short ipfr_off; 33 u_char ipfr_ttl; 34 u_char ipfr_seen0; 35 frentry_t *ipfr_rule; 36} ipfr_t; 37 38 39typedef struct ipfrstat { 40 u_long ifs_exists; /* add & already exists */ 41 u_long ifs_nomem; 42 u_long ifs_new; 43 u_long ifs_hits; 44 u_long ifs_expire; 45 u_long ifs_inuse; 46 u_long ifs_retrans0; 47 u_long ifs_short; 48 struct ipfr **ifs_table; 49 struct ipfr **ifs_nattab; 50} ipfrstat_t; 51 52#define IPFR_CMPSZ (offsetof(ipfr_t, ipfr_pass) - \ 53 offsetof(ipfr_t, ipfr_ifp)) 54 55extern int ipfr_size; 56extern int fr_ipfrttl; 57extern int fr_frag_lock; 58extern int fr_fraginit __P((void)); 59extern void fr_fragunload __P((void)); 60extern ipfrstat_t *fr_fragstats __P((void)); 61 62extern int fr_newfrag __P((fr_info_t *, u_32_t)); 63extern frentry_t *fr_knownfrag __P((fr_info_t *, u_32_t *)); 64 65extern int fr_nat_newfrag __P((fr_info_t *, u_32_t, struct nat *)); 66extern nat_t *fr_nat_knownfrag __P((fr_info_t *)); 67 68extern int fr_ipid_newfrag __P((fr_info_t *, u_32_t)); 69extern u_32_t fr_ipid_knownfrag __P((fr_info_t *)); 70 71extern void fr_forget __P((void *)); 72extern void fr_forgetnat __P((void *)); 73extern void fr_fragclear __P((void)); 74extern void fr_fragexpire __P((void)); 75 76#if defined(_KERNEL) && ((BSD >= 199306) || SOLARIS || defined(__sgi) \ 77 || defined(__osf__) || (defined(__sgi) && (IRIX >= 60500))) 78# if defined(SOLARIS2) && (SOLARIS2 < 7) 79extern void fr_slowtimer __P((void)); 80# else 81extern void fr_slowtimer __P((void *)); 82# endif 83#else
|
84# if defined(linux) && defined(_KERNEL) 85extern void fr_slowtimer __P((long)); 86# else |
87extern int fr_slowtimer __P((void));
|
88# endif |
89#endif 90 91#endif /* __IP_FRAG_H__ */
|