mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
ubus call added to fetch igmp stats, format is,
ubus call mcast stats
Sample output:
root@iopsys:~# ubus call mcast stats
{
"snooping": [
{
"interface": "br-lan",
"groups": [
{
"group_address": "225.10.10.20",
"associated_devices": [
{
"host_address": "192.168.1.152",
"source_interface": "eth1",
"timeout": "258"
}
]
},
{
"group_address": "225.10.10.2",
"associated_devices": [
{
"host_address": "192.168.1.146",
"source_interface": "eth0",
"timeout": "259"
}
]
}
]
}
]
}
18 lines
206 B
Bash
Executable file
18 lines
206 B
Bash
Executable file
#!/bin/sh
|
|
|
|
. /usr/share/libubox/jshn.sh
|
|
. /lib/functions.sh
|
|
include /lib/mcast
|
|
|
|
case "$1" in
|
|
list)
|
|
echo '{ "stats":{} }'
|
|
;;
|
|
call)
|
|
case "$2" in
|
|
stats)
|
|
read_mcast_stats
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|