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???