summaryrefslogtreecommitdiffstats
path: root/sys/dev/randomdev/yarrow.h
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2000-07-23 11:08:16 +0000
committermarkm <markm@FreeBSD.org>2000-07-23 11:08:16 +0000
commit5cdbfcb1a2cf4b4ded5bff0b970f29e18fada454 (patch)
tree21be041cff086690f613f725fd550c3d4efd3aad /sys/dev/randomdev/yarrow.h
parent230f54e2d8923fa7f9d8407246ac8735f0245caf (diff)
downloadFreeBSD-src-5cdbfcb1a2cf4b4ded5bff0b970f29e18fada454.zip
FreeBSD-src-5cdbfcb1a2cf4b4ded5bff0b970f29e18fada454.tar.gz
Clean this up with some BDE-inspired fixes.
o Make the comments KNF-compliant. o Use nanotime instead of getnanotime; the manpage lies about the kern.timecounter.method - it has been removed. o Fix the ENTROPYSOURCE const permanently. o Make variable names more consistent. o Make function prototypes more consistent. Some more needs to be done; to follow.
Diffstat (limited to 'sys/dev/randomdev/yarrow.h')
-rw-r--r--sys/dev/randomdev/yarrow.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/sys/dev/randomdev/yarrow.h b/sys/dev/randomdev/yarrow.h
index d2471bc..e64a1bc 100644
--- a/sys/dev/randomdev/yarrow.h
+++ b/sys/dev/randomdev/yarrow.h
@@ -26,13 +26,14 @@
* $FreeBSD$
*/
-#define ENTROPYBIN 256 /* buckets to harvest entropy events */
-#define ENTROPYSOURCE 2 /* entropy sources (actually classes) */
- /* The entropy classes will as follows: */
- /* 0 - Keyboard */
- /* 1 - Mouse */
- /* to start with. More will be added */
+/* #define ENTROPYSOURCE nn entropy sources (actually classes)
+ * The entropy classes will as follows:
+ * 0 - Direct write
+ * 1 - Keyboard
+ * 2 - Mouse
+ */
+#define ENTROPYBIN 256 /* buckets to harvest entropy events */
#define TIMEBIN 16 /* max value for Pt/t */
#define KEYSIZE 32 /* 32 bytes == 256 bits */
@@ -44,7 +45,9 @@ void random_deinit(void);
void random_init_harvester(void (*)(struct timespec *, u_int64_t, u_int, u_int, enum esource));
void random_deinit_harvester(void);
-/* This is the beasite that needs protecting. It contains all of the
+void write_random(char *, u_int);
+
+/* This is the beastie that needs protecting. It contains all of the
* state that we are excited about.
* This is a biiig structure. It may move over to a malloc(9)ed
* replacement.
OpenPOWER on IntegriCloud