I would like to be able to change the DNS addresses by console. Is there a definite function or any concrete example that demonstrates how to do it?
From your code, you can call ifconfig() with the parameters IFS_NAMESERVER_SET (to clear all name servers and set the first one) and IFS_NAMESERVER_ADD (to add additional name servers).
If you’re using the zconsole library, look at Samples/zconsole/userblock_tcpipconsole.c, it includes commands to change the DNS addresses:
{ "SET NAMESERVER", con_set_nameserver, help_set_txt },
{ "ADD NAMESERVER", con_add_nameserver, help_add_nameserver_txt },
Oh, wow. It’s easier than I thought, it worked perfectly for me. Thank you very much for the reply.