First off, why have you started a new thread for the same question?
Second, why have you ignored all the responses given to you in that thread?
Third, why are you trying to make life so hard for yourself? Just do system("ifconfig ..."). Do you have an overwhelmingly important reason for avoiding executing ifconfig? Like you need to set millions of IP addresses
in a couple of seconds???
Dave. | [reply] |
Ifconfig does not use /proc or something like that. It access the interface using ioctl and some other C libraries (direct access).
Why you do not use ifconfig ? Btw, to change the gateway you need access to the routing table.. Why do not use the available tools for that? Like "ifconfig", "route", etc ?
-DBC
| [reply] |