1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00
Files
nmap/libdnet-stripped/include/dnet/rand.h
dmiller 210d6c0847 Upgrade libdnet to 1.18.0, plus Nmap's changes
Nmap's changes have been moved from the NMAP_MODIFICATIONS file to the
Github repo at https://github.com/nmap/libdnet

The NMAP_MODIFICATIONS file instead will document only the changes made
to strip unused parts of the libdnet source prior to inclusion in Nmap.
2025-03-31 19:30:47 +00:00

34 lines
724 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$
*/
#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 */