OpenWrt Forum Archive

Topic: nvram and UCI based C applications

The content of this topic has been archived on 27 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,
I would like to write a C program to run into my AP which will have to read my configuration.
To do this on WhiteRussian was pretty simple, because bcmnvram.h contains all nvram functions I need.
What about Kamikaze? What is the most convenient way? Reading /etc/config files? Making a call system to the bash (e.g. uci show > /tmp/uci_show)? Or there are better ways?
Thanks

The most elegant way is to write a C API for UCI. There is already a API for shell scripts.

Thanks smile

The discussion might have continued from here.