Openwrt network parameters

Hello I am creating one agent on openwrt that requires real time network data for analysis. For that I need network parameters like wifi parameters, ethernet parameters, etc. How can I fetch those parameters?

What specific "parameters" do you need?

This heavily depends on the specific parameters in question. Network information (mainly statistics) can be acquired via sysfs (/sys/class/net/$ifname/), wireless information can be gathered via the nl80211 Kernel API (or by parsing iw output but that is not recommended). High level wireless information such as SSID, encryption status etc. is only available from hostapd, you need to query its control socket (/var/run/hostapd/$wlanifname) using wpa_cli or custom code.

You can find some examples for querying wireless data in the iwinfo library.

Like connection time of associated devices, channel utilization, etc.

@jow Thanks for the Reply