diff options
author | Florian Eckert <fe@dev.tdt.de> | 2021-12-09 16:18:19 +0100 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2021-12-25 20:27:44 +0100 |
commit | 7ccbf08570619a4d3eccf6401791075908bb1d78 (patch) | |
tree | ae47a9c61313aca2bc25500044a0dbd3204bcfd3 /system.h | |
parent | 5ca5e0b4d058a47d72ba4102acdcec826e203c41 (diff) | |
download | netifd-7ccbf08570619a4d3eccf6401791075908bb1d78.tar.gz |
netifd: add devtype to ubus call
Every network device has a type. There is no standard interface here.
The type can be determined either from the file
'/sys/class/net/<device>/uevent' or, if no information is found
there, from the file '/sys/class/net/<device>/type'.
This new function first checks whether there is a DEVTYPE=<type> sring in
the 'uevent' file and uses it. If it does not find this information,
the 'type' is used as a fallback and mapped the number to a character
sequence.
This new 'devtype' information can be found in the network.device ubus
call.
Command:
ubus call network.device status
Output:
{
"eth0": {
"devtype": "ethernet",
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'system.h')
0 files changed, 0 insertions, 0 deletions