NetBSD/sys/netinet/ip_frag.h

62 lines
1.5 KiB
C
Raw Normal View History

/* $NetBSD: ip_frag.h,v 1.10 1998/02/10 01:26:53 perry Exp $ */
/*
* Copyright (C) 1993-1997 by Darren Reed.
*
* Redistribution and use in source and binary forms are permitted
* provided that this notice is preserved and due credit is given
* to the original author and the contributors.
*
* @(#)ip_frag.h 1.5 3/24/96
* Id: ip_frag.h,v 2.0.2.12 1997/10/23 14:56:01 darrenr Exp
*/
#ifndef _NETINET_IP_FRAG_H_
#define _NETINET_IP_FRAG_H_
#define IPFT_SIZE 257
typedef struct ipfr {
struct ipfr *ipfr_next, *ipfr_prev;
1997-05-25 16:40:11 +04:00
void *ipfr_data;
struct in_addr ipfr_src;
struct in_addr ipfr_dst;
u_short ipfr_id;
u_char ipfr_p;
u_char ipfr_tos;
u_short ipfr_off;
u_short ipfr_ttl;
u_char ipfr_pass;
} 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;
struct ipfr **ifs_table;
1997-05-25 16:40:11 +04:00
struct ipfr **ifs_nattab;
} ipfrstat_t;
#define IPFR_CMPSZ (4 + 4 + 2 + 1 + 1)
1997-07-05 09:38:14 +04:00
extern int fr_ipfrttl;
extern ipfrstat_t *ipfr_fragstats __P((void));
extern int ipfr_newfrag __P((ip_t *, fr_info_t *, int));
extern int ipfr_nat_newfrag __P((ip_t *, fr_info_t *, int, struct nat *));
extern nat_t *ipfr_nat_knownfrag __P((ip_t *, fr_info_t *));
extern int ipfr_knownfrag __P((ip_t *, fr_info_t *));
extern void ipfr_forget __P((void *));
1997-07-05 09:38:14 +04:00
extern void ipfr_unload __P((void));
1997-05-25 16:40:11 +04:00
#if (BSD >= 199306) || SOLARIS || defined(__sgi)
extern void ipfr_slowtimer __P((void));
#else
extern int ipfr_slowtimer __P((void));
#endif
#endif /* _NETINET_IP_FRAG_H_ */