The first a bug in pax and should be commited to FBSD, too.
[dragonfly.git] / contrib / ipfilter / ip_frag.h
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.7 2002/07/06 14:17:51 darrenr Exp $
8  */
9
10 #ifndef __IP_FRAG_H__
11 #define __IP_FRAG_H__
12
13 #define IPFT_SIZE       257
14
15 typedef struct  ipfr    {
16         struct  ipfr    *ipfr_next, *ipfr_prev;
17         void    *ipfr_data;
18         struct  in_addr ipfr_src;
19         struct  in_addr ipfr_dst;
20         void    *ipfr_ifp;
21         u_32_t  ipfr_optmsk;
22         u_short ipfr_secmsk;
23         u_short ipfr_auth;
24         u_short ipfr_id;
25         u_char  ipfr_p;
26         u_char  ipfr_tos;
27         u_short ipfr_off;
28         u_char  ipfr_ttl;
29         u_char  ipfr_seen0;
30         frentry_t *ipfr_rule;
31 } ipfr_t;
32
33
34 typedef struct  ipfrstat {
35         u_long  ifs_exists;     /* add & already exists */
36         u_long  ifs_nomem;
37         u_long  ifs_new;
38         u_long  ifs_hits;
39         u_long  ifs_expire;
40         u_long  ifs_inuse;
41         struct  ipfr    **ifs_table;
42         struct  ipfr    **ifs_nattab;
43 } ipfrstat_t;
44
45 #define IPFR_CMPSZ      (offsetof(ipfr_t, ipfr_off) - \
46                          offsetof(ipfr_t, ipfr_src))
47
48 extern  int     fr_ipfrttl;
49 extern  int     fr_frag_lock;
50 extern  ipfrstat_t      *ipfr_fragstats __P((void));
51 extern  int     ipfr_newfrag __P((ip_t *, fr_info_t *));
52 extern  int     ipfr_nat_newfrag __P((ip_t *, fr_info_t *, struct nat *));
53 extern  nat_t   *ipfr_nat_knownfrag __P((ip_t *, fr_info_t *));
54 extern  frentry_t *ipfr_knownfrag __P((ip_t *, fr_info_t *));
55 extern  void    ipfr_forget __P((void *));
56 extern  void    ipfr_unload __P((void));
57 extern  void    ipfr_fragexpire __P((void));
58
59 #ifdef _KERNEL
60 # if     (BSD >= 199306) || SOLARIS || defined(__sgi)
61 #  if defined(SOLARIS2) && (SOLARIS2 < 7)
62 extern  void    ipfr_slowtimer __P((void));
63 #  else
64 extern  void    ipfr_slowtimer __P((void *));
65 #  endif
66 # else
67 extern  int     ipfr_slowtimer __P((void));
68 # endif /* (BSD >= 199306) || SOLARIS */
69 #else
70 extern  void    ipfr_slowtimer __P((void));
71 #endif /* _KERNEL */
72
73 #endif  /* __IP_FIL_H__ */