aboutsummaryrefslogtreecommitdiffstats
path: root/rngd.h
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2010-07-03 22:43:21 -0400
committerJeff Garzik <jgarzik@redhat.com>2010-07-03 22:43:21 -0400
commitd1b4c50492be7346f9b4eea44a3e18b15cbca0c5 (patch)
tree2cbacc5fe0f6816eab534a2ef5426693d425904e /rngd.h
parentdc51bdc91b67e16b1b2cdfd86cc47d98612bf93a (diff)
downloadrng-tools-d1b4c50492be7346f9b4eea44a3e18b15cbca0c5.tar.gz
rng-tools-d1b4c50492be7346f9b4eea44a3e18b15cbca0c5.tar.xz
rng-tools-d1b4c50492be7346f9b4eea44a3e18b15cbca0c5.zip
Add TPM RNG support.
also, trim trailing whitespace. Contributed by Dell, with bug fixes by David Howells @ Red Hat. Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'rngd.h')
-rw-r--r--rngd.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/rngd.h b/rngd.h
index dbc4419..e2e3a62 100644
--- a/rngd.h
+++ b/rngd.h
@@ -7,7 +7,7 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -35,16 +35,27 @@
/* Command line arguments and processing */
struct arguments {
char *random_name;
- char *rng_name;
-
+
int random_step;
int fill_watermark;
double poll_timeout;
int daemon;
+ int enable_tpm;
};
extern struct arguments *arguments;
+/* structures to store rng information */
+struct rng {
+ char *rng_name;
+ int rng_fd;
+
+ int (*xread) (void *buf, size_t size, struct rng *ent_src);
+ fips_ctx_t *fipsctx;
+
+ struct rng *next;
+};
+
/* Background/daemon mode */
extern int am_daemon; /* Nonzero if we went daemon */
@@ -61,5 +72,6 @@ extern int am_daemon; /* Nonzero if we went daemon */
} \
} while (0)
+extern void list_add(struct rng *ent_src);
#endif /* RNGD__H */