diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2006-10-17 03:09:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-17 11:18:43 -0400 |
commit | aaa248f6c9c81b2683db7dbb0689cd5ed1c86d88 (patch) | |
tree | 106d9ce5ebac4175b0fb97ff80a92e399fcf2a33 /include/linux | |
parent | 0187f879ee8d4b914e74ffa3cc5df268311fc2d2 (diff) |
[PATCH] rename net_random to random32
Make net_random() more widely available by calling it random32
akpm: hopefully this will permit the removal of carta_random32. That needs
confirmation from Stephane - this code looks somewhat more computationally
expensive, and has a different (ie: callee-stateful) interface.
[akpm@osdl.org: lots of build fixes, cleanups]
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Stephane Eranian <eranian@hpl.hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/net.h | 7 | ||||
-rw-r--r-- | include/linux/random.h | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/net.h b/include/linux/net.h index c257f716e00f..15c733b816f0 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #define _LINUX_NET_H | 19 | #define _LINUX_NET_H |
20 | 20 | ||
21 | #include <linux/wait.h> | 21 | #include <linux/wait.h> |
22 | #include <linux/random.h> | ||
22 | #include <asm/socket.h> | 23 | #include <asm/socket.h> |
23 | 24 | ||
24 | struct poll_table_struct; | 25 | struct poll_table_struct; |
@@ -193,9 +194,9 @@ extern int sock_map_fd(struct socket *sock); | |||
193 | extern struct socket *sockfd_lookup(int fd, int *err); | 194 | extern struct socket *sockfd_lookup(int fd, int *err); |
194 | #define sockfd_put(sock) fput(sock->file) | 195 | #define sockfd_put(sock) fput(sock->file) |
195 | extern int net_ratelimit(void); | 196 | extern int net_ratelimit(void); |
196 | extern unsigned long net_random(void); | 197 | |
197 | extern void net_srandom(unsigned long); | 198 | #define net_random() random32() |
198 | extern void net_random_init(void); | 199 | #define net_srandom(seed) srandom32(seed) |
199 | 200 | ||
200 | extern int kernel_sendmsg(struct socket *sock, struct msghdr *msg, | 201 | extern int kernel_sendmsg(struct socket *sock, struct msghdr *msg, |
201 | struct kvec *vec, size_t num, size_t len); | 202 | struct kvec *vec, size_t num, size_t len); |
diff --git a/include/linux/random.h b/include/linux/random.h index 5d6456bcdeba..0248b30e306d 100644 --- a/include/linux/random.h +++ b/include/linux/random.h | |||
@@ -69,6 +69,9 @@ extern struct file_operations random_fops, urandom_fops; | |||
69 | unsigned int get_random_int(void); | 69 | unsigned int get_random_int(void); |
70 | unsigned long randomize_range(unsigned long start, unsigned long end, unsigned long len); | 70 | unsigned long randomize_range(unsigned long start, unsigned long end, unsigned long len); |
71 | 71 | ||
72 | u32 random32(void); | ||
73 | void srandom32(u32 seed); | ||
74 | |||
72 | #endif /* __KERNEL___ */ | 75 | #endif /* __KERNEL___ */ |
73 | 76 | ||
74 | #endif /* _LINUX_RANDOM_H */ | 77 | #endif /* _LINUX_RANDOM_H */ |