prng.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Very simple prng to allow for randomized tests with reproducable
  3. * results.
  4. *
  5. * Copyright (C) 2012 by Open Source Routing.
  6. * Copyright (C) 2012 by Internet Systems Consortium, Inc. ("ISC")
  7. *
  8. * This file is part of Quagga
  9. *
  10. * Quagga is free software; you can redistribute it and/or modify it
  11. * under the terms of the GNU General Public License as published by the
  12. * Free Software Foundation; either version 2, or (at your option) any
  13. * later version.
  14. *
  15. * Quagga is distributed in the hope that it will be useful, but
  16. * WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. * General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with Quagga; see the file COPYING. If not, write to the Free
  22. * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  23. * 02111-1307, USA.
  24. */
  25. #ifndef _PRNG_H
  26. #define _PRNG_H
  27. struct prng;
  28. struct prng* prng_new(unsigned long long seed);
  29. unsigned int prng_rand(struct prng*);
  30. void prng_free(struct prng *);
  31. #endif