0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-25 03:01:55 +00:00
bird/sysdep/unix/random.c
2000-06-05 11:46:40 +00:00

22 lines
382 B
C

/*
* BIRD Internet Routing Daemon -- Random Numbers
*
* (c) 2000 Martin Mares <mj@ucw.cz>
*
* Can be freely distributed and used under the terms of the GNU GPL.
*/
#include <stdlib.h>
#include "nest/bird.h"
u32
random_u32(void)
{
long int rand_low, rand_high;
rand_low = random();
rand_high = random();
return (rand_low & 0xffff) | ((rand_high & 0xffff) << 16);
}