1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Add missing include guards and move the existing ones out of the

implementation namespace.
This commit is contained in:
Dag-Erling Smørgrav 2013-10-09 09:11:14 +00:00
parent a332c3c798
commit 3e8957ea85
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/random_number_generator/; revision=256182
8 changed files with 34 additions and 9 deletions

View File

@ -26,6 +26,9 @@
* $FreeBSD$
*/
#ifndef SYS_DEV_RANDOM_HASH_H_INCLUDED
#define SYS_DEV_RANDOM_HASH_H_INCLUDED
#define KEYSIZE 32 /* (in bytes) == 256 bits */
#define BLOCKSIZE 16 /* (in bytes) == 128 bits */
@ -43,3 +46,5 @@ void randomdev_hash_iterate(struct randomdev_hash *, void *, size_t);
void randomdev_hash_finish(struct randomdev_hash *, void *);
void randomdev_encrypt_init(struct randomdev_key *, void *);
void randomdev_encrypt(struct randomdev_key *context, void *, void *, unsigned);
#endif

View File

@ -27,8 +27,8 @@
* $FreeBSD$
*/
#ifndef __LIVE_ENTROPY_SOURCES__
#define __LIVE_ENTROPY_SOURCES__
#ifndef SYS_DEV_RANDOM_LIVE_ENTROPY_SOURCES_H_INCLUDED
#define SYS_DEV_RANDOM_LIVE_ENTROPY_SOURCES_H_INCLUDED
/*
* Live entropy source is a source of entropy that can provide
@ -57,4 +57,4 @@ void live_entropy_sources_feed(int, event_proc_f);
MODULE_VERSION(name, ver); \
MODULE_DEPEND(name, random, 1, 1, 1);
#endif /* __LIVE_ENTROPY_SOURCES__ */
#endif /* SYS_DEV_RANDOM_LIVE_ENTROPY_SOURCES_H_INCLUDED */

View File

@ -26,8 +26,8 @@
* $FreeBSD$
*/
#ifndef __RANDOM_ADAPTORS_H__
#define __RANDOM_ADAPTORS_H__
#ifndef SYS_DEV_RANDOM_RANDOM_ADAPTORS_H_INCLUDED
#define SYS_DEV_RANDOM_RANDOM_ADAPTORS_H_INCLUDED
#include <sys/eventhandler.h>
@ -68,4 +68,4 @@ EVENTHANDLER_DECLARE(random_adaptor_attach, random_adaptor_attach_hook);
SYSCTL_DECL(_kern_random);
#endif /* SYSCTL_DECL */
#endif /* __RANDOM_ADAPTORS_H__ */
#endif /* SYS_DEV_RANDOM_RANDOM_ADAPTORS_H_INCLUDED */

View File

@ -26,8 +26,8 @@
* $FreeBSD$
*/
#ifndef __RANDOM_HARVEST_H__
#define __RANDOM_HARVEST_H__
#ifndef SYS_DEV_RANDOM_RANDOM_HARVESTQ_H_INCLUDED
#define SYS_DEV_RANDOM_RANDOM_HARVESTQ_H_INCLUDED
typedef void (*event_proc_f)(struct harvest *event);
@ -39,4 +39,4 @@ void random_harvestq_internal(u_int64_t, const void *,
extern int random_kthread_control;
extern struct mtx harvest_mtx;
#endif /* __RANDOM_HARVEST_H__ */
#endif /* SYS_DEV_RANDOM_RANDOM_HARVESTQ_H_INCLUDED */

View File

@ -26,6 +26,9 @@
* $FreeBSD$
*/
#ifndef SYS_DEV_RANDOM_RANDOMDEV_H_INCLUDED
#define SYS_DEV_RANDOM_RANDOMDEV_H_INCLUDED
/* This header contains only those definitions that are global
* and non algorithm-specific for the entropy processor
*/
@ -54,3 +57,5 @@ struct random_hardware_source {
enum esource source;
random_read_func_t *read;
};
#endif

View File

@ -26,6 +26,9 @@
* $FreeBSD$
*/
#ifndef SYS_DEV_RANDOM_RANDOMDEV_SOFT_H_INCLUDED
#define SYS_DEV_RANDOM_RANDOMDEV_SOFT_H_INCLUDED
/* This header contains only those definitions that are global
* and harvester-specific for the entropy processor
*/
@ -79,3 +82,5 @@ random_check_uint_##name(SYSCTL_HANDLER_ARGS) \
return (sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, \
req)); \
}
#endif

View File

@ -26,5 +26,10 @@
* $FreeBSD$
*/
#ifndef SYS_DEV_RANDOM_RWFILE_H_INCLUDED
#define SYS_DEV_RANDOM_RWFILE_H_INCLUDED
int randomdev_read_file(const char *filename, void *buf, size_t);
int randomdev_write_file(const char *filename, void *buf, size_t);
#endif

View File

@ -26,7 +26,12 @@
* $FreeBSD$
*/
#ifndef SYS_DEV_RANDOM_YARROW_H_INCLUDED
#define SYS_DEV_RANDOM_YARROW_H_INCLUDED
void random_yarrow_init_alg(struct sysctl_ctx_list *);
void random_yarrow_deinit_alg(void);
int random_yarrow_read(void *, int);
void random_yarrow_reseed(void);
#endif