| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: rnd_private.h,v 1.8 2015/04/13 22:43:41 riastradh Exp $ */ | | 1 | /* $NetBSD: rnd_private.h,v 1.9 2015/04/14 13:03:37 riastradh Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1997 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 1997 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Michael Graff <explorer@flame.org>. This code uses ideas and | | 8 | * by Michael Graff <explorer@flame.org>. This code uses ideas and |
9 | * algorithms from the Linux driver written by Ted Ts'o. | | 9 | * algorithms from the Linux driver written by Ted Ts'o. |
10 | * | | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | | 11 | * Redistribution and use in source and binary forms, with or without |
12 | * modification, are permitted provided that the following conditions | | 12 | * modification, are permitted provided that the following conditions |
13 | * are met: | | 13 | * are met: |
14 | * 1. Redistributions of source code must retain the above copyright | | 14 | * 1. Redistributions of source code must retain the above copyright |
| @@ -27,28 +27,28 @@ | | | @@ -27,28 +27,28 @@ |
27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | 27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
30 | * POSSIBILITY OF SUCH DAMAGE. | | 30 | * POSSIBILITY OF SUCH DAMAGE. |
31 | */ | | 31 | */ |
32 | | | 32 | |
33 | #ifndef _DEV_RNDPRIVATE_H | | 33 | #ifndef _DEV_RNDPRIVATE_H |
34 | #define _DEV_RNDPRIVATE_H | | 34 | #define _DEV_RNDPRIVATE_H |
35 | | | 35 | |
36 | #include <sys/types.h> | | 36 | #include <sys/types.h> |
37 | #include <sys/mutex.h> | | 37 | #include <sys/mutex.h> |
38 | #include <sys/queue.h> | | 38 | #include <sys/queue.h> |
39 | #include <sys/rndio.h> | | 39 | #include <sys/rndio.h> |
40 | #include <sys/rndsource.h> | | | |
41 | #include <sys/rndpool.h> | | 40 | #include <sys/rndpool.h> |
| | | 41 | #include <sys/rndsource.h> |
42 | | | 42 | |
43 | /* | | 43 | /* |
44 | * Number of bytes returned per hash. This value is used in both | | 44 | * Number of bytes returned per hash. This value is used in both |
45 | * rnd.c and rndpool.c to decide when enough entropy exists to do a | | 45 | * rnd.c and rndpool.c to decide when enough entropy exists to do a |
46 | * hash to extract it. | | 46 | * hash to extract it. |
47 | */ | | 47 | */ |
48 | #define RND_ENTROPY_THRESHOLD 10 | | 48 | #define RND_ENTROPY_THRESHOLD 10 |
49 | | | 49 | |
50 | /* | | 50 | /* |
51 | * Used by rnd_extract_data() and rndpool_extract_data() to describe how | | 51 | * Used by rnd_extract_data() and rndpool_extract_data() to describe how |
52 | * "good" the data has to be. | | 52 | * "good" the data has to be. |
53 | */ | | 53 | */ |
54 | #define RND_EXTRACT_ANY 0 /* extract anything, even if no entropy */ | | 54 | #define RND_EXTRACT_ANY 0 /* extract anything, even if no entropy */ |