[ ubus | uci | netifd ] query net dev (if)name

Having read https://oldwiki.archive.openwrt.org/doc/uci/network

Determining Linux interface names
(uci -P/var/state get network.dev.ifname)

and then it gets confusing me

The uci state vars are deprecated and not used anymore for network related information
Use /lib/functions/network.sh:

Having looked into netifd and subsequent ubus via "/lib/functions/network.sh" there is however no


Thus reckoned that

__network_ifstatus() {
	local __tmp

	[ -z "$__NETWORK_CACHE" ] && \
		export __NETWORK_CACHE="$(ubus call network.interface dump)"

Would provide the ifname information. However,

__network_ifstatus wan; echo $ifname


__network_ifstatus wan; echo $name

comes up empty.

So, then how to correctly retrieve the ifname via lib/functions/network.sh if uci -P/var/state get network.dev.ifname is said being deprecated?