/* -*-c-*-
*
- * $Id: noise.h,v 1.3 1999/12/22 15:57:55 mdw Exp $
+ * $Id: noise.h,v 1.6 2004/04/08 01:36:15 mdw Exp $
*
* Acquisition of environmental noise (Unix-specific)
*
* MA 02111-1307, USA.
*/
-/*----- Revision history --------------------------------------------------*
- *
- * $Log: noise.h,v $
- * Revision 1.3 1999/12/22 15:57:55 mdw
- * Label system-specific parts more clearly.
- *
- * Revision 1.2 1999/12/10 23:29:48 mdw
- * Change header file guard names.
- *
- * Revision 1.1 1999/09/03 08:41:12 mdw
- * Initial import.
- *
- */
-
#ifndef CATACOMB_NOISE_H
#define CATACOMB_NOISE_H
/*----- Noise source definition -------------------------------------------*/
-extern rand_source noise_source;
+extern const rand_source noise_source;
/*----- Magic numbers -----------------------------------------------------*/
extern int noise_filter(rand_pool */*r*/, int /*good*/, const char */*c*/);
+/* --- @noise_freewheel@ --- *
+ *
+ * Arguments: @rand_pool *r@ = pointer to a randomness pool
+ *
+ * Returns: Nonzero if some randomness was contributed.
+ *
+ * Use: Runs a free counter for a short while as a desparate attempt
+ * to get randomness from somewhere. This is actually quite
+ * effective.
+ */
+
+int noise_freewheel(rand_pool */*r*/);
+
+/* --- @noise_enquire@ --- *
+ *
+ * Arguments: @rand_pool *r@ = pointer to a randomness pool
+ *
+ * Returns: Nonzero if some randomness was contributed.
+ *
+ * Use: Runs some shell commands to enquire about the prevailing
+ * environment. This can gather quite a lot of low-quality
+ * entropy.
+ */
+
+extern int noise_enquire(rand_pool */*r*/);
+
/* --- @noise_acquire@ --- *
*
* Arguments: @rand_pool *r@ = pointer to a randomness pool