mv643xx_eth: Fix MV643XX_ETH offsets used by Pegasos 2
[safe/jmp/linux-2.6] / include / linux / net.h
index c257f71..dd79cdb 100644 (file)
@@ -23,8 +23,9 @@
 
 struct poll_table_struct;
 struct inode;
+struct net;
 
-#define NPROTO         32              /* should be enough for now..   */
+#define NPROTO         34              /* should be enough for now..   */
 
 #define SYS_SOCKET     1               /* sys_socket(2)                */
 #define SYS_BIND       2               /* sys_bind(2)                  */
@@ -56,6 +57,7 @@ typedef enum {
 
 #ifdef __KERNEL__
 #include <linux/stringify.h>
+#include <linux/random.h>
 
 #define SOCK_ASYNC_NOSPACE     0
 #define SOCK_ASYNC_WAITDATA    1
@@ -168,7 +170,7 @@ struct proto_ops {
 
 struct net_proto_family {
        int             family;
-       int             (*create)(struct socket *sock, int protocol);
+       int             (*create)(struct net *net, struct socket *sock, int protocol);
        struct module   *owner;
 };
 
@@ -193,9 +195,9 @@ extern int       sock_map_fd(struct socket *sock);
 extern struct socket *sockfd_lookup(int fd, int *err);
 #define                     sockfd_put(sock) fput(sock->file)
 extern int          net_ratelimit(void);
-extern unsigned long net_random(void);
-extern void         net_srandom(unsigned long);
-extern void         net_random_init(void);
+
+#define net_random()           random32()
+#define net_srandom(seed)      srandom32((__force u32)seed)
 
 extern int          kernel_sendmsg(struct socket *sock, struct msghdr *msg,
                                    struct kvec *vec, size_t num, size_t len);
@@ -311,6 +313,10 @@ static const struct proto_ops name##_ops = {                       \
 #define MODULE_ALIAS_NET_PF_PROTO(pf, proto) \
        MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto))
 
+#define MODULE_ALIAS_NET_PF_PROTO_TYPE(pf, proto, type) \
+       MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto) \
+                    "-type-" __stringify(type))
+
 #ifdef CONFIG_SYSCTL
 #include <linux/sysctl.h>
 extern ctl_table net_table[];