NetBSD/sys/netinet/ip_frag.h

87 lines
2.1 KiB
C
Raw Normal View History

2004-03-28 13:00:53 +04:00
/* $NetBSD: ip_frag.h,v 1.19 2004/03/28 09:00:57 martti Exp $ */
/*
2002-01-24 11:21:30 +03:00
* Copyright (C) 1993-2001 by Darren Reed.
*
2002-01-24 11:21:30 +03:00
* See the IPFILTER.LICENCE file for details on licencing.
*
* @(#)ip_frag.h 1.5 3/24/96
2004-03-28 13:00:53 +04:00
* Id: ip_frag.h,v 2.23 2004/01/08 13:34:28 darrenr Exp
*/
#ifndef _NETINET_IP_FRAG_H_
#define _NETINET_IP_FRAG_H_
#define IPFT_SIZE 257
typedef struct ipfr {
2004-03-28 13:00:53 +04:00
struct ipfr *ipfr_hnext, **ipfr_hprev;
struct ipfr *ipfr_next, **ipfr_prev;
1997-05-25 16:40:11 +04:00
void *ipfr_data;
2004-03-28 13:00:53 +04:00
void *ipfr_ifp;
struct in_addr ipfr_src;
struct in_addr ipfr_dst;
2002-01-24 11:21:30 +03:00
u_32_t ipfr_optmsk;
u_short ipfr_secmsk;
u_short ipfr_auth;
u_short ipfr_id;
u_char ipfr_p;
u_char ipfr_tos;
2004-03-28 13:00:53 +04:00
u_32_t ipfr_pass;
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;
} 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;
2004-03-28 13:00:53 +04:00
u_long ifs_retrans0;
u_long ifs_short;
struct ipfr **ifs_table;
1997-05-25 16:40:11 +04:00
struct ipfr **ifs_nattab;
} ipfrstat_t;
2004-03-28 13:00:53 +04:00
#define IPFR_CMPSZ (offsetof(ipfr_t, ipfr_pass) - \
offsetof(ipfr_t, ipfr_ifp))
2004-03-28 13:00:53 +04:00
extern int ipfr_size;
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;
2004-03-28 13:00:53 +04:00
extern int fr_fraginit __P((void));
extern void fr_fragunload __P((void));
extern ipfrstat_t *fr_fragstats __P((void));
extern int fr_newfrag __P((fr_info_t *, u_32_t));
extern frentry_t *fr_knownfrag __P((fr_info_t *, u_32_t *));
extern int fr_nat_newfrag __P((fr_info_t *, u_32_t, struct nat *));
extern nat_t *fr_nat_knownfrag __P((fr_info_t *));
extern int fr_ipid_newfrag __P((fr_info_t *, u_32_t));
extern u_32_t fr_ipid_knownfrag __P((fr_info_t *));
extern void fr_forget __P((void *));
extern void fr_forgetnat __P((void *));
extern void fr_fragclear __P((void));
extern void fr_fragexpire __P((void));
1997-05-25 16:40:11 +04:00
2004-03-28 13:00:53 +04:00
#if defined(_KERNEL) && ((BSD >= 199306) || SOLARIS || defined(__sgi) \
|| defined(__osf__) || (defined(__sgi) && (IRIX >= 60500)))
# if defined(SOLARIS2) && (SOLARIS2 < 7)
extern void fr_slowtimer __P((void));
2002-01-24 11:21:30 +03:00
# else
2004-03-28 13:00:53 +04:00
extern void fr_slowtimer __P((void *));
# endif
2002-01-24 11:21:30 +03:00
#else
2004-03-28 13:00:53 +04:00
extern int fr_slowtimer __P((void));
#endif
#endif /* _NETINET_IP_FRAG_H_ */