o linux/net.h: bye bye struct net_proto

struct net_proto is not anymore needed, as the protocols
have their init functions marked as __init, not needing
explicit calling.
parent fb99146a
......@@ -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
......@@ -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) */
......@@ -43,11 +43,6 @@
#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 */
......@@ -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);
......
#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;
......
......@@ -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 */
......
......@@ -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,
};
......
......@@ -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,
};
......
......@@ -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;
}
......
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment