summaryrefslogtreecommitdiffstats
path: root/sys/dev/rndvar.h
diff options
context:
space:
mode:
authorflipk <flipk@openbsd.org>1997-06-22 04:58:03 +0000
committerflipk <flipk@openbsd.org>1997-06-22 04:58:03 +0000
commit082fb45b162b15d808cf2fa58e970f35fc4a1e2d (patch)
tree4a6b10c987b2b91d52118c4487872299c79abc7e /sys/dev/rndvar.h
parentThe mac68k ite emulates a vt100, _not_ a vt220. This is the sorta simple (diff)
downloadwireguard-openbsd-082fb45b162b15d808cf2fa58e970f35fc4a1e2d.tar.xz
wireguard-openbsd-082fb45b162b15d808cf2fa58e970f35fc4a1e2d.zip
wasn't a race after all. properly initialize event_q pointers so the
last one doesn't point off the end.
Diffstat (limited to 'sys/dev/rndvar.h')
-rw-r--r--sys/dev/rndvar.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/sys/dev/rndvar.h b/sys/dev/rndvar.h
index 39ac7934b38..28edbc99322 100644
--- a/sys/dev/rndvar.h
+++ b/sys/dev/rndvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rndvar.h,v 1.8 1997/06/21 04:59:37 flipk Exp $ */
+/* $OpenBSD: rndvar.h,v 1.9 1997/06/22 04:58:06 flipk Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff.
@@ -46,7 +46,27 @@
#define RND_ARND 4 /* aRC4 based random number generator */
#define RND_NODEV 5 /* First invalid minor device number */
+struct rndstats {
+ u_long rnd_total; /* total bits of entropy generated */
+ u_long rnd_used; /* strong data bits read so far */
+ u_long arc4_reads;/* aRC4 data bytes read so far */
+
+ u_long rnd_timer; /* timer calls */
+ u_long rnd_mouse; /* mouse calls */
+ u_long rnd_tty; /* tty calls */
+ u_long rnd_disk; /* block devices calls */
+ u_long rnd_net; /* net calls */
+
+ u_long rnd_reads; /* strong read calls */
+ u_long rnd_waits; /* sleep for data */
+ u_long rnd_enqs; /* enqueue calls */
+ u_long rnd_deqs; /* dequeue calls */
+ u_long rnd_drops; /* queue-full drops */
+ u_long rnd_drople;/* queue low watermark low entropy drops */
+};
+
#ifdef _KERNEL
+extern struct rndstats rndstats;
extern void add_mouse_randomness __P((u_int32_t));
extern void add_net_randomness __P((int));