gem5/ext/dnet/rand.h
Nathan Binkert a102f84540 includes: add ext to the includes path.
move dnet to the correct place so that we use this

--HG--
rename : ext/dnet/dnet/addr.h => ext/dnet/addr.h
rename : ext/dnet/dnet/arp.h => ext/dnet/arp.h
rename : ext/dnet/dnet/blob.h => ext/dnet/blob.h
rename : ext/dnet/dnet/eth.h => ext/dnet/eth.h
rename : ext/dnet/dnet/fw.h => ext/dnet/fw.h
rename : ext/dnet/dnet/icmp.h => ext/dnet/icmp.h
rename : ext/dnet/dnet/intf.h => ext/dnet/intf.h
rename : ext/dnet/dnet/ip.h => ext/dnet/ip.h
rename : ext/dnet/dnet/ip6.h => ext/dnet/ip6.h
rename : ext/dnet/dnet/os.h => ext/dnet/os.h
rename : ext/dnet/dnet/rand.h => ext/dnet/rand.h
rename : ext/dnet/dnet/route.h => ext/dnet/route.h
rename : ext/dnet/dnet/tcp.h => ext/dnet/tcp.h
rename : ext/dnet/dnet/udp.h => ext/dnet/udp.h
2009-03-17 12:49:03 -07:00

33 lines
771 B
C

/*
* rand.h
*
* Pseudo-random number generation, based on OpenBSD arc4random().
*
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
* Copyright (c) 1996 David Mazieres <dm@lcs.mit.edu>
*
* $Id: rand.h,v 1.4 2002/04/07 19:01:25 dugsong Exp $
*/
#ifndef DNET_RAND_H
#define DNET_RAND_H
typedef struct rand_handle rand_t;
__BEGIN_DECLS
rand_t *rand_open(void);
int rand_get(rand_t *r, void *buf, size_t len);
int rand_set(rand_t *r, const void *seed, size_t len);
int rand_add(rand_t *r, const void *buf, size_t len);
uint8_t rand_uint8(rand_t *r);
uint16_t rand_uint16(rand_t *r);
uint32_t rand_uint32(rand_t *r);
int rand_shuffle(rand_t *r, void *base, size_t nmemb, size_t size);
rand_t *rand_close(rand_t *r);
__END_DECLS
#endif /* DNET_RAND_H */