There are tons of examples in the Internet about how to set a Static IP address to a network interface under Linux using C language.
One of the most popular is How to set the IP address from C in linux
I have a task to switch a local network interface back to dyamic IP allocation from DHCP server progframmatically using C language under Linux. But could not find anything in the Internet.
Is there any way to achieve this using similar “smart” programming way as most prorammers do for setting Static IP, I mean by calling ioctl() function, or some other kernel functions?