]> git.hungrycats.org Git - linux/commitdiff
o linux/net.h: bye bye struct net_proto
authorArnaldo Carvalho de Melo <acme@conectiva.com.br>
Thu, 3 Apr 2003 08:08:27 +0000 (05:08 -0300)
committerArnaldo Carvalho de Melo <acme@conectiva.com.br>
Thu, 3 Apr 2003 08:08:27 +0000 (05:08 -0300)
struct net_proto is not anymore needed, as the protocols
have their init functions marked as __init, not needing
explicit calling.

include/linux/atm.h
include/linux/if_pppox.h
include/linux/inet.h
include/linux/net.h
include/net/af_unix.h
net/atm/common.c
net/atm/pvc.c
net/atm/svc.c
net/ipv4/af_inet.c
net/unix/af_unix.c

index b5d4c29ba6c40be41a504b28d5119835e2024931..0380156f9c86e780b641a8ebae96363ef4069447 100644 (file)
@@ -236,15 +236,4 @@ struct atmif_sioc {
 };
 
 typedef unsigned short atm_backend_t;
-
-#ifdef __KERNEL__
-
-#include <linux/net.h> /* struct net_proto */
-
-
-void atmpvc_proto_init(struct net_proto *pro);
-void atmsvc_proto_init(struct net_proto *pro);
-
-#endif /* __KERNEL__ */
-
 #endif
index a4633c570266ad63f83c9b55285ca6a63b88217d..948826892b8242c1fecbbb7fdafb79bd3858ee9c 100644 (file)
@@ -158,8 +158,6 @@ enum {
 
 extern struct ppp_channel_ops pppoe_chan_ops;
 
-extern int pppox_proto_init(struct net_proto *np);
-
 #endif /* __KERNEL__ */
 
 #endif /* !(__LINUX_IF_PPPOX_H) */
index ffbfe45a365d35d2c307a1187866d6b8b9575372..af4fa41bd632f1868093480158df5d616f2dee49 100644 (file)
 #define _LINUX_INET_H
 
 #ifdef __KERNEL__
-
-#include <linux/net.h>
-
-extern void            inet_proto_init(struct net_proto *pro);
-extern __u32           in_aton(const char *str);
-
+extern __u32 in_aton(const char *str);
 #endif
 #endif /* _LINUX_INET_H */
index a670cf44fa9fd2565a881f40b6f2974fa2bd76c5..55083c9382982c58c6d2e59f943818b28874816e 100644 (file)
@@ -136,16 +136,6 @@ struct net_proto_family {
        short   encrypt_net;
 };
 
-/**
- *  struct socket - network interface with the file system
- *  @name - Protocol name
- *  @init_func - Bootstrap
- */
-struct net_proto {
-       const char *name;
-       void      (*init_func)(struct net_proto *pro);
-};
-
 extern int          sock_wake_async(struct socket *sk, int how, int band);
 extern int          sock_register(struct net_proto_family *fam);
 extern int          sock_unregister(int family);
index d526b746b4b924b46ab6d234e0e2ec972e48ef45..db82099b2b1778b1472fadd8710fc4e753c05d7f 100644 (file)
@@ -1,6 +1,5 @@
 #ifndef __LINUX_NET_AFUNIX_H
 #define __LINUX_NET_AFUNIX_H
-extern void unix_proto_init(struct net_proto *pro);
 extern void unix_inflight(struct file *fp);
 extern void unix_notinflight(struct file *fp);
 typedef struct sock unix_socket;
index 913ae4749588e244aae1c61d45c8f0fe6c64d8a4..addb78f2bc28a00228b6a35e271c5ba4804571c6 100644 (file)
@@ -6,8 +6,7 @@
 #include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kmod.h>
-#include <linux/net.h>         /* struct socket, struct net_proto, struct
-                                  proto_ops */
+#include <linux/net.h>         /* struct socket, struct proto_ops */
 #include <linux/atm.h>         /* ATM stuff */
 #include <linux/atmdev.h>
 #include <linux/atmclip.h>     /* CLIP_*ENCAP */
index fd2a99bba4f6288baae9d81481b11736dc17db7e..cbac7fddf9524452870990b61ab982db4d1e3cf1 100644 (file)
@@ -4,8 +4,7 @@
 
 
 #include <linux/config.h>
-#include <linux/net.h>         /* struct socket, struct net_proto,
-                                  struct proto_ops */
+#include <linux/net.h>         /* struct socket, struct proto_ops */
 #include <linux/atm.h>         /* ATM stuff */
 #include <linux/atmdev.h>      /* ATM devices */
 #include <linux/atmclip.h>     /* Classical IP over ATM */
@@ -111,8 +110,8 @@ static int pvc_create(struct socket *sock,int protocol)
 
 
 static struct net_proto_family pvc_family_ops = {
-       .family =PF_ATMPVC,
-       .create =pvc_create,
+       .family = PF_ATMPVC,
+       .create = pvc_create,
 };
 
 
index fb9fc7d95397265c1eb01543ba6be341555c92e1..6201170b53973efea1a25177b8f75344d1361082 100644 (file)
@@ -4,8 +4,7 @@
 
 
 #include <linux/string.h>
-#include <linux/net.h>         /* struct socket, struct net_proto,
-                                  struct proto_ops */
+#include <linux/net.h>         /* struct socket, struct proto_ops */
 #include <linux/errno.h>       /* error codes */
 #include <linux/kernel.h>      /* printk */
 #include <linux/skbuff.h>
@@ -430,8 +429,8 @@ static int svc_create(struct socket *sock,int protocol)
 
 
 static struct net_proto_family svc_family_ops = {
-       .family =PF_ATMSVC,
-       .create =svc_create,
+       .family = PF_ATMSVC,
+       .create = svc_create,
 };
 
 
index 2555a4e02dec5a3a53e5d0a737593348ad886c24..2082abcdc2d3f869b3a71cf7a4c3ca3f9597ed60 100644 (file)
@@ -1122,7 +1122,7 @@ static int __init inet_init(void)
        printk(KERN_INFO "NET4: Linux TCP/IP 1.0 for NET4.0\n");
 
        if (sizeof(struct inet_skb_parm) > sizeof(dummy_skb->cb)) {
-               printk(KERN_CRIT "inet_proto_init: panic\n");
+               printk(KERN_CRIT "%s: panic\n", __FUNCTION__);
                return -EINVAL;
        }
 
index 1cc95eb5a702ca35eea09489b7136378ce5fe817..45a143c520daabdc7f78508d39cefe9c0073c9d7 100644 (file)
@@ -1945,9 +1945,8 @@ static int __init af_unix_init(void)
        struct sk_buff *dummy_skb;
 
        printk(banner);
-       if (sizeof(struct unix_skb_parms) > sizeof(dummy_skb->cb))
-       {
-               printk(KERN_CRIT "unix_proto_init: panic\n");
+       if (sizeof(struct unix_skb_parms) > sizeof(dummy_skb->cb)) {
+               printk(KERN_CRIT "%s: panic\n", __FUNCTION__);
                return -1;
        }
         /* allocate our sock slab cache */