On Mon 16.04.18 16:33, Daniel Wagner wrote:
On 04/11/2018 04:00 PM, Christian Spielberger wrote:
>ACD needs random IPv4 addresses as fallback (IPv4LL address) and random delays
>between sent ARP probe and ARP announce packets. Hence, this patch moves
>ipv4ll_random_delay_ms() to a new file src/shared/random.[h|c] in order to
>be available generally.
>@@ -0,0 +1,30 @@
>+ * Random number generation library
>+ * based on IPv4 Local Link library with GLib integration,
>+ * Copyright (C) 2009-2010 Aldebaran Robotics. All rights reserved.
>+ * Copyright (C) 2018 Commend International. All rights reserved.
>+ * This program is free software; you can redistribute it and/or modify
>+ * it under the terms of the GNU General Public License version 2 as
>+ * published by the Free Software Foundation.
>+ * This program is distributed in the hope that it will be useful,
>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
>+ * GNU General Public License for more details.
>+int get_random(uint64_t *val);
>+unsigned int random_delay_ms(unsigned int secs);
Prefix these function with 'random_':
Maybe someone has a better idea for 'random_get()'. I'd to have all the
shared code file properly prefixed to avoid clashes.
Ok. What about random_number(uint64_t *val) ?