2002-01-24 11:21:30 +03:00
|
|
|
/* $NetBSD: ip_frag.h,v 1.17 2002/01/24 08:23:12 martti Exp $ */
|
1997-01-06 00:32:18 +03:00
|
|
|
|
1997-01-05 16:47:59 +03:00
|
|
|
/*
|
2002-01-24 11:21:30 +03:00
|
|
|
* Copyright (C) 1993-2001 by Darren Reed.
|
1997-01-05 16:47:59 +03:00
|
|
|
*
|
2002-01-24 11:21:30 +03:00
|
|
|
* See the IPFILTER.LICENCE file for details on licencing.
|
1997-01-05 16:47:59 +03:00
|
|
|
*
|
|
|
|
* @(#)ip_frag.h 1.5 3/24/96
|
2002-01-24 11:21:30 +03:00
|
|
|
* Id: ip_frag.h,v 2.4.2.6 2002/01/01 15:09:38 darrenr Exp
|
1997-01-05 16:47:59 +03:00
|
|
|
*/
|
|
|
|
|
1998-02-10 04:26:19 +03:00
|
|
|
#ifndef _NETINET_IP_FRAG_H_
|
|
|
|
#define _NETINET_IP_FRAG_H_
|
1997-01-05 16:47:59 +03:00
|
|
|
|
|
|
|
#define IPFT_SIZE 257
|
|
|
|
|
|
|
|
typedef struct ipfr {
|
|
|
|
struct ipfr *ipfr_next, *ipfr_prev;
|
1997-05-25 16:40:11 +04:00
|
|
|
void *ipfr_data;
|
1997-01-05 16:47:59 +03:00
|
|
|
struct in_addr ipfr_src;
|
|
|
|
struct in_addr ipfr_dst;
|
2001-03-26 10:11:46 +04:00
|
|
|
void *ipfr_ifp;
|
2002-01-24 11:21:30 +03:00
|
|
|
u_32_t ipfr_optmsk;
|
|
|
|
u_short ipfr_secmsk;
|
|
|
|
u_short ipfr_auth;
|
1997-01-05 16:47:59 +03:00
|
|
|
u_short ipfr_id;
|
|
|
|
u_char ipfr_p;
|
|
|
|
u_char ipfr_tos;
|
|
|
|
u_short ipfr_off;
|
2001-04-06 19:32:40 +04:00
|
|
|
u_char ipfr_ttl;
|
|
|
|
u_char ipfr_seen0;
|
1999-12-12 14:11:15 +03:00
|
|
|
frentry_t *ipfr_rule;
|
1997-01-05 16:47:59 +03:00
|
|
|
} ipfr_t;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct ipfrstat {
|
|
|
|
u_long ifs_exists; /* add & already exists */
|
|
|
|
u_long ifs_nomem;
|
|
|
|
u_long ifs_new;
|
|
|
|
u_long ifs_hits;
|
|
|
|
u_long ifs_expire;
|
|
|
|
u_long ifs_inuse;
|
|
|
|
struct ipfr **ifs_table;
|
1997-05-25 16:40:11 +04:00
|
|
|
struct ipfr **ifs_nattab;
|
1997-01-05 16:47:59 +03:00
|
|
|
} ipfrstat_t;
|
|
|
|
|
2001-04-06 19:32:40 +04:00
|
|
|
#define IPFR_CMPSZ (offsetof(ipfr_t, ipfr_off) - \
|
|
|
|
offsetof(ipfr_t, ipfr_src))
|
1997-01-05 16:47:59 +03:00
|
|
|
|
1997-07-05 09:38:14 +04:00
|
|
|
extern int fr_ipfrttl;
|
2000-05-03 15:12:03 +04:00
|
|
|
extern int fr_frag_lock;
|
1997-07-05 09:38:14 +04:00
|
|
|
extern ipfrstat_t *ipfr_fragstats __P((void));
|
1999-12-12 14:11:15 +03:00
|
|
|
extern int ipfr_newfrag __P((ip_t *, fr_info_t *, u_int));
|
|
|
|
extern int ipfr_nat_newfrag __P((ip_t *, fr_info_t *, u_int, struct nat *));
|
1997-07-05 09:38:14 +04:00
|
|
|
extern nat_t *ipfr_nat_knownfrag __P((ip_t *, fr_info_t *));
|
1999-12-12 14:11:15 +03:00
|
|
|
extern frentry_t *ipfr_knownfrag __P((ip_t *, fr_info_t *));
|
1997-10-30 19:08:54 +03:00
|
|
|
extern void ipfr_forget __P((void *));
|
1997-07-05 09:38:14 +04:00
|
|
|
extern void ipfr_unload __P((void));
|
2000-05-03 15:12:03 +04:00
|
|
|
extern void ipfr_fragexpire __P((void));
|
1997-05-25 16:40:11 +04:00
|
|
|
|
2002-01-24 11:21:30 +03:00
|
|
|
#ifdef _KERNEL
|
|
|
|
# if (BSD >= 199306) || SOLARIS || defined(__sgi)
|
|
|
|
# if defined(SOLARIS2) && (SOLARIS2 < 7)
|
1997-01-05 16:47:59 +03:00
|
|
|
extern void ipfr_slowtimer __P((void));
|
2002-01-24 11:21:30 +03:00
|
|
|
# else
|
1999-12-12 14:11:15 +03:00
|
|
|
extern void ipfr_slowtimer __P((void *));
|
2002-01-24 11:21:30 +03:00
|
|
|
# endif
|
|
|
|
# else
|
1997-03-29 03:54:55 +03:00
|
|
|
extern int ipfr_slowtimer __P((void));
|
2002-01-24 11:21:30 +03:00
|
|
|
# endif /* (BSD >= 199306) || SOLARIS */
|
|
|
|
#else
|
|
|
|
extern void ipfr_slowtimer __P((void));
|
|
|
|
#endif /* _KERNEL */
|
1998-02-10 04:26:19 +03:00
|
|
|
|
|
|
|
#endif /* _NETINET_IP_FRAG_H_ */
|