Hi,

it exist the two functions network_get_subnet and network_get_subnet6 in 
/lib/functions/network.sh. They return the first ip or ip6 address of a given 
interface. In my case:

root@my-openwrt:~# . /lib/functions/network.sh; network_get_subnet subnet "lan"; echo 
$subnet; network_get_subnet6 subnet6 "lan"; echo $subnet6
192.168.107.1/24
fec0:0:0:eeee::1/64

Does exist the reverse function too? I would like to get the interface for an 
ip address, ether for the real address of the interface or for an ip address of 
the subnet.

Regards,
Hartmut

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to