diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2000-09-07 19:45:05 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2000-09-07 19:45:05 +0000 |
commit | c4c96483aacda3818e04438503a92cd720834ad8 (patch) | |
tree | 8590b5a7992a7b2af6710cb49ade58cdd350a455 /sys | |
parent | 9e78c45e84c1df9eff2fe3424f1c69b7207ad957 (diff) |
New timeouts.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_fil.c | 14 | ||||
-rw-r--r-- | sys/netinet/ip_frag.c | 10 |
2 files changed, 20 insertions, 4 deletions
diff --git a/sys/netinet/ip_fil.c b/sys/netinet/ip_fil.c index b8243712c19..ce308dacb5c 100644 --- a/sys/netinet/ip_fil.c +++ b/sys/netinet/ip_fil.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_fil.c,v 1.36 2000/08/10 05:50:25 kjell Exp $ */ +/* $OpenBSD: ip_fil.c,v 1.37 2000/09/07 19:45:04 art Exp $ */ /* * Copyright (C) 1993-1998 by Darren Reed. @@ -170,6 +170,11 @@ int fr_running = 0; struct callout_handle ipfr_slowtimer_ch; #endif +#ifdef __OpenBSD__ +#include <sys/timeout.h> +struct timeout ipfr_slowtimer_to; +#endif + #if (_BSDI_VERSION >= 199510) && defined(_KERNEL) # include <sys/device.h> # include <sys/conf.h> @@ -301,7 +306,10 @@ int iplattach() #ifdef _KERNEL # if (__FreeBSD_version >= 300000) && defined(_KERNEL) ipfr_slowtimer_ch = timeout(ipfr_slowtimer, NULL, hz/2); -# else +# elif defined(__OpenBSD__) + timeout_set(&ipfr_slowtimer_to, ipfr_slowtimer, NULL); + timeout_add(&ipfr_slowtimer_to, hz/2); +#else timeout(ipfr_slowtimer, NULL, hz/2); # endif #endif @@ -323,6 +331,8 @@ int ipldetach() #ifdef _KERNEL # if (__FreeBSD_version >= 300000) untimeout(ipfr_slowtimer, NULL, ipfr_slowtimer_ch); +# elif defined(__OpenBSD__) + timeout_del(&ipfr_slowtimer_to); # else # ifdef __sgi untimeout(ipfr_slowtimer); diff --git a/sys/netinet/ip_frag.c b/sys/netinet/ip_frag.c index 4ac9b87c98a..6152e243353 100644 --- a/sys/netinet/ip_frag.c +++ b/sys/netinet/ip_frag.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_frag.c,v 1.18 2000/08/10 05:50:26 kjell Exp $ */ +/* $OpenBSD: ip_frag.c,v 1.19 2000/09/07 19:45:04 art Exp $ */ /* * Copyright (C) 1993-1998 by Darren Reed. @@ -83,10 +83,14 @@ static const char rcsid[] = "@(#)$IPFilter: ip_frag.c,v 2.4.2.5 2000/06/06 15:50 # ifndef IPFILTER_LKM # include <sys/libkern.h> # include <sys/systm.h> -# endif +# endif extern struct callout_handle ipfr_slowtimer_ch; # endif #endif +#ifdef __OpenBSD__ +#include <sys/timeout.h> +extern struct timeout ipfr_slowtimer_to; +#endif ipfr_t *ipfr_heads[IPFT_SIZE]; @@ -514,6 +518,8 @@ int ipfr_slowtimer() # ifndef linux # if (__FreeBSD_version >= 300000) ipfr_slowtimer_ch = timeout(ipfr_slowtimer, NULL, hz/2); +# elif defined(__OpenBSD__) + timeout_add(&ipfr_slowtimer_to, hz/2); # else timeout(ipfr_slowtimer, NULL, hz/2); # endif |