summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPatrick Mochel <mochel@osdl.org>2003-01-06 01:50:37 -0600
committerPatrick Mochel <mochel@osdl.org>2003-01-06 01:50:37 -0600
commit6ed6b9bf5b5d80581ebfcc3fa2738ee386b78cd1 (patch)
tree8519dd91154bf4dac9367c392a89fcb8840c1750 /include
parent426f67ebf9dab281a43bb5ff07c23713e7eefe95 (diff)
net devices: Get network devices to show up in sysfs.
- declare net_subsys, and register during net_dev_init(). - Add kobject to struct net_device. - initialize name and register in register_netdevice(). - remove in unregister_netdevice(). This allows one to see the registered network devices in the system via: # tree /sys/net/ /sys/net/ `-- eth0
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 513b89ca7836..888d520fd319 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -28,6 +28,7 @@
#include <linux/if.h>
#include <linux/if_ether.h>
#include <linux/if_packet.h>
+#include <linux/kobject.h>
#include <asm/atomic.h>
#include <asm/cache.h>
@@ -438,6 +439,9 @@ struct net_device
/* this will get initialized at each interface type init routine */
struct divert_blk *divert;
#endif /* CONFIG_NET_DIVERT */
+
+ /* generic object representation */
+ struct kobject kobj;
};