문제

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?

도움이 되었습니까?

해결책

You have to do it through ioctls: /usr/include/linux/sockios.h Welcome to Linux!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top