/*
 * Mach Kernel - Entropy Generating Device
 * Copyright (C) 2007 Free Software Foundation.
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, 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
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 */

/* Entropy device header */

#ifndef _DEVICE_ENTROPY_H_
#define _DEVICE_ENTROPY_H_

#ifdef MACH_KERNEL

#include <sys/types.h>
#include <device/conf.h>
#include <device/ds_routines.h>
#include <device/io_req.h>
#include <device/device_types.h>

#define ENTROPYBUFSIZE sizeof(unsigned long)*128 

/* typedef struct {
  unsigned long ticks;
  int data;
} entropy_data; */

io_return_t entropyopen(dev_t dev, int flag, io_req_t ior);
io_return_t entropyclose(dev_t dev, int flag);
io_return_t entropyread(dev_t dev, io_req_t ior);
io_return_t entropygetstat(dev_t dev, int flavor,
			   int *data, unsigned int *count);
void entropy_putchar(int c);
void entropy_putdata(void *data, int size);

#endif /* MACH_KERNEL */
#endif /* ! _DEVICE_ENTROPY_H_ */
