From 6ed6b9bf5b5d80581ebfcc3fa2738ee386b78cd1 Mon Sep 17 00:00:00 2001 From: Patrick Mochel Date: Mon, 6 Jan 2003 01:50:37 -0600 Subject: 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 --- include/linux/netdevice.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/linux/netdevice.h') 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 #include #include +#include #include #include @@ -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; }; -- cgit v1.2.3