1/* 2 * Copyright (C) 1993-2001 by Darren Reed. 3 * 4 * See the IPFILTER.LICENCE file for details on licencing. 5 * 6 * @(#)ip_frag.h 1.5 3/24/96 7 * $Id: ip_frag.h,v 2.4.2.2 2000/11/10 13:10:54 darrenr Exp $
|
8 * $FreeBSD: head/sys/contrib/ipfilter/netinet/ip_frag.h 102520 2002-08-28 13:41:36Z darrenr $
|
8 * $FreeBSD: head/sys/contrib/ipfilter/netinet/ip_frag.h 130886 2004-06-21 22:46:36Z darrenr $ |
9 */ 10 11#ifndef __IP_FRAG_H__ 12#define __IP_FRAG_H__ 13 14#define IPFT_SIZE 257 15 16typedef struct ipfr { 17 struct ipfr *ipfr_next, *ipfr_prev; 18 void *ipfr_data; 19 struct in_addr ipfr_src; 20 struct in_addr ipfr_dst; 21 void *ipfr_ifp; 22 u_32_t ipfr_optmsk; 23 u_short ipfr_secmsk; 24 u_short ipfr_auth; 25 u_short ipfr_id; 26 u_char ipfr_p; 27 u_char ipfr_tos; 28 u_short ipfr_off; 29 u_char ipfr_ttl; 30 u_char ipfr_seen0; 31 frentry_t *ipfr_rule; 32} ipfr_t; 33 34 35typedef struct ipfrstat { 36 u_long ifs_exists; /* add & already exists */ 37 u_long ifs_nomem; 38 u_long ifs_new; 39 u_long ifs_hits; 40 u_long ifs_expire; 41 u_long ifs_inuse; 42 struct ipfr **ifs_table; 43 struct ipfr **ifs_nattab; 44} ipfrstat_t; 45 46#define IPFR_CMPSZ (offsetof(ipfr_t, ipfr_off) - \ 47 offsetof(ipfr_t, ipfr_src)) 48 49extern int fr_ipfrttl; 50extern int fr_frag_lock; 51extern ipfrstat_t *ipfr_fragstats __P((void)); 52extern int ipfr_newfrag __P((ip_t *, fr_info_t *)); 53extern int ipfr_nat_newfrag __P((ip_t *, fr_info_t *, struct nat *)); 54extern nat_t *ipfr_nat_knownfrag __P((ip_t *, fr_info_t *)); 55extern frentry_t *ipfr_knownfrag __P((ip_t *, fr_info_t *)); 56extern void ipfr_forget __P((void *));
|
57extern void ipfr_forgetnat __P((void *)); |
58extern void ipfr_unload __P((void)); 59extern void ipfr_fragexpire __P((void)); 60 61#ifdef _KERNEL 62# if (BSD >= 199306) || SOLARIS || defined(__sgi) 63# if defined(SOLARIS2) && (SOLARIS2 < 7) 64extern void ipfr_slowtimer __P((void)); 65# else 66extern void ipfr_slowtimer __P((void *)); 67# endif 68# else 69extern int ipfr_slowtimer __P((void)); 70# endif /* (BSD >= 199306) || SOLARIS */ 71#else 72extern void ipfr_slowtimer __P((void)); 73#endif /* _KERNEL */ 74 75#endif /* __IP_FIL_H__ */
|