@@ -1765,6 +1765,10 @@ void sk_common_release(struct sock *sk);
/* Initialise core socket variables */
void sock_init_data(struct socket *sock, struct sock *sk);
+
+/* /sys/net */
+extern struct kobject *net_kobj;
+
/*
* Socket reference counting postulates.
*
@@ -141,6 +141,10 @@ static void sock_show_fdinfo(struct seq_file *m, struct file *f)
#define sock_show_fdinfo NULL
#endif
+/* /sys/net */
+struct kobject *net_kobj;
+EXPORT_SYMBOL_GPL(net_kobj);
+
/*
* Socket files have a set of 'special' operations as well as the generic file ones. These don't appear
* in the operation structures but are done directly via the socketcall() multiplexor.
@@ -3060,6 +3064,10 @@ static int __init sock_init(void)
goto out_mount;
}
+ net_kobj = kobject_create_and_add("net", NULL);
+ if (!net_kobj)
+ printk(KERN_WARNING "%s: kobj create error\n", __func__);
+
/* The real protocol initialization is performed in later initcalls.
*/