summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_fil.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2000-09-07 19:45:05 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2000-09-07 19:45:05 +0000
commitc4c96483aacda3818e04438503a92cd720834ad8 (patch)
tree8590b5a7992a7b2af6710cb49ade58cdd350a455 /sys/netinet/ip_fil.c
parent9e78c45e84c1df9eff2fe3424f1c69b7207ad957 (diff)
New timeouts.
Diffstat (limited to 'sys/netinet/ip_fil.c')
-rw-r--r--sys/netinet/ip_fil.c14
1 files changed, 12 insertions, 2 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);