You have to do it through ioctls: /usr/include/linux/sockios.h Welcome to Linux!
Enable interface / set IP from C++ (with Qt) and Linux [closed]
سؤال
I need to bring an interface up/down from C++ running on Linux, and set the IP/netmask (And I use Qt in case that helps).
I need to create the equivalent capability of the ifconfig command from within c++. Is there an interface/library available to help me do this?
المحلول
لا تنتمي إلى StackOverflow