2023-02-08 13:17:09 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2013-07-05 17:35:37 +02:00
|
|
|
/*
|
|
|
|
* Very simple prng to allow for randomized tests with reproducable
|
|
|
|
* results.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2012 by Open Source Routing.
|
|
|
|
* Copyright (C) 2012 by Internet Systems Consortium, Inc. ("ISC")
|
|
|
|
*
|
|
|
|
* This file is part of Quagga
|
|
|
|
*/
|
|
|
|
#ifndef _PRNG_H
|
|
|
|
#define _PRNG_H
|
|
|
|
|
|
|
|
struct prng;
|
|
|
|
|
|
|
|
struct prng *prng_new(unsigned long long seed);
|
2017-07-12 18:44:44 +02:00
|
|
|
int prng_rand(struct prng *);
|
2013-09-30 14:27:50 +02:00
|
|
|
const char *prng_fuzz(struct prng *, const char *string, const char *charset,
|
|
|
|
unsigned int operations);
|
2013-07-05 17:35:37 +02:00
|
|
|
void prng_free(struct prng *);
|
|
|
|
|
|
|
|
#endif
|