Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys Add comments for some ioctls and structs; fix a typo...
details: https://anonhg.NetBSD.org/src/rev/986bd5d85ce7
branches: trunk
changeset: 772077:986bd5d85ce7
user: apb <apb%NetBSD.org@localhost>
date: Sat Dec 17 12:59:21 2011 +0000
description:
Add comments for some ioctls and structs; fix a typo in another comment.
diffstat:
sys/sys/rnd.h | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (45 lines):
diff -r 66ac1974a95e -r 986bd5d85ce7 sys/sys/rnd.h
--- a/sys/sys/rnd.h Sat Dec 17 12:45:14 2011 +0000
+++ b/sys/sys/rnd.h Sat Dec 17 12:59:21 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rnd.h,v 1.26 2011/11/29 03:50:32 tls Exp $ */
+/* $NetBSD: rnd.h,v 1.27 2011/12/17 12:59:21 apb Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -63,6 +63,7 @@
uint8_t digest[SHA1_DIGEST_LENGTH];
} rndsave_t;
+/* Statistics exposed by RNDGETPOOLSTAT */
typedef struct
{
uint32_t poolsize;
@@ -118,7 +119,7 @@
uint32_t total; /* entropy from this source */
uint32_t type; /* type */
uint32_t flags; /* flags */
- void *state; /* state informaiton */
+ void *state; /* state information */
size_t test_cnt; /* how much test data accumulated? */
rngtest_t *test; /* test data for RNG type sources */
} krndsource_t;
@@ -197,6 +198,10 @@
uint32_t mask; /* mask for the flags we are setting */
} rndctl_t;
+/*
+ * Add entropy to the pool. len is the data length, in bytes.
+ * entropy is the number of bits of estimated entropy in the data.
+ */
typedef struct {
uint32_t len;
uint32_t entropy;
@@ -208,6 +213,6 @@
#define RNDGETSRCNAME _IOWR('R', 103, rndstat_name_t) /* get src by name */
#define RNDCTL _IOW('R', 104, rndctl_t) /* set/clear source flags */
#define RNDADDDATA _IOW('R', 105, rnddata_t) /* add data to the pool */
-#define RNDGETPOOLSTAT _IOR('R', 106, rndpoolstat_t)
+#define RNDGETPOOLSTAT _IOR('R', 106, rndpoolstat_t) /* get statistics */
#endif /* !_SYS_RND_H_ */
Home |
Main Index |
Thread Index |
Old Index