summaryrefslogtreecommitdiffstats
path: root/sys/contrib/ipfilter/netinet/ip_frag.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/ipfilter/netinet/ip_frag.h')
-rw-r--r--sys/contrib/ipfilter/netinet/ip_frag.h102
1 files changed, 49 insertions, 53 deletions
diff --git a/sys/contrib/ipfilter/netinet/ip_frag.h b/sys/contrib/ipfilter/netinet/ip_frag.h
index 227dbcd..6b0c1be 100644
--- a/sys/contrib/ipfilter/netinet/ip_frag.h
+++ b/sys/contrib/ipfilter/netinet/ip_frag.h
@@ -1,7 +1,7 @@
/* $FreeBSD$ */
/*
- * Copyright (C) 1993-2001 by Darren Reed.
+ * Copyright (C) 2012 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
@@ -21,26 +21,33 @@ typedef struct ipfr {
void *ipfr_data;
frentry_t *ipfr_rule;
u_long ipfr_ttl;
+ u_int ipfr_pkts;
+ u_int ipfr_bytes;
+ u_int ipfr_badorder;
int ipfr_ref;
u_short ipfr_off;
- u_short ipfr_seen0;
+ u_short ipfr_firstend;
+ u_char ipfr_p;
+ u_char ipfr_seen0;
/*
* All of the fields, from ipfr_ifp to ipfr_pass, are compared
* using bcmp to see if an identical entry is present. It is
* therefore important for this set to remain together.
*/
void *ipfr_ifp;
- struct in_addr ipfr_src;
- struct in_addr ipfr_dst;
+ i6addr_t ipfr_source;
+ i6addr_t ipfr_dest;
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;
+ u_32_t ipfr_id;
u_32_t ipfr_pass;
+ int ipfr_v;
} ipfr_t;
+#define ipfr_src ipfr_source.in4
+#define ipfr_dst ipfr_dest.in4
+
typedef struct ipfrstat {
u_long ifs_exists; /* add & already exists */
@@ -51,6 +58,14 @@ typedef struct ipfrstat {
u_long ifs_inuse;
u_long ifs_retrans0;
u_long ifs_short;
+ u_long ifs_bad;
+ u_long ifs_overlap;
+ u_long ifs_unordered;
+ u_long ifs_strict;
+ u_long ifs_miss;
+ u_long ifs_maximum;
+ u_long ifs_newbad;
+ u_long ifs_newrestrictnot0;
struct ipfr **ifs_table;
struct ipfr **ifs_nattab;
} ipfrstat_t;
@@ -58,51 +73,32 @@ typedef struct ipfrstat {
#define IPFR_CMPSZ (offsetof(ipfr_t, ipfr_pass) - \
offsetof(ipfr_t, ipfr_ifp))
-extern ipfr_t *ipfr_list, **ipfr_tail;
-extern ipfr_t *ipfr_natlist, **ipfr_nattail;
-extern int ipfr_size;
-extern int fr_ipfrttl;
-extern int fr_frag_lock;
-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 *));
-#ifdef USE_MUTEXES
-extern void fr_fragderef __P((ipfr_t **, ipfrwlock_t *));
-extern int fr_nextfrag __P((ipftoken_t *, ipfgeniter_t *, ipfr_t **, \
- ipfr_t ***, ipfrwlock_t *));
-#else
-extern void fr_fragderef __P((ipfr_t **));
-extern int fr_nextfrag __P((ipftoken_t *, ipfgeniter_t *, ipfr_t **, \
- ipfr_t ***));
-#endif
-
-extern void fr_forget __P((void *));
-extern void fr_forgetnat __P((void *));
-extern void fr_fragclear __P((void));
-extern void fr_fragexpire __P((void));
-
-#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));
-# else
-extern void fr_slowtimer __P((void *));
-# endif
-#else
-# if defined(linux) && defined(_KERNEL)
-extern void fr_slowtimer __P((long));
-# else
-extern int fr_slowtimer __P((void));
-# endif
-#endif
+extern void *ipf_frag_soft_create __P((ipf_main_softc_t *));
+extern int ipf_frag_soft_init __P((ipf_main_softc_t *, void *));
+extern int ipf_frag_soft_fini __P((ipf_main_softc_t *, void *));
+extern void ipf_frag_soft_destroy __P((ipf_main_softc_t *, void *));
+extern int ipf_frag_main_load __P((void));
+extern int ipf_frag_main_unload __P((void));
+extern int ipf_frag_load __P((void));
+extern void ipf_frag_clear __P((ipf_main_softc_t *));
+extern void ipf_frag_expire __P((ipf_main_softc_t *));
+extern void ipf_frag_forget __P((void *));
+extern int ipf_frag_init __P((void));
+extern u_32_t ipf_frag_ipidknown __P((fr_info_t *));
+extern int ipf_frag_ipidnew __P((fr_info_t *, u_32_t));
+extern frentry_t *ipf_frag_known __P((fr_info_t *, u_32_t *));
+extern void ipf_frag_natforget __P((ipf_main_softc_t *, void *));
+extern int ipf_frag_natnew __P((ipf_main_softc_t *, fr_info_t *, u_32_t, struct nat *));
+extern nat_t *ipf_frag_natknown __P((fr_info_t *));
+extern int ipf_frag_new __P((ipf_main_softc_t *, fr_info_t *, u_32_t));
+extern ipfrstat_t *ipf_frag_stats __P((void *));
+extern void ipf_frag_setlock __P((void *, int));
+extern void ipf_frag_pkt_deref __P((ipf_main_softc_t *, void *));
+extern int ipf_frag_pkt_next __P((ipf_main_softc_t *, ipftoken_t *,
+ ipfgeniter_t *));
+extern void ipf_frag_nat_deref __P((ipf_main_softc_t *, void *));
+extern int ipf_frag_nat_next __P((ipf_main_softc_t *, ipftoken_t *,
+ ipfgeniter_t *));
+extern void ipf_slowtimer __P((ipf_main_softc_t *));
#endif /* __IP_FRAG_H__ */
OpenPOWER on IntegriCloud