Domanda

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?

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top