ip_frag.h revision 57096
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 */ 11 12#ifndef __IP_FRAG_H__ 13#define __IP_FRAG_H__ 14 15#define IPFT_SIZE 257 16 17typedef struct ipfr { 18 struct ipfr *ipfr_next, *ipfr_prev; 19 void *ipfr_data; 20 struct in_addr ipfr_src; 21 struct in_addr ipfr_dst; 22 u_short ipfr_id; 23 u_char ipfr_p; 24 u_char ipfr_tos; 25 u_short ipfr_off; 26 u_short ipfr_ttl; 27 frentry_t *ipfr_rule; 28} ipfr_t; 29 30 31typedef struct ipfrstat { 32 u_long ifs_exists; /* add & already exists */ 33 u_long ifs_nomem; 34 u_long ifs_new; 35 u_long ifs_hits; 36 u_long ifs_expire; 37 u_long ifs_inuse; 38 struct ipfr **ifs_table; 39 struct ipfr **ifs_nattab; 40} ipfrstat_t; 41 42#define IPFR_CMPSZ (4 + 4 + 2 + 1 + 1) 43 44extern int fr_ipfrttl; 45extern ipfrstat_t *ipfr_fragstats __P((void)); 46extern int ipfr_newfrag __P((ip_t *, fr_info_t *, u_int)); 47extern int ipfr_nat_newfrag __P((ip_t *, fr_info_t *, u_int, struct nat *)); 48extern nat_t *ipfr_nat_knownfrag __P((ip_t *, fr_info_t *)); 49extern frentry_t *ipfr_knownfrag __P((ip_t *, fr_info_t *)); 50extern void ipfr_forget __P((void *)); 51extern void ipfr_unload __P((void)); 52 53#if (BSD >= 199306) || SOLARIS || defined(__sgi) 54# if defined(SOLARIS2) && (SOLARIS2 < 7) 55extern void ipfr_slowtimer __P((void)); 56# else 57extern void ipfr_slowtimer __P((void *)); 58# endif 59#else 60extern int ipfr_slowtimer __P((void)); 61#endif 62 63#endif /* __IP_FIL_H__ */ 64