|
|
4d24b8 |
diff -up ./src/devices/network.cpp.orig ./src/devices/network.cpp
|
|
|
4d24b8 |
--- ./src/devices/network.cpp.orig 2013-10-29 08:26:59.000000000 +0100
|
|
|
4d24b8 |
+++ ./src/devices/network.cpp 2013-10-29 08:30:52.100379762 +0100
|
|
|
4d24b8 |
@@ -346,9 +346,29 @@ const char * network::device_name(void)
|
|
|
4d24b8 |
|
|
|
4d24b8 |
void netdev_callback(const char *d_name)
|
|
|
4d24b8 |
{
|
|
|
4d24b8 |
+ char devname[128];
|
|
|
4d24b8 |
+
|
|
|
4d24b8 |
std::string f_name("/sys/class/net/");
|
|
|
4d24b8 |
f_name.append(d_name);
|
|
|
4d24b8 |
|
|
|
4d24b8 |
+ sprintf(devname, "%s-up", d_name);
|
|
|
4d24b8 |
+ register_parameter(devname);
|
|
|
4d24b8 |
+
|
|
|
4d24b8 |
+ sprintf(devname, "%s-powerunsave", d_name);
|
|
|
4d24b8 |
+ register_parameter(devname);
|
|
|
4d24b8 |
+
|
|
|
4d24b8 |
+ sprintf(devname, "%s-link-100", d_name);
|
|
|
4d24b8 |
+ register_parameter(devname);
|
|
|
4d24b8 |
+
|
|
|
4d24b8 |
+ sprintf(devname, "%s-link-1000", d_name);
|
|
|
4d24b8 |
+ register_parameter(devname);
|
|
|
4d24b8 |
+
|
|
|
4d24b8 |
+ sprintf(devname, "%s-link-high", d_name);
|
|
|
4d24b8 |
+ register_parameter(devname);
|
|
|
4d24b8 |
+
|
|
|
4d24b8 |
+ sprintf(devname, "%s-packets", d_name);
|
|
|
4d24b8 |
+ register_parameter(devname);
|
|
|
4d24b8 |
+
|
|
|
4d24b8 |
network *bl = new(std::nothrow) class network(d_name, f_name.c_str());
|
|
|
4d24b8 |
if (bl) {
|
|
|
4d24b8 |
all_devices.push_back(bl);
|