diff options
Diffstat (limited to 'usr.sbin/hostapd/hostapd.c')
-rw-r--r-- | usr.sbin/hostapd/hostapd.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/usr.sbin/hostapd/hostapd.c b/usr.sbin/hostapd/hostapd.c index e7dabf43f51..0e9d74857b1 100644 --- a/usr.sbin/hostapd/hostapd.c +++ b/usr.sbin/hostapd/hostapd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hostapd.c,v 1.11 2005/06/17 19:13:35 reyk Exp $ */ +/* $OpenBSD: hostapd.c,v 1.12 2005/07/04 16:48:55 reyk Exp $ */ /* * Copyright (c) 2004, 2005 Reyk Floeter <reyk@vantronix.net> @@ -494,6 +494,20 @@ main(int argc, char *argv[]) return (EXIT_SUCCESS); } +void +hostapd_randval(u_int8_t *buf, const u_int len) +{ + u_int32_t data = 0; + u_int i; + + for (i = 0; i < len; i++) { + if ((i % sizeof(data)) == 0) + data = arc4random(); + buf[i] = data & 0xff; + data >>= 8; + } +} + struct hostapd_table * hostapd_table_add(struct hostapd_config *cfg, const char *name) { |