]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/netinet/ip_frag.h
This commit was generated by cvs2svn to compensate for changes in r53809,
[FreeBSD/FreeBSD.git] / sys / netinet / ip_frag.h
1 /*
2  * Copyright (C) 1993-1998 by Darren Reed.
3  *
4  * Redistribution and use in source and binary forms are permitted
5  * provided that this notice is preserved and due credit is given
6  * to the original author and the contributors.
7  *
8  * @(#)ip_frag.h        1.5 3/24/96
9  * $Id: ip_frag.h,v 2.2 1999/08/06 06:26:38 darrenr Exp $
10  * $FreeBSD$
11  */
12
13 #ifndef __IP_FRAG_H__
14 #define __IP_FRAG_H__
15
16 #define IPFT_SIZE       257
17
18 typedef struct  ipfr    {
19         struct  ipfr    *ipfr_next, *ipfr_prev;
20         void    *ipfr_data;
21         struct  in_addr ipfr_src;
22         struct  in_addr ipfr_dst;
23         u_short ipfr_id;
24         u_char  ipfr_p;
25         u_char  ipfr_tos;
26         u_short ipfr_off;
27         u_short ipfr_ttl;
28         frentry_t *ipfr_rule;
29 } ipfr_t;
30
31
32 typedef struct  ipfrstat {
33         u_long  ifs_exists;     /* add & already exists */
34         u_long  ifs_nomem;
35         u_long  ifs_new;
36         u_long  ifs_hits;
37         u_long  ifs_expire;
38         u_long  ifs_inuse;
39         struct  ipfr    **ifs_table;
40         struct  ipfr    **ifs_nattab;
41 } ipfrstat_t;
42
43 #define IPFR_CMPSZ      (4 + 4 + 2 + 1 + 1)
44
45 extern  int     fr_ipfrttl;
46 extern  ipfrstat_t      *ipfr_fragstats __P((void));
47 extern  int     ipfr_newfrag __P((ip_t *, fr_info_t *, u_int));
48 extern  int     ipfr_nat_newfrag __P((ip_t *, fr_info_t *, u_int, struct nat *));
49 extern  nat_t   *ipfr_nat_knownfrag __P((ip_t *, fr_info_t *));
50 extern  frentry_t *ipfr_knownfrag __P((ip_t *, fr_info_t *));
51 extern  void    ipfr_forget __P((void *));
52 extern  void    ipfr_unload __P((void));
53
54 #if     (BSD >= 199306) || SOLARIS || defined(__sgi)
55 # if defined(SOLARIS2) && (SOLARIS2 < 7)
56 extern  void    ipfr_slowtimer __P((void));
57 # else
58 extern  void    ipfr_slowtimer __P((void *));
59 # endif
60 #else
61 extern  int     ipfr_slowtimer __P((void));
62 #endif
63
64 #endif  /* __IP_FIL_H__ */